How to wait for X seconds in GCODE

More
06 Dec 2014 19:38 #53761 by gaeldk
Hello,

When I start my program
I start with the following sequence

G17 G21 G90

G00 X0 Y0 Z9.999 M03

then the rest

How can I wait for 5 seconds after the M03 to be sure that my spindle manages to reach the required speed ? I know that it does so in 5 seconds.

Only the on/off of the spindle is digitally controlled on my setup.

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

More
06 Dec 2014 20:12 - 06 Dec 2014 20:22 #53762 by gaeldk
Considering doing this via an M1xx user defined command linked to a batch like this :
#!/bin/bash
# wait for P seconds
sleep $1
exit 0

all this in a M101 file...

A bit violent, is there something smarter ?
Last edit: 06 Dec 2014 20:22 by gaeldk.

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

More
06 Dec 2014 20:26 #53763 by ArcEye
Hi

www.linuxcnc.org/docs/devel/html/gcode/gcode.html#sec:G4-Dwell

G4 P5

will do what you want.

I do the same all the time to ensure spindle is up to speed on my lathe before commencing a program

regards
The following user(s) said Thank You: gaeldk

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

More
06 Dec 2014 20:41 #53764 by gaeldk
Thanks ! So the cause of all this is my poor English...

I was looking for a sleep or wait command, had no idea what dwell meant....

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

More
06 Dec 2014 21:11 #53766 by ArcEye
I think it is called that because of the typical usage for it, which is to dwell at the bottom of a hole to ensure cut depth
or above a hole to allow swarf clearance etc

regards
The following user(s) said Thank You: FariaAl, bkt

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

More
19 Dec 2016 15:54 #84416 by clunc
As a non-daily CNC hobbyist/operator, I have an M0/Pause after M5, w/a (MSG, Paused for spindle to reach speed.)

I find this wait very helpful to compose myself for the havoc my code is about to unleash.

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

More
19 Dec 2016 17:13 #84417 by Badger
I take a similar approach to double check possible conflicts and oversights before proceeding.

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

More
20 Dec 2016 13:39 #84455 by andypugh

As a non-daily CNC hobbyist/operator, I have an M0/Pause after M5, w/a (MSG, Paused for spindle to reach speed.)


If you have spindle speed feedback then you can use the motion.spindle.at-speed input pin to get a more useful behaviour. The machine will make G0 positioning moves, but won't start the G1 feed moves until the spindle is at the requested speed.
(this is rather useful for constant-surface-speed operation on a lathe)

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

Time to create page: 0.163 seconds
Powered by Kunena Forum