72 Chapter 6
Reading Out Measured Result
Reading Out Measured Result
The program of Example 6-6 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 OFF the trigger system continuous startup and sets the trigger
mode to external trigger.
Lines 120 to 130 Reads out the ON/OFF state of the comparator function and sets it to
the Comp_flag variable.
Lines 170 to 180 Executes the :READ? command, displays the message to prompt the
user to input an external trigger, and waits until the external trigger is
inputted and the measurement finishes.
Lines 190 to 220 Reads out the header part.
Line 240 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.
Line 260 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 280 Reads out the message terminator at the end of the data.
Lines 320 to 340 Displays the measurement status, measured primary parameter result,
and measured secondary parameter result.
Line 360 If the Comp_flag value is 1 (the comparator function is ON), displays
the comparator sorting result.
Line 380 If the Comp_flag value is not 1 (the comparator function is OFF),
displays “Comparator : OFF.”