Forum Header

Reversing Spindle Direction for Machine Tapping

More
7 years 10 months ago #123297 by waynegramlich
I installed LinuxCNC 2.6.4 on a Ubuntu 10.4.4LTS distro running on a 16MB Intel Box back in March of 2011. It has worked flawlessly almost 8 years. I'm still running the old hardware under the theory of "If it ain't broke, don't fix it!"

As a winter solstice gift to myself, I decided to buy a tension/compression tapping collet for my mill so I could do machine tapping. While I verified that my machine could reverse spindle direction from the manual control panel, I never verified that I could do it from inside LinuxCNC. Needless, to say, M4 causes the spindle to stop rather than reverse. I thought "no sweat", I'll dig out `stepconf` and fire it up and fix the problem.

Now I'm scratching my head, because I can't figure out what all of the spindle options are for the parallel port configuration do. The 5 options are Spindle_ON, Spindle_CW, Spindle_CCW, Spindle_PWM, and Spindle_Brake. Nowhere in the on-line step-conf documentation did I find a description of what each of these pin options do. I'm pretty sure my machine electronics when a PWM pulse and a pin that specifies the spindle direction (either CW or CCW.)

Any help would be greatly appreciated...

Regards,

-Wayne

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

More
7 years 9 months ago #123317 by pl7i92
Why that old
You shoudt use at least 12.04 and with 2.7.14 you get so much benefit in order to intersect your needed behaver

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

More
7 years 9 months ago - 7 years 9 months ago #123332 by Todd Zuercher

waynegramlich wrote: I installed LinuxCNC 2.6.4 on a Ubuntu 10.4.4LTS distro running on a 16MB Intel Box back in March of 2011. It has worked flawlessly almost 8 years. I'm still running the old hardware under the theory of "If it ain't broke, don't fix it!"

As a winter solstice gift to myself, I decided to buy a tension/compression tapping collet for my mill so I could do machine tapping. While I verified that my machine could reverse spindle direction from the manual control panel, I never verified that I could do it from inside LinuxCNC. Needless, to say, M4 causes the spindle to stop rather than reverse. I thought "no sweat", I'll dig out `stepconf` and fire it up and fix the problem.

Now I'm scratching my head, because I can't figure out what all of the spindle options are for the parallel port configuration do. The 5 options are Spindle_ON, Spindle_CW, Spindle_CCW, Spindle_PWM, and Spindle_Brake. Nowhere in the on-line step-conf documentation did I find a description of what each of these pin options do. I'm pretty sure my machine electronics when a PWM pulse and a pin that specifies the spindle direction (either CW or CCW.)

Any help would be greatly appreciated...

Regards,

-Wayne


Spindle_ON - will set up a signal on that parallel port pint that is true when the spindle is on and false when off.
Spindle_CW - will set up a signal on that parallel port pint that is true when the spindle is to turn clockwise.
Spindle_CCW - will set up a signal on that parallel port pint that is true when the spindle is to turn counter clockwise.
Spindle_PWM - will set up a pwm signal on that parallel port pint that can be used to set the spindle speed (with the appropriate hardware.)
Spindle_Brake - will set up a signal on that parallel port pint that is intended to control a spindle brake.
Last edit: 7 years 9 months ago by Todd Zuercher.

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

More
7 years 9 months ago #123370 by waynegramlich
Machine upgrades are a slippery slope. My general feeling is that if I'm going to do a machine upgrade, I should buy a new machine. That way I can configure the new machine while being sure that my mill can still run on the old machine.

Parallel ports are largely extinct on newer machines, so that means I'm looking at buying a Mesa board, but which one? Every time I go to the Mesa web site I struggle to figure out what to get. I'm currently leaning towards the 7i92, but have not decided yet.

Then I have to find a PC. There are tons of them out there. At this point in time I'd like to get one without a fan.

The bottom line is that I'm looking into a machine upgrade.

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

More
7 years 9 months ago #123372 by waynegramlich
Thank you for the succinct response. That is kind of what I thought they did, but I could not find any documentation that actually said that.

I've done some digging around with halscope, and it looks like the problem is that my version of LinuxCNC probably has a bug when it come to the M4 command. When I run "M4 S500", the Axis GUI says the spindle is spinning at 500, but halscope shows no PWM signal on the Spindle_PWM signal. For `M3 S500` the PWM signal is present. I'm leaning towards a machine hardware/software upgrade so that I am not chasing around problems in an unsupported version of LinuxCNC.

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

More
7 years 9 months ago - 7 years 9 months ago #123376 by Grotius
Wayne,

Here an example of parameters i used in hal 0-10v example :

spindle for parport in hal :
net spindle-cmd-rpm => pwmgen.0.value
net spindle-on <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 100.0
setp pwmgen.0.scale 18000
setp pwmgen.0.offset 0.114285714286
setp pwmgen.0.dither-pwm true
net spindle-cmd-rpm <= motion.spindle-speed-out
net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-cmd-rps <= motion.spindle-speed-out-rps
net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-at-speed => motion.spindle-at-speed
net spindle-cw motion.spindle-forward
net spindle-ccw motion.spindle-reverse

postgui.hal in my case :
net spindle-cw grotius_gui.led_spindle_1_on parport.0.pin-17-out
net spindle-ccw grotius_gui.led_spindle_2_on parport.1.pin-17-out
net spindle-pwm parport.0.pin-01-out

You can put this in one file, postgui.hal if you want.
In your ini at hal section load custom.hal file.
Good luck !!
Last edit: 7 years 9 months ago by Grotius.

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

Time to create page: 0.104 seconds
Powered by Kunena Forum