0

How to reset switch trigger to False for Amber and Green when in Red condition?

J Kelly 5 years ago in IQANdesign 0
Hello, 

I have created a Qcode using Enable/Disable SMC

Green // used to go to green from yellow when Message Enable >= 2

if (Message Enable >= 2 and Switch_Trigger_Now = True) then
Result:= True
endif

Red // used to remove the slider 

if (Message Enable = 0) then
Result:= True
endif

Amber //used to keep at Amber whether off or on when in state 1

if (Message Enable = 1 or Message Enable >= 2 and Switch_Trigger_Now = False) then
Result:= True
endif
if (Message Enable = 1 and Switch_Trigger_Now = True) then
Result:= True
endif

Image 1574
I would like for the Green and Amber buttons to reset to 0 when the Red state condition is met. 

Unfortunately the reset does not work after the user pushes the button and it stores the last value of the slider. However the condition of keeping the slider on when Amber and retaining to switch to Green is detectable. 

Are there any suggestions on how the Red state can be used to reset the slider button. 

I can also provide in file format if this helps.