HP IBASIC Supplement 2-13
Recording Programs
Avoiding Recording Errors
Avoiding Recording Errors
Use Instrument Preset
In most cases, the key/operation should be the first keystroke
recorded. This sets the instrument to its default state and avoids the risk
of creating a program that depends on prior instrument settings.
You can include the command to perform a preset in your program by
pressing immediately after turning recording on. This
inserts the following line prior to all other OUTPUT statements in your
program:
OUTPUT @Rfna;”SYST:PRES;*WAI”
See your analyzer's User's Guide to determine the specific preset state
for your particular analyzer.
Specifically Select Parameters
If you do not want to preset the instrument before running a recorded
program (for example, you may be recording a section of a larger
measurement sequence), be sure to specifically activate every
instrument setting that you will need in your automated sequence. For
example, if you want the data format to be Log Mag, press
and then , even though Log Mag is already the default
setting. This will generate a program line to specifically set the data
format to Log Mag.
In some cases you may have to select another setting first and then
re-select the original setting in order to generate the correct program
line. For example, if you want to generate a program line to set the sweep
trigger to Continuous, and you discover that it is already set to
Continuous when you start recording, press
first—then press . You can easily remove unwanted
program lines generated by this procedure in the editor.
NOTE Do not rely on the step keys or the front panel knob to set parameters.
Use of step keys is not recommended because the results may depend on
the function's step size, which may change as other parameters change.
PRESET
PRESET
FORMAT
MENU