du hast recht, jetzt wird nur noch 0 (inaktiv) und 1 (aktiv) ausgegeben. Das Programm hat sich jedoch einige Male verabschiedet. Jetzt läuft es zwar wieder normal...
Welche Ideen hast du denn für den zweiten Ausgang?
Code
Dim bRawByte(10) As Byte
Dim bMarkerByte() As Byte = {1, 2, 3, 4, 5, 6, 7, 8}
Private Sub Venti_Dusche_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Venti_Dusche.Click
ComError = easyCOM.MC_Write_Object_Value(MyComHandle, 0, 4, 1, 0, 1)
ComError = easyCOM.MC_Read_Object_Value(MyComHandle, 0, 1, 1, 0, bRawByte(0))
MsgBox(bRawByte(0) And 1)
If bRawByte(0) = 1 Then
Venti_Dusche.BackColor = Color.Yellow
Else : Venti_Dusche.BackColor = Color.Transparent
End If
End Sub
Dim bRawByte_1(10) As Byte
Dim bMarkerByte_1() As Byte = {1, 2, 3, 4, 5, 6, 7, 8}
Private Sub Venti_WC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Venti_WC.Click
ComError = easyCOM.MC_Write_Object_Value(MyComHandle, 0, 4, 11, 0, 1)
ComError = easyCOM.MC_Read_Object_Value(MyComHandle, 0, 1, 2, 0, bRawByte_1(0))
MsgBox(bRawByte_1(0) And 1)
If bRawByte_1(0) = 1 Then
Venti_WC.BackColor = Color.Yellow
Else : Venti_WC.BackColor = Color.Transparent
End If
Alles anzeigen
Leider funktioniert es mit dem 2. Ausgang nicht wie erhofft. Ich habe eine neue Variable für den zweiten Ausgang definiert (bRawByte_1(0)).
Edit: Leider funktioniert auch die Einfärbung der Buttons nicht mehr...