Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Outputting the cdc d value

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Some notes:

1) Per others (I haven't tested this) the variable may not exist (or be set correctly) until the CUTCOM ON event

2) Guessing, if operation "A" uses it, the variable does NOT get deleted at the end of operation "A", so the next operation (operation "B") WILL see the *previous* operation's value.  You might need to unset the variable to clear it at "end of path" event

3) If assigned to the TOOL, the value MAY exist at "start of path" - probably as mom_tool_*.  But this will NOT reflect whether diameter comp is actually used (or not) in the toolpath (and may be over-ridden in the operation, or with a Cutcom ON UDE)

 

I believe, if you HAVE to have this in the operation header, the only reliable way to do this is to do multiple processing of the posted output.  There are a couple ways to do this:

A) write a "flag string" where you want the output (e.g. "PUT CDC VALUE HERE") in the posted code.  If you get to a cutcom on event, save the data in an array ("my_cutcom_data($mom_operation_name)") indexed on the operation name.  After posting is done, close the output file, then (using normal tcl commands) open the output file, read thru, writing to a new file.  Anywhere you see the "flag string", figure out the operation name & write the desired output.  When done, close both files and delete the un-edited one.

 

B) create a 2nd (really small) post that only outputs operation name & CDC status.  Then use MOM_run_postprocess to run that in "start of program" event.  When it returns to the main post, parse the specified output file to get operation name & CDC status for that operation (store in global variables).  Now, as each oper is encountered, output the correct data in the header.

 

There's probably some other options, but those are what I would try

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: Outputting the cdc d value

Valued Contributor
Valued Contributor

cdccdc.PNG

Re: Outputting the cdc d value

Valued Contributor
Valued Contributor

Ive gotten the value to post out im having trouble with the info exists and formating it correctly

Re: Outputting the cdc d value

Valued Contributor
Valued Contributor

cdc_header.PNG

Re: Outputting the cdc d value

Valued Contributor
Valued Contributor

cdc_header_2.PNG

Re: Outputting the cdc d value

Valued Contributor
Valued Contributor

using the advice of debugging and changing the register to 777 was able to find the correct variable >Tried the if info exists and setting the CDC as the out put literal keep encountering errors .

Re: Outputting the cdc d value

PLM World Member Phenom PLM World Member Phenom
PLM World Member Phenom
Try this

if { [info exists mom_tool_cutcom_register] && $mom_tool_cutcom_register != 0 } { MOM_output_literal "$co $mom_tool_cutcom_register $ci" }
John Joyce, Manufacturing Engineer,
Senior Aerospace

NX 11.0.2.7 Vericut 8.0.3 - Statements and opinions are mine alone and do not reflect
the opinion of my employer or any other member of the human race

Re: Outputting the cdc d value

Valued Contributor
Valued Contributor

couldnt get this to work probably didnt have it structured right

Re: Outputting the cdc d value

Valued Contributor
Valued Contributor

attempt.PNG

Re: Outputting the cdc d value

Valued Contributor
Valued Contributor

Tried to see if this would work but have not done any if statements before

Learn online





Solution Information