Gear cutting with HAL function

More
26 Mar 2011 21:27 #8127 by darty367
I read your links and try to understand but it's not very simple, please tell me if my reasoning is good.

I checked my input pin in watch screen , it's works.

so now I must copy paste your code :
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Hobbing

in the custom_postgui.hal file and that's it ?

in your code, I'm not sure because I don't understand very well all the code and functions but I suppose A axis can not be use directly with // port with this code :
# A-Axis
setp hm2_7i43.0.stepgen.03.step_type 0
setp hm2_7i43.0.stepgen.03.position-scale [AXIS_3]SCALE
setp hm2_7i43.0.stepgen.03.steplen [AXIS_3]STEPLEN
setp hm2_7i43.0.stepgen.03.stepspace [AXIS_3]STEPSPACE
setp hm2_7i43.0.stepgen.03.dirhold [AXIS_3]DIRHOLD
setp hm2_7i43.0.stepgen.03.dirsetup [AXIS_3]DIRSETUP
setp hm2_7i43.0.stepgen.03.maxaccel [AXIS_3]STEPGEN_MAXACCEL
setp hm2_7i43.0.encoder.00.scale -200

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

More
28 Mar 2011 11:22 #8189 by andypugh
darty367 wrote:

in your code, I'm not sure because I don't understand very well all the code and functions but I suppose A axis can not be use directly with // port with this code :


My example uses a Mesa card, but there is no reason at all that it couldn't be configured to work with a Parallel port.

First, create an XYZA machine using the Stepconf wizard, then you should be able to just splice in the sections of the HAL file which link the spindle and A axis together.

It might help to draw a block diagram...

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

More
31 Mar 2011 18:22 - 31 Mar 2011 18:22 #8335 by darty367
hello andy, I would like propose in the french categorie, a tutorial with screenshots for help people to use this hal function.

So I launch stefconf and configure A axis, and enable the hal function.

For the port // setup , I must choose In input pin (mill to pc) : numerical input ?

after that, what I need to enable for the hal ?



thk
Last edit: 31 Mar 2011 18:22 by darty367.

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

More
31 Mar 2011 19:32 #8341 by andypugh
I am afraid I don't actually know, as I have never used that page of stepconf. I just tried it now on my machine and the "existing program" button is not enabled (?)

I did it all by hand-editing HAL and INI files.

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

More
31 Mar 2011 20:01 #8343 by darty367
In this case, how can I do it manually ? I think I can know after with the stefconf what is the good configuration.

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

More
31 Mar 2011 21:00 #8346 by andypugh
Add a reference to the XML file and the Postgui HAL file to the INI file, as described here.
linuxcnc.org/docs/html/config_ini_config.html

Specifically PYVCP in the [DISPLAY] section and POSTGUI_HALFILE in the [HAL] section.

You might have to do a bit more work to splice together the A-axis stepgen sections in the main HAL file.

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

More
20 Jun 2011 12:05 - 20 Jun 2011 12:38 #10646 by darty367
There are several week that I'm not come on this thread for learn more about hal function because I not enough time, but I really want understand and use this hal function for make my personnal hobbing, it's shame that there is not exist a tutorial for learn more quickly.

I check an other way for make similar function (not with hal function for the moment), but directly in hardware with an arduino card.

I can use an arduino card for change speed ratio between an encoder and stepper motor. It can be more simple that hal function.

But I don't know exactly how I must calculate the good speed ratio between the encoder, stepper motor and gear cutting mill like this :



I suppose it is the same thing that with hal function because it's mathematical.

in my idea, if the gear diameter is the same that the gear cutting mill, the speed ratio is 1:1, after just dividing or multiplying according to the diameter between the gear cutting mill and the gear.
But I'm not sure, it looks too simple.

Somebody can help me ?
Last edit: 20 Jun 2011 12:38 by darty367.

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

More
20 Jun 2011 12:49 #10649 by andypugh
darty367 wrote:

I can use an arduino card for change speed ratio between an encoder and stepper motor. It can be more simple that hal function.

I think that sounds like a difficult way to do it.

Really, the way I did it was very simple.

But I don't know exactly how I must calculate the good speed ratio between the encoder, stepper motor and gear cutting mill like this :


It is really very simple. For a 1-tooth gear the spindle and gear blank need to turn at the same speed. For a 12-tooth gear the gear blank needs to turn at spindle speed/12 and so on.

However, it isn't just a case of doing it with speed, you need to divide the spindle _position_ by 12, and pass that to the workpiece stepgen. If you try to do it with velocity then you are likely to get rounding errors and the phase-lock will be lost.

Set up your machine t work correctly with stepconf, then post the entire config directory as a zip file here, I will edit it to make it work for hobbing.

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

More
20 Jun 2011 13:26 - 20 Jun 2011 19:45 #10656 by darty367
andypugh wrote:

I think that sounds like a difficult way to do it.

Really, the way I did it was very simple.


I already make the C code, this is the same thing, I can change easly the speed ratio between encoder and the step of the stepper motor
if it's works for gear hobbing, it can be very simple to use.
Last edit: 20 Jun 2011 19:45 by darty367.

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

More
20 Jun 2011 13:39 #10657 by darty367

Set up your machine t work correctly with stepconf, then post the entire config directory as a zip file here, I will edit it to make it work for hobbing.


when I have more time, I try to install all this and I send you the zip file :)

just, I seen that you have create a new spindle encoder disc with 180 tooth, why ?

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

Time to create page: 0.103 seconds
Powered by Kunena Forum