HP E1419A User Manual page 52

Measurement and control module
Table of Contents

Advertisement

especially when trying to re-write 1024 element arrays and especially when
the trigger cycle time is very short.
There are multiple times between the base triggers where scalar and array
changes can be accepted from the supervisory computer, and these changes
are held in a holding buffer until the supervisory computer instructs the
changes to take effect. These changes then take place during the Update
window and take effect BEFORE algorithms start executing. The
"do-update-now" signal can be sent by command(ALG:UPD) or by a
change in a digital input state(ALG:UPD:CHAN). In either case, the
programmer has control over when the new changes take effect.
The E1419's ability to execute programs directly on the card and its fast
execution speed give the programmer real-time response to changing
conditions. And, programming the card has been made very easy to
understand. HP chose C as the language used to write user programs since
that language is already considered the industry standard. Choosing C
allows you to write algorithms on PC's or UNIX workstations that have C
compilers, so you can debug algorithms before execution on the card. The
E1419 also provides good debugging tools that permit you to determine
worst-case execution speed, monitor variables while running, and
selectively enable/disable any of the E1419's 32 algorithms.
HP created a limited and simplified version of C since most applications
need only basic operations: add, subtract, multiply, divide, scalar variables,
arrays, and programming constructs. The programming constructs are
limited to if-then-else to allow conditional evaluation and response to input
changes. Since all algorithms have an opportunity to execute after each
time-base trigger, the if-then-else constructs permit conditional skipping of
cycle intervals so that some code segments or algorithms can execute at
multiples of the cycle time instead of every cycle.
Looping constructs such as for or while are purposely left out of the
language so that user programs are deterministic. Note that looping is not
really needed for most applications since the cycle interval execution(via the
trigger system) of every algorithm has inherent repeat looping. With no
language looping constructs, the HP E1419's C compiler can perform a
worst-case branch analysis of user programs and return the execution time
for determining the minimum time-base interval. Making this timing query
available allows the programmer to know exactly how much time may be
required to execute any/all phases before attempting to set up physical test
conditions.
Note the darker shaded portion at the end of the Execute Algorithms Phase
in Figure 3-2 . The conditional execution of code can cause the length of
this phase to move back and forth like an accordion. This can cause
undesirable output jitter when the beginning of the output phase starts
Chapter 3
Programming the HP E1419A 51

Advertisement

Table of Contents
loading

Table of Contents