How to Stop / Pause the robot motion if a DI goes high

  • Hi,

    I have a RJ3iB controller controlling a robot with a spindle used for milling.

    If the spindle would stop for some reason (error) I want to stop/hold/pause the robot. I added a tachometer with an output that goes high if the spindle speed goes below a certain speed.

    Since the milling program has been generated by RoboDK and consists of many points I don't think it is easy to use the SKIP instruction here.

    I am looking for a possibility to RUN a parallel program that runs while milling is active. This parallel program (or background logic) should stop or better 'pause/hold' the robot motion as soon as the digital input from the tachometer goes high.

    As far as I know a parallel program that can be started with the RUN statement cannot be in group 1 and therefore cannot stop the motion of the robot (?)

    In what way can I make the robot stop as soon as the DI goes high?

    Thanks in advance!

    Edited once, last by EBri ().

  • Thanks for your fast reply. When I map Hold and the Tacho DI, the robot will always Hold when the tacho signal goes high. This would mean that the robot would be able to move 'only' if the spindle is running. This would make it impossible to i.g. change tools.

    During milling I will give some Register a value 1. When milling stops this register gets value 0.

    How can I stop/hold the robot when the register value is 1 (milling) and the tacho DI goes high ?

    Edited once, last by EBri ().

  • You could create some background logic for this. Map the Hold signal to a Flag and create some logic to only drop the Hold signal in case your Tacho DI goes off (or on?) AND Register value is 1.

  • You could either use a PLC or BGLogic to set the value of the hold signal.


    In BG logic you would map the hold signal to a Flag. Then keep that flag on whenever your not milling or the spindle is not low. Hold signal is reverse logic (off = robot paused)


    : F[x] = (R[x] = 0 or !DI[x])



    Another suggestion would be to reverse the logic of your spindle DI so that it is ON when the speed is ok. That way if your sensor looses connection it will stop the robot. You always should design for things to fail safe. So if the sensor fails the robot goes to a safe state of stopped. In order to have a fail safe design signals should always be ON when OK.


    If you ever have this stop your robot you will need to train your maintenance to switch the register back to 0.



    ***Edit: I see DS186 already posted the same solution while I was typing. :top:

  • Thanks for the answers!
    (Actually the logic is reversed in the system: When Tacho DI = true, the spindle speed is OK. If the DI is false (e.g. wire broken), the spindle speed is too low. Like you write, in this way the signal is fail safe).
    At this moment I know how to 'read' the SI[3] (Hold button) but I don't know how to Set / command a Hold instruction. So I need to find a way how to map the 'hold command' to a flag. I'm afraight it's clear I never worked with Flags before :o) (Suggestions are appreciated of course ;o)

  • In the Fanuc - Manuals, Software, Tools section at the top of the Fanuc forum you can get to this settings thread:

    settings-to-make-fanuc-programming-easier-from-all-of-us


    To map a UI signal to a flag you go to IO>Type UOP>In, then you can press config to map the signals. You can map them to Rack 34 to control them with Flags.


    I would go ahead and map all 18 UI signals, Range 1-18, Rack 34, slot 1, start 1. Then Flags 1-18 will correspond with UI 1-18.


    (of course this assumes you are not controlling UOP with anything else).


    Then in BG Logic you can add the line for hold as F[2], but also set 1, 3, and 8 to always be on. Then make sure to press run on the BG Logic menu to start that BG program. It will stay on run even through a power cycle.

  • Hi,

    Great detailed descriptio, thanks!

    I mapped the UI's to flags 1-18 and started a BGLogic prog that sets UI's 1, 3 and 8 and sets the Hold flag (2) as desired.

    UI[2] and Flag[2] behave as expected but the robot can be started when Hold is high and when Hold is low. So the logic seems to work fine but the robot does not stop yet.

    What can be the reason for that?

  • The Enable was Off. I have set it to True.

    Yes the UOP UI[2] also switches.

    I did an extra power cycle (also did one after the mapping) and now it works fine. When Hold is active the Hold led is on and the robot does not move. Great! Thank you very much for you fantastic help!!

    Edited 2 times, last by EBri ().

Advertising from our partners