cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Cnc Programmer

VA_10756497
3-Newcomer

Cnc Programmer

I am using Creo Parametric Release 5.0 and Datecode5.0.5.0

When I select gohome on Creo it ouputs G0 I need this to output G28 command is there a way to change that? I am currently using Option File Generator add on to modify post.

ACCEPTED SOLUTION

Accepted Solutions
BenLoosli
23-Emerald II
(To:VA_10756497)

Try Austin NC: G-Post & APT Training | Austin N.C. - (austinnc.com)

I think PTC uses their G-Post for the post processing.

I have done this many years ago.

View solution in original post

8 REPLIES 8
BenLoosli
23-Emerald II
(To:VA_10756497)

You will need to modify the GOHOME command in the option file so it outputs a G28 instead of the G00.

I've not ever used the GOHOME command. It seems to be a very poorly documented command in any manuals or other information I've found over the years. I guess a valid question I'd have is why it's needed? Are you bringing the machine to the home position in preparation for a tool change? Are you just moving the tool out of the way prior to a program stop so the operator can check things? Or is this a "move to home" at the end of a program?

 

There are operations where I need the equivalent of a GOHOME where I have the post processor do the equivalent, but I make the motions part of the particular operation the machine is performing. My general post does such a thing for the following:

(1) At the beginning of the program. This was because we had an old machine that, if you didn't return it to home position before applying a fixture offset, would end up with erroneous positioning.

(2) Immediately before a tool change. This gets the tool changer and its swinging arm away from the part being machined, minimizing the danger of a collision as much as possible.

(3) At the end of the program. To get the tool away from the part and/or to bring the part being machined closest to the front of the machine.

 

For the machines I usually use, the things I'd need to output for a GOHOME are much more than a simple G28. The typical G-Code is something like:

 

G00
G49 G28 Z0.0000
G91
G28 X0.0000 Y0.0000
G90

 

These commands are telling the machine to:

G00 -> Switch to RAPID mode (if not already in that motion mode)

G49 -> Cancel any tool offset currently active

G28 Z0.0000 -> Move to the Z axis home position. We use 3-axis machines, so this will tend to move the tool into a "safe" Z location.

G91 -> Turn on relative motion mode.

G28 X0.0000 Y0.0000 -> Move the X and Y axes to their home position.

G90 -> Turn absolute positioning on.

 

You've got to know what your machine requires for the specific action you want to perform. For example, on some of our machines the "G49" causes program execution to fail, so it is omitted from code written for them.

 

As for doing this type of thing with the options generator, I don't see any way to "map" particular NCL commands to G codes and the like. To handle things of this nature I've had to edit the FIL code associated with the post-processor (under "Advanced" in the options generator). I think you'll have to look into doing this kind of thing if you want to handle GOHOME commands issued within your NC sequences/operations. It's not a simple process, but very much worth it if you want to be able generate reliable code without any manual editing.

I am working on a VTL post tool change is at home position Therefore after each tool i need to have it GOHOME basically when i output the GOHOME function it outputs the refference home diameter set at the start of Option file generator it outputs:

G0 X0. Z0.

I need it to output 

G28 X0. Z0.

Because the G0 would send my machine inwards and possibly crash with part

Is there any training you would recommend to learn to edit with FIL code?

I've never had any formal training on how to do post-processor stuff. I had to learn how to do it by scouring the internet for examples, manuals and such and a lot of experimentation. It's not a straightforward thing. I tried to get some "training" from some PTC folk for some 4th axis work I needed to do, but they seemed to be more interested in having me farm out the post processor development than actually give me any useful help.

For the situation you are dealing with, the problem isn't terribly complicated, you just need to add the lines that will write the "prep" code you need to have the machine execute right before doing the tool change.

The code that is run for a tool change will be in the FIL code enclosed within two lines. Kind of the "tool change block":

CIMFIL/ ON, LOADTL
.
.  <- Code here
.
CIMFIL/ OFF

Since you are providing prep code that you want to have run right before the tool change, you can have the post processor put those commands in whenever a "LOADTL" is encountered, which in your case would look something like:

CIMFIL/ ON, LOADTL

$$ Move to home position for tool change.   
INSERT/ 'G00$'
INSERT/ 'G28 X0.0000 Z0.0000$'

This will output your prep lines before the tool change, then execute what is already coded for a tool change already.

Note that you'll no longer need to have an explicit GOHOME command in your NC sequences in Creo, because the toolchange for the machine now is set up to handle it properly.

As with any such changes that affect code that will run a machine, you've got to test it thoroughly to make sure nothing is wrong. For example, you might find that you want to move to Z0 only, then move to X0. I always do that because otherwise the machine will move along both axes at the same time and could smash into something.

BenLoosli
23-Emerald II
(To:KenFarley)

Some controllers that I have programmed will retract in Z before moving to X0Y0 when they see X0Y0Z0 in the code.

They will also move to XY then feed down in Z when leaving the 'home' position.

These are usually in conjunction with a tool change command to clear the tool before returning to the tool change position.

Yeah the old beasts are really weird about stuff.

Our newer machines make things so much easier. Calling a tool change, just "M06 T04" and the like, causes the machine to move to machine Z0 then swap in the new tool. Very nice when you're loading a whole lot of tools, particularly for setting offsets.

BenLoosli
23-Emerald II
(To:VA_10756497)

Try Austin NC: G-Post & APT Training | Austin N.C. - (austinnc.com)

I think PTC uses their G-Post for the post processing.

I have done this many years ago.

Announcements


Top Tags