Guimmie
Member
Hi!
In a WinCC Flexible script I'm trying to get some bit from some Tag so as I don't have to read to much Tags from PLC.
Now, for example, I'm reading EB0 and E0.0 too by different tags and it's what I want to change.
At first, I was looking for some "BitInTag()" function but I didn't found It...
Then, I decided to make my one "GetBitInTag(Tag,Bit)" function with the next code:
Dim Aux
ShiftAndMask Tag,Aux,Bit,1
If Aux = True Then
GetBitInTag = True
Else
GetBitInTag = False
End If
I was confied that It was going to work (and the compiler was with me) but in the best way, WinCC Flexible Runtime crashes with a "...need to be closed..." error.
If someone knows some function to make this or can improve my script, please reply!!!!!
Thanks!
In a WinCC Flexible script I'm trying to get some bit from some Tag so as I don't have to read to much Tags from PLC.
Now, for example, I'm reading EB0 and E0.0 too by different tags and it's what I want to change.
At first, I was looking for some "BitInTag()" function but I didn't found It...
Then, I decided to make my one "GetBitInTag(Tag,Bit)" function with the next code:
Dim Aux
ShiftAndMask Tag,Aux,Bit,1
If Aux = True Then
GetBitInTag = True
Else
GetBitInTag = False
End If
I was confied that It was going to work (and the compiler was with me) but in the best way, WinCC Flexible Runtime crashes with a "...need to be closed..." error.
If someone knows some function to make this or can improve my script, please reply!!!!!
Thanks!