Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Custom UDE and proc

Siemens Legend Siemens Legend
Siemens Legend

I cretaed a custom UDE that is supposed to disable fourth_axis output so post can be used for 3 or 4 axis machines. I place the UDE on topo level program. I placed the proc in the tcl file. I put MOM_output_text tests to make sure proc is being parsed, and it is. But the fourth_axis does not get disabled.ScreenHunter_01 May. 09 09.14.gifScreenHunter_02 May. 09 09.15.gifScreenHunter_03 May. 09 09.16.gifScreenHunter_04 May. 09 09.17.gif

10 REPLIES

Re: Custom UDE and proc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I think you will have to add MOM_disable_address to PB_CMD_before_output to make it persistent.

Have you tried using "MOM_suppress ALWAYS ..." instead?

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

Re: Custom UDE and proc

Siemens Legend Siemens Legend
Siemens Legend

 I did try MOM_suppress ALWAYS, did not work.

I have done this many times in post builder, and it always works. I cannot get it to work in post configurator...

Re: Custom UDE and proc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I'm guessing they are doing something in "start of path" to reset things. (similar to in post builder that MOM_start_of_program is called, via PB_CMD_kin_start_of_path, in the "start of path" event for every operation, and it re-defines MOM_set_csys (and other procs), so if I want to have my own code for MOM_set_csys, I have to re-re-define it to what I want in every op.

 

But, as you can't read what they are doing (I'm assuming it is in one of  the locked/encrypted layers), it will be impossible for us "mere mortals" to over-ride it (sigh...)

 

You might try adding code to "start of path" (whatever they call it in PC) that, if your variable to suppress the 4th axis is set correctly, you re-issue the "MOM_disable_address fourth_axis" command.

 

And if it is disabled, you might want to add code everywhere it *would* be output, to check "mom_tool_axis" (or mom_out_angle_pos or whatever) to make sure the user isn't trying to post a 4 axis path with a 3 axis post ;-)

 

edit:

Note if I want an word *permanently* off, I find MOM_disable_address FAR more reliable than any "MOM_suppress" options

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: Custom UDE and proc

Siemens Phenom Siemens Phenom
Siemens Phenom

I suggest not to go with an UDE att all for that use case, but have a setting in the service layer and create the 3 / 4 / 5 axis post based on that setting. So that makes it more convenient not bother the user using an UDE in that case.

 

Thomas

 

Thomas Schulz
Siemens PLM
Manufacturing Engineering Software

Re: Custom UDE and proc

Siemens Legend Siemens Legend
Siemens Legend

You are missing the point, why is the proc not working...

Also, I have done this many times for customers, they much prefer to have only one post to handle both 3 and 4 axis milling, especially if the 4th axis is an addon that is not always on the machine. It is much easier to maintain one post then 2.

Re: Custom UDE and proc

Siemens Legend Siemens Legend
Siemens Legend

Hi Michael,

 

your proc is not working because in Post Configurator the addresses are enable/ disable in the plane output command internally in Post Configurator. The command is executed if the machine mode is more than 3ax...This is necessary in Post Configurator to handle the Chain functionality and the output is always correct for different chains and all addresses are outputted. So first the way for your problem...You just have to use the buffer after the plane init and call a proc where you asking the value of the ude variable, e.g. the rapid move buffer. Your UDE eventhandler just contain the global for variable. The difference is to ask the variable later and not in the corresponded UDE event.

 

top_ude_suppress.jpg

 

This should work in your case.

 

But i recommend to use a way which is more efficient and you don't have to think about Disable, Enable addresses. When you use the Multichain feature you can create a chain with kinematic type 3axis and 1 chain with 4ax. This automatically enable and disble addresses for the current active chain and the post handle it. If it's needed and the customer want to decide which chain should be active for the operation you can also set up the ude to activate the chain. But if you have the situation you've described then you can set the condition for the mom_carrier_name in 4axis mode and it's not needed to set up an UDE. And you maintain only one post Smiley Happy

Be aware that the default chain should contains the highest kinematic configuration, that means 4axis, the additional chain than have only the 3axis kinematic.

 

ude_chain.jpg

 

The post handle then automatically the correct output for the different kinematics.

 

If you need any additional information or want to have more discussions here let me know.

 

Best regards

Thomas

Re: Custom UDE and proc

Valued Contributor
Valued Contributor

Hi Michael, Hi Thomas,

 

Though I very like the idea of having multiple chains to do this, I too have needed to do that with Michael's first proposed way.

 

I tried entry point "MOM_rapid_move_LIB FIRST_MOVE_MILL" but there is a problem with that, if operation is TCPM kind, then fourth_axis "might" become fifth_axis address and then it disables wrong address (for example, you might want to disable B address but end up with disabling C address). This can cause very bad results on machine, especially if you are using this method to use tailstock on the machine like me.

  

So i want to warn anybody who intending to use this.

 

And I'm also having problem to find right entry point.

Tried these so far with no luck: (4th axis may need to be disabled like after 4 operations)

  • MOM_rapid_move_LIB FIRST_MOVE_MILL
  • MOM_first_move_LIB MOM_first_move_LIB_ENTRY_start (This is necessary when there is a second op with same tool)
  • MOM_initial_move MOM_initial_move_ENTRY_start
  • LIB_SPF_operation_header_comment HEADER_COMMENT
  • MOM_tool_change_LIB TOOL_CHANGE
  • MOM_tool_change_LIB_ENTRY OOTB_OEM_TOOLCHANGE_START

I end up with disabling it in UDE, can anyone help me to find right entry point for this? (Not too early that UDE can provide its variables or not too late after M128 executed that causes wrong axis disabling)

 

Re: Custom UDE and proc

Siemens Legend Siemens Legend
Siemens Legend

Hi dfdfgs,

 

the M128 output is triggered by the LIB_ROTARY_simultaneous_init MILL,SIMULTANEOUS Buffer.

So you can put your additional logic before the @ROTARY_SIMULTANEOUS Tag.

 

Best regards

Thomas

Re: Custom UDE and proc

Genius
Genius

I just create a UDE, but I don't know where(which file) should I write those proc cmd? 

Highlighted

Custom UDE and proc

Siemens Legend Siemens Legend
Siemens Legend

I cretaed a custom UDE that is supposed to disable fourth_axis output so post can be used for 3 or 4 axis machines. I place the UDE on topo level program. I placed the proc in the tcl file. I put MOM_output_text tests to make sure proc is being parsed, and it is. But the fourth_axis does not get disabled.ScreenHunter_01 May. 09 09.14.gifScreenHunter_02 May. 09 09.15.gifScreenHunter_03 May. 09 09.16.gifScreenHunter_04 May. 09 09.17.gif

NX CAM Postprocessor Group
NX CAM Postprocessor Group

Members (145)