Macro is resetting/restarting after emergency stop

  • I have a macro that contains an IMOV but, if the operator happens to press the emergency button while the robot is doing this macro code, the job line holding this macro call is restarted. The robot ends up doing the IMOV twice, restarting the IMOV from the position the robot was when the emergency was pressed. This obviously leads to collisions.

    I need the macro not to be restarted or, if it's not that, preventing the IMOV from executing the logic twice. It would also work if the robot could go backwards to the last fixed position, and restart from there. But I guess that's not out of the box.

    I can use fixed positions in most of the program but I need IMOVs at least in two points. Naturally I want to keep the macro code but I will get rid of it if that's the issue.

    I recall I saw in a manual a way to let the controller show the macro step, instead of just the line containing the macro call. Would this help? There's also some parameter that might be helpful but I'm not so sure.

    These parameters specify the method of restarting the manipulator that has deviated from the normal path such as an emergency stop or jog operation.
    0: Move to the indicated step (initial setting).
    1: After moving back to the deviated position, move to the indicated step.
    2: Move back to the deviated position and stop.


  • AD
  • That is the way a macro job works on an interruption. There is an S2c parameter. Depending on the value of the parameter the conditions will be what you are experiencing. Changing the value will restart from the cursor but the macro job will be displayed as if it were a CALLed job.

    What generation of controller are you on? It may be S2C438.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • NX100 NS4.16.01A-00 version 3.51. CPU 4.16

    I'm looking at the manuals that came with it and I'm not finding that parameter. I thought about just using a regular job but jobs in this specific controller don't accept arguments either.

  • That parameter address doesn't apply to a controller that old.

    Something to test regardless, if memory serves me correct, is even with an IMOV instruction in a non-macro type job, if you interrupt the system with the cursor on the IMOV upon restart the controller will re-execute the instruction. The controller may move the robot up to twice the value of the IMOV. This doesn't apply to newer controllers.

    I would restructure the job. A handful of instructions instead of the IMOV would be safer.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • The last resource I have in the basket is changing the IMOV for a MOVL with a temporal fixed end point. Instead of calculating the offset from the current position, calculating it from the previous fixed point, which is certain. This way the macro can restart but the end point will be the same.

    Nevertheless I'm going to try what you said, putting an IMOV in a job and stop the cursor on it, see if it does it twice as well. If it does, it's.. really surprising.

    Also, I changed that parameter to 1 just hoping a bell rings, but no luck. So I can confirm the parameter doesn't work in this NX.

    Thanks devils

  • You were right. I tested an empty job with an IMOV and it does restart after an emergency stop. You can do it indefinitely and the robot will just keep moving. Big oversight.

    I managed to keep the macro functionality with a MOVL anyway, although the macro wouldn't show in the instruction list if I used a LP argument (?). Had to use a P, but it all works safely now.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now