Writing to an integer OPC tag from a Checkbox

I have a tag in my UDT that shows if a part of the PLC logic is enabled or disabled. However, this is an integer tag and the requirement is to toggle this from “enabled” to “disabled” using a checkbox in perspective.

The problem I’m having is that when the logic is enabled, the integer tag is “1” and when the logic is disabled the integer tag is “2”.

I have tried using an expression binding with a transform in order to display this state on the checkbox and this seems to work well. However, when clicking on the checkbox to toggle the state, this value is not written back to the PLC.

I think the problem boils down to the fact that I am looking for a way to write to an integer tag from a checkbox?

I appreciate that there are different components I could use to achieve this but I’d really like to be able to do this with a checkbox if possible.

(using Perspective, Ignition version 8.0.9)

Easily fixed! Created a boolean tag to reference the specific bit of the integer tag that I was going to change…

1 Like