Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 9 months ago.
polling modbus slave
Hi,
I am trying to figure out how to implement a ModbusRTU slave on mbed. I found your nice example, but for some reason it doens't seem to do what I think it should do.
I connected the serial interface to my PC (using a serial-USB interface) On my PC I try to poll the modbus slave using modpoll.exe with this command: "modpoll -p none -r45 -c1 -1 -t4 -b9600 COM2"
The output I get is:
Protocol configuration: Modbus RTU Slave configuration...: address = 1, start reference = 45, count = 1 Communication.........: COM2, 9600, 8, 1, none, t/o 1.00 s, poll rate 1000 ms Data type.............: 16-bit register, output (holding) register table
'-'- Polling slave... Reply time-out!
Extra information: before I poll, LED1 is blinking every second, but after I polled once, the blinking stops.
Any idea's what I am doing wrong?
Thank you in advance! Christopher
Question relating to:
1 Answer
8 years, 9 months ago.
Hi Chris,
Try with a smaller start reference, since in my example there are only 20 elements in the buses and you are stating to read with offset 45. Or add more elements to your registers.
Gabriel