Tag writes to float as int

I have a 7.9.9 project where one particular tag writes to a float value in a CompactLogix PLC as if it was an integer value. It reads it correctly as a float, but writes it as an int. I have tried renaming the tag in ignition, deleting and re-creating it, putting it in different folders, dragging it in from the OPC browser, copying and pasting a similar tag and just changing the OPC Item Path, and no good. I’ve deleted and recreated the tag in the PLC, even downloaded to the PLC without the tag and then re-added it.

PLC Tag name is SP_Flow_SupplyAir_FOA. It reads correctly - change the value in the PLC, value changes in Ignition. But if I try to write to it, it writes a scrambled, nonsensical value.

If I change the PLC tag to SP_Flow_SupplyAir_FOA1, and update the OPC item path in Ignition, it works correctly. As soon as I remove the 1 from the end, it breaks again - it will display correctly, but if I try to change the value from ignition, it results in a scrambled, nonsensical value in the PLC. This applies whether I change it from on object on the screen, or direct on the tag browser.

I am absolutely stumped as to why this is happening. It’s literally just that exact tag name that it has the problem with - no other tags have a problem, and neither does that one if I just slightly change the name of the PLC tag.

Anyone got any ideas?

The Logix driver caches the entire hierarchy of tag names and structures and types in a connected processor. If allowed, it attempts to track changes using a PLC-providing change indicator, but that sometimes goes awry. Have you tried restarting the device connection (disable then re-enable, or simply edit the device)?

1 Like

Disabling and re-enabling didn’t help.

Interestingly, if I drag the tag in from the OPC server, it creates it as data type Int4. So obviously you’re right, maybe when I first created the tag I accidentally made it a DINT, then changed it, but Ignition still has it cached as an integer. If I create a new driver with a different name, it drags it in as a float. If I delete the old driver and create it again with the same name, it’s back to an int. So I guess the cache is based on the driver name? Any ideas on how I can clear the cache?

You need to restart the UA module or the Ignition Gateway.

1 Like

Thanks Kevin, that worked.

Long standing bug… as soon as you access the node in the server somehow (browse, read, write, subscribe), its DataType gets “locked in” in the OPC UA server until it’s restarted.

Ah, good to know. Is there a plan to patch it in a future release?

1 Like