Modbus Command

M

Thread Starter

Mohammad Mp

Hi everyone

I have a PLC that support MODBUS communication protocol and includes the holding memories and extended memories.

In some cases, I want to write to file records by command 15 Hex, such below code:<pre>
01 15 2D 06 00 01 00 01 00 13 B2 1E D6 A4 36 6A
2A 4C 99 A6 BE B2 5C 00 2B FA CE 16 68 9B 38 00
2F 75 08 16 D6 A4 0C 01 00 4C 06 16 D5 A3 27 23
FA 75</pre>
this command write values in File number 1\starting address 1\19 registers
and the response is<pre>
01 15 2D 06 00 01 00 01 00 13 B2 1E D6 A4 36 6A
2A 4C 99 A6 BE B2 5C 00 2B FA CE 16 68 9B 38 00
2F 75 08 16 D6 A4 0C 01 00 4C 06 16 D5 A3 27 23
FA 75</pre>
now I want to write in File number 1\starting address 1\2 registers
and I send this command:<pre>
01 15 0B 06 00 01 00 01 00 02 D6 A3 D7 A4 90 B7</pre>
but the response is<pre>
01 95 04 4E 93</pre>
what is the problem?

Regards
 
Your response: 01 95 04 4E 93 decodes
01 = slave address/ID
95 = Function Code 15 with MSB leading bit set to a logic one (the high order nibble 0001 with the MSB set to one is 1001 or hex 9)

04 (04 hex) exception error for Slave Device Failure: The Modbus spec says, "An unrecoverable error [occurred] while the server (or slave) was attempting to perform the requested action."

The remaining bytes are CRC.

Why the exception code? I don't have a clue.
 
Thread starter Similar threads Forum Replies Date
E Modbus 0
Y Modbus 7
D Modbus 2
S Modbus 1
D Modbus 1
Top