1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Fanuc Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Go "home" from inside a program.

  • NovaFlatline
  • June 12, 2018 at 7:16 PM
  • Thread is Resolved
  • NovaFlatline
    Trophies
    3
    Posts
    31
    • June 12, 2018 at 7:16 PM
    • #1

    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?

  • ravitejagali
    Trophies
    3
    Posts
    143
    • June 12, 2018 at 8:27 PM
    • #2

    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]

  • andreic
    Reactions Received
    24
    Trophies
    4
    Posts
    282
    • June 13, 2018 at 2:32 PM
    • #3

    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.

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • June 13, 2018 at 6:52 PM
    • #4

    Can you wirte karel from TP? Kinda lost here, my apologies.

  • HawkME
    Reactions Received
    568
    Trophies
    11
    Posts
    3,268
    • June 13, 2018 at 7:45 PM
    • #5

    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.

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • June 13, 2018 at 7:48 PM
    • #6

    Find the manual. Ok.

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • June 14, 2018 at 12:38 AM
    • #7

    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.

  • andreic
    Reactions Received
    24
    Trophies
    4
    Posts
    282
    • June 14, 2018 at 2:21 PM
    • #8

    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.

  • HawkME
    Reactions Received
    568
    Trophies
    11
    Posts
    3,268
    • June 14, 2018 at 3:31 PM
    • #9
    Quote from NovaFlatline


    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.

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • June 15, 2018 at 12:56 PM
    • #10

    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.

  • andreic
    Reactions Received
    24
    Trophies
    4
    Posts
    282
    • June 15, 2018 at 1:11 PM
    • #11

    It would be safer to use UFRAME[0] for going home positions.

  • HawkME
    Reactions Received
    568
    Trophies
    11
    Posts
    3,268
    • June 15, 2018 at 3:36 PM
    • #12
    Quote from NovaFlatline


    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

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • June 18, 2018 at 6:11 PM
    • #13

    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

  • HawkME
    Reactions Received
    568
    Trophies
    11
    Posts
    3,268
    • June 18, 2018 at 7:14 PM
    • #14

    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.

  • NovaFlatline
    Trophies
    3
    Posts
    31
    • June 19, 2018 at 6:49 PM
    • #15

    Thank you. Works like a charm.

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download