
10-20
Remote Operations
Model 2520 User’s Manual
Error messages
See
Programming example
The following QuickBasic 4.5 programming example will control the Model 2520 via the
RS-232 COM2 port. Place the Model 2520 into the RS-232 mode from the front panel
main menu (press COMM then select RS-232). When the communication setting is
changed, the Model 2520 will reset into that mode.
RD$ = SPACE$ (1500)
' Set string space.
CLS
' Clear screen.
PRINT “Set COM2 baud rate to 9600”
PRINT “Set no flow control, and CR as terminator.”
' Configure serial port parameters.
' The following values are the default settings for the Model 2520:
ComOpen$ = “COM2: 9600,N,8,1,ASC,CD0,CS0,DS0,LF,OP0,RS,TB8192,RB8192”
OPEN ComOpen$ FOR RANDOM AS #1
' Model 2520 setup commands:
PRINT #1,“*RST”
' Reset instrument to default parame-
ters.
PRINT #1,“:SENS1:VOLT:RANG 3”
' Set 3V measure range.
PRINT #1,“:SOUR1:CURR 0.1”
' Set laser source to output 100mA.
PRINT #1,“:FORM:ELEM VOLT1”
' Set to output voltage readings to
PC.
' Initiate a reading and print results:
PRINT #1,“:READ?”
' Trigger and acquire one reading.
LINE INPUT #1, RD$
RD$ = “Voltage: “ + RD$
PRINT RD$
' Clean up and quit:
finish:
CLOSE #1
' Close file.
CLEAR
' Interface clear.
END
Содержание 2520
Страница 250: ...A Specifications ...
Страница 254: ...B StatusandErrorMessages ...
Страница 262: ...C DataFlow ...
Страница 266: ...D IEEE 488BusOverview ...
Страница 281: ...E IEEE 488andSCPI ConformanceInformation ...
Страница 285: ...F MeasurementConsiderations ...
Страница 308: ...G GPIB488 1Protocol ...
Страница 312: ...H ExamplePrograms ...
Страница 317: ...I ContinuousPulseMode ...