HP (Hewlett-Packard) 132A Water Dispenser User Manual


 
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
Programming Guide 3-49
How to Program the Counter for Math/Limit
Operations
Updating Math and Limit Results Over HP-IB
When using the Limits or Math capabilities from the front panel, the default
(power-up) operation is for results to be automatically updated whenever a value
is updated in either the Limit or Scale&Offset menu. For example, entering a scale
value automatically enables Math and updates the result in the display to reflect
the changes. Similarly, entering either an upper or lower limit automatically
enables Limit Testing. If, after entering a value in either of these menus, you do
not want limits or math, you must go to the appropriate menu item and turn off
limits or math.
When the Counter is programmed, there are additional issues that must be
addressed.
The first thing done in most programs is to put the Counter in a known state using
*RST. The *RST command resets the Counter. One of the things this command
does is disable the automatic
post-processing of Limit and Math operations . What this means is, that if you
set a limit, scale or offset value, and enable Limits or Math, the answer will
not be automatically updated to reflect the Limit or Math values . Whenever a
new measurement is made, the result will be updated, but, if the Counter is in
Single mode, changing the Limits or Math will not result in an automatic re-
calculation.
There are two things you can do to make sure the results are updated. One is to
send the command :CALC:IMM:AUTO ON after the *RST command. This will
cause the results to be updated whenever a limit, scale or offset value is changed.
The benefit with this command is that you only have to send this command once
and the Counter will always return data that reflects the current limit or
scale/offset settings.
One potential drawback is that results you may not care about can occur, possibly
causing an unexpected event (like an SRQ or out-of-limit condition). For example,
if you wanted to change the scale and offset, you might first send the scale value.
With :CALC:IMM:AUTO ON, the scale value will be immediately applied, before
the offset value is received. You may not care what this scaled-only value is,
but it may cause an out-of-limit condition, which may in turn cause an SRQ,
neither of which you might have expected.
The other option is to program the Counter to update post-processed results only
when you tell it to. This is accomplished by sending the command :CALC:IMM
after you send all of the limits or scale/offset values. This way, no intermediate