
v1 = 0

Label Loop
	Select v1
		' ---------------------- Wait Slot(1) OFF		
		Case 0 			
			If Slot(1) < 500
				v1 = 1
			EndIf
		' ---------------------- Wait Slot(1) ON			
		Case 1	 		
			If Slot(1) > 500
				v1 = 2
			EndIf
    	' ---------------------- Pulse has been pressed		
		Case 2			
			v1 = 0		
			' ------------------ Set Slot(2) ON or OFF
			If Slot(2) < 500
				Slot(2) = 1000
			Else
				Slot(2) = 0
			EndIf
	EndSelect
Goto Loop

