EasyManua.ls Logo

Fluke Calibration 5560A - OPC?, *OPC, and *WAI

Default Icon
120 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5560A/5550A/5540A
Remote Programmers Manual
40
*OPC?, *OPC, and *WAI
The *OPC?, *OPC, and *WAI commands let you maintain control of the order of execution of
commands that could otherwise be passed up by subsequent commands.
If you send an OUT command, you can check if the output has settled by sending the query *OPC?. As
soon as the OUT command has completed (output settled), a 1 appears in the output buffer. Always
follow an *OPC? command with a read command. The read command causes program execution to
pause until the addressed instrument responds. This sample program shows how you can use *OPC?:
10 PRINT @4, “OUT 100V,1KHZ;OPER; *OPC?” ! 5560A ADDRESS IS 4
20 INPUT @4, A ! READ THE “1” FROM THE 5560A
30 !PROGRAM HALTS HERE UNTIL A “1” IS PUT INTO THE OUTPUT BUFFER
40 PRINT “OUTPUT SETTLED”
The *OPC command is similar in operation to the *OPC? query, except that it sets bit 0 (OPC for
Operation Complete) in the Event Status Register to 1 rather than sending a 1 to the output buffer. One
simple use for *OPC is to include it in the program in order for it to generate an SRQ (Service Request).
Then an SRQ handler written into the program can detect the operation complete condition and
respond appropriately. You can use *OPC similarly to *OPC?, except your program must read the ESR
to detect the completion of all operations. This sample program shows how you can use *OPC:
10 REMOTE
20 PRINT @4, “OUT 100V,1KHZ;OPER;*OPC” ! 5560A 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 causes the Calibrator to wait until any prior commands are completed before it
continues to the next command, and takes no other action. The *WAI command is a convenient way to
halt operation until the command or commands preceding it are completed. This sample program
shows how you can use *WAI:
10 REMOTE
20 PRINT @4, “OUT 100V,1KHZ;OPER;*WAI” ! 5560A ADDRESS IS 4
30 PRINT @4, “OUT?” ! READ THE OUTPUT VALUE
40 INPUT @4, A$,B$,C$ ! A$ CONTAINS THE OUTPUT VALUE
50 PRINT “OUTPUT SETTLED”
60 PRINT “OUTPUT IS: “;A$;B$;” at “;C$
70 END

Table of Contents

Related product manuals