[?]: How invert Bit function in WinCC V6.0 SP4 ?

ProTool, WinCC flexible, WinCC, PP/OP/TP/TD/MP
Post Reply
Posts: 23
Joined: Sat Sep 23, 2006 6:58 pm
Location: Venezuela

[?]: How invert Bit function in WinCC V6.0 SP4 ?

Post by Mendicoaj » Tue Jan 16, 2007 2:34 pm


I am trying to implement a Invert bit function in WinCC v6.0 when i click over a picture object. I mean that when i click one time the bit set to 1, when i click again over the picture the bit set to 0....and so...

In WinCC Flexible i can find that the function is direct available in the function list "InvertBit".

But, How could i implement this function with WinCC v6.0?


Posts: 50
Joined: Wed Aug 16, 2006 8:49 pm
Location: Europe

Post by zxcslo » Sat Jan 20, 2007 1:17 pm

Public Function ToggleBit(InByte As Byte, Bit As Byte) As Byte

ToggleBit = InByte Xor (2 ^ Bit)

End Function

Post Reply