AdvancedHMI Software
General Category => Support Questions => Topic started by: Darrell on May 01, 2015, 01:00:23 PM
-
When I start my HMI , the switch always shows Center position , if the bit for right or left is true it still shows the Center position , Micrologix 1400 , I have to click it to show the correct position
Darrell
-
Do you have anything in the properties PLCAddressValueLeft and PLCAddressValueRight? If there is nothing in those properties, it will not sync up with the PLC.
-
Yes I do , the bit is true , and it doesn't sync up
Darrell
-
Open SelectorSwitch3Pos.vb and add this code to the PLC Related Properties region:
Private m_ValueLeft As Boolean
Public Property ValueLeft As Boolean
Get
Return (Value = 0)
End Get
Set(value As Boolean)
If m_ValueLeft <> value Then
If value Then
Me.Value = 0
ElseIf Not m_ValueRight Then
Me.Value = 1
End If
m_ValueLeft = value
End If
End Set
End Property
Private m_ValueRight As Boolean
Public Property ValueRight As Boolean
Get
Return (Value = 2)
End Get
Set(value As Boolean)
If m_ValueRight <> value Then
If value Then
Me.Value = 2
ElseIf Not m_ValueLeft Then
Me.Value = 1
End If
m_ValueRight = value
End If
End Set
End Property
-
Now works , thanks Archie
-
What I noticed today was when I load my HMI the switch will sync , but if I happen to click the switch to another position it will not re-sync
I'm using this one as an indicator , to tell me which one is on , Hand/Off/Auto switch for example
Darrell