[WinCC-VBScript] lecture de bit
Bonjour a tous...
bon voila mon problème,je viens lire un mot (word) que je voudrais eclater en bit pour pouvoir par la suite venir en lire 5, le script bloque dans la boucle
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Function Text_Trigger(Byval Item)
Dim texte
Dim MON_INDEX,i
Dim Mon_Int
Dim Bit(16)mes bits
Set Mon_Int = HMIRuntime.Tags("Mon_Int")Mon mot
Set MON_INDEX = HMIRuntime.Tags("MON_INDEX")
Set texte = ScreenItems("Mon_Text")
MsgBox "je suis la "
For i = 1 To 16
MsgBox "je suis lala "
Bit(1) = Mon_Int & 2^i 'C est la que ca bloque au niveau du masque
MsgBox "bit"
If Bit(i) Then
b = HMIRuntime.Tags("MON_INDEX").Read
texte.text TextFileReadLine("C:\Ma_list.txt",b)
End If
Next
MsgBox "out" |
Merci a tous
End Function