Go "home" from inside a program.

  • I am self taught on fanuc controller, looking for a way to send the robot home on a pushbutton. I would like to use "user 2" button on the controller. If the fence is opened the robot goes to controled stop mode, but say an operator loads the part wrong and starts program then notices it. Is there a way that i can program the robot to "Z+" say 50 MM and return to a "home" position? What would be the steps to do so. Also i have UI 1,2,3,8 set to rack 35 slot 1 start 1 (on) would using the "user 2" be defeated by that said setup?

  • I really don't know about user 2 buttons, but similar situation arised with Yaskawa, In home program write before teached point


    If( Signal = ON)


    LPOS //Take current pos Z valur


    L LPOS Tool offset PR[] // In PR[] keep the value Z


    }


    L or J [Home]

  • Basically if you want to be able to send the robot in home pos, one option would be to use condition handlers in KAREL programs and one HOME TP program. Condition Handler will abort the current running program and call HOME program.

  • You can create a Home program as a macro, then assign that macro to trigger from a user key.


    Create your homing program, then on the select screen highlight and press detail. Chang the type to macro.


    Then you assign the user key to trigger the macro.


    Menu>Setup>Macro. Select your homing program and set the assignment to UK[2] (user key 2). To run the macro you will probably first have to abort the currently running program (FCTN>ABORT) then press SHIFT+UK[2].


    If you have the manual then just search for macro and it will tell you everything you want to know and more.

  • Update, i now know how to trigger a macro to use a program. With that said, im still lost with the homeing program. I take the LPOS, keep the Z, uh and im lost.
    I load the position data, add 50 MM to Z+ to come off my work piece?
    How about if i were to create a point two meters above and hope for the best. Im only using a 4" X 1/2" router bit.

  • So, regarding KAREL + TP program solution:
    You have your KAREL program (with %NOABORT, %NOPAUSE etc. which runs continuously), let's call it MYKLPROG.
    You have your HOME TP program, let's call it GOHOME.
    Inside MYKLPROG you make a condition handler to monitor desired signals and use RUN_TASK, ABORT_TASK to control GOHOME.


  • Update, i now know how to trigger a macro to use a program. With that said, im still lost with the homeing program. I take the LPOS, keep the Z, uh and im lost.
    I load the position data, add 50 MM to Z+ to come off my work piece?
    How about if i were to create a point two meters above and hope for the best. Im only using a 4" X 1/2" router bit.


    Say that PR[1] is your home position and PR[2] is used to store the current position.


    Homing Program:
    : PR[2]=LPOS;
    : PR[2,3]=500; -> make this whatever value is a safe Z height to move to from your active user frame
    :L PR[2] 500mm/sec FINE ;
    :J PR[1] 20% FINE ;


    So it will move from the current position to a safe Z height, then Joint move to home.

  • Ok, and this wont effect the current user frame. What i mean is the frame itself is not effected so i wont have to reframe. I would have to change all 6 axis if it where to lose it.


  • Ok, and this wont effect the current user frame. What i mean is the frame itself is not effected so i wont have to reframe. I would have to change all 6 axis if it where to lose it.

    No, it will not affect your uframe. Like any program, be sure to set the active uframe and utool before any motion instructions.


    Doing homing routines in uframe[0] is a very common method.


    Sent from my SM-G930V using Tapatalk

  • It wont let me program a movement to a user key. Looks like another push botton needs to be installed.
    Ive got this


    PR[1] = UFRAME [0]
    PR[2] = LPOS
    PR[2,3]=500
    L: PR[2] 500mm FINE
    J: PR[1] 20% FINE
    Am i missing something?
    R3JB Controller

  • PR[1] shouldn't be = UFRAME, it should be taught as your "home" position.


    I would delete that 1st of code line and instead put in:


    : UFRAME_NUM=?;
    : UTOOL_NUM=?;


    Replace the "?" with the user frame number and user tool number that you want this program to operate in.


    Then, without worrying about the user key, just run and test this program in teach mode to ensure it safely does what you want it to do.


    Finally, to assign the user key you need to go to menu>Setup>macros. Your program must be created as a macro. To check this you go to the select list, highlight the program name, and press detail. Under subtype you can change it to macro.

Advertising from our partners