Skip to main content
10-Marble
December 3, 2019
Solved

FIL - capture the first GOTO; extract the Z and put the Z first movement

  • December 3, 2019
  • 2 replies
  • 5108 views

Hello, I would like to catch the first GOTO in CL file and output Z first (only for the first goto).

In the CL I have:

SPINDL / RPM, 7957.753876,  CLW
RAPID
GOTO / 835.8168781015, 779.7292319751, 30.0000000000

In the post-processed file I get (yes G1 because I forced not tot have G0):

G1X835.817Y779.729Z30F9999

But I would like to have 2 different lines like below (I would like to have F1000 for example):

G1Z30F1000

G1X835.817Y779.729Z30F9999 (I can repeat the same line like it is)

Thanks for your help.

 

Best answer by KenFarley

When you are using the POSTF function to extract values from a goto, the coordinates of the position are obtained as:

 

XPOS = POSTF ( 7, 6 )  $$ X position

YPOS = POSTF ( 7, 7 )  $$ Y position

ZPOS = POSTF ( 7, 8 )  $$ Z position

 

The "position" you are specifying for this is what the GPOST program thinks of as its position, which is after it has read the CL file and put the data in its own command structure. It's weird at first but kind of makes more sense as you do more of this stuff.

2 replies

23-Emerald III
December 3, 2019

How does the controller handle that first G1 line?

Most controls will move the XY first then Z if approaching the part. On a retract, they execute the Z move first then the XY to clear the part.

 

If you know the Z30 will clear the part, use a start point that is at Z30, then move the table to your XY location.

 

10-Marble
December 3, 2019

Thanks for your reply.

I can't decide previoulsy that Z30 or Z500 is OK for ALL my pieces, because that depends on where I have my origin.

In some case my Z_zero is on a flat plane which is let's say 50mm below the highest top of the piece; therefore Z30 not enough.

And if I put a very high Z that could put machine in error...

 

23-Emerald III
December 3, 2019

Does Creo machining have a start point option?

Program the start point in relation to your part in its fixturing then have the code got from home to the start point then into the XYZ location for the first cut.

 

If you can use a RAPID feed rate, then the control will do the proper initial move to avoid the part.

 

21-Topaz II
December 3, 2019

Perhaps I don't understand what you're doing, and you haven't really specified what type of sequence you are using. For most of the paths I use, I do what I *think* you're trying to do via the following:

(1) Set the "CLEAR_DIST" to a large enough value. This distance is how high above the first toolpath point I want the machine to stop moving in RAPID mode and finish the downward motion in normal motion mode.

(2) Optionally, set a "PLUNGE_FEED" value, which is the machine speed that will be used exclusively to finish the downward motion to that first toolpath point. If you don't specify this value (or leave it as "0" or zero), the default is to use your specified "CUT_FEED".

As long as I am careful about setting the CLEAR_DIST, I never have any unpleasant surprises when the machine moves into the first toolpath position.

10-Marble
December 4, 2019

Thank you everybody. Probably I was not clear enough. My concern is only about the very first movement. All the rest is fine. I'd like to catch the Z value from the very first GOTO.

Write a new line with ZxxxF1000 in top of the part program (for example after the comments).

"Only" this.

 

10-Marble
May 28, 2020

Hello again, I try to be clearer. I "almost" got what I want but I think one line is wrong and/or missing in my FIL programming.

 

I catch the 1st GOTO in the CL file.

I want to extract the Z value (which is in 3rd position) and it is " 30 ".

And then I want to display in a new line in the post.

 

Below my FIL. The line ZPOS=POSTF(7,3) colud be wrong (or something is missing before) because I don't get the expected Z number value.

 

CL FILE

 

SPINDL / RPM, 14500.000000,  CLW
RAPID
GOTO / -317.1302147874, 12.2510352126, 30.0000000000
RAPID
GOTO / -317.1302147874, 12.2510352126, 5.5000000000

 

my FIL:

 

CIMFIL/ON,5,5 $$CATCH THE GOTO POINTS
DMY=POSTF(20)  $$SAVE THE CURRENT CL RECORD
ZPOS=POSTF(7,3) $$CATCH THE Z VALUE
INSERT/'Z',ZPOS,'F1000','$'  $$CREATE NEW LINE WITH Z_position F1000
DMY=POSTF(21) $$RELOAD THE SAVED CL RECORD
DMY=POSTF(13) $$EXECUTE THE CURRENT CL RECORD
DMY=POSTF(26,5,5,0) $$TURN OFF THIS CIMFIL/ON,5,5 ROUTINE
CIMFIL/OFF

 

Here is what I get in the post-processed file.

S14500M3
Z 5F1000
G1X-317.13Y12.251Z30F9999

 

I get the value "5" which is not the Z value in the GOTO.