Hi all. I was converting a SCADA to Ignition under the assumption that all my Boolean tags were configured as Booleans in the PLC. I created dozens and dozens of one shot buttons in the new Ignition SCADA with control values bound to OPC tags with bad paths that I intended to configure later.
When I got access to the tags via Kepware, I realized that all of the push buttons were referencing individual bits of Integer tags.
That said, I am wondering if there is an easy way to reference the individual bits of a PLC integer tag that can support writing. Putting a dot or a forward slash with a bit number at the end of a path to an OPC integer does not work (e.g. opcItemPathToIntegerTag.bitNum or opcItemPathToIntegerTag/bitNum)
My colleagues and I came up with several solutions to this problem:
- Creating OPC tags for the integers, and then creating Boolean expression tags using the getBit function to reference the individual bits of the integers. This approach allowed for read access to the bits without reprogramming the tag paths. However, the expression tags cannot be written to directly, so the push buttons cannot be fully implemented this way.
- Could theoretically make it bidirectional by having a Boolean memory tag for every expression tag: button writes to memory tag, which has a change script to write to OPC integer tag. Expression tag reads integer bit and writes its value to the memory tag. This is convoluted though...
- Creating a template that will add/subtract an appropriate value to the desired tag based on tag path and bit numbers indicated by parameters. This would entail reprogramming many of the push buttons in the SCADA, replacing the one shot buttons with template instances
- Adding Boolean tags to the PLC for Ignition to write to and mapping the PLC tags to the appropriate actions, redoing the OPC paths for the Ignition tags. This would be a clean solution and will not involve having to reprogram the buttons
We're planning on going for option 2 or 3 presently. However, does anyone know of a more elegant way to tackle this issue, preferably by just manipulating opc item paths?
If not, I strongly believe that a feature should be added: I would like to be able to append a dot or a slash and a bit number to the end of an OPC Item Path to an integer to access the individual bits of the integer.