Fluke PM-3370B Sander User Manual


 
3 - 74 USING THE COMBISCOPE INSTRUMENTS
3.15.3 How to enable status reporting
The principle of using the status reporting mechanism is explained by showing two
program examples. In the first example the standard Status Byte (STB) is checked
to signal "operation completed". In the second example the SRQ mechanism is
used to signal "operation completed" by generating a Service Request.
3.15.3.1 Program example using the status byte (STB)
PROGRAM EXAMPLE:
In this example the standard status byte (STB) is checked to detect whether or
not a "CONFigure:AC" + "INITiate" operation is completed. If completed, the
program continues by fetching and printing the AC-RMS value.
CALL IBTMO(0, 13)
Timeout at 10 seconds
CALL Send(0, 8, "
*
RST", 1)
Resets the instrument
CALL Send(0, 8, "
*
ESE 1", 1)
Enables OPC-bit (0) in ESE
’"
OPeration Completed" is reported in bit 5 (ESB) of the STB after sending
*
OPC
.
CALL Send(0, 8, "CONFigure:AC", 1)
Automatic configuration
CALL Send(0, 8, "
*
OPC", 1)
This command forces the instrument to set the OPC bit
when all pending operations have been finished
.
CALL Send(0, 8, "INITiate", 1)
Single initiation
ESB.bit.set = 0
result$ = SPACE$(3)
WHILE ESB.bit.set = 0
CALL Send(0, 8, "
*
STB?", 1)
Requests for the STB
CALL Receive(0, 8, result$, 256)
Reads the STB
IF (VAL(result$) AND 32) THEN
ESB = bit 5 (value 32)
ESB.bit.set = 1
Operation completed
END IF
WEND
CALL Send(0, 8, "FETCh:AC?", 1)
Fetches AC-RMS value
result$ = SPACE$(30)
CALL Receive(0, 8, result$, 256)
Reads AC-RMS value
PRINT "AC-RMS value = "; result$
Prints AC-RMS value