How to wait for X seconds in GCODE

More
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.

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

More
11 years 10 months ago - 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 :
Code:
#!/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: 11 years 10 months ago by gaeldk.

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

More
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
The following user(s) said Thank You: gaeldk

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

More
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....

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

More
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
The following user(s) said Thank You: FariaAl, bkt

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

More
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.

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

Time to create page: 5.332 seconds
Powered by Kunena Forum