- Posts: 42
- Thank you received: 0
How to wait for X seconds in GCODE
11 years 10 months ago #53761
by gaeldk
How to wait for X seconds in GCODE was created 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.
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 to join the conversation.
11 years 10 months ago #53762
by gaeldk
Replied by gaeldk on topic How to wait for X seconds in GCODE
Considering doing this via an M1xx user defined command linked to a batch like this :
all this in a M101 file...
A bit violent, is there something smarter ?
Code:
#!/bin/bash
# wait for P seconds
sleep $1
exit 0
all this in a M101 file...
A bit violent, is there something smarter ?
Please Log in to join the conversation.
11 years 10 months ago #53763
by ArcEye
Replied by ArcEye on topic How to wait for X seconds in GCODE
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
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
Please Log in to join the conversation.
11 years 10 months ago #53764
by gaeldk
Replied by gaeldk on topic How to wait for X seconds in GCODE
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....
I was looking for a sleep or wait command, had no idea what dwell meant....
Please Log in to join the conversation.
11 years 10 months ago #53766
by ArcEye
Replied by ArcEye on topic How to wait for X seconds in GCODE
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
or above a hole to allow swarf clearance etc
regards
Please Log in to join the conversation.
9 years 10 months ago #84416
by clunc
Replied by clunc on topic How to wait for X seconds in GCODE
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.
I find this wait very helpful to compose myself for the havoc my code is about to unleash.
Please Log in to join the conversation.
9 years 10 months ago #84417
by Badger
Replied by Badger on topic How to wait for X seconds in GCODE
I take a similar approach to double check possible conflicts and oversights before proceeding.
Please Log in to join the conversation.
9 years 10 months ago #84455
by andypugh
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)
Replied by andypugh on topic How to wait for X seconds in GCODE
clunc wrote: 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 to join the conversation.
Time to create page: 0.298 seconds
