cancel
Showing results for 
Search instead for 
Did you mean: 

post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

PLM World Member Valued Contributor PLM World Member Valued Contributor
PLM World Member Valued Contributor

 

This line works for the Tool number.  is there a way to get matching N number?

 

MOM_output_literal "T$mom_next_tool_number"

 

NX 8.5

12 REPLIES

Re: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

Are you using Post Builder?

I am curious why you are outputing a literal instead of using the T word. 

Mark Rief
Retired Siemens

Re: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

In the past, I have done this by turning off sequence numbers inthe post, then adding a new N word to the tool change block, that uses the same expression as the T word.

 

I am not sure if there is a better technique now.

Mark Rief
Retired Siemens

Re: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

PLM World Member Valued Contributor PLM World Member Valued Contributor
PLM World Member Valued Contributor

Yes, this is using post builder. I’m not very familiar with it so I’m learning as I go.

Re: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

PLM World Member Valued Contributor PLM World Member Valued Contributor
PLM World Member Valued Contributor

Mark,  That exactly what im trying to do.  the error i get is open ".  or i get the error this already exist

Re: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

PLM World Member Valued Contributor PLM World Member Valued Contributor
PLM World Member Valued Contributor

this is what i get

 

N1 G40 G17 G80 G90 G0
G91 G28 Z0.0 M5
T1 M6 (2000 3FL INSERT CUTTER PRO 4.00)
(ROUGH_PART_OP1)
G54
G90 X-.5 Y6.25 S7639 M3
G43 Z3. H1 M8
Z2.45
G1 Z2.35 F114.585

 

 

this is what i need

 

N1 G40 G17 G80 G90 G0
G91 G28 Z0.0 M5
N1 T1 M6 (2000 3FL INSERT CUTTER PRO 4.00) **********added N#
(ROUGH_PART_OP1)
G54
G90 X-.5 Y6.25 S7639 M3
G43 Z3. H1 M8
Z2.45
G1 Z2.35 F114.585

Re: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

Master
Master
Here are some variables that relate to what you want. Maybe set mom_seqnum to tool # and then output your N with
MOM_set_seq_on
and then shut it off
MOM_set_seq_off

MOM_reset_sequence <start> <increment> {frequency}

Example: MOM_reset_sequence 10 10 1

mom_seqnum = The current sequence number.
Shags72 Mfg. Eng.
Windows 7 Pro 64bit
NX 8.5.2.3 MP3 Teamcenter 8
Dell M6700 i7-3740QM 8GB RAM,
NVIDIA Quadro k3000M

Re: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

PLM World Member Valued Contributor PLM World Member Valued Contributor
PLM World Member Valued Contributor

Shaggs 72,

 

 

Thanks you very much.  i got it!

 

global mom_seqnum
   set seqnum [format "%4.0f" $mom_seqnum]
   MOM_output_literal "N[expr $seqnum-mom_current_tool]"

Re: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

Esteemed Contributor
Esteemed Contributor

That is uh...some "interesting" code.  Note you may have multiple lines with the same N number!

 

Some suggestions

1) Don't use "MOM_output_literal" - the post has no idea what you have done, so it can't react intelligently

 

2) Just use the "T" word in the "auto tool change" event, where you want it.

If you are annoyed with leading zero(s), fix the formatting of the word (NC data definitions -> format tab).

 

3) use MOM_set_seq_off in the beginning of the post

Just before the "T" line, use MOM_set_seq_on, then after it use MOM_set_seq_off 

So block numbers are ONLY output at the tool change lines.

 

4) Add a custom command (e.g. "PB_CMD_df_reset_block_number_to_tool")

("df" = your initials)

something like

# assumes one tool used no more than 9 or 10 times in one program
global mom_tool_number
global mom_tool_name
global mom_seqnum
global jf_tool_usage

if {![info exists jf_tool_usage($mom_tool_name)]} {
   set jf_tool_usage($mom_tool_name) 0  ;# or 1 if you prefer
}

set mom_seqnum [expr 10*$mom_tool_number + $jf_tool_usage($mom_tool_name)]

incr jf_tool_usage($mom_tool_name)

 put that just before the "T" line

Note this allows UNIQUE block numbers for every tool change (assuming one tool is not called up more than 9 or so times in one program)

If you only ever use each tool ONCE, you can simplify a bit.

 

Hope this gives you some ideas....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: post bulder adding N to tool change line ex: N1 T1 M6 ( tool desc )

PLM World Member Valued Contributor PLM World Member Valued Contributor
PLM World Member Valued Contributor

 

Ken,

 

Thanks you for not just typing HA HA HA HA HA and instead letting me know I’m doing something completely wrong in a nice way!

 

I learned something !

 

I placed your code in, and I think it worked as intended. Is it supposed to add 10 to the N number? Is there a way to output N2 for tool #2 and N22 if the tool gets recalled. This may be a bad idea due to larger capacity mills with 100+ tools. I’m trying to figure out how to incorporate the above safety line so an operator can’t just search N# and crash a machine.

 

 

(PROGRAMMER damian.forsythe TUE, AUG 26, 2014 12:42)
(MACHINE: HAAS VF 3 AXIS)
(NOTES: UNPROVEN PROGRAM)
G40 G17 G80 G90 G0
G91 G28 Z0.0 M5
N20 T2 M6 (0750 CAR EM)
(ROUGH_DROP_AWAY_OP2)
T1
G54
G90 X13.4 Y-.4342 S4074 M3
G43 Z2.66 H2 M8



G0 Z2.85
M9
G91 G28 Z0.0 M5
G91 G28 Y0.0
M0 (OPERATOR INSTRUCTIONS)
G54
(RECLAMP)
G40 G17 G80 G90 G0
G91 G28 Z0.0 M5
N21 T2 M6 (0750 CAR EM)
(FACE_TOP_OF_DOVETAIL_PADS_OP2)
T3
G54
G90 X4. Y1.0312 S4074 M3
G43 Z2.66 H2 M8
Z1.55




G0 Z2.66
M9
G91 G28 Z0.0 M5
M1
G40 G17 G80 G90 G0
G91 G28 Z0.0 M5
N30 T3 M6 (.500 DIA 90 DEG DOVETAIL)
(ADD_DOVETAIL_OP2)
T2
G54
G90 X-4.5955 Y-1.5125 S5000 M3
G43 Z2.66 H3 M8
Z1.42



G0 Z2.66
M9
G91 G28 Z0.0 M5
G91 G28 Y0.0
T2 M6
M30
%

 

Learn online





Solution Information