Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
After many years of dealing with minor edits to my G-Code, I am trying to put some final touches on my Posts. Does anyone have any ideas on how to get the posts to for out both the X and Y moves after it calls out the Work Offset? We have had issues with changing work offsets but the actual X or Y number is the same as the previous offset. This usual happens when we are running multiples of the same part.
I am also trying to come up with a way to have the post retract every time there is a rotation (both on 3+2 trunnions and on Horizontals). We currently manually put a Go Delta move in at the last toolpath before an index but depending on where the CSYS is for the next work offset the Post processor sometimes uses Retract Logic instead of Approach Logic. Which causes the Z to move into the part before the tombstone rotates. I am thinking that I would like the post to output a G0G90G53Z0. before every rotation but I want to make sure that it knows after the rotation where it is positioned.
Any ideas are greatly appreciated...
Thanks!
You can catch an offset setting and process it to add other things via something like the following:
$$
$$ This is my code to output the G54 to G59 that is valid for our machines.
$$
CIMFIL/ ON, SET, OFSETL
OFSTYP = POSTF ( 6, 5 )
OFSREG = POSTF ( 7, 5 )
IF ( OFSTYP .EQ. 1 ) THEN
IF ( OFSREG.GE.54.AND.OFSREG.LE.59.AND.CURREG.NE.OFSREG ) THEN
CURREG = OFSREG
OFSCMD = TEXT/ 'G', CONVI, OFSREG, 2, '$'
INSERT/ OFSCMD
ENDIF
ENDIF
CIMFIL/ OFF
You could add some other "INSRT/" statements to put, for example, a G00 motion. Unfortunately, I can't seem to find any POSTF register that keeps track of the current X, Y, and Z coordinates (plus B and C, I suppose if you're on a higher degree-of-freedom machine). But if, like me, you handle every "GOTO", you could have a variable that stores the last X, Y, and Z that were seen. So you could then use those stored values to write a G00 or G01 or whatever to the output.
You could do something similar, I suppose, if there is a specific FIL code that is in the CL file to signal a rotation. I do something like this for tool changes (bring the machine home, orient the spindle, then get the tool and for safety, an optional stop, etc.)
Insert a retract line as Kenneth advised then read ahead to get your next move values and create lines for the next move. We handle B values for indexing in the w/o register and a spherical clearance zone for 5axis. This is part of what I use for verticals and horizontals-
DMY=POSTF(15,0,1) $$SAVE POINTER LOCATION AND SEE WHAT HAPPENS AFTER W/O CHANGE
DO/RAH2,RH2=1,10,1
RH2=1 $$RESET LOOP VAR
DMY=POSTF(14) $$GET NEXT RECORD
TPSRCH=POSTF(7,2) $$GET 2ND WORD
GTSRCH=POSTF(7,3) $$GET 3RD WORD
IF (TPSRCH.EQ.14000.OR.GTSRCH.EQ.(ICODEF(LOADTL)))THEN $$END LOOP AT FINI-LOADTL
RH2=11
ENDIF
IF (TPSRCH.EQ.5000)THEN $$VERIFY AND CREATE NEXT XYZ MOVES AND END LOOP
XPOS=POSTF(7,6)
YPOS=POSTF(7,7)
ZPOS=POSTF(7,8)
PREFUN/0,NEXT $$MOVE TO NEXT X Y
POSTN/OUT,X,XPOS,Y,YPOS
REPEAT/Z,G,43
REPEAT/Z,H,TLADJ $$PICK UP TOOL L OFFSET - TLADJ IS SET AT LOADTL
POSTN/OUT,Z,ZPOS $$MOVE TO NEXT Z
RH2=11
ENDIF
RAH2)CONTIN
DMY=POSTF(15,0,2)
Josh
That's some good looking FIL code Josh. You must have been paying attention in the G-Post class.
Fred
Fred that's the nicest thing anyone has said to me all day!
Josh,
When using the spherical clearance zone, how do you remove all of the unnecessary moves that it makes when indexing? I've tried playing with the Tolerance but I still get a couple of extra X,Y,A,&B moves mixed in.
Thanks!
Haven't had a chance to figure that out yet (just starting to program for the 5-axis). But it eliminated over-travels and simulated well enough I was confident of not crashing - at the expense of extra and jerky movements.
I don't know if there is a way to fix this in creo but if I come up with a post solution I will add it here.
Josh
You can set the Tool Axis Vector Tolerance in the post Option File. It is on the Machine Tool Type -> Types, Specs & Axes -> Specs tab in the lower right corner. I would start with .0001 in the IJK Toolaxis Tolerance and see what that does for you.
Fred
Jason was referring to clearance moves around the part-machine volume. Using the strategy mentioned above, Creo will create a minimum number of points to move to and remain clear of the established zone. Example, for a 90deg A rotation, 2-3 intermediate seemed to be typical. Does the Tool Axis Vector Setting affect this?
Josh
The vector tolerance in the post would not affect move like this as they are fairly large. It is meant to skip very small rotary moves.
Fred
Here's a sample where the part was faced at A0C0 and is indexing to A-90C0 :
N14G0Z14.4675
N15X6.6029Y-8.3624A-44.904
N16Z11.9361
N17X6.1271Y-13.5225A-89.904
N18Z5.9666
N19X6.125Y-13.5286A-90.
N20Z5.955
So instead of a smooth transition around the part you get kind of a jerky movement, runs fine otherwise though. I am just getting familiar with this machine - variaxis - so it may just be reclamping or something else causing it.
Joshua,
you can eliminate unwanted jerky A-axis movements by setting value of the TOLERANCE (in Operation Clearance tab) to a very high value, e.g. to 2500.
This value (estimated) depends on the dimension of the cylindrical retract surface.
Then, you can see only one tool transition movement, in toolpath simulation and subsequently in the NC program.
Rostislav
Rostislav,
No matter how high I set the tolerance I still can not get rid of the last 2 intermediate motions.
******* EDIT ......... I just noticed that you said cylinder in your comment so I tried it and it worked like you had said. The only issue for me is that I can control my B-Axis rotations using that but not my A-Axis or vice versa but not both at the same time. Why can't sphere work like cylinder in regards to the tolerance?!?!!? Just like everything else in CREO - hasn't changed since WildFire 2 *******
Ken / Josh,
Thank you for the information... I will try these methods as soon as I can!