How can we add G43 Hnnn to Post?

Discussion of post processors for various CNC machines

How can we add G43 Hnnn to Post?

Postby rowbare » Tue Apr 19, 2011 5:56 pm

I am using a Tormach with TTS and I have a tool table set up with offsets. I am using the Mach 3 Inch post. I wanted to modify the tool change to add the G43 offset command. This would change my tool change line from:
M6 Tnnn
to:
M6 Tnnn G43 Hnnn

Is there a post variable that will retrieve the unprefixed tool number? The [T] variable gives the tool number prefixed with T eg T4 so writing G43 H[T] doesn't work.

bob
rowbare
 
Posts: 2
Joined: Tue Apr 19, 2011 5:01 pm

Re: How can we add G43 Hnnn to Post?

Postby Randy » Tue Apr 19, 2011 7:29 pm

Hi Bob, welcome to the forum. Here is my Tormach post:

Code: Select all
; MeshCAM config
; This config is for Randy's Tormach PCNC
;
; 2/29/04    Changed comments to be enclosed by () rather than start with ;
;      Added CutViewer config output
; 5/13/04    Added toolchange gcode
; 3/17/05   Changed stock definition to use CUTVIEWERSTOCK variable
; 3/22/05   Added UNITS statement
; 8/02/05       Removed [F] statement from rapid moves
; 11/19/06      Added G43, M3 lines to toolchange (RG-G)
; 11/26/06      Added PLUNGE_RATE_MOVE, Tools FORMAT (courtesy JeffD)
; 12/16/06      Moved CUTVIEWERTOOL to M6 line
; 1/1/07        Added S word format
; 1/20/07       Added dummy "S4500" for default rpm
; 7/21/07       Added M9 and M8 statements to toolchange
; 8/8/07        Added M998 statement to toolchange
; 8/19/07       Changed M2 to M30
; 9/23/07       Added FP and SZ formats, added SZ and FP to PLUNGE_RATE_MOVE
; 11/17/08      Reworked toolchange
; 10/22/09      Changed SZ format from # to @
; 3/30/10       Added COMMENT lines, courtesy jeffD and Robert
; 12/23/10      Added arc moves for V4
; 2/4/11        Added A axis format
;
DESCRIPTION = "Tormach-Inch RG-G(*.nc)"
FILE_EXTENSION = "nc"
UNITS = INCH
;Feeds
FORMAT = [F|#|F|1.1]
FORMAT = [FP|#|F|1.1]
;Moves
FORMAT = [X|#|X|1.4]
FORMAT = [Y|#|Y|1.4]
FORMAT = [Z|#|Z|1.4]
FORMAT = [R|#|A|1.4]
FORMAT = [SZ|@|Z|1.4]
;Tools
FORMAT = [T|@||1.0]
FORMAT = [S|@|S|1.0]
;
START = "%"
START = "(FILENAME: [FILENAME])"
START = "([CUTVIEWERSTOCK])"
START = "G20 G17 G40 G80 G90"
;
TOOLCHANGE = "M09 (coolant off)"
TOOLCHANGE = "M05 (spindle off)"
TOOLCHANGE = "M998"
TOOLCHANGE = "M06 T[T] G43 H[T] ([CUTVIEWERTOOL])"
TOOLCHANGE = "G0[SZ]"
TOOLCHANGE = "M08 (flood coolant on)"
TOOLCHANGE = "M03 S4500 (spindle CW) (dummy speed-edit as necessary)"
;
COMMENT_START = "("
COMMENT_END = ", Tool [T])"
;
RAPID_RATE_MOVE        = "G0[X][Y][Z]"
FIRST_FEED_RATE_MOVE   = "G1[X][Y][Z] [F]"
FEED_RATE_MOVE         = "G1[X][Y][Z]"
;
FIRST_CW_ARC_MOVE      = "G2[X][Y][I][J][F]"
CW_ARC_MOVE            = "G2[X][Y][I][J]"
;
FIRST_CCW_ARC_MOVE     = "G3[X][Y][I][J][F]"
CCW_ARC_MOVE           = "G3[X][Y][I][J]"
;
;
;rapid down to safe Z, plunge to final Z
PLUNGE_RATE_MOVE       = "G0[SZ]"
PLUNGE_RATE_MOVE       = "G1[Z] [FP]"
;
END = "M09 (coolant off)"
END = "M05 (spindle off)"
END = "M998"
END = "M30 (END OF PROGRAM)"
END = "%"



The key is removing the T following the @ from the variable format line, so that variable [T] is the just tool number.

On my toolchange I turn off the flood coolant, do the M998 to raise the head for the toolchange, then move back down to the safety Z before I turn the coolant back on.

This post is current for the arc-fitting that Robert recently added.

I don't have a rotary axis, but need the A axis format statement to let me post 4-sided gcode (one side at a time--I index the workpiece by turning it in the vise).

A long time ago I just set the dummy speed at 4500, and have never gotten to changing to a programmable speed. For almost all I do I run the spindle flat out, and that is often too slow. :) You'll probably want to fix that part if you base a post on this one.

I couldn't attach the .con file directly, but I call the file Tormach-Inch RGG.con. Feel free to use any part of it you want (not that I could stop you now that I've shared it with the whole world... :D )

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: How can we add G43 Hnnn to Post?

Postby rowbare » Wed Apr 20, 2011 5:04 am

Hi Randy,

Thank you very much for sharing your post. I hope to be able to try it this week. I will add the feed rate variable back in though.

It took me a while to figure out why it wasn't writing the rotary movements but I finally caught on. That is actually perfect for me since I am using a manual indexer.

bob
rowbare
 
Posts: 2
Joined: Tue Apr 19, 2011 5:01 pm

Re: How can we add G43 Hnnn to Post?

Postby 1013 » Sat Dec 08, 2012 4:30 am

Thanks for the info, I also needed to add the G43 for the Smithy 1240 I used to cut a wooden rifle grip.
1013
 
Posts: 7
Joined: Sat Dec 08, 2012 4:26 am

Re: How can we add G43 Hnnn to Post?

Postby Finsbury » Sat Sep 20, 2014 6:31 pm

rowbare wrote:Hi Randy,

Thank you very much for sharing your post. I hope to be able to try it this week. I will add the feed rate variable back in though.

It took me a while to figure out why it wasn't writing the rotary movements but I finally caught on. The Crazy Bulk review on https://deadliftdonkey.com/my-crazy-bulk-review will work too. That is actually perfect for me since I am using a manual indexer.

bob


Did you add the feed rate variable back in? How did you do it?
Last edited by Finsbury on Sun Aug 21, 2016 3:46 pm, edited 3 times in total.
Finsbury
 
Posts: 1
Joined: Sat Sep 20, 2014 6:27 pm

Re: How can we add G43 Hnnn to Post?

Postby Randy » Mon Sep 22, 2014 4:31 pm

Hi Finsbury, and welcome to the forum. It actually wasn't the feedrate I had dummied in--it was the spindle speed.

I had put in my post

Code: Select all
TOOLCHANGE = "M03 S4500 (spindle CW) (dummy speed-edit as necessary)"

and then later changed it to

Code: Select all
TOOLCHANGE = "M03 [S] (spindle CW)"

to use the spindle speed defined in the tool definition.

The feed rate itself was always there as the [F] in all the FIRST_*_MOVE lines.

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA


Return to Post Processors

cron