ModbusRTU extension

For the moment you have to write a program in the PLC (device) that copy a value in a holding register to a coil. Then use 0x06, write single holding register to write the data that shall be transferred to the coil.

Hello everyone
I want to read data running on plc with mit app
I looked at the examples on the forum but I couldn't succeed. The connection is established, but when I want to read data, I see the value -2.
Can you help with this ?

From your mail:

word type
D0 plc adres
1000 hexadecimal adress
44097 modbus adress

44097 mean read input register 4097 using function code 4 (16bit word).
The test program does not accept this format. Use address 4097 and FC4 instead.

D0 implies that it is a Modbus serial subnet bridged from this TCP unit. Normally it is 0 for direct Modbus/TCP addressing. The test program just send what is entered.

The test program uses decimal notation.

Note: Some PLC:s number the registers from 0 and some from 1. I guess that you should use dec 4096 in this example (Hex 1000)

1 Like

Hello
Thank you very much for your reply. I will try again tomorrow and get back to you.

Hello again
Data reading was successful.
Thank you very much for sharing this valuable information with us.