Easy I/O for DAQ Library Chapter 10
LabWindows/CVI Standard Libraries 10-6 © National Instruments Corporation
Command Strings
You can use command strings within the Channel String to set per-channel limits and an
interchannel sample rate. For example,
"cmd hi 10.0 low -10.0; 7:4; cmd hi 5.0 low -5.0; 3:0"
specifies that channels 7 through 4 should be scanned with limits of +/- 10.0 volts and
channels 3 through 0 should be scanned with limits of +/- 5.0 volts. As you view the
Channel String from left to right, when a high/low limit command is encountered, those limits
are assigned to the following channels until the next high/low limit command is encountered.
The High Limit and Low Limit parameters to AISampleChannels are the initial high/low
limits. These parameters can be thought of as the left-most high/low limit command.
The following Channel String,
"cmd interChannelRate 1000.0; 0:3"
specifies that channels 0 through 3 should be sampled at 1000.0 Hz, in other words, there should
be 1/1000.0 = 1ms of delay between each channel. If you do not set an interchannel sample rate,
the channels are sampled as fast as possible for your hardware to achieve pseudo simultaneous
scanning.
The syntax for the command string can be described using the following guide:
items enclosed in [] are optional
<number> is an integer or real number
<LF> is a line-feed character
;|<LF> means you may use either ; or <LF> to separate command strings from channel
strings
! may be used as an optional command separator
spaces are optional
The syntax for the initial command string that appears before any channels are specified is:
"cmd [interChannelRate <number>[!]] [hi <number> [!]low <number>[!]];|<LF>"
The syntax for command strings that appear after any channels are specified is:
";|<LF> cmd hi <number>[!] low <number>[!] ;|<LF>"