Cancel
Showing results for 
Search instead for 
Did you mean: 

Working with .tcl, .def files for custom CLS file output

Pioneer
Pioneer

Hello all,
Working in NX 7.5.5 and now soon 11.0.
The Company also works in Catia.


We will be moving to a post processor that will handle both output. Catia APT and NX CLS files.

 

I am familiar with the APT side and adjusting the pptables for my desired output. Have also done some work with the standard clsf.tcl files to get some output I need for now but need more.

 

I am looking for some reading material on the definitions and available language to pull from cells from within NX. (IE. mom_tool_description) I will try to get the info as close as possible moving into the posting software so when done you cannot tell what app produced the NC file. Its a goal. Once I get the correct custom pptable and custom .tcl file in place.

 

Also maybe something on building equations. EX. Like to only post a spindle rpm if it is check marked for output and not to repeat redundant values if same from one path to the next.

I'm not be apposed for someone that would be willing to help and produce these for me at a cost.

At this point I have a lot of homework on my plate and would like any suggestions.

 

Thank you.

11 REPLIES

Re: Working with .tcl, .def files for custom CLS file output

Gears Phenom Gears Phenom
Gears Phenom

You can start with the MOM Variables Browser in Post builder.

There is a set of TclTK manuals included in NX

C:\Program Files\Siemens\NX 11.0\POSTBUILD\tcl\TclTk8.0Manuals.zip

 

var_browser.JPG

John Joyce, Manufacturing Engineer,
Senior Aerospace Connecticut
www.senioraeroct.com
Production: NX11.0.2.7, Vericut 8.0.3
Development: Tcl/Tk
Testing NX12.0

Re: Working with .tcl, .def files for custom CLS file output

Siemens Genius Siemens Genius
Siemens Genius

Hello Flipper, 

 

you can use the "Review Tool" when post processing a tool path which will list all available Tcl variables of the post run. 

 

You can activate in the post processing dialog, as shown in the dialog.

 

2017-09-25 15_14_46-NX_Post Review Tool - C__Users_weisse_Desktop_weisse151217_review.out.png

A description of the variables can be found in PostBuilder or the NX help documentation. 

 

Hope that helps, 

Florian

Re: Working with .tcl, .def files for custom CLS file output

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

You might want to create a post (or use one of the OOTB example) to "play" with to find variables.

 

Also read this thread (the whole thing) for another method:

https://community.plm.automation.siemens.com/t5/Discussion-Forum-NX-Manufacturing/moog-show-globals-...

 

If you want to find what variable is controlled by a GUI toggle/option, the best way is to

1) Post & list variables one of the ways suggested in this thread

2) As needed, save/rename file with variable info

3) change the ONE setting

4) repost, save file with new variable info

5) compare the files with the variable info (e.g. using Winmerge or equivalent)

 

If you are trying to find a variable, another technique is to set it to a "unique" value (e.g. 1.23456) then search for that LESS ONE DIGIT (e.g. "1.2345") in the variable info list.

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: Working with .tcl, .def files for custom CLS file output

Pioneer
Pioneer

Wow Nice responses. Thank you so much. I give all this a try asap.

Re: Working with .tcl, .def files for custom CLS file output

Legend
Legend

The examples above, show you for a debug at the processor level, I would make differently for the customization of the cls, because all postprocessor variables can be different compared to cls .

If you edit the clsf_standard (make a copy, it's safer) in ...\MACH\resource\tool_pat\clsf.tcl

you should find :

# source [MOM_ask_env_var UGII_CAM_DEBUG_DIR]mom_debug.tcl
# source [MOM_ask_env_var UGII_CAM_DEBUG_DIR]mom_review.tcl
# MOM_set_debug_mode ON

Uncomment lines and process

As shown above by @FlorianW  A Review Tool shows up... but for the cls file

Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: Working with .tcl, .def files for custom CLS file output

Phenom
Phenom
Circle representation in the CL has some difference as I recall. UDE's will need to be written as apt word representation as well. The pptable is a configuration file and doesn't allow a lot of flexibility. I would say that you are on the right track by changing configuration (more) in the cl post tcl in NX side.
NX10.03
Windows 7 Pro

Re: Working with .tcl, .def files for custom CLS file output

Pioneer
Pioneer

Hello again,

I'm guessing my logic is not as good as I'd like.

I am building a custom .tcl file..

I can get this "MOM_spindle_rpm" to post out where I need it to but want some variables with it.

 

This is what I would like and if anyone can please help.

 

In the feeds and speeds tab of a Machining operation (MO), in spindle speed (RPM) area there is a checkmark.

If it is checked I want it to post. If not do nothing.

Also, if it is the same as the last time it posted, do nothing. (posting thru GPM at the moment)

This way I get rid of the redundant spindle outputs and I can control the spindle output from within NX MO's. (redundant spindles I may be able to handle thru the newer posting software so this MAY be a non issue.)

 

I see using a logic of "If" and "else" but have not placed the correct language to not get an alarm.

Also, I see some kind of buffer setup maybe.

 

I have been looking thru the internet for some custom .tcl files to pull the language from and have not been too successful. I started with the clsf_Standard file or"clsf.tcl" and copied and renamed. I also can see in in the pulldown within NX so I can grab it.

 

Thank you in advance.

 

PS.    is mom_spindle_status the checkmark?

 

Re: Working with .tcl, .def files for custom CLS file output

Legend
Legend

look this way ...\MACH\resource\tool_path\clsf_advanced.tcl you have an example with mom_spindle_rpm ,find this proc :

proc AUTO_TOOL_SPINDL_NEXTTOOL {} {
...
}

you may be able to modify it according to your logic...

Hope que ça help

Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: Working with .tcl, .def files for custom CLS file output

Pioneer
Pioneer
Thanks for the reply,
Not seeing anything there I can use at the moment.
I am really surprised that there are not more custom .tcl files out there companies use and share. At least for examples.

Learn online





Solution Information