Go Down

Topic: New Modbusmq project: Testers needed! (Read 15309 times) previous topic - next topic


Here is the link (To be clear this is not my code all the credits go the maker(s) of it)



you are not using the latest revision of the modbus code or you are missing a lot of parts from it

try downloading it again and only change to
Code: [Select]
Client client = 0;

in the beginning of the file


OK it works. I was working with an older version like you said.

Thanks  :)


Just curious if anyone has implemented modbusmq using the WiFi 2.0 shield?

If so what changes would be required?


There are a number of issues with this library before I even get started.  If the IP has a 0 in the middle (192.168.0.xx) it, the strncpy causes a mal-formed IP.  I have changed them to memcpy.

There is no reference to the subnet mask in the IP configuration.  This too needs rectification.

Now on to making the rest of the library work.



the library seems to work, as i could test it with modpoll, but i'm struggling since too weeks to find a guide or sample code to map the I/O or even to read or write registers, please for anyone who succeeded to implement it to post his code to guide us


Well finally i figured it out, i'm not a programmer so i'n not sure if this is the right way to do it, but here is my code may it help somebody
in this code
PWM pins 3,5,6,9 are mapped to Holding register 40001-4
Analogue  pins 0-5  are mapped as input registers 30001-6
Digital pins 2,4 are mapped as input status 10001-2
Digital pins 7,8,13 are mapped as coil status 00001-2


NB. arduino couldn't handle 2 concurrent tcp connections


I have been testing the library and everything seems to work for what I use it.

Changing SPI communication speed with WIZ5100
If I understood everything well, then this should be the function tto be used. "setClockDivider(uint08 rate)"

Does anybody know where in the program I should write this function to change the SPI communication speed with the WIZ5100? I have tried some places like in setup and I do not see any noticable difference with my modbuspoll software.

Go Up