Hi everyone,
The structure of my program is as follow :
I do have a MAIN programs call by the PLC and inside the Main a select instruction to call any other programs depending of a variable from the PLC
On top of that , i've BG logic , nothing surprising and everything is running fine.
I wanna add to my program some defect of the gripper which is basically as follow :
Before doing my last Linear pick mouvement : I need to control if the gripper is open, if not the program must be stop until the DI[Gripper_Open] = On
Doing this is quite simple inside a program (not the BG)
IF (DI[60:Gripper_open]=OFF)
GO[4:Robot_Defect]=1
CALL F_Defect
ENDIF
Inside the F_Detect TP Program
R[6:Defect_Robot]=GO[4:Robot_Defect]
SELECT R[6:Defect_Robot] =1, JUMP LBL[1]
=2, JUMP LBL[2]
=3, JUMP LBL[3]
LBL[1]
Message [Gripper not open before picking]
WAIT DI[60:Gripper_open]=ON
JUMP LBL[999]
As you can see the robot is not really hold or pause, it is simply a wait instruction, which is what I need, the robot will kept going is the DI is active
The current issue is , I want to permanently control that the gripper remains close once my robot has pick up the product.
I must use those information inside the background logic , but the background logic cannot call any program , nor contain any WAIT instruction (logic : it must loop).
I could use the RUN instructions instead of CALL inside the BG , to run the F_detect independently
How should I use a judicious program for this defect information?
Should I use 2 BG logic (does fanuc allowing that?)
Instead of calling for F_defect, it might be better to use a register that the BC logic will see and then run the F_defect ? ( to prevent the F_defect being call twice (once by the main and also run by the BGlogic)
How do expert like you handle those situation ?
Thank in advance.