backtrackbaba / simple-modbus

Automatically exported from code.google.com/p/simple-modbus
0 stars 0 forks source link

Illegal data value #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. I upload the Simple Modbus slave example to arduino.
2. Connect arduino uno to computer via max485 and USB to rs485 converter
3. Try to read registers with Modbus poll and Mtester

I receive message "Illegal data value".I am using arduino 1.0.2 on Windows 7 
64bit
?

What does it mean?Where is the problem?
Thanks

Original issue reported on code.google.com by dilie...@gmail.com on 8 Dec 2012 at 10:14

GoogleCodeExporter commented 9 years ago
Hi, I use Mtester & QModbus for all my testing, "Illegal data value" means 
either your starting address is incorrect or you are trying to read too many 
registers at once. Using Mtester the starting address is 1 and the amount of 
registers to read is 9 when referring to the slave example. It includes the 
offset starting address.
When using QModbus the starting address is 0.

Original comment by bester.j...@gmail.com on 28 Dec 2012 at 9:08

GoogleCodeExporter commented 9 years ago
Thanks for replay,
I found my mistake and now I can control arduino via modbus.Now i want to
configurate arduino ethernet as tcp/modbus master and read data from other
arduinos and send data to server whith tcp protocol.Is this possible and
how can I do this.

Original comment by dilie...@gmail.com on 7 Jan 2013 at 8:33

GoogleCodeExporter commented 9 years ago
In addition to Modbus ASCII and RTU there also exist a Modbus/TCP protocol but 
this must be targeted on the TCP layer and adhere to the Modbus/TCP standard 
and is going to be hard work to port.

I would suggest (and maybe this is what you meant :-) that you just set up as 
much packets with different array registers as you need with SimpleModbusMaster 
and then use the array of data as any other data when using the TCP library.

Original comment by bester.j...@gmail.com on 9 Jan 2013 at 8:50