Controller Programs
G-8
BUS.INIT
SEND.INTERFACE.CLEAR
REMOTE.ENABLE.ON
SYNCHRONOUS.GPIB
?GPIB.DEVICES
16 GPIB.DEVICE 2001
EOI.ON
EOS.ON
10 EOS.CHARACTER
1000 TIMEOUT
?GPIB.DEVICE
100 STRING COMMAND
1000 STRING RESPONSE
: GET.OUTPUT
RESPONSE GPIB.READ
CR RESPONSE “TYPE
;
: GET.INPUT
CR .” Enter command string: “
“INPUT COMMAND “:=
“?” COMMAND “WITHIN
IF 2001
COMMAND GPIB.WRITE
GET.OUTPUT
ELSE 2001
COMMAND GPIB.WRITE
THEN
;
: MAIN
BEGIN
ME
GET.INPUT
AGAIN
;
\ Initialize bus
\ Take control of bus
\ Allow remote operation
\ Make sure ASYST is in sync. mode
\ List controller parameters
\ Set 2001 address and name
\ Enable end or identify
\ Enable end of string terminator
\ Use LF terminator
\ Set timeout for 1sec
\ List 2001 parameters
\ Allocate 100 bytes for user input
\ Allocate 1000 bytes for 2001 response
\ Definition for 2001 output
\ Get response
\ Display response
\ Definition for user input
\ Prompt user
\ Get commands
\ Test for query
\ If query, make 2001 current device
\ Send commands to 2001
\ Get response from 2001
\ If not query, make 2001 current device
\ Send commands to 2001
\ Definition for main program
\ Start loop
\ Make controller current device
\ Get commands from user
\ Return for more commands
\ <Control-Break> to exit