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

How to create a correct procedure??

Creator
Creator

Hello all, I would like to have this procedure in my postprocessor

 

 

IF &mom_tool_name =(the same) &mom_tool_name_next

THEN G1 Z&mom_point_pos(2)+20

ELSE G91 G28 Z0

 

How does it save correct ??

 

Thank you very much for your help

 

Best Regards

11 REPLIES

Re: How to create a correct procedure??

What exactly are you trying to do?

I think you can define moves for the end of operation and for a tool change in Post Builder.

Mark Rief
Retired Siemens

Re: How to create a correct procedure??

Creator
Creator

Hello
I want to create a procedure that solved my problem.
Now I have (example)

(OPERATION: MILLING 1)
T1
G0 G90 Z10
G1 Z-3 F300
G1 X20 Y40
G1 X59 Y80
.......
G1 X10 Y10
G1 Z30
G91 G28 Z0

(OPERATION: MILLING 2)
T1
G0 G90 Z10
G1 Z-3 F300
G1 X21 Y20
G1 X321 Y20
.......
G1 X230 Y130
G1 Z30
G91 G28 Z0

(OPERATION: MILLING 3)
T2
G0 G90 Z10
G1 Z-3 F300
G1 X20 Y40
G1 X59 Y80
.......
G1 X10 Y10
G1 Z30
G91 G28 Z0
G91 G28 X0
G91 G28 Y0

I want to make it so:

(OPERATION: MILLING 1)
T1
G0 G90 Z10
G1 Z-3 F300
G1 X20 Y40
G1 X59 Y80
.......
G1 X10 Y10
G1 Z80 (function 30 + 50 when the same tool in the next operation)


(OPERATION: MILLING 2)
T1
G0 G90 Z10
G1 Z-3 F300
G1 X21 Y20
G1 X321 Y20
.......
G1 X230 Y130
G1 Z30
G91 G28 Z0

(OPERATION: MILLING 3)
T2
G0 G90 Z10
G1 Z-3 F300
G1 X20 Y40
G1 X59 Y80
.......
G1 X10 Y10
G1 Z30
G91 G28 Z0

 

(End of program)
G91 G28 X0
G91 G28 Y0

Best Regards

Re: How to create a correct procedure??

Esteemed Contributor
Esteemed Contributor

In the "End of path" event, you can use mom_next_oper_has_tool_change (YES/NO) and mom_current_oper_is_last_oper_in_program (also "YES"/"NO") to tell (at end of path) if the next operation has a tool change.  You can either add this as conditions on blocks, or put the logic in a custom command that "MOM_do_template"s the correct blocks

 

The Z value for the one can be set to "$mom_pos(2)+50" (or whatever) if hardcoding is OK.

 

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: How to create a correct procedure??

Creator
Creator
How to use this procedure ??
MOM_do_template <template_name> {BUFFER CREATE}

I would ask for an example of how to use it.

Re: How to create a correct procedure??

Esteemed Contributor
Esteemed Contributor

PeterCNC wrote:
MOM_do_template <template_name> {BUFFER CREATE}

Open the TCL file created by Post Builder in a regular text editor and search for MOM_do_template for some examples.

 

The templates are defined in the DEF file created by PB.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX12.0

How to Get the Most from Your Signature in the Community

Re: How to create a correct procedure??

Esteemed Contributor
Esteemed Contributor

If you go to the "NC Data Definitions" tab -> "Block" tab in post builder, you will see various blocks created by you or Postbuilder (when you created your post)

You can define your own blocks as well.

 

Use MOM_do_template to output one of those blocks.

e.g. I see a block "circular_move"

So in my post (tcl code) I could have a line like:

MOM_do_template circular_move

 

BUFFER and CREATE are options, read the docs on what they do (I don't use them very often, but when I need them they are very useful).

 

Ken

 

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: How to create a correct procedure??

Valued Contributor
Valued Contributor

I was under the impression that "End of path" outputs code after all movements. if you put $mom_pos(2)+50 won't it add 50 to the next z move in the next path?

Using NX 8.0.3.4

Re: How to create a correct procedure??

Esteemed Contributor
Esteemed Contributor

No, at end-of-path, the post has NO knowledge about the next operation's first motion (not even if you turn on look-ahead).

So mom_pos(2) would contain the value for the last Z position

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: How to create a correct procedure??

Creator
Creator
OK
Thank you for the explanation of this function ("MOM_do_template).

I have a question on how to create a logical function??

If mom_next_oper_has_tool_change is true
then MOM_do_template
else $mom_pos(2)+50

How to create logic functions in PB ??

Learn online





Solution Information