Using
the
Command
This
example program in RMBASIC (Rocky Mountain
BASIC),
Group
Feature
demonstrates the benefits of the 'Command Group Feature'
implemented in the El440 See Chapter
4
Understanding
the
HP
E1440A.
The :VOLT and :VOLT:OFFSet commands are used as an example
and the measurement task is
:
Base setup:
Frequency
:
11
MHz
Function
:
SIN
First measurement:
Voltage
:
0.1
V
Voltage offset
:
0.2 V
Second
measurement:
Volt age
:
2.0
V
Voltage offset
:
3.0
V
Third
measurement:
Voltage
:
0.1
V
(again
Voltage offset
:
0.2
V
(again)
The problem here is that, if parameters are programmed in separate
output statements, you would enter temporarily incompatible states.
Referring to the example above, if you always program in the order
-
:VOLT and then :VOLT:OFFS, you will get an error at the beginning
of the third measurement because an offset of 0.1
V
is incompatible
with an amplitude of 2 V (leftover from second measurement).
Reverting the order of programming (first offset then amplitude) will
just move the problem, not eliminate it. In this case you will get an
error at the first
:VOLT:OFFS command because an offset of 0.1
V
is
incompatible with an amplitude of 0.001 (value after "RST).
There are three ways out of the dilemma
:
1.
Every time you want to program amplitude and offset set them to
save values first. This doubles the programming effort.
2. Keep track of the current value and select programming sequence
(amplitude/offset or offset/amplitude) accordingly. Very time
consuming.
3.
Send amplitude and offset in one string. The most efficient
method.
Sample program
10
REAL
El440
20
3
0
40
!
!
for the instrument HP-IB address.
!
Note that
an
INTEGER is too small to hold
!
a HP-IB address with secondary addressing.
3-6
Using
the
HP
E1440A
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com