Hello Guest it is March 28, 2024, 07:21:27 AM

Author Topic: Tweaking a Post question on G28 G90...  (Read 6101 times)

0 Members and 1 Guest are viewing this topic.

Tweaking a Post question on G28 G90...
« on: January 04, 2015, 12:46:06 PM »
Hello guys,

I am tweaking a post for my machine and started with a Fanuc base which is close, but it has raised a few questions.  In my search I came across some confusing information, see below.

In the Mach3 G-code reference (button in the software that pops up the code references) it states that G28 and G90/91 should not be used in the same line, however my base post shows them on the same line (sample below).  I was just wondering why they shouldn't be on the same line if the fanuc post puts them there.  I am guessing its because mach doesn't want to mix something up and perform a G28 prior to setting G90 or G91 so the machine is sure to move in the correct manner?  if this thinking is right I can simply put the G90/91 command on the line before the G28 Z0, but I wanted to fully understand and make sure i owned the answer before committing to it.

This is the first Post Processor I have ever played with so I want to be sure I understand exactly what is being changed and why so I can build on the premise.  so below is the condensed code snippet

O0001
N1 G17 G20 G40 G80
N2 (1/2 EM HSS 4FL 2 LOC)
N3 T07 M06
N4 S5000 M03
N5 G54
N6 M08
N7 G90 G00 X.079 Y-.3625
N8 G43 Z.0984 H07
N9 G01 Z-.9016 F100.
N10 X.1001 Y-.326 Z-.9334 F60.

(Time Warp)

N375 G00 Z.1
N376 Z1. M09
N377 G40 X3.75 Y.25
N378 G91 G28 Z0
N379 (#8 HSS 60Deg Centerdrill)
N380 T10 M06
N381 S2800 M03
N382 G54
N383 M08
N384 G90 X.75 Y3.
N385 G43 Z1. H10
N386 G81 G98 R.1 Z-.0751 F6.
N387 X8.25
N388 G80
N389 Z1. M09
N390 G91 G28 Z0
N391 (E, 1/4 JOBBER DRILL)
N392 T11 M06
N393 S1500 M03
N394 G54
N395 M08
N396 G90 X.75 Y3.
N397 G43 Z.1 H11
N398 G81 G99 R.1 Z-1.125 F8.
N399 X8.25
N400 G80
N401 Z1. M09
N402 G91 G28 Z0
N403 (1/2 EM HSS 4FL 2 LOC)
N404 T07 M06
N405 S5000 M03
N406 G54
N407 M08
N408 G90 X5.775 Y3.
N409 G43 Z.0984 H07

(Time Warp)

N703 G00 Z.1
N704 Z1. M09
N705 G40 X4.5 Y4.75
N706 M05
N707 G91 G28 Z0
N708 G28 X0 Y0
N709 M30



Thanks for looking guys!!

Chris

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Tweaking a Post question on G28 G90...
« Reply #1 on: January 04, 2015, 01:29:33 PM »
It is NOT a good idea to use the G28 and G90 on the same line. IF you were to use a way point in the G28 it may NOT go to where you expected to go.

Your G90 would BEST be placed in the safety line (N1 in your case) which defines how Mach3 is to act on startup of the File. The G90 sets Mach3 to (ABS) mode for motion. Then IF you need to switch over to G91(INC)you call it as needed.

In you code example you have a mixed  code call  with the G28 Z0  G91. You would normally never want to do a G28 in INC mode as it may never complete the motion. Remember you are creating a POST for MACH3 NOT Fanuc so you have to play by Mach3 rules.

Just a thought, (;-) TP

Re: Tweaking a Post question on G28 G90...
« Reply #2 on: January 04, 2015, 03:04:40 PM »
TP,

Great information! thank you for the reply!

I can changed the output as suggested to add the G90 in the safety line.  Knowing what mach3 needs would be wonderful but i have not found any information that was in any one place, perhaps it is in a SDK for cam software writers?  All i had to go by was the sheetcam g-code i used to use and those programs were drastically different which really made things confusing for me.

Do you by chance have a G-code file with a little bit of everything in it that i might use as a template for finishing up this post processor code?  would be great to see something that was setup to use a machine correctly rather then how i was using sheetcam which was bandaiding tool change locations and didn't take into account any work offsets ( i was using machine and work offsets as the same because i had no homing switches, worked but now that i have added all the hardware needed, would be nice to use it correctly!!

below is the updated output file with the new post processor coding.  see anything else i may want to rethink/correct?  any input or help is greatly appreciated!!

Thanks a TON!

Chris

O0001
N1 G17 G20 G40 G80 G90
N2 (1/2 EM HSS 4FL 2 LOC)
N3 T07 M06
N4 S5000 M03
N5 G54
N6 M08
N7 G00 X.079 Y-.3625
N8 G43 Z.0984 H07
N9 G01 Z-.9016 F100.
N10 X.1001 Y-.326 Z-.9334 F60.
N11 G03 X.079 Y-.2495 Z-1. I-.0482 J.0278 F30.
N12 G02 X-.0072 Y-.1945 I.4261 J.7632

(Time Warp)

N375 G00 Z.1
N376 Z1. M09
N377 G40 X3.75 Y.25
N378 G28 Z0
N379 (#8 HSS 60Deg Centerdrill)
N380 T10 M06
N381 S2800 M03
N382 G54
N383 M08
N384 X.75 Y3.
N385 G43 Z1. H10
N386 G81 G98 R.1 Z-.0751 F6.
N387 X8.25
N388 G80
N389 Z1. M09
N390 G28 Z0
N391 (E, 1/4 JOBBER DRILL)
N392 T11 M06
N393 S1500 M03
N394 G54
N395 M08
N396 X.75 Y3.
N397 G43 Z.1 H11
N398 G81 G99 R.1 Z-1.125 F8.
N399 X8.25
N400 G80
N401 Z1. M09
N402 G28 Z0
N403 (1/2 EM HSS 4FL 2 LOC)
N404 T07 M06
N405 S5000 M03
N406 G54
N407 M08
N408 X5.775 Y3.
N409 G43 Z.0984 H07
N410 G03 X6. Y2.775 Z.0807 I.225 J0 F3.5526
N411 X6.225 Y3. Z.0631 I0 J.225
N412 X6. Y3.225 Z.0454 I-.225 J0
N413 X5.775 Y3. Z.0277 I0 J-.225
N414 X6. Y2.775 Z.01 I.225 J0

(Time Warp)

N703 G00 Z.1
N704 Z1. M09
N705 G40 X4.5 Y4.75
N706 M05
N707 G28 Z0
N708 G28 X0 Y0
N709 M30


Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Tweaking a Post question on G28 G90...
« Reply #3 on: January 04, 2015, 03:13:54 PM »
Are you using SheetCam ??

(;-) TP
(No subject)
« Reply #4 on: January 04, 2015, 03:21:51 PM »
No, I'm using Camworks.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Tweaking a Post question on G28 G90...
« Reply #5 on: January 04, 2015, 04:47:42 PM »
In the safetly line you may consider cancelling ALL offsets  you need to add G49  and setting the G54 at that point as well. Also set the IJs to INC just to be safe G91.1 .

The rest looks OK from here.

(;-) TP
(No subject)
« Reply #6 on: January 04, 2015, 06:12:52 PM »
Just to be clear,  the software doesn't support I, j, k so does that mean add G91 instead? And should I leave G90 on the safety line as well as adding the G91?

Thanks!

Chris

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Tweaking a Post question on G28 G90...
« Reply #7 on: January 04, 2015, 09:20:49 PM »
Mach3 supports IJK in abs or Inc mode. G91.1 sets Mach3 to Inc IJK's


(;-) TP
(No subject)
« Reply #8 on: January 04, 2015, 09:44:59 PM »
I meant the cam software/fanuc post software, sorry for the confusion...

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Tweaking a Post question on G28 G90...
« Reply #9 on: January 04, 2015, 10:01:19 PM »
oK I have never seen a CAM that did not support IJK mode.

Just a thought, (;-) TP