Specifications

Non-Control Algorithms
Data Acquisition
Algorithm
The VT1419A’s Algorithm Language includes intrinsic functions to write values to
the CVT, the FIFO, or both. Using these functions, algorithms can be created that
simply perform a data acquisition function. The following example shows acquiring
eight channels of analog input from SCP position 0 and one channel (8 bits) of
digital input from a VT1533A in SCP position 7. The results of the acquisition are
placed in the CVT and FIFO.
/* Data acquisition to CVT and FIFO */
writeboth( I100, 330 ); /* channel 0 to FIFO and CVT element 330 */
writeboth( I101, 331 ); /* channel 1 to FIFO and CVT element 331 */
writeboth( I102, 332 ); /* channel 2 to FIFO and CVT element 332 */
writeboth( I103, 333 ); /* channel 3 to FIFO and CVT element 333 */
writeboth( I104, 334 ); /* channel 4 to FIFO and CVT element 334 */
writeboth( I105, 335 ); /* channel 5 to FIFO and CVT element 335 */
writeboth( I106, 336 ); /* channel 6 to FIFO and CVT element 336 */
writeboth( I107, 337 ); /* channel 7 to FIFO and CVT element 337 */
writeboth( I156, 338 ); /* channel 56 to FIFO and CVT element 338 */
Using SENS:DATA:FIFO:… and the SENS:DATA:CVT commands, the
application program can access the data.
Process Monitoring
Algorithm
Another function the VT1419A performs well is monitoring input values and
testing them against pre-set limits. If an input value exceeds its limit, the algorithm
can be written to supply an indication of this condition by changing a CVT value or
even forcing a VXIbus interrupt. The following example shows acquiring one
analog input value from channel 0 and one VT1533A digital channel from
channel 56 and limit testing them.
/* Limit test inputs , send values to CVT and force interrupt when exceeded */
static float Exceeded; /* Exceeded is set by boolean operations to either 0 or 1
*/
static float Max_chan0, Min_chan0, Max_chan1, Min_chan1;
static float Max_chan2, Min_chan2, Max_chan3, Min_chan3;
static float Mask_chan56;
if ( First_loop ) Exceeded = 0; /* initialize Exceeded on each INIT */
writecvt( I100, 330); /* write analog value to CVT */
Exceeded=((I100 > Max_chan0 ) || ( I100 < Min_chan0 ) ); /* limit test analog */
writecvt( I101, 331); /* write analog value to CVT */
Exceeded = Exceeded+((I101 > Max_chan1 ) || ( I101 < Min_chan1 ) );
writecvt( I102, 332); /* write analog value to CVT */
Exceeded = Exceeded+((I102 > Max_chan2 ) || ( I102 < Min_chan2 ) );
writecvt( I103, 333); /* write analog value to CVT */
Exceeded = Exceeded+((I103 > Max_chan3 ) || ( I103 < Min_chan3 ) );
writecvt( I156, 334); /* write 8-bit value to CVT */
Exceeded = Exceeded + ( I156 != Mask_chan56); /* limit test digital */
If ( Exceeded ) interrupt( );
The Algorithm Language and Environment
Non-Control Algorithms
Chapter 4 121
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com