I have created some probing operations using UDE's and I need to output a different tool change command and length "H" offset call up depending on a selection in the UDE?
We have a probe tool with cranked stylus having three possible stylus directions and I have one tool definition now I could just create three tools in NX and then catch the tool number and output the correct "H" offset and just set the tool call to output the correct info, BUT I would prefer just to have the one tool definition and just use the selection added to the UDE to control which stylus to use my problem is that the required value isn't active until after I need it?
I was hoping that someone could point me in the right direction I could try and loop all the UDE's to only process second time around so that the values are "known" but I am not sure on the best method for this either?
Any help as always is greatly appreciated!
UDEs on the operation are not available until MOM_initial_move (or MOM_first_move if no tool change.) For this reason it can make sense to delay any output until then. This (from the old help) is the breakdown on the timing:
START OF PROGRAM
UDEs attached to the program
START OF GROUP (NC_PROGRAM, GENERIC_MACHINE, GEOMETRY, METHOD)
UDEs attached to the group
UDEs attached to the geometry with Start Post commands
UDEs attached to the method with Start Post commands
UDEs attached to the cutting tool with Start Post commands
UDEs attached to the machine tool with Start Post commands
START OF OPERATION
TOOL CHANGE (not LOAD command)
UDEs attached to the operation with Start Post commands
UDEs attached to the operation with End Post commands
END OF OPERATION
UDEs attached to the geometry with End Post commands
UDEs attached to the method with End Post commands
UDEs attached to the tool with End Post commands
UDEs attached to the machine tool with End Post commands
END OF PROGRAM
As Study says, you can delay the tool change output until the initial move occurs, some times I have used this approach. The tool change event is empty and is passed to the initial move.
You can try also to create a new machine control operation and put it before the operation, the post must handle this machine control operation and you can read the event before the operation is processed.
Note if you put a "Tool Change Marker" "UDE" (see the bottom of the UDE list) after your UDE, the data for your UDE will be available in the tool change event (assuming there's a tool change)
- Add UDE to METHOD view methods, have user select correct method
- Use more structure in the Machine tool view (e.g. pocket + 3 tools in pocket?)
- possibly more
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled