A command can be a channel command in addition to being one of the other types of commands
(integer or boolean). A channel command means that the command applies to a specific input or
output channel. The channel is specified by a single character (e.g., '1', 'A', 'B', etc.) occurring before
any other payload data.
An example of a boolean channel command is the '
AGC
' (Automatic Gain Control) command. '
Q04AGC10
' disables the AEC on input channel 1 . After sending this command, the device will
respond with a status message of '
Q04AGC10
'.
An example of an integer channel command is the '
GAINI
' command, which adjusts the gain on the
input channels. '
Q04GAINIA12
' sets the input gain of channel A to 12 dB. After sending this
command, the device will respond with a status message of '
Q04GAINIA12
'.
A wildcard character ('
*
') can be used as the channel specifier for many of the channel commands. If
this is the case, there are two options for specifying the values for the channels. The first method is
to specify a single value that will be applied to all the channels.
Take the
MUTEI
command for example: '
Q04MUTEI*1
' mutes input channels 1 and A-B After
sending this command, the device will respond with a status message of '
Q04MUTEI*111
'. In this
status message, the device reports the status of all the channels. Since the
MUTEI
command applies
to channels 1 and A-B the status of all 3 channels. The first (left most) value corresponds to channel
1 and the last (right most) value corresponds to channel B.
This leads us to the second method of using a wildcard character: specifying the values for each of
the channels. For example, '
B04MUTEI*101
' mutes channels 1, B and unmutes channel A. In this
case, the device will respond with a status message of '
B04MUTEI*101
'.
As an interesting example, consider sending '
Q04MUTEI*2
' after the above example. The device will
respond with a status message of '
Q04MUTEI*010
'. Notice that all the states have been toggled.
Queries using the '
?
' character are straightforward. For example, '
Q04MUTEI1?
' might return '
Q04MUTEI11
', while '
Q04MUTEI*?
' might return '
Q04MUTEI*100
'.
Using the wildcard character with integer channel commands is similar to using it with boolean
commands, but there are some differences. If we sent '
Q04GAINI*10
', the input gains on channels
1 and A-B will all be set to 10 dB. The device will respond with a status message of '
S04GAINI*ÄÄÄ
'. Those weird characters are the main difference between using wildcards with
integer channel commands versus boolean channel commands. When reporting multiple integer
values, the Vortex uses a binary format with one byte per integer value. This allows for more compact
commands and reduces RS-232 and bus traffic. To convert from an integer value to a byte value, we
add 132 to the integer value. In the above example, where the gain is set to 10 dB, we have: 10 +
132 = 142 = 0x8E (hex) = Ä (ASCII). The reason for adding 132 is to allow us to conveniently
represent negative numbers as well as avoid the use of special characters that are normally used in
RS-232 and EF Bus communications.
When using a wildcard character to specify separate values for each channel, you must also use the
binary format. For example, '
Q04GAINI*Äää
' sets the input gain of channel 1 to 10 dB and the input
gain of channels A-B to 0 dB. (10 + 132 = 142 = 0x8E (hex) = Ä (ASCII), 0 + 132 = 132 = 0x84