24
MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
K.I.S.S.™
Keep It Simple Serial
Using Bitmapped Parameters
Some commands accept “Bitmapped” parameters. These are decimal values that represent a series of flags,
or bits, that control, enable and/or disable different device operations.
Binary arithmetic is used to represent bitmapped parameters, it is assumed the reader has some familiarity
with binary arithmetic.
An example of a command that uses a bitmapped parameter is the “
XS settings<CR>
” command, which is
defined as:
XS
settings
<CR>
Where ‘
settings
’ is a bitmapped parameter:
AS - 0=Master / Slave mode.
1=Asynchronous Mode.
FP
- 0=Disable Front Panel.
1=Front Panel Enabled
IRE - 0=Disable IR Control.
1=Enable IR Control.
IRS - 0=Turn off IR Sensor.
1=Turn on IR Sensor.
IRJ - 0=Turn off IR Jack.
1=Turn on IR Jack.
CSE - 0=Disable CS and CRC-8
1=Append either Checksums or CRC-8 to responses.
CRC- 0=Append Checksums,
1=Append CRC-8’s, to responses.
12V - 0=+12V disabled
1=Use IR Jack as +12V On / Off Control
The ‘Decimal Value’ in the table’s header, refers to the values added together to create the decimal parameter
used by the command. For instances if the bits ‘AS’ and ‘IRS’ where to be set to 1, and the rest of the bits set
to zero, the parameter value would be calculated as: 8+1, making the parameter value: 9.
The command to directly set those two bits, and reset all the others would be:
XS 9<CR>
Individual bits of a bitmapped parameter can be set or reset without affecting the other bits, by prefixing the bit-
mapped parameter with a ‘+’ to set individual bits, or a ‘-’ to reset individual bits.
For instance in the above example the bitmapped value has been set to ‘9’. If we would now like to enable the
IR remote, by setting the ‘IRE’ bit, the following command can be issued:
XS +4<CR>
The will set the ‘IR’ bit, and have no affect on the others, and the new “XS” value would be: 13
If we’d like to now disable the IR jack and the IR remote functions and the Front Panel, by clearing the ‘IRJ’,
‘IRE’ & ‘FP’ bits, we’d use the value “16+4+2”, or 22, and issue the command:
XS -22<CR>
leaving the new “XS” value to be: 1.
Using Command Checksums and CRC-8 Checkcodes
A checksum or CRC-8 checkcode may be appended to any command, and if given, will be calculated by the
device and compared with the given value. If a mismatch occurs an error will be returned and the command will
not be executed. This can be used to help assure reliable operation in noisy environments. Checksums are
more commonly used in serial protocols, however CRC-8 checkcodes offer a more secure means of insuring
error free communications.
A checksum or CRC-8 checkcode is appended to the command by adding a semicolon (‘;’) for a checksum, or
a colon (‘:’) for a CRC-8 checkcode.
Decimal Value
+128
+64
+32
+16
+8
+4
+2
+1
Bit Position
7
6
5
4
3
2
1
0
Name
12V
CRC
CSE
IRJ
IRS
IRE
FP
AS
Factory Settings
0
0
0
1
1
1
1
0