Gear cutting with HAL function
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.
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.
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
Please Log in or Create an account to join the conversation.
I did it all by hand-editing HAL and INI files.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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.
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 ?
Please Log in or Create an account to join the conversation.
I think that sounds like a difficult way to do it.I can use an arduino card for change speed ratio between an encoder and stepper motor. It can be more simple that hal function.
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.
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.
Please Log in or Create an account to join the conversation.
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.