Automatic pause when spindle is started

More
15 Feb 2016 22:12 #70194 by cmorley
motion.feed-inhibit or
motion.spindle-at-speed
might be more appropriate (and safer) then pausing the program.

feed-inhibit (which i believe works on rapids as well) would allow no movement (unless in the middle of a thread pass)
spindle-at-speed - Motion will pause until this pin is TRUE, under the following conditions: before the first feed move after each spindle start or speed change; before the start of every chain of spindle-synchronized moves; and if in CSS mode, at every rapid to feed transition. This input can be used to ensure that the spindle is up to speed before starting a cut, or that a lathe spindle in CSS mode has slowed down after a large to small facing pass before starting the next pass at the large diameter. Many VFDs have an at speed output. Otherwise, it is easy to generate this signal with the HAL near component, by comparing requested and actual spindle speeds.

These pins are realtime, HALUI is not

Chris M
The following user(s) said Thank You: Rubenv

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

More
15 Feb 2016 22:19 #70195 by cmorley
feed-inhibit works on feed, rapids and jogging

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

More
16 Feb 2016 19:24 #70247 by Rubenv
Thanks Chris

You don't perhaps have a sample. I am still finding my way!

Ruben

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

More
16 Feb 2016 21:26 #70253 by Todd Zuercher
The RS485 solution would not use any parallel port io, it would use a serial port connection (ordinary com port or USB port via an rs485 adapter in both cases). Yes you can usually access all of the drives commands, readouts, and settings. But it is not necessarily easy to set up, and can take a fair bit of programming and configuration to accomplish especially if there isn't a driver specifically set up for your VFD.
If all you need is to turn on/off the drive, and wait for it to spin up. it will be far simpler just to use your parallel port io (if you don't have enough pins consider adding a second port with a pci card (you can have up to 3). If you don't want to do that, it might be easier just to insert a G4 P? pause after your spindle start command in your G-code.

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

More
17 Feb 2016 12:35 #70284 by Rubenv
Thanks Todd, will add that to a bucket for when I understand much more

Can anyone help me with a sample config for motion.feed-inhibit?

Would much appreciate it!

Ruben

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

More
17 Feb 2016 19:32 #70303 by Rubenv
Guys

This is what I have, but i don't get the motion enabled again. it works fine to stop the motion for 5 sec, but it stays that way...

i can't link the pin a second time..

loadrt timedelay count=1
addf timedelay.0 servo-thread
setp timedelay.0.on-delay 5
setp timedelay.0.off-delay 5
net spindle-on <=> motion.feed-inhibit
net spindle-on => timedelay.0.in
net spindle-ready <= timedelay.0.out
net spindle-ready => motion.feed-inhibit ---> here I get the error

please help?

Thanks
Ruben

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

More
17 Feb 2016 20:11 - 17 Feb 2016 20:14 #70307 by Todd Zuercher
You cant use the same pin twice. Also I think your logic is flawed. You are also going to need an xor2 or something to make it all work.
Something like
loadrt timedelay count=1
loadrt xor2 count=1
addf timedelay.0 servo-thread
addf xor2.0 servo-thread
setp timedelay.0.on-delay 5
setp timedelay.0.off-delay 5
net spindle-on => xor2.0.in0
net spindle-on => timedelay.0.in
net spindle-timer <= timedelay.0.out
net spindle-timer => xor2.0.in1
net spindle-ready <= xor2.0.out => motion.feed-inhibit
I think this is also going to pause the machine when you turn off the spindle. If that is what you want, if not just change the timedelay.0.off-delay to 0.
Last edit: 17 Feb 2016 20:14 by Todd Zuercher.
The following user(s) said Thank You: Rubenv

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

More
18 Feb 2016 02:18 - 18 Feb 2016 02:20 #70331 by cmorley
Last edit: 18 Feb 2016 02:20 by cmorley. Reason: logic was flawed :)

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

More
18 Feb 2016 06:08 #70333 by Rubenv
Thanks Todd,

I was thinking of adding another function. I have really searched but there is not allot available on this subject.

I will test tonight!

Ruben

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

More
18 Feb 2016 12:05 #70338 by BigJohnT

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 !


I just put a M0 after my M3 and when my spindle is set I press the run button.

JT

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

Time to create page: 0.080 seconds
Powered by Kunena Forum