Digitel MPC Manual
Page 47 of 72
is reset back to MONITOR. Once a command packet is received, the mode changes
to RESPOND. The only way the unit can get to a RESPOND is by receiving
2.1.
a valid PHI start character followed by a space,
2.2.
a 2-byte hex value matching the unit'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 PHI unit. All PHI units must respond within 500 milliseconds
once a valid command has been received. A valid response could be an error code
indicating that the unit 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> <STA TUS > <space> <RESPONSE CODE> <space> < C H E C K S U M > < T E R M I N A T O R >
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.