Cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete address from post

Creator
Creator

Hello Everyone,

 

i want to know how i can delete in my Post Prozessor some strings(commands) with G0 Addresses.

 

For Example, i want to get something like this:

 

if { ($mom_motion_type == "RAPID")} {      

"Delete (only) next G0 Command in my Post"
}

 

It 's possible?

 

Thanks

 

 

 

 

 

 

13 REPLIES

Re: How to delete address from post

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

What is the real problem?

What is the output you get and what should the output look like?

Can you offer the sample part and the post-processor?

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

Re: How to delete address from post

Creator
Creator

Hello Stefan,

 

the real problem is that in my Post i have a dublicated commands.

In my Post i use for some operation a calling of CAM-macroses. There macro command must be called before NX-Command. 

 

For Example:

Sample Macro  ("My_Macro"):

N9000 G1 X100 Y200

 

In my post:

 

N100 My_Macro

N105 G0 X100 Y200  (RAPID MOVE;  this command is dublicate)

N110 G1 X150 Y300

 

I want to have

N100 My_Macro

N105 G1 X150 Y300

 

Thanks

 

 

Re: How to delete address from post

Gears Phenom Gears Phenom
Gears Phenom

hi,

 

try to use this in some logic:

 

MOM_suppress once G_motion

or

MOM_suppress always G_motion / MOM_suppress off G_motion

or

MOM_disable_address G_motion / ..enable

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: How to delete address from post

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Another option...

MOM_do_template linear_move CREATE

 

If you use the CREATE key word, the post thinks the line is already output.

 

But (as the post thinks it is already output) you have to be careful about modality (e.g. maybe the NEXT line, the one you really want output, now needs a G0, but the post already thinks it was output.)

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


Re: How to delete address from post

Creator
Creator

Hello,

 

thanks a lot for your ideas but the next line will be outputed.

Re: How to delete address from post

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

What is the source code of your macro?

Have you updated the positional variables, so that MOM knows that the position is already reached?

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

Re: How to delete address from post

Legend
Legend

@ustus wrote:

Hello,

 

thanks a lot for your ideas but the next line will be outputed.


As a precaution, you'd need to evaluate if My_Macro is declared/exiting before deleting anything from your output.

 

Something like below will wipe out that rapid motion right after My_Macro, and only if My_Macro_VAR is set to 1

 

 

### place into PB_CMD_before_motion ###

global mom_motion_event if {[info exists <My_Macro>]} { set <My_Macro_VAR> 1} if { ([string match $mom_motion_event "rapid_move"] || [<My_Macro_VAR>==1]) } { MOM_suppress Once G_motion MOM_suppress Once X MOM_suppress Once Y MOM_suppress Once Z
}

unset <My_Macro_VAR>

 

Hope this helps

 

Charles

 

Re: How to delete address from post

Creator
Creator

Hello Stefan,

my macros are for plc-cnc control (vacuum hood up, down, to position 1 etc.)

I must give in my macros values of a next position and this position will be reached in macro.

 

So, i have something like this:

 

N1 a=100 b=200

N2 G1 Xa Yb

N3 G0 X100  (NX)

 

It's not bad that I have line N3 in my outpost, but it's dublicate.

 

MOM don't know that a position is altready reached. How I can do it?

Re: How to delete address from post

Creator
Creator

Hello Charles,

 

my output after your recommendation is:

 

N105 G0

 

It's fast goodMan Happy

 

How I can delete this G0?

Learn online





Solution Information