To Write Programs That Open \System\Program - HP 16500L Installation And Service Manual

Interface module
Table of Contents

Advertisement

To write programs that open \system\program

Using NFS, mount the HP 16500B's file system as the control user.
1
Refer to the "Accessing the HP 16500B File System" chapter.
From within your controlling C or BASIC program, open the file
2
\system\program and send text strings to the file using "write" or
"output" commands.
In C-language, 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
HP 16500B. To prevent this, you may need to empty the buffer after each
command. In C-language, 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-language, you can use the read or getstr functions to read the contents
of the file into the buffer.
Whenever you send queries to the HP 16500B, 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-language, you can use the
rewind function to reset the pointer, or you can close the program file,
then immediately re-open it.
Programming the HP 16500B
To write programs that open \system\program
5-9

Advertisement

Table of Contents
loading

Table of Contents