MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07
27
K.I.S.S.™
Keep It Simple Serial
Response String Checksums and CRC-8 Checkcodes (Continued)
Notice that in the first example a checksum was not appended to the “LI?” command. When issuing a com-
mand the checksum and CRC-8 codes are sent on a command by command basis. Anytime a checksum or a
CRC-8 code is appended to a command it will be checked and validated by the device, regardless of the
“Response Checksum / CRC-8” settings.
When Response Checksums, or Response CRC-8 Checkcodes are enabled, Error Response strings will also
have checksum or CRC-8 codes appended to them.
Master / Slave and Asynchronous Modes of Operation
The K.I.S.S.™ protocol can be used in a Master / Slave mode, where responses are only sent when
requested, or in an Asynchronous mode, where responses are sent whenever the operational state of the
device changes, such as a front panel button being pressed.
The Master / Slave Mode of Operation
In the Master / Slave mode, the controller requests information from the device at polled intervals. The control
program assumes the role of the master, and the device is operated in the slave mode. No information will be
sent from the device without first receiving a request from the controller.
For controllers that cannot handle having information being sent to them in the background, or at unspecified
times, the Master / Slave setting is ideal, since all state changes will be logged but not sent until requested by
the controller.
To allow for more efficient Master / Slave operations, there is a Query Status command available to the control-
ler that return the status state of the device as a bitmap of flags indicating which states have changed and need
querying. This allows the controller to poll, using a single command, and then based on those flag settings,
issue only the commands needed to read the new state(s) of the device.
The Master / Slave mode also allows for a predictable communications flow. A communication sequence is
always started by the controller by issuing a command. The response will always be either the Acknowledge-
ment Response, or an Error Response, followed by (if a query command was issued) the Query Response.
For instance:
LI ?<CR>
Sent: Controller issues a query command
+<CR><LF>
Received: Acknowledgment (or possible Error) Response
=LI 3,2,80<CR><LF>
Received: Query Response
In the Master / Slave mode, the Acknowledgement or Error Response will always be the next response string
after a command is issued, and a Query Response will always follow an Acknowledgement Response.
The Asynchronous Mode of Operation
In the Asynchronous mode the device sends a Query Response string anytime there is a state change. For
instance when an input is changed by the user by pressing a button on the front panel, or using a remote con-
trol, or by the IR jack, or even if a serial command has been issued, a Query Response string indicating an
input change will be sent to the controller.
The advantage if this mode is the controller can be kept constantly in sync with the device without having to
send periodic polling commands. This disadvantages are: The controller must be able to receive the Query
Response strings in the background at unspecified times, and the communications flow is slightly more compli-
cated.