Setting axis MAX_LIMIT and/or MIN_LIMIT after startup???

More
22 Jun 2017 10:19 #94783 by Henk
HI
We are running a Pfauter CNC gear hobbing machine that was recently retrofitted with LCNC, running AXIS.

Depending on the helix angle of the gear being cut and the hob lead angle, the A axis needs to be set at a certain angle. This axis is set up as a locking indexer. If this angle is between 0 and 180 degrees, the Z axis can travel along its entire length as determined by the hard limits and soft limits (set to be approx. 5mm away from the hard limit).

When the A axis is set to angles >0 deg and smaller than 180 deg I would like to change the Zaxis MIN_LIMIT accordingly and I'm not sure if that is possible.



Any suggestions are welcome.

Thanks
Henk

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

More
22 Jun 2017 20:19 #94803 by andypugh
Look for a HAL pin called ini.z.min_limit

That ought to do the trick. (I tested it here on version 2.8, I am not sure if the pin exists in 2.7)

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

More
23 Jun 2017 10:15 #94826 by Henk
Thanks Andy, I will have a look. Will probably have to write a component to set the min limit before A-axis moves are executed.
Will keep you posted

Thanks
Henk

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

More
23 Jun 2017 10:17 #94827 by andypugh
You might be able to use "lincurve" to generate a limit based on the A-axis angle.

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

More
26 Jun 2017 13:14 #94987 by Henk
HI Andy
Lincurve works great, thanks.

The out pin from lincurve needs to be connected in the postgui hal file as it seems that it is not yet available when this is done in the main hal file, no problem there.

One thing that I have not figured out yet is where to get the A axis position from. The encoders start counting as soon as the axes are enabled and the home sequence starts and therefore are not always the same, depending on what position the machine was left when switched off the last time. Because of this, I cannot use the A axis encoder position as an input to the lincurve component. I have tested the functionality for now by using M68 E03 Q #<A-axis position> from MDI or from the .ngc file that moves the Aaxis.

Not sure if there is a better way using a pin already available in hal? The motor position cmd and the encoder position in hal for that axis does not have offsets (home and work offset) applied to them, so therefore can vary depending on the distance to the home position as determined by the homing sequence.

Thanks
Henk

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

More
26 Jun 2017 13:26 - 26 Jun 2017 13:28 #94988 by andypugh
Try these pins:

halui.axis.N.pos-commanded Commanded axis position in machine coordinates
halui.axis.N.pos-feedback Feedback axis position in machine coordinates
halui.axis.N.pos-relative Commanded axis position in relative coordinates

(Halui is an optional HAL component, but most configs load it)
Last edit: 26 Jun 2017 13:28 by andypugh.

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

More
26 Jun 2017 13:43 #94991 by Henk
That is what i was looking for!
Thanks Andy.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum