how to add G04 (pause) before 1st feed move

This forum is for requests and queries about machine tool support for Vectric Products
Post Reply
Roelli
Vectric Craftsman
Posts: 181
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany

how to add G04 (pause) before 1st feed move

Post by Roelli »

Hello.

Problem:
My tool cooling systems needs to be switched on ~5 seconds before the engraving process starts.
(because after a while the coolant will flow back into the storage tank - and then it needs ~5 seconds until the coolant will come out of the injector)
Once the cooling system is used... the coolant does NOT need any wait-time.

Question:
I can use this to switch the coolant on, let it work 5 seconds and switch it off:
"M08" (coolant on)
"G04 H5" (wait time for 5 seconds)
"M09" (coolant off)

But at which position do I have to add this code?
When I put this infront of the feed rate moves then the 5 seconds will be added before ANY feed moves... which would make it inefficient. (the engraving process lasts too long)
I also tried to add this right after the toolchange but the code only seems to work after the SECOND tool change.

Any ideas?
Or is that something what the cnc controller should do? (look for the first G1,G2,G3 command and add code before that)

Thanks!

Roelli.




Code: Select all

+------------------------------------------------
+    Line terminating characters                 
+------------------------------------------------

LINE_ENDING = "[13][10]"

+------------------------------------------------
+    Block numbering                             
+------------------------------------------------

LINE_NUMBER_START     = 0
LINE_NUMBER_INCREMENT = 10
LINE_NUMBER_MAXIMUM = 999999

+================================================
+                                                
+    Formating for variables                     
+                                                
+================================================

VAR LINE_NUMBER = [N|A|N|1.0]
VAR SPINDLE_SPEED = [S|A|S|1.0]
VAR FEED_RATE = [F|C|F|1.1]
VAR X_POSITION = [X|C|X|1.3]
VAR Y_POSITION = [Y|C|Y|1.3]
VAR Z_POSITION = [Z|C|Z|1.3]
VAR ARC_CENTRE_I_INC_POSITION = [I|A|I|1.3]
VAR ARC_CENTRE_J_INC_POSITION = [J|A|J|1.3]
VAR X_HOME_POSITION = [XH|A|X|1.3]
VAR Y_HOME_POSITION = [YH|A|Y|1.3]
VAR Z_HOME_POSITION = [ZH|A|Z|1.3]

+================================================
+                                                
+    Block definitions for toolpath output       
+                                                
+================================================

+---------------------------------------------------
+  Commands output at the start of the file
+---------------------------------------------------

begin HEADER

"G00 G17 G53"
"G40 G50 G71"
"T[T] M06 [S] M03 "
"G00 Z80"
"G00 [XH] [YH] "


+---------------------------------------------------
+  Commands output at toolchange
+---------------------------------------------------

begin TOOLCHANGE

"M05"
+"M08"
+"G04 H5"
"G00 Z20"
"G0 [XH] [YH]"
"T[T] M06 [S] M03 "
"G00 Z80"
"G00 [XH] [YH] "
+"M08"
+"G04 H10"


+---------------------------------------------------
+  Commands output for rapid moves 
+---------------------------------------------------

begin RAPID_MOVE

+"M08"
+"G04 H8"
"M09"
"G0[X][Y][Z]"


+---------------------------------------------------
+  Commands output for the first feed rate move
+---------------------------------------------------

begin FIRST_FEED_MOVE

"M08"
"G1[X][Y][Z][F]"


+---------------------------------------------------
+  Commands output for feed rate moves
+---------------------------------------------------

begin FEED_MOVE

"M08"
"G1 [X][Y][Z]"


+---------------------------------------------------
+  Commands output for the first clockwise arc move
+---------------------------------------------------

begin FIRST_CW_ARC_MOVE

"M08"
"G2[X][Y][I][J][F]"


+---------------------------------------------------
+  Commands output for clockwise arc  move
+---------------------------------------------------

begin CW_ARC_MOVE

"M08"
"G2[X][Y][I][J]"


+---------------------------------------------------
+  Commands output for the first counterclockwise arc move
+---------------------------------------------------

begin FIRST_CCW_ARC_MOVE

"M08"
"G3[X][Y][I][J][F]"


+---------------------------------------------------
+  Commands output for counterclockwise arc  move
+---------------------------------------------------

begin CCW_ARC_MOVE

"M08"
"G3[X][Y][I][J]"



+---------------------------------------------------
+  Commands output at the end of the file
+---------------------------------------------------

begin FOOTER

"M09"
"G00 Z60"
"G00 X100.000 Y300.000" 
+"G0[ZH]"
+"G0[XH][YH]"
"M30"
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html

User avatar
Adrian
Vectric Archimage
Posts: 14544
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: how to add G04 (pause) before 1st feed move

Post by Adrian »

You would need to add it at the end of the HEADER section and at the TOOLCHANGE section. The TOOLCHANGE section isn't called when the file is run because it assumes the correct tool is already in place which is why you need the code in the HEADER section as well.

Roelli
Vectric Craftsman
Posts: 181
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany

Re: how to add G04 (pause) before 1st feed move

Post by Roelli »

T H A N K S ! ! !

Thats works perfectly. :D

Roelli.
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html

Post Reply