Automatic pause when spindle is started

More
27 Aug 2015 21:56 #61840 by gaeldk
Hello,

It takes some time for my spindle to reach the desire rotation speed. So I have to manually ad a G4 P10 on every file that is generated from my CAM tool.
Is there a way to tell LinuxCNC to always wait for X secodns when the spindle is started before starting to move ?

Than you !

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

More
27 Aug 2015 22:37 #61841 by Delron
I used the "Spindle at Speed" Function. Like this.


net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
net spindle-on <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm => parport.1.pin-16-out
setp pwmgen.0.pwm-freq 50.0
setp pwmgen.0.scale 30050.0
setp pwmgen.0.offset 0.000998336106489
net spindle-at-speed => motion.spindle-at-speed
setp parport.1.pin-17-out-invert 1
net spindle-on => parport.1.pin-17-out

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

More
28 Aug 2015 14:12 #61855 by gaeldk
Thank you that is probably it but not sure where this must be entered...
Nor the action of each individual line (like the value for freq, scale, offset...)

I need to study this somewhere.

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

More
28 Aug 2015 18:16 - 28 Aug 2015 18:21 #61860 by Rick G
Might look here...
linuxcnc.org/docs/html/gcode/m-code.html...53-Feed-Stop-Control

You might also use a user defined M code to start the spindle with a pause, call a sub that turns the spindle on and adds a delay.
Often the g code output of the cam can be modified, if so you can add the delay there or cause spindle on to call a sub.

Rick G
Last edit: 28 Aug 2015 18:21 by Rick G.

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

More
28 Aug 2015 20:39 #61864 by Delron

Thank you that is probably it but not sure where this must be entered...
Nor the action of each individual line (like the value for freq, scale, offset...)

I need to study this somewhere.


So long as you have feedback (tack) from your spindle, you can use this. Or like Rick said, manually adding a pause in the g-code. I did that at first but still managed to crash a bit or two when I forgot to flip the switch on the spindle.

More info here; linuxcnc.org/docs/html/examples/spindle.html

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

More
28 Aug 2015 20:56 #61865 by gaeldk
Hello,

I have actually no feedback from the spindle. So I need to put 10 seconds regardless and this should be OK.

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

More
29 Aug 2015 01:28 #61871 by Todd Zuercher
A lot of VFDs have a digital output available (either dedicated or programable) to indicate that the spindle is up to speed. If you can bring that in and connect it up to the motion.spindle-at-speed pin that is an ideal solution. If that is not an option, it gets only a little more complicated.
I'd try try connecting the spindle on signal to the spindle is up to speed pin through the timedelay component linuxcnc.org/docs/html/man/man9/timedelay.9.html

If you need help modifying your hal file for this, please ask for help and post your config files and someone can walk you through it (or maybe do it for you).

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

More
13 Jan 2016 22:32 #68332 by gaeldk
Yes I think this is the proper solution. My CN is connected via the parallel port so I need to find another IO from the spindle to the PC...

My VFD is a Fuling DZB 300

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

More
14 Jan 2016 15:45 #68377 by andypugh
The inverter appears to offer RS485 communications, you might be able to hook it to the serial port with an adaptor and get a lot more control / feedback whilst also freeing up parport pins.

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

More
15 Feb 2016 07:37 #70152 by Rubenv
Gents, I am sitting in the same boat, I would like a time delay, independent of the VFD to delay the rest of the program to run after spindle start. I running from parallel port, so IO is costly. I have done some more investigation and I will try the following tonight:

loadrt timedelay count=1
addf timedelay.0 servo-thread
setp timedelay.0.on-delay 6
setp timedelay.0.off-delay 0
net spindle-on => halui.program.pause
net spindle-on => timedelay.0.in
net spindle-ready <= timedelay.0.out
net spindle-ready => halui.program.resume

Andy, your RS485 sounds like a good solution later on, can you control all the spindle functions this way and do you have a circuit or adaptor suggestion for this?

I am also a newbie to LinuxCNC, so bear with me please.

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

Time to create page: 0.159 seconds
Powered by Kunena Forum