Thanks for these responses.
I was able to accomplish the above using the expression ([Alarm Status Tag1]==1)x1 + ([Alarm Status Tag2]==1)x2, etc. to pack individual bits into a word.
However, I'd like to use dan's solution for setting bits of HMI pushbuttons packed into words. In the above example, the Alarm Status Tags are internal tags that can be read and used in an expression.
I've tried creating an I/O tag "HMI Pushbuttons" which writes to the PLC address, with child tags for each button of type "Numeric Calculation". In the first button tag, I tried the expression And([HMI Pushbuttons],0x0001). However, this gives me an invalid as the response.
Can you walk me through the steps on how to set this up properly, including which tag types to create and which to link to the pushbuttons?
Thanks.
Thanks for these responses.
I was able to accomplish the above using the expression ([Alarm Status Tag1]==1)x1 + ([Alarm Status Tag2]==1)x2, etc. to pack individual bits into a word.
However, I'd like to use dan's solution for setting bits of HMI pushbuttons packed into words. In the above example, the Alarm Status Tags are internal tags that can be read and used in an expression.
I've tried creating an I/O tag "HMI Pushbuttons" which writes to the PLC address, with child tags for each button of type "Numeric Calculation". In the first button tag, I tried the expression And([HMI Pushbuttons],0x0001). However, this gives me an invalid as the response.
Can you walk me through the steps on how to set this up properly, including which tag types to create and which to link to the pushbuttons?
Thanks.