WinCC VBScript InvertBitInVariable
We have already seen the Set and Reset function of a bit in a non-boolean variable here. But we still need to see another function, such as inverting a bit of a Variable. I have created the two possible versions, the one where we write directly to the variable or the one where we write in the DataManager; if you have questions, please review this explanation.
What we do is check the bit that we pass as a parameter from the variable we pass as a parameter, and depending on its state, we invert it.
As we have seen previously, we use the And and Or functions.
Since we are on the subject, let's see how it would be for a boolean variable in its two versions as before.
The use of the function is very simple; we call it and pass the arguments.
If you are interested, you can download here the file with the four functions.
May 28, 2018
"Gratitude in silence serves no one." Gladys Bronwyn Stern