Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Insert UDE command

Hello,

I want to insert one UDE command (For example: MACHIN/XX, XX) in the UDE of first GOTO motion of tool path operation. I do not know it is possible, or not?)

 

CL FILE OUTPUT LOOKS LIKE:

 

LOAD/1,OFFSET,2

SPINDL/1500,CLW

GOTO/123,258,369

MACHIN/XX,XX

;

;

...

...

 

Thanks!

CANATEDA

-----------------------------------------
NX3.0
NX6.0
NX10.0.35
NX11.0.1
UG_NX is my favorite !!!!!!
1 REPLY
Solution
Solution
Accepted by topic author Canateda
‎06-15-2017 09:30 PM

Re: Insert UDE command

Note as long as the UDE's event is triggered ANY TIME before where you need the output, the UDE's event handler does NOT need to output anything.

 

so say the UDE is

EVENT canateda_stuff
{
      # stuff here
PARAM canateda_data
{
# parameter definition per your needs
} }

 

 

So I would add the UDE to the "start" events in the operation

 

The UDE event handler would NOT output anything:

proc MOM_canateda_stuff { } {
global mom_canateda_data # handle logic, check variables, etc. # but NO output }

Then I would add a custom command, something like this (this is the full tcl code, not visible unless you open the post's .tcl file in an editor):

 

proc PB_CMD_canateda_stuff_output { } {
     global mom_canateda_data
if {[info exists mom_canateda_data]} { MOM_output_literal "mom_canateda_data = $mom_canateda_data"
unset mom_canateda_data
} }

 

 Then add this custom command AFTER the motion output in linear/rapid/other motion events.

 

If you insist on using the CLS, I would copy one of the tcl files in \MACH\resource\tool_path\* to a new name, and edit as needed (you won't have the Post Builder user interface, so you'll have to edit the TCL code directly) and add a reference to the new tcl file in template_clsf.dat.  Code will be (essentially) the same, but without the naming requirements of PB.

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


Learn online





Solution Information