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

Why doesn't my program start? (RUN) after a stop, only the original program starts

  • ssaul
  • September 12, 2024 at 4:10 PM
  • Thread is Resolved
  • ssaul
    Reactions Received
    8
    Posts
    53
    • September 12, 2024 at 4:10 PM
    • #1
    Code
    good morning team
    
    Currently I execute a program with the RUN instruction to make the process faster, the program I execute is the draining of a servogun, while the robot drops and then picks the gun is being drained. Sometimes while the draining is executed they open the door or put In manual the station or the robot receives a hold and stops the two programs when starting the cycle again, only the main program starts and the background program remains paused until I go to teach and press select, monitor selects the paused program and press power again When the program starts, my question is how can I get the two programs to start?
    
    I currently use pns my robot is an r-2000ic with R30IB controller
    
    I don't have Karel's option :(

    Images

    • IMG-20240902-WA0122.jpg
      • 129.01 kB
      • 720 × 1,280
      • 25
  • Shellmer
    Reactions Received
    52
    Trophies
    5
    Posts
    161
    • September 12, 2024 at 5:10 PM
    • #2

    I would suggest you to simply rewrite your draining routine to be executed by a BGLogic (background task) instead of using a RUN command.

    Usually this is done creating a simple trigger, like a DO that when it's on, makes the program execute, and if it's off, it just does a jump to the end of the file. It can be a little tricky if you need to wait for signals as the BGlogic doesn't allow you to jump backwards or use wait commands, but it can be done if you create a state machine and you use a register to advance steps. In case you deactivate that DO, you can just reset all signals and it should be good.

    BGLogic doesn't get interrupted by hold signals or when programs are aborted, and it's main use is to create routines that will be running forever even when on manual mode.

    In case you want to stop the execution of that background logic you can add a condition so if the robot is on manual or the TP selector is ON, it just jumps to the end or reset the state machine step.

  • ssaul
    Reactions Received
    8
    Posts
    53
    • September 12, 2024 at 6:15 PM
    • #3
    Quote from Shellmer

    I would suggest you to simply rewrite your draining routine to be executed by a BGLogic (background task) instead of using a RUN command.

    Usually this is done creating a simple trigger, like a DO that when it's on, makes the program execute, and if it's off, it just does a jump to the end of the file. It can be a little tricky if you need to wait for signals as the BGlogic doesn't allow you to jump backwards or use wait commands, but it can be done if you create a state machine and you use a register to advance steps. In case you deactivate that DO, you can just reset all signals and it should be good.

    BGLogic doesn't get interrupted by hold signals or when programs are aborted, and it's main use is to create routines that will be running forever even when on manual mode.

    In case you want to stop the execution of that background logic you can add a condition so if the robot is on manual or the TP selector is ON, it just jumps to the end or reset the state machine step.

    Code
    thanks for your recommendation
    
    I have several programs running in BGlogin but they are monitoring programs, I have never seen someone run a program in BGlogic that involves moving some external axis of the robot, in this case it would move group 2, which is the servogun.
    If you have any program that I can use as a reference, it would help me a lot.
  • Shellmer
    Reactions Received
    52
    Trophies
    5
    Posts
    161
    • September 12, 2024 at 6:21 PM
    • #4
    Quote from ssaul
    Code
    thanks for your recommendation
    
    I have several programs running in BGlogin but they are monitoring programs, I have never seen someone run a program in BGlogic that involves moving some external axis of the robot, in this case it would move group 2, which is the servogun.
    If you have any program that I can use as a reference, it would help me a lot.

    Ohh, I though you would just want to execute some logic that involved signals to trigger the draining process, like activating a pump and then stopping it when you detected no more water flow.

    Definitivelly, you can't do motion through BGlogic, also it would be unsafe if it was allowed, I was just saying that you can maybe run a background program triggered by a DO that would drain the water from the gun circuit, and would still run until you disabled that DO even if someone opened the door.

    If that is the only purpose of that routine you can share some signals with the normal robot program in order to indicate the robot that the draining started and finished. But if you really need to move the second motion group and you do not start the program from the main again after the doors are closed and rearmed, you may need to use Karel and set the modifier to not abort the program even with abort signals (but that could also give trouble, as you would not be able to abort that program through the FCNT, ABORT ALL.

  • ssaul
    Reactions Received
    8
    Posts
    53
    • September 12, 2024 at 6:28 PM
    • #5
    Quote from Shellmer

    Ohh, I though you would just want to execute some logic that involved signals to trigger the draining process, like activating a pump and then stopping it when you detected no more water flow.

    Definitivelly, you can't do motion through BGlogic, also it would be unsafe if it was allowed, I was just saying that you can maybe run a background program triggered by a DO that would drain the water from the gun circuit, and would still run until you disabled that DO even if someone opened the door.

    If that is the only purpose of that routine you can share some signals with the normal robot program in order to indicate the robot that the draining started and finished. But if you really need to move the second motion group and you do not start the program from the main again after the doors are closed and rearmed, you may need to use Karel and set the modifier to not abort the program even with abort signals (but that could also give trouble, as you would not be able to abort that program through the FCNT, ABORT ALL.

    Code
    Currently in the dress program the gun closes to remove the wear from the cap, it is very rare for it to fail but it is annoying to have to go and select the program so that it can start, I had planned to make a program that would open the screen of that program but The normal execution screen and the background screen have the same ID
  • ssaul
    Reactions Received
    8
    Posts
    53
    • September 25, 2024 at 9:35 AM
    • #6

    NADIE?

  • ssaul
    Reactions Received
    8
    Posts
    53
    • October 8, 2024 at 1:55 AM
    • #7

    HELP ME

  • hermann
    Reactions Received
    403
    Trophies
    9
    Posts
    2,593
    • October 8, 2024 at 7:31 AM
    • #8

    Please don't use code tag for normal text in a post. It makes reading very annoying, most time I don't read them,

    Quote from Shellmer

    ..If that is the only purpose of that routine you can share some signals with the normal robot program in order to indicate the robot that the draining started and finished...

    Why not using solution of Shellmer?

    Use a flag that you reset before running the second task, start the second task, at the end of the second task set the flag. In main task check the flag at the position where the second task has to be finished. If it hasn't been finished start task again and wait for flag. If you wanna make it bullet proof use a second flag that indicates that second task has been started but not finished.

  • sborchshev
    Reactions Received
    1
    Trophies
    2
    Posts
    35
    • October 8, 2024 at 5:56 PM
    • #9

    It is impossible to run two programs with motion instruction withing one motion group as far as I know.

  • ssaul
    Reactions Received
    8
    Posts
    53
    • October 8, 2024 at 11:16 PM
    • #10

    perdon por ponerlo como un codigo es solo que mi idioma natal es español y uso un traductor por eso se pone como codigo

    este es mi pns10

    Antes de entrar a soldar a wd1st045lh_234 tiene un wait que confirma que no este corriendo el programa run TIP:DRESS:GUN1_RUN


    Este es el programa TIP_DRESS_GUN1_RUN al incio del programa activo una DO 179 y la apago al final del programa


    en eso no tengo problema, el problema es cuando entran a la celda y esta corriendo el programa RUN se pausa y ya no restablece, solo restablece el programa principal


    Quote from hermann

    Please don't use code tag for normal text in a post. It makes reading very annoying, most time I don't read them,

    Why not using solution of Shellmer?

    Use a flag that you reset before running the second task, start the second task, at the end of the second task set the flag. In main task check the flag at the position where the second task has to be finished. If it hasn't been finished start task again and wait for flag. If you wanna make it bullet proof use a second flag that indicates that second task has been started but not finished.

    No comprendo como usar las banderas para que el programa arranque después de una pausa

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

Tags

  • Instrucción RUN
  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