Writing to a tag bit

Hello,

I have been able to address and add the OPC tag bit and I have a good quality tag. I have tried to write to the tag by changing the value from 0 to 1 as an Integer tag or by changing it to a boolean tag and changing the boolean to true. Neither of these work and I don’t get any errors, it just doesn’t do anything. For example, I write a 1 and hit enter and it continues to display 0. Or I click on the boolean box to change it to true and it just stays the same after clicking it. I can read the tags but I cannot write to them from the tag browser. Is there anything else I can try?

This is common for lame Modbus devices that don’t support the standard “masked write” operation. In such devices, you can only (safely) write to complete words. When the mask write fails, there’s typically a corresponding error in the gateway log. Some related topics, with racy work-arounds:

https://forum.inductiveautomation.com/search?q=modbus%20masked%20write

Sorry I forgot to mention this is using a Allen-Bradley Logix Driver

What is the base type of the tag? Are there gateway log entries? { Share more details. }

Also: have you set your designer connection mode to Read-Write?

I checked and there are no gateway logs when I tried to write to it. The designer is in read/write when trying to write to it. The base tag data type is BOOL decimal style and the bit is SINT binary style.

You can’t write to outputs. Even if you could, I’d avoid addressing IO directly.

You can only write to Logix outputs if:

  • The tag in Logix is set to external access == read/write, and
  • No logic in the PLC is writing to that tag.
1 Like