A - 10 APPLICATION PROGRAM EXAMPLES
A.5 Pass/Fail Testing
The following examples use the SYSTem:SET command for storing and restoring
instrument setups, which can be used for non-supported functions, such as,
Pass/Fail Testing. Before executing one of the programs, a pass/fail test setup
must be created by hand via the front panel, including:
1) Generation of a signal that must be tested.
2) Creation of an envelope that must be stored in one of the memory registers,
e.g. m2.
Front panel: MEASURE > PASS/FAIL > TEST (envel) > etc.
3) Definition of the action to be taken on a passing or failing waveforms, e.g. save
failing waveforms to e.g., m3.
Front panel: MEASURE > PASS/FAIL > ACTION (save) > etc.
4) Execution of the example program(s) of the following subsections to save,
restore, or run the Pass/Fail test setup that you created before:
- Section A.5.1 describes how to save the Pass/Fail test setup.
- Section A.5.2 describes how to restore the Pass/Fail test setup.
- Section A.5.3 describes how to run the Pass/Fail test setup.
A.5.1 Saving a pass/fail test setup
In the following example the pass/fail test setup information is saved to a file on
disk. The name of the file, plus the memory register where the envelope is stored
are requested. The layout of the file on disk is as follows:
<number of system settings bytes>
<system settings bytes> indefinite length format
<memory_register of the envelope> e.g., 2_1
<number of envelope trace bytes>
<envelope trace bytes> definite length format
Application summary:
•
Create a complete Pass/Fail test setup.
•
Request the file name in which to save the current instrument setup and open
the file for output.
•
Call routine Save.Setup to save the instrument settings.
•
Call routine Save.Envreg to save the reference envelope.
•
Routine Save.Setup does the following:
- Requests the instrument settings by sending: SYSTem:SET?
and by reading the response data (setupin$).
- Writes the length, plus data to the opened file.