To write programs that open
\system\program
1
Using NFS, mount the logic analyzer’s file system as the control user.
Refer to the chapter "Accessing the Logic Analyzer File System."
2
From within your controlling program, open the logic analyzer file
{NFS mount path}\system\program
and send text strings to
the file using "write" or "output" commands.
In C, you can use the
write
or
putstr
functions to write text strings to the
\system\program
file.
Your operating system may buffer the commands before sending them to the
logic analyzer. To prevent this, you may need to empty the buffer after each
command. In C, you can use the
flush
function to empty the buffer.
Queries
Responses to queries appear as text strings in the
\system\program
file.
To retrieve information from queries, create a text buffer, open the
\system\program
file and read the contents of the file into the buffer. In
C, you can use
read
or
getstr
to read the contents of the file into the
buffer.
Whenever you send queries to the logic analyzer, you need to pause your
program for a short time to allow the system to process the query before you
attempt to read the response. A time equal to or slightly greater than the file
timeout is sufficient.
Resetting the File Pointer
Whenever you change from reading the
\system\program
file to writing
the
\system\program
file, or from writing to reading, you need to reset
the file pointer to the beginning of the file. In C, you can use the
rewind
function to reset the pointer, or you can close the
program
file, then
immediately re-open it.
Programming the Logic Analyzer
To write programs that open
\system\program
5-9
Summary of Contents for 1660 CS Series
Page 7: ...1 Connecting and Configuring...
Page 16: ...1 10...
Page 17: ...2 Accessing the Logic Analyzer File System...
Page 25: ...3 Using the X Window Interface...
Page 37: ...4 Retrieving and Restoring Data...
Page 50: ...4 14...
Page 51: ...5 Programming the Logic Analyzer...
Page 64: ...5 14...
Page 65: ...6 Concepts...
Page 72: ...6 8...
Page 73: ...7 Troubleshooting...
Page 104: ...Index Index 4...