We have a field device that used Modbus TCPip. I may be not understanding how this is supposed to be set up. I configured the driver for the correct IP and port, but the statusshows connected for a few seconds then drops out.
I have actually remove all the tags using the connection except for one. Any ideas?
Where are you seeing the drop out?
Is it in the device status in the gateway or in the designer where the tags are going bad?
There are a lot of very low power Modbus devices that have limits on speed of polling and maximum amount of registers able to be polled at a time, maybe you are approaching these limits? These are configurable in the driver.
Generally if it is "Bad" tags, if you have a single tag on the unit that fails for some reason, it will force all tags of the same register type/polled in the same request to fail as well. Fix the one bad tag and all the surrounding tags work again.
at the gateway level. I have only 1 tag pointing to the device (might have the address wrong for that tag) Trying to figure out the addressing at the moment.
Many devices will drop an idle connection after ten seconds. If you've screwed up the addressing, there might not be an active poll happening.
I guess that makes sense.
If you share more details, we can probably help you with the addressing.
The device is a Red Lion device. It was set up (supposedly) with the addresses that were in the device that the Red Lion replaced. I am not familiar with the device nor its predecessor. The old HMI communicated to the old device through the same protocol I believe. The address for the heartbeat tag for example was 413499.
So I entered the address as ns=1;s=[Roads]413499
That does not work, I get a config error on the tag.
after running across this page:
I tried ns=1;s=[Roads]HRI413499 (the heartbeat is a 32 bit integer I was told)
I get a Bad status with this as opposed to bad configuration.
Start with defining the Device ID:
ns=1;s=[Roads]1.HRI413499
Also that register ID looks like its got a function code on the front, so its likely that it should be:
ns=1;s=[Roads]1.HRI13499
See how those go.
You may also need to mess around with the zero based addressing
and reverse word order
options in the driver configuration for the device.
ns=1;s=[Roads]1.HRI13499
This worked! I guess I need to figure out how to reconfigure the rest of them.
If you can, mark the post as a solution to help others with similar issues.
Kudos also to pturmel for providing a possible explanation for the connection dropping out. Unfortunately I can only mark one solution.
2 Likes