Example Programs
G-20
Program (bufclint.bas) (cont.)
cmd$ = ":trac:feed:cont next; *OPC"
GOSUB send2002
' Select Next buffer control mode
' Set OPC upon completion of commands
cmd$ = ":rout:scan:lsel ext"
GOSUB send2002
' Select external scan mode
'trigger equipment
cmd$ = ":init"
GOSUB send7001
' Take 7001 out of idle
cmd$ = ":init"
GOSUB send2002
' Take 2002 out of idle
'
' Start filling....
'
t1 = TIMER
' Wait for buffer to fill...
'
DO
DO
LOOP UNTIL srq%
CALL spoll(DmmAddr%, poll%, status%)
LOOP UNTIL (poll% AND 64)
' Loop until buffer fills
cmd$ = ":stat:meas:even?"
GOSUB send2002
CALL enter(Sme$, length%, 16, status%)
'
' Go get buffer contents.
'
cmd$ = "trac:data?"
GOSUB send2002
' Read all readings in buffer
DIM Readings!(1 TO 350), dummy!(1 TO 1)
' Setup CEC for LISTEN & 2002 for TALK
CALL transmit("UNT UNL MLA TALK 16", status%)
' Read 2 bytes (#0)
r$ = SPACE$(2)
CALL receive(r$, l%, status%)
NumDataPoints% = 35
' Get Data in 4 blocks since CEC can only handle up to 64kB
' per data transfer.
NumBytes% = NumDataPoints% * 4
CALL rarray(Readings!(1), NumBytes%, l%, status%)
' get Terminator Character(s)
CALL settimeout(100)
CALL rarray(dummy!(1), 1, l%, status%)
CALL settimeout(10000)
CALL transmit("UNT UNL", status%)
' UNTalk and UNListen all devices
t2 = TIMER
t3 = t2 - t1
FOR i = 1 TO 35
PRINT "Rdg("; i; ") = "; Readings!(i)
' Display reading
NEXT i
PRINT
PRINT "Total time = "; t3
' Display total processing time
' for all readings
PRINT
t4 = t3 / 35
PRINT "Seconds per channel = "; t4
' Display the average time for each
' reading
END
Summary of Contents for 2002
Page 123: ...Front Panel Operation 2 106...
Page 145: ...IEEE 488 Reference 3 22...
Page 167: ...IEEE 488 Reference 3 44...
Page 284: ...A Specifications A 1...
Page 362: ......
Page 364: ...This page left blank intentionally...
Page 365: ......