Hello all,
I'm having a problem that i could use some advice on. I have a combo box and a static text box that has dynamic text based off an integer down in the AS. What i want to have happen is that every time the selection of the combo box changes that a new value of the selected index is pushed into this integer so that the text changes to a verbose description I have the code under my miscellaneous event Change. Please see the code attached below
Dim VarButton
Dim OPERATIONLOG
Dim TAGNAME
Dim INDEX
Dim RSB_FLAG
Dim DFE_FLAG
Dim UNE_FLAG
Dim READY
Dim MachineStateTemp
Dim test_text
Set RSB_FLAG = HMIRuntime.Tags("AS1/DFE_UNE_RSB.RSB_Flag")
RSB_FLAG.Value = 1
RSB_FLAG.Read
RSB_FLAG.Write
Do
' Set MachineStateTemp = HMIRuntime.Tags("AS1/MachineStateTemp")
'MachineStateTemp.Read
'test_text.text = "i'm here"
Set VarButton = HMIRuntime.Tags("AS1/MachineStateTemp")
Set INDEX = HMIRuntime.Tags("AS1/DFE_UNE_RSB.DFE_LIST_INDEX")
INDEX.read
VarButton.Value=300+INDEX.Value
VarButton.Write
'MachineStateTemp.Value = VarButton.Value
'MachineStateTemp.Write
Set TAGNAME = ScreenItems("TAGNAME")
TAGNAME.Text = "MachineStateTemp"
Set OPERATIONLOG = ScreenItems("OPERATIONLOG")
OPERATIONLOG.Text = " Change Machine State to "&VarButton.Value
Set "AS1/DFE_UNE_RSB.DFE_Flag" = False
Set DFE_FLAG = HMIRuntime.Tags("AS1/DFE_UNE_RSB.DFE_Flag")
Set UNE_FLAG = HMIRuntime.Tags("AS1/DFE_UNE_RSB.UNE_Flag")
Set READY_FLAG = HMIRuntime.Tags("AS1/DFE_UNE_RSB.READY_Flag")
DFE_FLAG.Read
UNE_FLAG.Read
READY_FLAG.Read
If(DFE_FLAG.Value = 1 Or UNE_FLAG.Value = 1 Or READY_FLAG.Value = 1) Then
RSB_FLAG.Value = 0
RSB_FLAG.Write
End If
'RSB_FLAG.Value = 0
'RSB_FLAG.Write
Loop While(RSB_Flag.Value = 1)
any advice would be greatly appreciated!
~M.
I'm having a problem that i could use some advice on. I have a combo box and a static text box that has dynamic text based off an integer down in the AS. What i want to have happen is that every time the selection of the combo box changes that a new value of the selected index is pushed into this integer so that the text changes to a verbose description I have the code under my miscellaneous event Change. Please see the code attached below
Dim VarButton
Dim OPERATIONLOG
Dim TAGNAME
Dim INDEX
Dim RSB_FLAG
Dim DFE_FLAG
Dim UNE_FLAG
Dim READY
Dim MachineStateTemp
Dim test_text
Set RSB_FLAG = HMIRuntime.Tags("AS1/DFE_UNE_RSB.RSB_Flag")
RSB_FLAG.Value = 1
RSB_FLAG.Read
RSB_FLAG.Write
Do
' Set MachineStateTemp = HMIRuntime.Tags("AS1/MachineStateTemp")
'MachineStateTemp.Read
'test_text.text = "i'm here"
Set VarButton = HMIRuntime.Tags("AS1/MachineStateTemp")
Set INDEX = HMIRuntime.Tags("AS1/DFE_UNE_RSB.DFE_LIST_INDEX")
INDEX.read
VarButton.Value=300+INDEX.Value
VarButton.Write
'MachineStateTemp.Value = VarButton.Value
'MachineStateTemp.Write
Set TAGNAME = ScreenItems("TAGNAME")
TAGNAME.Text = "MachineStateTemp"
Set OPERATIONLOG = ScreenItems("OPERATIONLOG")
OPERATIONLOG.Text = " Change Machine State to "&VarButton.Value
Set "AS1/DFE_UNE_RSB.DFE_Flag" = False
Set DFE_FLAG = HMIRuntime.Tags("AS1/DFE_UNE_RSB.DFE_Flag")
Set UNE_FLAG = HMIRuntime.Tags("AS1/DFE_UNE_RSB.UNE_Flag")
Set READY_FLAG = HMIRuntime.Tags("AS1/DFE_UNE_RSB.READY_Flag")
DFE_FLAG.Read
UNE_FLAG.Read
READY_FLAG.Read
If(DFE_FLAG.Value = 1 Or UNE_FLAG.Value = 1 Or READY_FLAG.Value = 1) Then
RSB_FLAG.Value = 0
RSB_FLAG.Write
End If
'RSB_FLAG.Value = 0
'RSB_FLAG.Write
Loop While(RSB_Flag.Value = 1)
any advice would be greatly appreciated!
~M.