User manual

Modbus Commands
2-38
SIMATIC TI505/TI500 MODNIM User Manual
2.5 Error Responses
Errors
such as illegal addressing or failure of communications with a PLC
are reported by exception responses. Exception responses replace the
expected response to a request and are recognized by the Function Code
with the top bit set high (see examples in Figure 2-34 and Figure 2-35).
07 00000041 AD
Address Function Data LRCStart EOF
๎€ 01 CR LF
Ready
Request:
07 02 76
Address Function Except.
Code
LRCStart EOF
๎€
81 CR LF
Ready
Response:
Figure 2-34 Exception
Response Frameโ€” ASCII Mode
07 01 00000041 XXXX
Address Function Data CRC
Request:
07 81 02 XXXX
Address Function Exception
Code
CRC
Response:
Figure 2-35 Exception
Response Frame โ€” R
TU Mode
In this example, the request is for secondary node 07 to return the data for
65 (41 hex) coils starting at address 00, which is an illegal address for a
SIMA
TIC TI PLC. The response is an exception indicated by the Function
Code 81 (01 with the high bit set), with the exception code 02 indicating that
the data address was illegal.
NOTE:
The TIW
A
Y I network uses Exception Primitives. Exceptions sent by
SIMA
TIC TI PLCs are mapped to Modbus Exception Codes.