Remote Operation
Remote Program Examples
5
5-49
The
*OPC
command is like the
*OPC?
query in operation, except that it sets bit 0 (OPC
for “Operation Complete”) in the Event Status Register to 1 as an alternative to sending a
1 to the output buffer. One simple use for
*OPC
is to put it in the program so that it gives
an SRQ (Service Request). Then an SRQ handler written into the program can find the
operation complete condition and respond correctly. You can use
*OPC
like
*OPC?
,
except your program must read the ESR to find the finish of all operations. The
subsequent sample program shows how you can use
*OPC
.
10 REMOTE
20 PRINT @4, “OUT 100V,1KHZ/;/OPER/;/*OPC”
! 5502A ADDRESS IS 4
30 PRINT @4, “*ESR?”
! PUT THE ESR BYTE IN BUFFER
40 INPUT @4, A%
! READ THE ESR BYTE
50 IF (A% AND 1%) = 0% GOTO 30
! TRY AGAIN IF NO OPC
60 PRINT “OUTPUT SETTLED”
70 END
The
*WAI
command makes the Calibrator stop until all commands are complete before it
continues to the subsequent command, and does no more. Use
*WAI
as an easy
procedure to stop operation until the commands before it are complete. The subsequent
sample program shows how you can use
*WAI
.
10 REMOTE
20 PRINT @4, “OUT 100V,1KHZ/;/OPER/;/*WAI”
! 5502A ADDRESS IS 4
30 PRINT @4, “OUT?”
! READ THE OUTPUT VALUE
40 PRINT @4, A$,B$,C$
! A$ CONTAINS THE OUTPUT
VALUE
50 PRINT “OUTPUT SETTLED”
60 PRINT “OUTPUT IS: “/;/A$/;/B$/;/” at “/;/C$
70 END
Get a Thermocouple Measurement
The subsequent program measures one temperature measurement at a time.
10 REM Set Bus Timeout to 20 seconds, Init IEEE Bus
20 TIMEOUT 20 * 1000
30 INIT PORT 0
40 CLEAR @6
100 REM Reset 5502A, TC measurement mode
110 PRINT @6,”*RST/;/ TC_TYPE J/;/ TC_MEAS FAR”
200 PRINT “Hit Carriage Return to take a Reading”
210 INPUTLINE A$
220 REM Request the measurement value
230 PRINT @6, “VAL?”
240 REM Read measurement, unit
250 INPUT @6, M,U$
260 GOTO 200
Use the RS-232 UUT Port to Control an Instrument
The SERIAL 2 TO UUT RS-232 port is used to send commands to a different instrument.
For example, a meter that is being calibrated can have its RS-232 port connected to the
Calibrator SERIAL 2 TO UUT serial port. Commands sent from a controller can go
through the Calibrator’s UUT port and be received by the meter or UUT. There are seven
special UUT_* commands that Calibrator can use to pass commands to an instrument
that you connect to the UUT port. See to Chapter 6.
Summary of Contents for 5502A
Page 4: ......
Page 12: ...5502A Operators Manual xii ...
Page 46: ...5502A Operators Manual 2 2 ...
Page 52: ...5502A Operators Manual 2 8 ...
Page 54: ...5502A Operators Manual 3 2 ...
Page 142: ...5502A Operators Manual 4 68 ...
Page 194: ...5502A Operators Manual 6 2 ...
Page 240: ...5502A Operators Manual 7 2 ...
Page 260: ...5502A Operators Manual 7 22 ...
Page 262: ...5502A Operators Manual 8 2 ...
Page 365: ...B 1 Appendix B ASCII and IEEE 488 Bus Codes ...
Page 366: ...5502A Operators Manual B 2 ...
Page 368: ...5502A Operators Manual B 4 ...
Page 378: ...5502A Operators Manual D 6 ...