6-40
Remote Programming
' Look for device named "LIA". Use IBCONF to configure the device "LIA" as above.
' Assign the device handle to variable LIA%.
BDNAME$ = "LIA"
CALL IBFIND(BDNAME$, LIA%)
' Check for error on IBFIND call.
IF LIA% < 0 THEN CALL FINDERR
' Reset the device.
WRT$ = "*RST"
CALL TXLIA(LIA%, WRT$)
CALL IBCLR(LIA%)
PRINT "The SR850 is reset. Now initialize the scan"
PRINT "Press <Enter> to continue."
INPUT a
' Set the SR850 to output responses to the GPIB port
WRT$="OUTX1"
CALL TXLIA(LIA%, WRT$)
' Set Internal sweep from 10 to 100 Hz
WRT$ = "FMOD1;SLLM10.;SULM100."
CALL TXLIA(LIA%, WRT$)
' Turn line notch filter on
WRT$ = "ILIN1"
CALL TXLIA(LIA%, WRT$)
' Set sample rate to 64 Hz, stop at end, 100 second scan length
WRT$ = "SRAT10;SEND0;SLEN100"
CALL TXLIA(LIA%, WRT$)
' Set single screen, chart, display R
WRT$ = "SMOD0;DTYP0,3;DTRC0,3"
CALL TXLIA(LIA%, WRT$)
' Set scale to 0 to 1 V, 10 sec per division
WRT$ = "DSCL0,.5;DOFF0,.5;DHZS0,11"
CALL TXLIA(LIA%, WRT$)
PRINT "The scan is ready. Now acquire data."
PRINT "Press <Enter> to continue."
INPUT a
DIM RXBUF%(13000)
' Turn off GPIB timeout or set the timeout longer than the scan. The timeout measures the time to transfer
the full number of bytes, not the time since the most recent byte is received.
CALL IBTMO(LIA%, 16)
' Turn FAST mode data transfer ON, then start scan using the STRD start after delay command.
' The STRD command must be used if the the scan is to be started by this program!
' Do NOT use STRT.