Modbus only working in Quick Client

I have kind of a weird problem with a new Modbus TCP device. The device is configured and I’ve set up tags using address mapping. When I use the Quick Client and trigger a read, it reads fine. I’m monitoring traffic with Wireshark, and I see the connection, request, and response.

image

But in the Designer, the tags are all null with a quality of Unknown. I’ve tried using the address mapping syntax for the tag and also manual addressing, with and without the unit id. Wireshark shows no traffic on port 502.
image

image

image

Also, when I set up a subscription in Quick Client, it’s always null. But a single read works fine.

This is in Ignition 7.9.7.

Usually for troubleshooting stuff like this it helps to delete the mapping and disable or delete all tags you’ve defined in Ignition except for one that you’re confident should have the right address and focus on that.

In this case it seems like you should just have one tag with an OPC Item Path of [eaoModbusTest]IR0. I assume you’ve got the driver configured for zero-based addressing as well?

It looks like restarting the OPC-UA module fixed this problem. Restarting the Modbus module wasn’t enough. Subscriptions in the Quick Client as well as creating new tags in the tag browser with manual addressing both work now.

I have this same issue with ignition 8.1.47. I restarted the Modbus module and the OPC-UA module and nothing changed. My designer shows the tags as Bad_Failure, but in quickclient if I read the tag it comes back w/ correct result almost instantly. Also if I subscribe to the tags in quickclient only the first tag works.

Even though the capability exists to create modbus tag mappings, it's recommended to not use it and to directly link to the registers following the proper naming convention.

2 Likes

Follow Kevin's advice above:

  • Delete your address mappings (as Michael notes, they are not recommended, especially when troubleshooting).

  • Create one manually addressed OPC tag at the default pace. Ensure the manual address includes the unit address if non-zero.

  • If that works, add more tags until you hit a problem.

2 Likes

I have no address mappings in the device setup. I addressed each Modbus address individually with OPC tags and initially they all work, but they do not follow the tag provider and never update after initial poll. So the only way that I have found that they will “repoll” or update again is if i double click into the tag value and click out of it then I get hit with this error: “Error writing to outputvolt.value: Bad("Bad_InternalError: An internal error occurred as a result of a programming or configuration error.")”, but as soon as close the error dialog box it reads the tag and sends me the correct value. See screenshot of my tag and tag provider setup.

Any ideas?

When you get the internal errors, are you getting a corresponding log entry in the gateway?

Your tag group name looks odd. Is that tag group name exactly matching in your tag?

If you collect packets with wireshark, with just this one tag enabled, you should see a read request every five seconds. Please verify.

Try resetting your tag group back to defaults to make sure it's not causing you problems. If you want to change the rate, only change the rate in the common section and leave the rest. This should help with narrowing down any problems. (Or create a new tag group just for testing and leave it at defaults except the rate if you want to slow it down).

Also, start with just a single tag on the device instead of creating them all (or just disable the other tags for now). If 1 tag works, keep adding tags to try to see when things break. There could be some modbus settings like span gaps that could be turned off to help with compatibility. (I've had some modbus devices return errors if any register it doesn't "support" is attempted to be read..even if it's between 2 valid registers). The modbus driver is less efficient this way, but fixes some compatibility.

Finally, check your logs and see if you're getting any errors.