68 Chapter 6
Reading Out Measured Result
Reading Out Measured Result
The program of Example 6-4 is detailed below.
Lines 50 to 60 Sets the GPIB address.
Line 70 Sets the data transfer format to the binary format.
Lines 90 to 100 Turns ON the trigger system continuous startup and sets the trigger
mode to the external trigger.
Lines 120 to 130 Reads out the ON/OFF state of the comparator function and assigns it
to the Comp_flag variable.
Lines 170 to 210 Makes the setup generate an SRQ when measurement finishes and
clears the status byte register and operation status event register.
Lines 250 to 260 Sets the branch destination of the SRQ interrupt and enables the SRQ
interrupt.
Lines 270 to 280 Displays the message to prompt the user to input an external trigger
and then waits until the external trigger is inputted and the
measurement finishes.
Line 300 Executes the measured result readout command (:FETC?).
Lines 310 to 340 Reads out the header part.
Line 360 If the Comp_flag value is 1 (the comparator function is ON), reads out
the measurement status, measured primary parameter result, measured
secondary parameter result, and comparator sorting result.
NOTE Binary data must be read out without formatting. Therefore, use an I/O path (@Binary) set
up as such for readout. This is also applicable to Line 380.
Line 380 If the Comp_flag value is not 1 (the comparator function is OFF),
reads out the measurement status, measured primary parameter result,
and measured secondary parameter result.
Line 400 Reads out the message terminator at the end of the data.
Lines 440 to 460 Displays the measurement status, measured primary parameter result,
and measured secondary parameter result.
Line 480 If the Comp_flag value is 1 (the comparator function is ON), displays
the comparator sorting result.
Line 500 If the Comp_flag value is not 1 (the comparator function is OFF),
displays “Comparator : OFF.”