How to stop the motion of the robot via a Karel program

  • Hello all,


    This is my first post on this forum. Our company just recently started developing programs for a Fanuc robot. In our setup, we have a client-server setup to control the robot. As an engineer, I encounter the situation I want to be able to send a command to instantaneously stop the robot. I want to do this by some command that should be present in the Karel environment. I also want to be able to tell the robot it is okay to 'unstop' , however not to resume motion, but be able to perform new motion commands in TP. What I found is this:


    HOLD GROUP[1] -- for a single robot


    -- do some code that manipulates the INT_REG used to store pointers to the motion stack that is stored in the STR_REG


    UNHOULD[1]


    What I understand from the manual is that HOLD GROUP command stops all motion, and UNHOLD undoes this holding? However, using my code above results in an error. Furthermore, I tried the routine STOP but this also results in an error.


    Are there any suggestions you might have for me? I would be very glad if there are some idea's on this one! Ofcourse, I looked around the forum to see if something similar was encountered earlier..

  • Place your Ad here!
  • Welcome GCBRB,


    please start with an information what kind of robot arm you have and on what type of controller you are working on. It will help others to better fit their answers.

  • I had to implement something like this not long ago, in Kukas you just set override velocity to 0; in Fanuc you can't, because the least the override can be set is 1.
    I tried many ways to stop robot motion, including HOLD and UNHOLD but somehow everything I tried had problems with my server-client application.


    I ended up creating a RPC Karel server listening for commands without any motion group control that delegates motion to another task and for STOP/CONTINUE commands I used the Karel instructions PAUSE_TASK/CONT_TASK (check the manual) on the task with motion

  • Depending on how you have your programs setup, you can use the KAREL abort_task command. Since you can't control motion via karel directly, you need to use a tp program. If you call this tp program via the start_task command it will run in 'parallel' (not technically parallel but close enough for this topic). Then your KAREL program will keep looping, and when you want to abort motion simple abort the task that was previously started.

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

Advertising from our partners