how does re-homing in g-code work?

More
18 Nov 2012 02:09 #26720 by helig
Hi

How can I trigger a re-homing in g-code?
When I used mach3 it worked with G28.1, but it seems to be different in linuxcnc

It sounds trivial, but I did not find in in user guide and searching forum or google didn't help either.

Please Log in or Create an account to join the conversation.

More
18 Nov 2012 02:34 #26722 by cncbasher
are you looking to just return to machine home position or wishing to rehome and reset the home positions

Please Log in or Create an account to join the conversation.

More
18 Nov 2012 05:07 #26728 by helig

are you looking to just return to machine home position or wishing to rehome and reset the home positions

the latter - ie touching the home swittches and resetting position. Like I can do it manually on the axis gui with the "Home All" button (confirming I want to rehome)

Please Log in or Create an account to join the conversation.

More
18 Nov 2012 18:23 #26745 by ArcEye
Hi

See also www.linuxcnc.org/index.php/english/forum...ies-par-lutilisateur, albeit it is mostly in French

AFAIK you cannot re-home from G Code.
The reason is that linuxcnc will reject the command if it is not in Manual mode, the same way as it will not jog unless in Manual mode.

You can prove this to yourself easily. Open Linuxcnc in one of the sims, axis_mm or just axis.
Take it out of estop and switch the machine on ( F1 F2)
Then open the Hal Configuration dialog and enter setp halui.joint.0.home 1 in the 'Test Hal Command' line edit box and press execute
The X axis will home
Then press F5 to bring the MDI tab to the front and try executing setp halui.joint.1.home 1 to home Y
You will get an error ' cant do that (EMC_AXIS_HOME) in MDI mode'

I expect it could be got around in the same way that jogging during toolchanges has been, by changing mode and then switching back, but the bottom line is that you should never need to do it during a program.

If you are homing to physical switches, then you have a problem with losing position that needs sorting out.

If you do not have home switches and home relative to the workpiece, then you need to use the offset systems instead.

regards

Please Log in or Create an account to join the conversation.

More
18 Nov 2012 18:40 #26746 by cncbasher

are you looking to just return to machine home position or wishing to rehome and reset the home positions

the latter - ie touching the home swittches and resetting position. Like I can do it manually on the axis gui with the "Home All" button (confirming I want to rehome)


is their a specific problem you are having , you should not need to re-home and reset to zero once the machine is homed , it could be your not switching between machine coordinates
and work coordinates , which is causing you to have to reset . once the machine is homed you can return to this position by issuing a G28

can you explain your problem

Please Log in or Create an account to join the conversation.

More
18 Nov 2012 19:18 #26747 by helig

can you explain your problem


No actual problem.
It's just that for whatever reason my machine might lose a step now and then which does not matter for my requirements. Yes, I know this is due to mechanical limitations and no software issue. Anyhow during longer g-code programs an occasional re-home would prevent positioning errors from accumulating.

But I understand from ArcEye's post it's not possible.

Thanks

Please Log in or Create an account to join the conversation.

More
19 Nov 2012 00:12 - 19 Nov 2012 00:15 #26761 by ArcEye

...an occasional re-home would prevent positioning errors from accumulating.

You can work around it 2 ways.

Either split your code into modules, allowing you to re-home between them, or just halt at a convenient point (not inside a sub!) and then re-home and 'run from line'.
The former is more manageable and reliable, because unlike other controllers, Linuxcnc does not re-start the spindle automatically etc. on a run from .. command and the next command needs to be a linear one.
As this probably meaning a retraction from the workpiece before halting, you might as well just code G28 M2, finish that module and start another after re-homing.

Obviously it is preferable to sort out why you lose steps, cuts too deep and stalling, velocity to fast or whatever.

regards
Last edit: 19 Nov 2012 00:15 by ArcEye.

Please Log in or Create an account to join the conversation.

More
19 Nov 2012 17:40 #26794 by andypugh

Obviously it is preferable to sort out why you lose steps, cuts too deep and stalling, velocity to fast or whatever.


Purely as an intellectual excercise, as I don't think this is a good idea, but I wonder if you could use the non-home end limit switches as probe inputs and periodically run a probing routine?

It is fairly unusual to just miss a couple of steps (My lathe does it when pushing too big a drill with the toolpost). If it happens during a fast rather than very slow move then the motor stalls and there is no recovery possible.

Please Log in or Create an account to join the conversation.

More
16 Mar 2013 16:31 #31492 by susam
Is it possible to achieve automatic homing when machine is powered on? I am using proximity sensors at the home positions of each axis....how do I go about doing this?
I understand it cannot be done through a G-code command....however, when we load an ngc file or power on the machine....is it possible for the axes to ho me by itself detecting the position using proximity sensors (like moving in negative X till the proximity sensors detects)?

Thanks


Regards
Susam

Please Log in or Create an account to join the conversation.

More
16 Mar 2013 18:58 #31497 by ArcEye

Is it possible to achieve automatic homing when machine is powered on?


Yes it is possible, but it is not desirable or safe.

You should not have un-commanded movement when power is applied, that is just dangerous.

It takes no time at all to type Ctrl Home or click on the Home button, I don't see the problem.

The other issue is how do you differentiate between a start-up and the F2 button having been pressed to power down the system whilst at lunch say and then pressing F2 again to resume the work.
You would not want to re-home in the latter case.

regards

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum