![Future Design MCT-MC 4.3 Скачать руководство пользователя страница 152](http://html1.mh-extra.com/html/future-design/mct-mc-4-3/mct-mc-4-3_user-manual_2352024152.webp)
MCT-MC
4.3
FDC MCT-MC
- 152 -
Appendix
Exception Responses
When the MC 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 MC:
controller address (1 byte)
c 0x80
exception code (0x01 or 0x02 or 0x03)
CRC low byte
CRC high byte
A.1.8 Error Checking
In Modbus communications, every message sent from the master (your software) receives a response from the
slave (MC), 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 MC appended to the message. This verifies that the data you
received was what the MC 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 35 and 36 (loop 1 process variable and set point) of controller at address 1.
Command sent to the MC:
01 03 00 23 00 02 35 C1
Message received from the MC:
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 MC
appended to the message. Do not include them when calculating the CRC.
nn
nn
nn
nn nn
Содержание MCT-MC 4.3
Страница 1: ...MCT MC 4 3 User Manual MCT MC 4 3 User Manual Rev A February 2018...
Страница 175: ...MCT MC4 3 Appendix 175 FDC MCT MC A 5 Power Supply Specifications DIN Rail Mount Power Supply Specifications...
Страница 176: ...MCT MC4 3 FDC MCT MC 176 Appendix...
Страница 177: ...MCT MC4 3 Appendix 177 FDC MCT MC Open Frame Power Supply Specifications...
Страница 178: ...MCT MC4 3 FDC MCT MC 178 Appendix...
Страница 179: ...MCT MC4 3 Appendix 179 FDC MCT MC A 6 Power On Delay Relay Specifications GE1A C10HA110...
Страница 180: ...MCT MC4 3 FDC MCT MC 180 Appendix...