I'm new to robot programming and the program I wrote gets stuck in the "Wait timeout" section. I'm not sure if this is due to my lbl's or ordering of my I/O values.
This is for an "open & close" program for some clamp fixtures using a fanuc tp. Example below...
LBL 1 (check fault)
waittmout = R(1:check clamp timeout)
DO (1:ext) = ON
DO (2:ret) = OFF
Wait DI(1: C1 ret) = OFF AND DI (2:C1 ext) = ON TIMEOUT, LBL 100
//I do this for each of the DI's for the valves, the lbl pairs to my check fault loop
JMP LBL(10) // If no fault
LBL (100:C1 CLS Fault) //check fault loop
UALM(1) //stating which DI had fault
JMP Lbl 1
LBL (10: Valve # cls)
// I've also tried adding an "If Then Else Statement after the user alarm, ex below...
If (DO(1:ext) = ON AND Do(2:ret)=OFF THEN JMP LBL(1)
ELSE
JMP LBL (10)
Are there any glaring mistakes or improvements I could make to the program? Let me know if more info is needed.