Hi,
I try to read a Siemens word where each bit represents an alarm into a boolean array.
I set the OPC Item path to [HD200_TAKEUP]DB3201,W5136.0 and expect to get an array with 16 elements. But instead I get 32?
This syntax is incorrect. You’re asking for bit 0 of that word, then letting Ignition turn that bool into an int, then casting that int into a bool array.
A Siemens Word is unsigned. Ignition’s tag system doesn’t have unsigned values, so it’s delivered to the tag system as a value the next size up - a signed integer. You’re then telling Ignition to treat it as a bool array.
Try addressing it as Signed Int instead: [HD200_TAKEUP]DB3201,I5136
That would cost your 7 power tags license cost, tags gets expensive in siemens very fast, and tossing 7 uneccecary bools instead of a DWord is just like burning money in your bbq.
125 tags addressed as a Word in the Siemens driver syntax, but use Boolean Array for the Ignition tag type. Ignition tags have limited special handling for this case. I think it will be read only, and you’ll have to look closer at your options for configuring alarms on a Boolean Array tag.
Which one of the two options would you prefer?
Option 1 would be my preferred solution, but we are wondering if this is less performant for the OPC polling, or is this the same load for the OPC server?
btw, it is not Siemens at our side, but KepWare.
If it’s Kepware you may have a 3rd option of actually reading a Boolean Array, I think their driver supports it.
Either way… #2 would be less load on the OPC Server, but I think the difference does not matter. I’d imagine all 3 place the same polling load on the PLC but I can’t tell you for sure because you’re using Kepware.