MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07
5
MAS7.1 Quick Reference
Command Responses (Continued)
Query Strings
A query string is a command string that you would normally send to the MAS7.1, proceeded by the ‘=’ charac-
ter, and with the parameters filled in to reflect the current state of the command. Commands return a query
string when a ‘?’ is used as a parameter.
For instance to find the current power on / off state of the MAS7.1 send:
P ?<CR>
and, assuming the power is on, it will respond with:
+<CR><LF>
=P 1<CR><LF>
The ‘+’ is the acknowledgement, indicating there were no errors in the command, the next line is the power
command’s current setting, the ‘1’ indicates the power is turned on.
You can setup the MAS7.1 to send query strings when something changes, for instance when the power is tog-
gled. See:
Master / Slave and Asynchronous Modes of Operation
Checksums and CRC8’s
You can optionally append a checksum or a CRC8 checkcode to the end of any serial command and it will be
tested by the MAS7.1. If the checksum or CRC8 checkcode does not match, the command will be rejected with
a “!4” error response.
To add a checksum to a command, append a ‘;’ followed by the calculated checksum. For instance to turn on
the MAS7.1 using a checksummed command:
P 1;220<CR>
To add a CRC8 checkcode to a command, append a ‘:’ followed by the CRC8 checkcode. For instance to turn
on the MAS7.1 using a CRC8 checkcoded command:
P 1:221<CR>
By setting the proper control flags, you can also have the MAS7.1 append a CRC8 checkcode or a checksum
to all of its response strings. See:
.
For more information on checksums and CRC8 checkcodes, and how they’re calculated, see: