BITAND function? Trying to use BITAND in variable address. BITAND 0x080 works but not BITAND 0x100 or above? Works in Cicode and graphics. Any ideas?
BITAND function? Trying to use BITAND in variable address. BITAND 0x080 works but not BITAND 0x100 or above? Works in Cicode and graphics. Any ideas?
I'm surprised that the first example even works. In standard Variable Tags (that refer to physical I/O devices) expressions are not allowed in address fields, unless you are referring to Calculated Variables.
Can you give some more details about the tag definition and the Plant SCADA version used? It looks like your expression is limited to 8 bits.
Hi Patrick
Yes from what i have found it seems the address field for the Cicode Digital tag is limited to 8 bits.
I am using Plant Scada 2023 Version 8.40.
I have a INT status Variable tag that gets data from physical I/O device. Each bit indicates if a timer is on/off.
I have internal Digital Variable tags ie Timer1, Timer2 ...Timer10 etc
In cicode if i write Timer1 = StatusTag BITAND (1), Timer2 = StatusTag BITAND (2)....Timer10 = StatusTag BITAND (512) etc and run this internal digital tags update as required.
If i change the Internal Digital Variable tag to cicode and add address as StatusTag BITAND (1) this works up to StatusTag BITAND (128). StatusTag BITAND (256) and above fails.
On graphics with a symbol set triggered from StatusTag BITAND (1) or StatusTag BITAND (256) or StatusTag BITAND (512) etc this also works.
Hope that makes sense.
Thanks
Sounds like a product limitation or defect. Maybe contact Support for further assistance?
Have you tried an expression like (tag BITAND 0x0200) > 0 ? This may alleviate the limitation of coercing a value > 255 into a digital.
Great suggestion. I would use (tag BITAND 0x200) <> 0 however to prevent problems with the 15th bit being interpreted as the integer sign flag.
Thanks Stuart that seems to work. I used Patricks suggestion as i might need all bits. Much easier using address then adding extra cicode. And can also populate via equipment module. Thankyou
Thanks Patrick for your suggestion. That seems to work.
I had tried something similiar earlier but without the brackets which confused it.