13-20
Remote Operations
Programming example
The following QuickBasic 4.5 programming example will control the SourceMeter via the
RS-232 COM2 port. Place the SourceMeter into the RS-232 mode from the front panel main
menu (press MENU, select COMMUNICATION, select RS-232). When the communication
setting is changed, the SourceMeter will reset into that mode.
RD$ = SPACE$ (1500)
‘
Set string space.
CLS
‘
Clear screen.
“
Set COM2 baud rate to 9600
”
“
Set no flow control, and CR as terminator.
”
‘
Configure serial port parameters.
‘
The following values are the default settings for the SourceMeter:
ComOpen$ =
“
COM2: 9600,N,8,1,ASC,CD0,CS0,DS0,LF,OP0,RS,TB8192,RB8192
”
OPEN ComOpen$ FOR RANDOM AS #1
‘
SourceMeter setup commands:
PRINT #1,
“
*RST
”
‘
Reset instrument to default parameters.
PRINT #1,
“
:SENS:FUNC
‘
RES
’
“
‘
Select ohms measurement function.
PRINT #1,
“
:SENS:RES:NPLC 1
”
‘
Set measurement speed to 1 PLC.
PRINT #1,
“
:SENS:RES:MODE MAN
”
‘
Select manual ohms mode.
PRINT #1,
“
:SOUR:FUNC CURR
”
‘
Select current source function.
PRINT #1,
“
:SOUR:CURR 0.01
”
‘
Set source to output 10mA.
PRINT #1,
“
:SOUR:CLE:AUTO ON
”
‘
Enable source auto output-off.
PRINT #1,
“
:SENS:VOLT:PROT 10
”
‘
Set 10V compliance limit.
PRINT #1,
“
:TRIG:COUN 1
”
‘
Set to perform one measurement.
PRINT #1,
“
:FORM:ELEM RES
”
‘
Set to output ohms reading to PC.
‘
Initiate a reading and print results:
PRINT #1,
“
:READ?
”
‘
Trigger and acquire one reading.
LINE INPUT #1, RD$
RD$ =
“
Resistance:
“
+ RD$
PRINT RD$
‘
Clean up and quit:
finish:
CLOSE #1
‘
Close file.
CLEAR
‘
Interface clear.
END
Содержание 6430
Страница 26: ......
Страница 32: ......
Страница 78: ...2 14 Connections ...
Страница 98: ...3 20 Basic Source Measure Operation ...
Страница 138: ...5 30 Source Measure Concepts ...
Страница 156: ...6 18 Range Digits Speed and Filters ...
Страница 168: ...7 12 Relative and Math ...
Страница 176: ...8 8 Data Store ...
Страница 202: ...9 26 Sweep Operation ...
Страница 248: ...11 22 Limit Testing ...
Страница 310: ...16 6 SCPI Signal Oriented Measurement Commands ...
Страница 418: ...17 108 SCPI Command Reference ...
Страница 450: ...18 32 Performance Verification ...
Страница 477: ...A Specifications ...
Страница 489: ...B StatusandErrorMessages ...
Страница 498: ...B 10 Status and Error Messages ...
Страница 499: ...C DataFlow ...
Страница 503: ...D IEEE 488BusOverview ...
Страница 518: ...D 16 IEEE 488 Bus Overview ...
Страница 519: ...E IEEE 488andSCPI ConformanceInformation ...
Страница 523: ...F MeasurementConsiderations ...
Страница 539: ...G GPIB488 1Protocol ...
Страница 557: ......