Example Programs
G-10
Program (astream.bas) (cont.)
cmd$ = ":sens:volt:dc:aver:stat off; adv:stat off; :init:cont on"
' Turn Filters off
GOSUB sendcmd
cmd$ = ":syst:amet astr"
' Set for ASCII stream
GOSUB sendcmd
SLEEP 1
' 1 second delay for setup
CLS
' Clear Screan
PRINT "Test in Progress....."
r$ = SPACE$(16)
' Alocate string space
t1 = TIMER
' Get starting time
FOR x = 1 TO 1000
' Take 1000 readings
CALL enter(r$, length%, 16, status%)
rdg!(x) = VAL(r$)
' Get Readings
NEXT x
t2 = TIMER
' Get ending time
PRINT "Starting Time = "; t1
' Print starting time
PRINT "Ending Time = "; t2
' Print ending time
PRINT "Elapsed Time = "; t2 - t1
' Print elapsed time
PRINT "Readings Per Second = "; 1 / ((t2 - t1) / 1000)
' Print reading rate
CALL transmit("listen 16 sdc", status%)
' Send device clear to 2002
SLEEP 1
' 1 second delay
INPUT zz$
FOR x = 1 TO 1000
PRINT rdg!(x)
' Display reading
IF rdg!(x) > 30 THEN BEEP: BEEP: BEEP
NEXT x
END
' End test
sendcmd:
CALL send(16, cmd$, status%)
' Send commands
IF status% <> 0 THEN
' check send status
PRINT status%
STOP
' Stop on errors
END IF
RETURN
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: ......