Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: Programinator on December 25, 2015, 05:33:43 PM

Title: Edit post for xy position move then z
Post by: Programinator on December 25, 2015, 05:33:43 PM
This is what my gcode is coming out like:

G90G80G20G49
G0Z0.1000
G0 X-0.5662 Y0.9343 Z0.1000
G1   Z-0.1250 F30

I would like it to come out like this:

G90G80G20G49
G0 X-0.5662 Y0.9343
G0Z0.1000
G1   Z-0.1250 F30

This is what my post looks like:


; Set up program header
;
START = "([FILENAME])"
START = "(Material Size) (X=[XSIZE], Y=[YSIZE], Z=[ZMATERIAL])"
START = "(Tool Number:[T]) ([TOOLDESC])"
START = "G90G80G20G49"
START = "G0[ZH]"
;
; Program moves
;
FIRST_RAPID_RATE_MOVE  = "G0 [X] [Y] [Z]"
;
FIRST_FEED_RATE_MOVE   = "G1 [X] [Y] [Z] [F]"
FEED_RATE_MOVE         = "[X] [Y] [Z]"
;
FIRST_CW_ARC_MOVE      = "G2 [X] [Y] [J] [F]"
CW_ARC_MOVE            = "G2 [X] [Y] [J]"
;
FIRST_CCW_ARC_MOVE     = "G3 [X] [Y] [J] [F]"
CCW_ARC_MOVE           = "G3 [X] [Y] [J]"
;
NEW_SEGMENT_POST_TOOLCHANGE= "(Tool Number:[T]) ([TOOLDESC])"
NEW_SEGMENT_POST_TOOLCHANGE= "M3 [S)"
;
; End of file
;
END = "G0[ZH]"
END = "G0[XH][YH]"
END = "M30"
; M30 = program end and rewind

I have tried a bunch of different codes and i cant get it to post like i wans

Im sure its an easy fix.  Any help would be appreciated

Thanks


Title: Re: Edit post for xy position move then z
Post by: BR549 on December 25, 2015, 07:43:30 PM
Are you SURE you want to do it that way ??. Normally you would want to FIRST move to Z rapid height THEN move in XY to teh start position then lower Z at feedrate to start.

That is what your first example is doing.

IF you first MOVE in XY without lifting Z to rapid clearnace you could easily tear something up if you hit something with teh tool. The Machine has NO idea where anything is so that is teh reason you would move it to a safeZ height BEFORE teh XY moves.

What Cam program is that ?  I can guess what to change but easier and safer to just look it up then you are sure.

Just a thought, (;-) TP
Title: Re: Edit post for xy position move then z
Post by: Programinator on December 25, 2015, 08:28:58 PM
Yes im sure this is what i want.  I always start my program with the tool above the part.  For my way of doing things this is way better.  Let me know if you have any ideas on how to change it and i can test it out.

Its for artcam

Thanks
Title: Re: Edit post for xy position move then z
Post by: BR549 on December 25, 2015, 08:45:58 PM
This is just a best guess , see what it does.


; Set up program header
;
START = "([FILENAME])"
START = "(Material Size) (X=[XSIZE], Y=[YSIZE], Z=[ZMATERIAL])"
START = "(Tool Number:[T]) ([TOOLDESC])"
START = "G90G80G20G49"
;START = "G0[ZH]"
;
; Program moves
;
FIRST_RAPID_RATE_MOVE  = "G0 [X] [Y] "
RAPID_RATE_MOVE  = "G0 [X] [Y] [Z]"
;
FIRST_FEED_RATE_MOVE   = "G1 [X] [Y] [Z] [F]"
FEED_RATE_MOVE         = "[X] [Y] [Z]"
;
FIRST_CW_ARC_MOVE      = "G2 [X] [Y] [J] [F]"
CW_ARC_MOVE            = "G2 [X] [Y] [J]"
;
FIRST_CCW_ARC_MOVE     = "G3 [X] [Y] [J] [F]"
CCW_ARC_MOVE           = "G3 [X] [Y] [J]"
;
NEW_SEGMENT_POST_TOOLCHANGE= "(Tool Number:[T]) ([TOOLDESC])"
NEW_SEGMENT_POST_TOOLCHANGE= "M3 [S)"
;
; End of file
;
END = "G0[ZH]"
END = "G0[XH][YH]"
END = "M30"
; M30 = program end and rewind
Title: Re: Edit post for xy position move then z
Post by: BR549 on December 25, 2015, 08:49:46 PM
Artcam HAS a post configuration manual have you read it ??

(;-) TP
Title: Re: Edit post for xy position move then z
Post by: ger21 on December 25, 2015, 08:59:40 PM
Try this, but I'm with terry, you should leave it like it is.


; Set up program header
;
START = "([FILENAME])"
START = "(Material Size) (X=[XSIZE], Y=[YSIZE], Z=[ZMATERIAL])"
START = "(Tool Number:[T]) ([TOOLDESC])"
START = "G90G80G20G49"
;
; Program moves
;
FIRST_RAPID_RATE_MOVE  = "G0 [X] [Y] [Z]"
FIRST_RAPID_RATE_MOVE  ="G0[ZH]"
Title: Re: Edit post for xy position move then z
Post by: Programinator on December 25, 2015, 09:42:33 PM

; Set up program header
;
START = "([FILENAME])"
START = "(Material Size) (X=[XSIZE], Y=[YSIZE], Z=[ZMATERIAL])"
START = "(Tool Number:[T]) ([TOOLDESC])"
START = "G90G80G20G49"
;START = "G0[ZH]"
;
; Program moves
;
FIRST_RAPID_RATE_MOVE  = "G0 [X] [Y] "
RAPID_RATE_MOVE  = "G0 [X] [Y] [Z]"


This code posts like this:  Not the result i need.  i will try the other suggestion now
THanks for trying

(text)
(Material Size) (X=39.370, Y=9.840, Z=1.500)
(Tool Number:1) (0.250 inches dia. slot drill)
G90G80G20G49
G0 X-0.5662 Y0.9343
G1   Z-0.1250 F30
Title: Re: Edit post for xy position move then z
Post by: Programinator on December 25, 2015, 09:45:38 PM
The second suggestion fails to post.  "Duplicate statement found"

THanks for trying

any other suggestions
Title: Re: Edit post for xy position move then z
Post by: ger21 on December 25, 2015, 09:56:51 PM
Try this:




; Set up program header
;
START = "([FILENAME])"
START = "(Material Size) (X=[XSIZE], Y=[YSIZE], Z=[ZMATERIAL])"
START = "(Tool Number:[T]) ([TOOLDESC])"
START = "G90G80G20G49"
;
; Program moves
;
FIRST_RAPID_RATE_MOVE  = "G0 [X] [Y] [Z]"
RAPID_RATE_MOVE  ="G0[ZH]"
Title: Re: Edit post for xy position move then z
Post by: Programinator on December 25, 2015, 11:25:54 PM
Well this is what i ended up doing.  a machine coordanate move to z-.1 then xy to work offset move then z

I like it like this because i change tools manually off the part on the xy and if i had a move to z.1 first then xy it will hit clamps.

This way i dont have to worry about it.

I dont understand why the way you guys suggested will not work.  But this way will do the trick

Thanks for your help


; Set up program header
;
START = "([FILENAME])"
START = "(Material Size) (X=[XSIZE], Y=[YSIZE], Z=[ZMATERIAL])"
START = "(Tool Number:[T]) ([TOOLDESC])"
START = "G90G80G20G49"
START = "G90G53Z-.1"
START = "G0[XH][YH]"
START = "G0[ZH]"

;
; Program moves
;
FIRST_RAPID_RATE_MOVE  = "G0 [X] [Y] [Z]"
Title: Re: Edit post for xy position move then z
Post by: BR549 on December 26, 2015, 04:25:32 PM
OH I think you will care as the Cam has NO idea where those clamps are. Each job they could be in a different XY point and Z height THAT is what Z rapid clearance setting is all about . It is a point where you do not need to be concered about the clamp heights. As it should clear any clamps on the table.

Your first responce was it will not matter because you always start over the part . But then you changed your mind talking about a problem hitting clamps.

Do you ALWAYS refhome the machine before you start work ? If you don't then you have NO idea where G53 Z-1 will take you .

BUT to each his own , I am glad you got it sorted the way you wanted.

(;-) TP
Title: Re: Edit post for xy position move then z
Post by: Programinator on December 26, 2015, 05:18:34 PM
Ok let me try to clear it up.....

Say i get done running the first tool.  I have my part clamped down and the clamps are thicker than .1

I jog my spindle off the part so i can change tools.  Then load program for next toolpath.

If i had it the way it was it would start by going to z.1 then xy which brings those clamps into play.  Of course i could program the safe z to 1.0 or something higher than the clamps but then i would waste time on g1z- moves.

I always have my machine referenced when i start so the g53 line will not be a problem.

So the way i have it setup now no matter where i am it will go to z home position and then rapid to xy zero THEN rapid to safe z which would be z.1 and feed down from there.

Hope that clears up what i was thinking.

Thanks for your help.
Title: Re: Edit post for xy position move then z
Post by: BR549 on December 26, 2015, 06:22:33 PM
That value of Z.1 is a variable that you  set from your Cam, it is not written in stone (;-)  Z rapid height or Safe Z to some is simple teh height above the work that it is safe to rapid anywhere on the table safely.

Not picking on you,  as you are doing a fine job , (;-) I did not know if you understood Z rapid height/SafeZ .

(;-) TP
Title: Re: Edit post for xy position move then z
Post by: Programinator on December 26, 2015, 11:08:35 PM
Thats the way it should work but my cam is not doing that right.  I have safe z set to 1.5 for example and then z to start at .1  it ignores the .1 and puts all the retract z moves during the program to z.1 which is a big waste of time because it has to feed from there all the way down.  So at any rate i decided to do it this way instead.

But you are right about sitting that up in cam.  must be a bug or something with artcam