8/3/2016 1:36 PM | |
Joined: 6/3/2014 Last visit: 1/17/2023 Posts: 660 Rating: (192) |
Hello List, WinCC RT Advanced or WinCC RT Professional? Do you want to check if both are set at the same time or do you need each of them for seperate operations? VBS example: 2^0 + 2^8 = 1 + 256 = 257
Now you can use the tag "TestResultBool" to use in your operation. If done this way, other bits in Test[1] can be set, too, but it has no influence on the result. Inspired by: http://www.jameshbyrd.com/using-bitwise-operators-in-vb/ For tags of the datatype integer you can use the function "ShiftAndMask": ShiftAndMask(Source tag, Target tag, Bits to shift, Bits to mask) There might be more Options in C --> see questions above. |
Last edited by: H.J. at: 8/3/2016 1:39:08 PMLast edited by: H.J. at: 8/3/2016 1:40:20 PMLast edited by: H.J. at: 8/3/2016 1:53:30 PMLast edited by: H.J. at: 8/3/2016 2:05:14 PM~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ★ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
|
This contribution was helpful to1 thankful Users |
Follow us on