Background logic, CALL program

  • Hi to all,


    I am interested if i can run motion program from BG logic.

    I need that option for running home position recovery program.

    If anyone have better solution please suggest it.


    Thanks:smiling_face:

  • As far as I know, BG Logic programs can only perform certain tasks, which do not include running motion programs.


    What's the overall goal, step by step, for your recovery? Depending on how you want things to flow, you may be able to use a combination of macros, multitasking, condition handlers, etc. to achieve your goal. This all depends on what you have upstream of the robot (PLC, etc) and how you want to initiate the recovery process.

  • If you're goal is to have the robot return to home/reference position after a stoppage I would create a specific program for it. One method is to call a recovery program via program select. First the current program is aborted with cstop, then once the "paused" bit goes low the recovery program is started. The pause bit lets you verify the current program was aborted and the pointer reset. I generally use this method for recovery.

    You can get even more involved with no-stop dcs zones to track tcp etc.

  • My idea was to CALL recovery program via NUM REG (robot was doing Main program previously, an it stopped because of something).

    My question is how to start recovery program when I type "1" in NUM REG.

    I tried with BG logic but I didn't find solution.

    I don't have PLC.

    Thanks

  • I believe you CAN accomplish this with a combination of BG Logic and Macros.


    BG Logic would contain a single program that would look for R[1] = 1. When R[1] = 1, it would then set DO[1] to ON. Then, have a Macro set up on DO[1] to abort programs. After a delay, have the BG Logic then set DO[2] to ON, triggering your home program in another Macro.


    I have never tried something like this, but the general idea ought to work, if nothing i mentioned is prohibited. But, why do you want to launch a program by setting a register rather than any other method?

Advertising from our partners