User manual

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