![Cincinnati Sub-Zero EZT-570S Скачать руководство пользователя страница 15](http://html.mh-extra.com/html/cincinnati-sub-zero/ezt-570s/ezt-570s_reference-manual_2607293015.webp)
EZT-570S User Communication Reference Manual
15
Exception Responses
When the EZT-570S cannot process a command, it returns an exception response and sets the high
bit (0x80) of the command.
0x01 illegal
command
0x02
illegal data address
0x03
illegal data value
Packet returned from the EZT-570S:
controller address (1 byte)
c 0x80
exception code (0x01 or 0x02 or 0x03)
CRC low byte
CRC high byte
2.3.2 Error
Checking
In Modbus communications, every message sent from the master (your software) receives a
response from the slave (EZT-570S), including write commands. Thus, after each command sent,
you must read the controller response before sending the next message. This provides the method
of error checking in order to verify that the message you sent was received correctly, and that the
controller is operating accordingly. This allows you to then determine the appropriate recovery
response in case the message was not received correctly by the controller, and what action is to be
taken by an operator and/or the software itself.
The exception responses provide a basic form of error checking. When an exception response is
received, the code provided in the response will tell you what the error was in the sent message.
However, this is only valid if the controller receives the message you sent, and there was an out-of-
range value or simple transmission error in the message. It does not validate incomplete or failed
transmissions. To insure that the data you receive from a read command is correct, and that the
controller properly received a write command, you must parse the controller’s response and validate
the return message to insure it is correct.
In order to validate that the message you received is correct, you must calculate the CRC for the
received message and compare it with the CRC that the controller appended to the message. This
verifies that the data you received was what the EZT-570S sent. If the CRC’s do not match, there
was an error in the transmission and the entire message should be ignored. This could then be
followed by an attempt to resend the failed command, or halt operation and alert an operator.
Example:
Read registers 60 and 61 (loop 1 set point and process variable) of the EZT-570S at
address 1.
Command sent to the EZT-570S :
01 03 00 3C 00 02 04 07
Message received from the EZT-570S:
01 03 04 03 0D 01 F3
2A 61
Calculated CRC:
2A61
(calculated from message 01 03 04 03 0D 01 F3)
Received CRC:
2A61
The calculated CRC matches the received CRC, the message is valid. Note that the last two
bytes of the received message are not used to calculate the CRC. The last two bytes are the
CRC that the EZT-570S appended to the message. Do not include them when calculating
the CRC.
nn nn nn nn
nn