Specifications

The VT1419A Algorithms are written inside Agilent VEE text boxes as a
one-dimension array of text lines. The Define Globals and Algorithms blocks show
how these text boxes are downloaded into the VT1419A. This makes VT1419A C
program development very easy.
Note that there are two Agilent VEE threads of operation as indicated by the two
START icons. This means that proper operation will only take place if the Agilent
VEE ‘RUN’ button is pressed. The Interrupt Handler simply waits for the
interrupt() routine in the VT1419A to execute and assert the VT1419A’s VXI
interrupt line. The Interrupt Handler is simply monitoring the out-of-bound
condition of the card. If the card indicates the temperature of the thermocouple rises
above 30 °C, an interrupt is generated. The interrupt is re-enabled after its
occurrence. Please note in Algorithm 1 that an interrupt is only allowed to occur
once when passing through 30 °C. After which, the card DOES NOT interrupt
again until the temperature falls below 29 °C and again passes through 30 °C. This
is done to illustrate the concept of hysteresis applied to interrupts. If the VT1419A
were allowed to interrupt Agilent VEE constantly while above 30 °C, the external
computer would be bombarded with interrupts which would lower the overall
performance. This technique achieves the needed signal to Agilent VEE but adds
the hysteresis to avoid constant interrupts.
CVT location 12 is used to reflect the state of the digital output channel used to
respond to the over-temperature condition. That condition is reflected back to
Agilent VEE as an LED.
Other interesting features include reading and writing of variables. Algorithm 2
takes the global variable “card_running” and complements it each time it executes.
It then writes that value to CVT location 11. Algorithms 2 has been configured by
the ALG:SCAN:RATIO command to execute every 500 triggers, as set in the
Algorithms object. Since the trigger timer is set to 2 milliseconds (Setup Trigger
Subsystem), Algorithm 2 executes once every 1 second and thereby causes the
card_running LED to blink at 1 second intervals. This is a good sanity check for the
Agilent VEE program to know that the VT1419A is running. If it had stopped for
some reason, the LED would not be flashing.
Another check to know that Agilent VEE is running is performed with the Variable
Access object. Agilent VEE reads the value of the global “vee_running,”
increments it by one and re-writes that value back to the VT1419A. Although not
included in this example, an algorithm could detect that the variable was changing
and know that Agilent VEE was still executing. This might be a situation where if
Agilent VEE were to be taken off-line or stopped, the VT1419A could detect the
situation and begin a possible shut-down of operations by itself.
Note that Algorithm 1 performs an average of sixteen temperature readings before
writing the result to CVT location 10. Each time the algorithm executes, a check is
performed to see if it has executed sixteen times. If not, only the sum and count is
affected and the routine exits prematurely. The average is done to provide quieter
readings when trying to make temperature measurements at high speed with a
non-filter/non-gain SCP. This is a caution. High accuracy and low drift temperature
measurements are better with SCP’s that have gain and filtering. However, decent
1-3°Caccuracy can be attained with the VT1501A straight-through SCP’s which
is typically very reasonable for thermocouples.
VEE Programming Examples
Programming Model Example
150 Chapter 5
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com