- Posts: 6803
- Thank you received: 2181
Modbus communication error
6 years 9 months ago #155241
by cmorley
Replied by cmorley on topic Modbus communication error
Looks from your setup software that the function should be 3 (read hold registers)not 4 ....
Please Log in or Create an account to join the conversation.
6 years 9 months ago #155244
by jsskangas
Replied by jsskangas on topic Modbus communication error
I did try 3 (read hold registers) and it did not make any difference:
Serial reading...
5 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=5 -> (Slave address-1 - Function code-83 ) 2 C0 F1
ERROR CLASSICLADDER- MODBUS-EXCEPTION RECEIVED:83 (Excep=2)
ERROR CLASSICLADDER- MODBUS-INCORRECT RESPONSE RECEIVED FROM SLAVE!!!
Serial flush all!
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-8 34 0 1 C7 A4
INFO CLASSICLADDER- MODBUS Length we should receive=4 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
5 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=5 -> (Slave address-1 - Function code-83 ) 2 C0 F1
ERROR CLASSICLADDER- MODBUS-EXCEPTION RECEIVED:83 (Excep=2)
ERROR CLASSICLADDER- MODBUS-INCORRECT RESPONSE RECEIVED FROM SLAVE!!!
Serial flush all!
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-8 34 0 1 C7 A4
INFO CLASSICLADDER- MODBUS Length we should receive=4 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
5 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=5 -> (Slave address-1 - Function code-83 ) 2 C0 F1
ERROR CLASSICLADDER- MODBUS-EXCEPTION RECEIVED:83 (Excep=2)
ERROR CLASSICLADDER- MODBUS-INCORRECT RESPONSE RECEIVED FROM SLAVE!!!
Serial flush all!
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-8 34 0 1 C7 A4
INFO CLASSICLADDER- MODBUS Length we should receive=4 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
5 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=5 -> (Slave address-1 - Function code-83 ) 2 C0 F1
ERROR CLASSICLADDER- MODBUS-EXCEPTION RECEIVED:83 (Excep=2)
ERROR CLASSICLADDER- MODBUS-INCORRECT RESPONSE RECEIVED FROM SLAVE!!!
Serial flush all!
Serial reading...
5 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=5 -> (Slave address-1 - Function code-83 ) 2 C0 F1
ERROR CLASSICLADDER- MODBUS-EXCEPTION RECEIVED:83 (Excep=2)
ERROR CLASSICLADDER- MODBUS-INCORRECT RESPONSE RECEIVED FROM SLAVE!!!
Serial flush all!
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-8 34 0 1 C7 A4
INFO CLASSICLADDER- MODBUS Length we should receive=4 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
5 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=5 -> (Slave address-1 - Function code-83 ) 2 C0 F1
ERROR CLASSICLADDER- MODBUS-EXCEPTION RECEIVED:83 (Excep=2)
ERROR CLASSICLADDER- MODBUS-INCORRECT RESPONSE RECEIVED FROM SLAVE!!!
Serial flush all!
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-8 34 0 1 C7 A4
INFO CLASSICLADDER- MODBUS Length we should receive=4 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
5 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=5 -> (Slave address-1 - Function code-83 ) 2 C0 F1
ERROR CLASSICLADDER- MODBUS-EXCEPTION RECEIVED:83 (Excep=2)
ERROR CLASSICLADDER- MODBUS-INCORRECT RESPONSE RECEIVED FROM SLAVE!!!
Serial flush all!
INFO CLASSICLADDER- Modbus I/O module to send: Lgt=8 <- Slave address-1 Function code-3 Data-8 34 0 1 C7 A4
INFO CLASSICLADDER- MODBUS Length we should receive=4 (+3)
Serial config...
Serial writing...
Writing done!
select() for serial reading...
Serial reading...
5 chars found
INFO CLASSICLADDER- Modbus I/O module received: Lgt=5 -> (Slave address-1 - Function code-83 ) 2 C0 F1
ERROR CLASSICLADDER- MODBUS-EXCEPTION RECEIVED:83 (Excep=2)
ERROR CLASSICLADDER- MODBUS-INCORRECT RESPONSE RECEIVED FROM SLAVE!!!
Serial flush all!
Please Log in or Create an account to join the conversation.
6 years 9 months ago #155245
by cmorley
Replied by cmorley on topic Modbus communication error
It did make a difference - the exception code is now 2 - illegal data address
So the function (3) is corrected but seems the address is wrong
is address 2101 legal? in your test you used 2100
So the function (3) is corrected but seems the address is wrong
is address 2101 legal? in your test you used 2100
Please Log in or Create an account to join the conversation.
6 years 9 months ago #155246
by cmorley
Replied by cmorley on topic Modbus communication error
ahh I bet you did set 2100 in classicladder - try setting 'modbus element offset' to 0
Chris
Chris
Please Log in or Create an account to join the conversation.
6 years 9 months ago #155247
by cmorley
Replied by cmorley on topic Modbus communication error
Sorry I meant set offset to 1
Please Log in or Create an account to join the conversation.
6 years 9 months ago - 6 years 9 months ago #155248
by jsskangas
Replied by jsskangas on topic Modbus communication error
Last edit: 6 years 9 months ago by jsskangas.
Please Log in or Create an account to join the conversation.
Time to create page: 0.140 seconds