/JOB
//NAME MASTER
//POS
///NPOS 0,0,0,0,0,0
//INST
///DATE 2015/07/28 13:20
///ATTR SC,RW
///LVARS 4,0,0,0,0,0,0,0
NOP
' Master Job
*TOP
' Capture if R1, R2 in home cube
DIN LB000 SOUT#(120)
DIN LB001 SOUT#(119)
DIN LB002 SOUT#(118)
SET LB003  EXPRESS LB000 + LB001
SET LB003  EXPRESS LB003 + LB002
' Jump to positioner sweep if
' robots at home
JUMP *HOME IF LB003=3
PAUSE
' Robots not at home position
' Move robots home and restart
' from top of master job
CALL JOB:HOME-RBT IF LB003<>3
JUMP *TOP
' 
*HOME
' Sweep to A if at side B
CALL JOB:SWEEP-TO-A IF IN#(4002)=ON
' Sweep to B if at side A
CALL JOB:SWEEP-TO-B IF IN#(4001)=ON
' 
' If the controller does not go
' into the SWEEPTOx jobs then
' verify that the positioner is
' at either A or B position and
' restart from top of master
JUMP *HOME
END
