1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Fanuc Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Defect and BG logic

  • ashley
  • December 19, 2024 at 2:47 PM
  • Thread is Unresolved
  • ashley
    Reactions Received
    1
    Posts
    39
    • December 19, 2024 at 2:47 PM
    • #1

    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 :face_with_tongue: ?
    Thank in advance.

  • asdf
    Reactions Received
    7
    Trophies
    1
    Posts
    45
    • December 20, 2024 at 3:42 PM
    • #2

    Fanuc does allow up to 8 BG logic programs, there is more info in the HandlingTool manual or the help button on the pendant.

    Also you can use the "run" instruction from BG logic instead of the "call" instruction. The link below has some good info on how that works.

    How to RUN FANUC Programs Concurrently with the RUN statement - ONE Robotics Company


    In the past I have used something along the lines of this to monitor the status of a gripper while holding a part. The F[enableGripCheck] would need to be turned on after you pick up the part and turned off before you place the part.

    Code
    *psuedocode
    *running in BG logic
    
    IF (F[enableGripCheck] AND (DI[GripNotOK]) THEN
    F[enableGripCheck=(OFF)
    !handle dropped part however you want
    ENDIF
  • ASUA1
    Reactions Received
    6
    Trophies
    1
    Posts
    24
    • December 20, 2024 at 5:30 PM
    • #3

    You may want to consider using the skip function in your program instead of BG logic. To me this seems like it would have more control over the situation and can trigger movements as needed whereas BG cant trigger movements. Doing it this way you can stop the robot from performing the move if it has dropped the part and you can "recover" faster

  • hermann
    Reactions Received
    404
    Trophies
    9
    Posts
    2,595
    • December 21, 2024 at 9:24 PM
    • #4

    What about condition monitoring? Programing statement "WHEN".

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • December 23, 2024 at 2:42 AM
    • #5

    In the past I have either used the skip function to monitor the gripper or use a PLC to monitor the signal and stop the robot. It is possible to do with BG logic or condition handlers as well.

  • ashley
    Reactions Received
    1
    Posts
    39
    • December 24, 2024 at 1:46 PM
    • #6

    Hello, I guess monitoring 2 BG Logic at the same time should do the job.
    On staubli, an expert told me once it is recommand to use 1 BG program only. Having 2 or more BG at time might greatly reduce processing speed.

    Quote from HawkME

    In the past I have either used the skip function to monitor the gripper or use a PLC to monitor the signal and stop the robot. It is possible to do with BG logic or condition handlers as well.

    Does ABORD or Pause fonction works in BG logic ? or do you use signal to PLC to stop the robot in the BG logic

    Thank you for your response and merry christmas.

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • December 24, 2024 at 2:46 PM
    • #7

    It can work in BG Logic if you are controlling the UI signals from there (indirectly with flags).

    Normally I use the PLC to control the UI signals. If you don't have a PLC then BG logic can act like a mini PLC. Also you can have multiple sections of logic in a single BG Logic program.


    Merry Christmas!

  • ashley
    Reactions Received
    1
    Posts
    39
    • December 24, 2024 at 2:54 PM
    • #8

    I do use a PLC to order the robot to start / stop and ordering which Mission the robot should do.

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • December 24, 2024 at 3:29 PM
    • #9

    Then easiest would be to have the PLC monitor the signal and turn on the pause signal when needed.

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Similar Threads

  • ERROR (-1418) Amp main circuit voltage in power block A - in AD Kawasaki control

    • SINTETIKA
    • October 6, 2022 at 8:01 AM
    • Kawasaki Robot Forum
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download