Skip to main content
1-Visitor
October 30, 2014
Solved

How to redefine tool change in g-post

  • October 30, 2014
  • 1 reply
  • 2634 views

Please help me to redefine tool change sequence using g-post.

My machine needs tool change sequence as follows.

T1M12 (load T1 from spindel to tool changer assembly )

T2M18 (load T2 to spindel )

M15

I can manage with t2m18 and m15, but I can not get a tool number to load from spindel to tool changer from the CL-data.

Excuse my poor English


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Best answer by KenFarley

If I understand correctly, you need to get the "last tool" number to put with the M12 code. To get this kind of information you need to use the POSTF function.

The last tool and current tool numbers are stored as double values. To get them you make a call like the following:

LASTTL = POSTF ( 1, 3, 0496 ) $$ Get the last tool

CURRTL = POSTF ( 1, 3, 0497 ) $$ Get the current tool

I don't know which you will need. It depends on whether the postprocessor has already updated these values when it got the tool change you are handling. You can try it out and see.

Also, you'll probably need to have some sort of check for the case where you are changing tools for the first time and there is thus no tool to put back into the tool changer assembly?

1 reply

KenFarley
KenFarley21-Topaz IIAnswer
21-Topaz II
October 31, 2014

If I understand correctly, you need to get the "last tool" number to put with the M12 code. To get this kind of information you need to use the POSTF function.

The last tool and current tool numbers are stored as double values. To get them you make a call like the following:

LASTTL = POSTF ( 1, 3, 0496 ) $$ Get the last tool

CURRTL = POSTF ( 1, 3, 0497 ) $$ Get the current tool

I don't know which you will need. It depends on whether the postprocessor has already updated these values when it got the tool change you are handling. You can try it out and see.

Also, you'll probably need to have some sort of check for the case where you are changing tools for the first time and there is thus no tool to put back into the tool changer assembly?

divanov1-VisitorAuthor
1-Visitor
October 31, 2014

That is exactly what I need. Thanks a lot.

Maybe you tell me how to get a fixture ottset number and insert some codes before and after it.