
About program fragments
Program fragments are used to demonstrate proper programming syntax. As the name im-
plies, only a fragment of the whole program is used to avoid redundancy.
At the beginning of each program, driver files have to be opened. The input terminator should
be set for CRLF. For example:
OPEN "ieee" FOR OUTPUT AS #1
OPEN "ieee" FOR INPUT AS #2
PRINT #1, "interm crlf"
A typical program fragment includes an OUTPUT command and an ENTER command. The
OUTPUT command sends a program message (command string) to the Model 2000 multimeter.
If the program message includes a query command, then the ENTER command is required to
get the response message from the Model 2000 multimeter. The ENTER command addresses
the Model 2000 multimeter to talk. The following example program fragment demonstrates how
OUTPUT and ENTER commands are used. Note that the commands assume address 16, which
is the factory-set address of the Model 2000 multimeter.
PRINT #1, "output 16; :func 'volt:ac'; func?"
PRINT #1, "enter 16"
If you wish to display the response message on the CRT, the computer will have to read the
message and then “print” it to the CRT display as follows:
LINE INPUT #2, A$
PRINT A$
The following programming example shows how all the above statements are used together.
The program fragment is shown in bold typeface.
OPEN "ieee" FOR OUTPUT AS #1
'Open driver
OPEN "ieee" FOR INPUT AS #2
'Open driver
PRINT #1, "interm crlf"
'CRLF terminator
PRINT #1, "output 16;:func 'volt:ac'; func?"
'Select ACV and query
PRINT #1, "enter 16"
'Get response message
LINE INPUT #2, A$
'Read response message
PRINT A$
'Display message
Remote Operation
4-13
Содержание 2000
Страница 1: ...Model 2000Multimeter User s Manual A G R E A T E R M E A S U R E O F C O N F I D E N C E...
Страница 13: ...1 General Information...
Страница 19: ...2 Basic Measurements...
Страница 54: ...2 36 Basic Measurements...
Страница 55: ...3 Measurement Options...
Страница 87: ...4 Remote Operation...
Страница 139: ...5 SCPI CommandReference...
Страница 215: ...A Specifications...
Страница 226: ...A 12 Specifications...
Страница 227: ...B Statusand ErrorMessages...
Страница 233: ...C Example Programs...
Страница 246: ...C 14 Example Programs...
Страница 247: ...D Models196 199and 8840A 8842ACommands...
Страница 255: ...E IEEE 488 BusOverview...
Страница 271: ...F IEEE 488andSCPI ConformanceInformation...