May 20, 2019, 07:09:48 AM
Robotforum | Industrial Robots Community

 Go "home" from inside a program.

normal_post Author Topic:  Go "home" from inside a program.  (Read 1276 times)

0 Members and 1 Guest are viewing this topic.

June 12, 2018, 05:16:01 PM
Read 1276 times
Offline

NovaFlatline


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?

Today at 07:09:48 AM
Reply #1

Advertisement

Guest

June 12, 2018, 06:27:49 PM
Reply #1
Offline

rAviteja_g


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]


June 13, 2018, 12:32:40 PM
Reply #2
Offline

andreic


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.

June 13, 2018, 04:52:47 PM
Reply #3
Offline

NovaFlatline


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

June 13, 2018, 05:45:55 PM
Reply #4
Offline

HawkME

Global Moderator
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.

June 13, 2018, 05:48:04 PM
Reply #5
Offline

NovaFlatline



June 13, 2018, 10:38:49 PM
Reply #6
Offline

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.

Today at 07:09:48 AM
Reply #7

Advertisement

Guest

June 14, 2018, 12:21:52 PM
Reply #7
Offline

andreic


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.

June 14, 2018, 01:31:27 PM
Reply #8
Offline

HawkME

Global Moderator

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.

June 15, 2018, 10:56:26 AM
Reply #9
Offline

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.

June 15, 2018, 11:11:46 AM
Reply #10
Offline

andreic


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

June 15, 2018, 01:36:31 PM
Reply #11
Offline

HawkME

Global Moderator
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


June 18, 2018, 04:11:08 PM
Reply #12
Offline

NovaFlatline


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

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

June 18, 2018, 05:14:47 PM
Reply #13
Offline

HawkME

Global Moderator
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.

Today at 07:09:48 AM
Reply #14

Advertisement

Guest

June 19, 2018, 04:49:35 PM
Reply #14
Offline

NovaFlatline


Thank you. Works like a charm.


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter