HP E1419A User Manual page 384

Measurement and control module
Table of Contents

Advertisement

Figure 1 A Haversine Function
A typical use of this function would be to output an analog voltage or
current at each Scan Trigger of the HP E1419A and over the range of the
haversine. For example, suppose you wanted a new position of an analog
output to move from 1ma to 3ma over a period of 100msec. If your
TRIG:TIMER setting or your EXTernal trigger was set to 2msec, then you
would want to force 50 intervals over the range of the haversine. This can
be easily done by using a scalar variable to count the number of times the
algorithm has executed and to scale the variable value to the -PI/2 to PI/2
range. 3ma is multiplied times the custom function result over each interval
which will yield the shape of the haversine (.003*sin(x)+.001).
Try the "eufn1419.vee" example program and define some custom functions
to illustrate this discussion.
Table 1 shows some examples of the accuracy of the custom function with
various input values compared to an evaluation of the actual transcendental
function found in 'C' or RMB. Please note that the Mx+B segments are
located on boundaries specified by 2/64 on each side of X=0. This means
that if you select the exact input value that was used for the beginning of
each segment, you WILL get exactly the calculated value of that function at
that point. Any point between segments will be an approximation
dependent upon the linearity of that segment. Also note that values of X = 2
and X = -2 will result in Y=infinity.
Appendix E
Generating User Defined Functions 383

Advertisement

Table of Contents
loading

Table of Contents