richw
I have a ethernet to rs485(modbus) converter trying to read a temp/humidity probe. After setting it up as a slave with all the correct information and starting openplc, it connects to the converter device but returns a timeout error in the dashboard. The converter is setup correctly because I tested with another program (modbus poll) and have no problems reading the sensor.

Does anybody have any idea why it wouldn't work or what i might be doing wrong? This seems pretty simple and should be able to work. openplc is working correctly on a mega with ethernet shield so i believe i have an understanding how to configure things.

Openplc is running on Linux box

Thanks,
Rick
Reply 0 0
thiagoralves
It would be useful to provide screenshots with the slave device configuration and how it is set up on Modbus poll. Showing the Modbus transactions on Modbus poll can also be useful to figure out which function code it is using. Some devices are tricky in which functions they support. OpenPLC tend to use only the bulk functions to read it all at once, but some devices don’t get along with that approach
Reply 0 0
richw
Capture.jpg  Capture2.jpg 


Capture3.jpg

 Here are some screen shots, hope this helps. in the first picture i use the read/write once button so its not continually polling. I did some research on modbus tcp and was wondering when openplc sends a modbus tcp packet does it include the slave address with it? some people were saying if it doesn't it wont work with ethernet converters.

Thanks,
Rick
Reply 0 0
thiagoralves
Hi Rick. It seems that the basic configuration looks the same on both. One thing that I’m thinking here could be the poll rate. By default OpenPLC polls all slave devices every 100ms. This could be a problem for slower devices which can lead to a timeout. Try increasing this poll rate to 1000ms or more just to check if it starts working.
Reply 0 0
richw
I tried increasing the poll rate but that didn't help. I had to change some settings in the ethernet converter. It is working correctly now. The problem i am having now is I hook up a second slave device and in the logs both slaves are connecting and disconnecting and failing to read the register data, but not all the time. sometimes I am receiving the data. It seem like some kind of timing issue. I even increased poll time significantly with no help, unless I'm doing something wrong with the way I have it setup. The second slave device is setup the same way as the first except I changed the slave ID. Any help would be appreciated.

Thanks,
Rick
Reply 1 0
Reply