Good Morning OptoMary,
Well, that was not exactly what I was after.
From what I read from your "Testing for True" post is that you are testing the entire "int32" variable value to see if it is "True" or false instead of checking an individual bit in that double word.
What I want is to simply set or clear an individual bit (bits 0-31) in that int32 variable.
i.e. Want to Set int32(bit 5) or (bit 7) or (bit 11) etc., etc.
In the PLC world (in its simplest form) I can do;
--[ Some Input On ]----------------------------(My Variable.Bit2) - Done. Simple and clean!
In OPTO world, am I going to have to do something like;
int32_test [OR] 2^Bit //pseudo code example
Or, similar using OPTO script every time I want to set or clear a bit in one of my local variables?
Can this be done without using OPTO script? This could get really cumbersome and frustrating if I am dealing with or, want to/have to deal with lots of Boolean variables. Example shown was for just setting one bit. Checking for true and comparisons with other variables will need to be done as well.
Is there a simpler way?
Just out of curiosity, why is "Boolean" Data type not available in PacControl ?