Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello everyone, I want to output G-code like this for swivel head 3,4,5-axis milling. For 4 and 5 axes, required G43.4 before rotary motion, and for 3 axes, G43. Can someone point me to which section in the post-processor I need to modify to achieve the required code? plz check the attached post-processor file. and creo10 mfg file..
(5-AXIS SWIVEL HEAD CLEANED PROGRAM)
%
O0001
N3 G91 G28 Z0.
N4 G91 G28 X0. Y0.
N5 G91 G28 B0.
N6 G91 G28 C0.
N7 G00 G80 G40 G49 G90 G54
N8 G00 B0.
N9 G00 C0.
N15 T1 M06
N16 S2387 M03
N18 G43.4 Z210.000 H1
N19 G00 X-100.000 Y-337.491 C-90. B90.
N20 G00 Z-10.000
N21 G00 Y-107.000
N22 G01 Y-100.000 F1193.66
N23 G01 X100.000
N24 G00 Y-337.491
N25 G91 G28 Z0.
N26 G91 G28 X0. Y0.
N27 G91 G28 B0.
N28 G91 G28 C0.
N29 M30
%
Solved! Go to Solution.
Posts for each machine are much easier to maintain and customize. Keep It Simple and your life becomes easier.
Take one post and copy it for another if the machines are very similar, then tweak to that machines needs to deliver a NC tape that is efficient.
By using multiple posts, you can include custom PPRINT statements to help the machinist and others who may look at the printout.
Hi @asifcad,
Thank you for your question.
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.
Best Regards,
Vivek N
Community Moderation Team
in Gpost Option file generator in 'Advanced tab' Fil editor....
cimfil/on,loadtl
rslt=postf(2,1,2707,1)
rslt=postf(13)
rslt=postf(2,1,2707,0)
TNUMB=POSTF(7,4)
TNUM=TEXT/CONVF,TNUMB,8,4,0,1,4
insert/'G43.3H',TNUM,'Z210.00','$'
cimfil/off
I get this:
T09M06
G43.3H9Z210.00
S75M03
G0X-.27383Y.303
.......................
The Z210.000 is fixed/hard coded. Can have it use your retract plane.
Hello, Peter Mueller. Many thanks for the reply...(The Z210.000 is fixed/hard-coded. Can you use your retract plane) Is it possible that Z value is also derived from NC Sequence Retract or the Clearance Plane?also how post processor know which sequence 3 and which is 4-axis or 5-axis.
Regards
Asif
I'll look into this one when I have time.
I use multiple posts for 3.4 and 5axis. Less complicated
Posts for each machine are much easier to maintain and customize. Keep It Simple and your life becomes easier.
Take one post and copy it for another if the machines are very similar, then tweak to that machines needs to deliver a NC tape that is efficient.
By using multiple posts, you can include custom PPRINT statements to help the machinist and others who may look at the printout.
Play with this INTCOM:
KKHOFF 2707 Switch to output Zlength (G43) CUTCOM with next Z Block
Default = 72 (off)
Range = 71 (on) Output CUTCOM with next Z block
72 (off) Do not output CUTCOM with next Z block
Depending on your option file setup, it can also output H with the "G43" and Z value.
You can then use REPLAC to change G43 to G43.4.
I wouldn't hard code the line with an insert statement.
Sorry, I just looked at your FIL file. Well....there's a lot of work to do if you really want control of your code.
The code below is basically a STUB, but may give you some ideas.
TCH=0
CIMFIL/ON,LOADTL
TCH=TCH+1
$$ needs to trigger a flag that a loadtl has been read.
$$ It should also have techniques to output various codes based on
$$ being the FIRST loadtl or subsequent loadtl's. I wouldn't do it with MACHIN
$$ as there are times you don't want a MACHIN statement or will have multiple
$$ MACHIN statmenets.
RESTAR = 71
IF(TCH .EQ. 1) THEN
$$COMMANDS TO WRITE BEFORE FIRST TOOL CHANGE
ELSE
$$COMMANDS TO WRITE ON ALL OTHER TOOL CHANGES
ENDIF
CIMFIL/OFF
CIMFIL/ON,GOTO
XX=POSTF(20)
$$Here there is lots of cool stuff we can do....
$$ dealing with planar machining
$$ lintol settings based on a feedrate threshold
$$ 90 deg head limits,
$$ automatic clamping and automatic retracting
$$ and much more....
$$ but at a minimum basically:
IF(RESTAR .EQ. 71) THEN
$$put startup blocks here in the format you
$$ want after a tool change.
RAPID
PREFUN/90,NEXT
PREFUN/WRKOFF,NEXT
POSTN/OUT,X,xval,Y,yval,S,sval,M,mval.....is a nice easy way
XX=POSTF(2,1,2707,71) $$ output G43 H with next Z
RESTAR = 72
ELSE
XX=POSTF(21)
XX=POSTF(13)
ENDIF
CIMFIL/OFF
CIMFIL/ON,SPINDL
IF(RESTAR .EQ. 71) THEN
CALL/SIMPST $$populate commons, don't write out
ELSE
XX=POSTF(13)
ENDIF
CIMFIL/OFF
Same stuff for COOLNT
I have checks in my CIMFIL area to ensure modality so I only output when something CHANGES, and
generally if it's a RESTAR because of LOADTL I just store values and deal with it at GOTO.