MPCe/LPCe Users Manual
32
allowed time frame or if the checksum does not match, the timer is disabled, the packet is discarded, and the
mode is reset back to MONITOR. Once a command packet is received, the mode changes to RESPOND. The
only way the controller can get to a RESPOND is by receiving
2.1. a valid start character followed by a space,
2.2. a 2-byte hex value matching the controller's address followed by a space,
2.3. at least one 2-character hex value command followed by a space,
2.4. a 2-byte hex checksum matching the command packet's actual checksum,
2.5. and a carriage return terminator.
3. RESPOND. The controlling computer is in count-down timer mode waiting for a response from the MPC. All
controllers must respond within 500 milliseconds once a valid command has been received. A valid response
could be an error code indicating that the controller is BUSY with a previous command or an acknowledging
response packet. After returning a response packet, the unit returns to MONITOR and executes the command. If
the controlling computer needs to verify that the last command was successful, it sends a command to the unit
requesting status feedback.
Response Packet
The response packet is made up of at least five fields, and contains information to let the controlling computer
know that the command requested was either recognized and accepted (STATUS = “OK”), or an error condition
occurred (STATUS = “ER”). The minimum packet also contains a RESPONSE CODE that is used either to pass
an error code (if STATUS = “ER”), or is available for each unit to use as needed for a STATUS return of “OK”.
The minimum response packet (simple acknowledgment with no data) would consist of the following fields, and
would be 12 bytes long.
< ADDRESS > <space> <STATUS> <space> <RESPONSE CODE> <space> <CHECKSUM> <TERMINATOR>
2 byte
1 byte
2 byte
1 byte
2 byte
1 byte
2 byte
1 byte
NOTE:
When a device responds to the controlling computer, that response has been requested
and is
expected by the computer. For this reason, a specific “start” character is not required in the response packet.
The address of the responding unit is included in the packet so the controlling computer can verify it to make
the data exchange easier to view on an ASCII terminal.