Communicating with modbus rtu

A

Thread Starter

André Lakatos

Dear Sirs:

I have a PLC (master) and a temperature controler (slave) that are communicating via modbus rtu.

I have to send to the slave the bytes 1 4 0 0 0 8 CRC CRC (function 4 of modbus to adress 1).

After i ask the first question 01 04 00 00 00 08 CRC CRC (function 4 of modbus), the module answer is OK. (01 04*****************************)

But when i send this command again, the slave returns 132 1 130 1 192 1 and remains cycling these bytes. This make no sense for me.

Why does the slave send to me the right response only in the first time that I ask?
Sorry for my terrible english.

Regards,
André Lakatos

Eletro-Forming
Rua Cesária Camargo de Oliveira, 280
Embu-SP
Tel : (0xx11)4704-3699
Fax: (0xx11)4704-3987
[email protected]
www.eletro-forming.com.br
 
L

Lynn A Linse

Well, a read-once Slave device is not very useful.

Make sure you don't poll the Slave a second time too quickly - you want to delay 10 or 25 msec or longer. Many slaves won't turn their receiver on for some time after responding. Most PC-class computers (even under Windows) are capable of very fast polling.

I cannot explain your funny response - however if RS-485 is involved it could just be garbage related to reflection on a floating line. Check your RS-485 line bias resisters (that hold the line idle between data bytes).

- LynnL
 
Top