Accessing i/o channels – VXI VT1422A User Manual

Page 188

Advertising
background image

186 Creating and Running Algorithms

Chapter 6

Accessing I/O

Channels

In the Algorithm Language, channels are referenced as pre-defined variable
identifiers. Because input channels could be from Remote Signal
Conditioning Units (RSCUs), there are two forms of input channel syntax.
The general on-board input channel identifier syntax is "I1cc" where cc is a
channel number from 00 (channel 0) through 63 (channel 63). The Remote
input channel syntax is "I1ccrr" where cc is the SCP channel number (one
of 00, 01, 08, 09, 16, 17, 24, 25, 32, 33, 40, 41, 48, 49, 56, or 57) and rr is
the channel (0 through 31) on the RSCU see the heading "Remote Channels"
on page 231 for more information.

For output channels, the syntax is "O1cc," where cc is a channel number
from 00 (channel 0) through 63 (channel 63). Like all VT1422A variables,
channel identifier variables always contain 32-bit floating point values even
when the channel is part of a digital I/O SCP. If the digital I/O SCP has 8-bit
channels (like the VT1533A), the channel's identifiers (O1cc and I1cc) can
take on the values 0 through 255. To access individual bit values, ".Bn" may
be appended to the normal channel syntax; where n is the bit number (0
through 7). If the Digital I/O SCP has single-bit channels (like the
VT1534A), its channel identifiers can only take on the values 0 and 1.
Examples:

O100 = 1;

assign value to output chan 0 on
VT1534A.

Inp_val = I108;

from 8-bit channel on VT1533A
Inp_val will be 0 to 255.
np_val will be 0 to 255.

Bit_4 = I109.B4;

assign VT1533A chan 9 bit 4 to
variable Bit_4

Output Channels

Output channels can appear on either or both sides of an assignment
operator. They can appear anywhere other variables can appear. Examples:

O100 = 12.5;

send value to output channel
buffer element 0

O108.B4 = ! O108.B4;

complement value found in
output channel buffer element 8,
bit 4 each time algorithm is
executed.

writecvt(O116,350);

send value of output channel 16
to CVT element 350

Advertising
This manual is related to the following products: