Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add new UDE in manufacturing 1

Status
Not open for further replies.

Bingos

Aerospace
Jun 13, 2007
45
Hi

How to add new UDE options in UG NX4 manufacturing.

 
Replies continue below

Recommended for you

This is a two step process

1. Add the UDE to the ude.cdl file – after making a copy of the original!
Look at the examples there.
Also check out the help docs Manufacturing – Customizing your environment. There is a whole section on UDE’s

2. The UDE needs to be recognized by the post. This will require a custom command and most likely some Tcl coding. Check out the Doc’s in Post Builder
I did a presentation a couple of years ago at the PLM World conference. See the attached file.


John Joyce
Tata Technologies iKS
1675 Larimer St.
Denver, CO
www.myigetit.com
 
 http://files.engineering.com/getfile.aspx?folder=86a0d3d3-24d8-4489-8aca-261a4858ae38&file=User_defined_events_taking_control_plm_2005.zip
Thanks for elaborated information

I have one more problem in linking of post.

I have created two separate posts (Zaxis and Waxis) how to link both post,
 
Under the Program and Tool path tab is a Linked Post tab
Activate Link Other Posts to This post – Let’s say your starting with the Zaxis post first. The system will prompt you for a Head command. Use Zaxis for example. Then click New and enter a Head word for the post you are linking to. Waxis for example. Then click Select Name and pick the other post .pui file. Repeat this with the the Waxis post so they are now linked to each other.

To switch from one post to another in NX you will need to add the HEAD command to either a Method or Program group. These are the only two objects that will work for this. I like to use the Method object so I only need one program.
In the Head UDE when you want the Zaxis post enter Zaxis. To call the Waxis post do the same thing. Don’t forget to set this at the very start of program. You may want to customize the UDE to add a pull down so you don’t need to type the head command in once you’ve got everything working.


John Joyce
Tata Technologies iKS
1675 Larimer St.
Denver, CO
 
I tried with inserting UDE in both method and program, after selecting waxis; it is not switching to sub post, triggering main post code only.

UDE created for selecting Z and W axis.

EVENT Head
{
UI_LABEL "Head"
CATEGORY MILL DRILL LATHE
PARAM command_status
{
TYPE o
DEFVAL "ZAXIS"
OPTIONS "ZAXIS","WAXIS"
UI_LABEL "Status"
}

}
 
You left out the head_name variable

EVENT head
{
UI_LABEL "Head"
PARAM command_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive","User Defined"
UI_LABEL "Status"
}
PARAM head_name
{
TYPE o
DEFVAL "ZAXIS"
OPTIONS "ZAXIS","WAXIS"
TOGGLE Off
UI_LABEL "Name"
}
}




John Joyce
Tata Technologies iKS
1675 Larimer St.
Denver, CO
 
Thank you verymuch

Its working !!!!

One more thing, how to format in TCL decimals to fractions

Example : 0.5 should output as 1/2
0.25 should output as 1/4

Thanks
 
Where would you want this output?

It will require a custom command to evaluate the value and then output the fraction as text.

There is no "format" command for fractions
For example if you wanted the tool diameter output as a fraction.

global mom_tool_dia

if { $mom_tool_dia == .5 } { MOM_output_literal "(Tool Dia 1/2)"}
if { $mom_tool_dia == .25 } { MOM_output_literal "(Tool Dia 1/4)"}

and so on

I would recomment getting a book on Tcl/Tk
I have Tcl/Tk for Dummies ant it helped a lot.
Check out the Help Docs in post Builder



John Joyce
Tata Technologies iKS
1675 Larimer St.
Denver, CO
 

I require this output for tool information only

I agree we can do as you mentioned with if statement, but if I am using something out of my inventory then I will be not able to output the values.
 
Hello Bingos, try next TCL code:
set mom_tool_dia 0.25
set mom_tool_dia_fract [format "%1.0f" [expr 1/$mom_tool_diam]]
MOM_output_literal "(tool diameter fractioned 1/$mom_tool_dia_fract)"

I have some free TCL/TK SW available, as tutor and for testing your own script. Only small differences, UG says MOM_output_literal, testing your script by using "puts" as standard TCL/TK

Kind Regards from the Netherlands, Bert
 
I WAS READING THIS POST AND IT SEEMS TO BE JUST WHAT IAM LOOKING FOR, HOWEVER I WAS HOPING FOR SOME ELABORATION ON THE TOPIC.

I VIEWED YOUR POWER POINT PRES. AND READ YOUR INFO ON LINKING POSTS. WITH THIS SETUP WILL I BE ABLE TO OUTPUT TWO SEPARATE FILES,(WHICH IS WHAT I WANT) OR DOES THIS "BLEND" THE TWO POSTS TOGETHER SOME HOW.

IAM LOOKING FOR A WAY TO LINK SEPARATE POSTS TOGETHER SO THE PROGRAMMER THAT USES IT WILL NOT HAVE TO OUTPUT TWO FILES,WHICH WILL ELIMINATE A STEP.

I FOLLOWED THE EXAMPLE OF CREATING A CUSTOM UDE AND POINTING IT TO THE LINKED POSTS, BUT IT IS NOT OUTPUTTING TWO FILES.
 
You know there is a custom command already included in UG for a Z/W axis. You only need one post. Unless your machine is different than what I'm assuming. But to answer your question, you need to link the posts inside the post. There is a tab for linked posts, you need to point to each separate post there. Make sure you call the 'Head' section here the same as what you program with.
-Derek
 
By default the "Program" that is selected is output as a single file.

The easiest thing to do would be to create multiple programs in NX if you need separate output files.

I am sure this could be done in Post Builder but it would require some customization of the post.



John Joyce
Tata Technologies iKS
1675 Larimer St.
Denver, CO
 
I WAS HOPING TO ONE WAY OR ANOTHER TO OUTPUT 2 DISTINCT FILES. ONE THE NORMAL MACHINE CODE AND ONE STRIPPED OF ALL MACHINE CODE ONLY THE THE CUTTER INFO. IS LEFT, LIKE MOM_TOOL_NUMBER, MOM_TOOL_LENGTH, AND MOM_TOOL FLUTE_LENGTH. ALSO MOM_LOGON_NAME MOM_MACHINE_TIME.

TWO SEPARATE OUTPUTS OF THE SAME PROGRAM. I CAN FOR THE MOST PART ACHIEVE THIS "MANUALLY" BY POSTING THE PROGRAM TWICE WITH DIFFERENT POST PROCESSORS.
I DIDN'T WANT TO CREATE AN EXTRA STEP THAT HAD TO BE TAUGHT OR ENFORCED. I JUST WANTED TO REDO THE CURRENT POST TO INCLUDE THE SECOND POST AND SECOND FILE OUTPUT. I HAVE A CUSTOM APPLICATION THAT I WILL IMPORT THE CUTTER DATA INTO A CENTRAL DATABASE FOR USE.
I KNOW UG HAS THE SHOP DOC AND WE ARE USING THAT ALREADY, BUT IT IS NOT EXACTLY WHAT I AM FISHING FOR. IF YOU HAVE ANY EXAMPLES OF HOW TO CUSTOMIZE THE POST I WOULD APPRECIATE THEM. ALSO IF YOU HAVE AN EXAMPLE OF HOW TO USE THE MOM_MACHINE_TIME COMMAND CORRECTLY. CAN THIS COMMAND BE USED WITHOUT HAVING VERICUT? OR IS THAT WHAT CALCULATES MACHINE TIME?
I AM ALSO TRYING TO NAME THE EXTERNAL FILE NAME BASED ON INFO IN THE PROGRAM ITSELF. IS THIS POSSIBLE? EXAMPLES? MY EXAMPLE IS SAY THAT THE POST OUTPUT LOOKS LIKE THIS,

(PART NAME 6000-200E004-cnc)
(SNC64, 20-11-07)
(PROGRAMMER, )
TOOL # 10 / FLUTE : 1.10000000000000010 LENGTH : 1.50000000000000010
TOOL # 2 / FLUTE : 1.30000000000000000 LENGTH : 1.60000000000000010
TOOL # 1 / FLUTE : 1.10000000000000010 LENGTH : 1.50000000000000010
TOOL # 4 / FLUTE : 1.00000000000000000 LENGTH : 1.50000000000000010
TOOL # 9 / FLUTE : 1.00000000000000000 LENGTH : 1.50000000000000010
TOOL # 12 / FLUTE : 0.65000000000000002 LENGTH : 1.00000000000000010
TOOL # 13 / FLUTE : 0.34999999999999998 LENGTH : 1.00000000000000010
(TOTAL MACHINING TIME: 2 MIN.)

I WOULD LIKE TO TAKE THE CURRENT PART NAME 6000-200E004-CNC
AND MODIFY IT FOR THE EXTERNAL FILE NAME TO 6000-200E004S0-CNC AND HAVE IT NAMED THIS NAME AUTOMATICALLY, AGAIN SO THAT HUMAN INTERVENTION WON'T BE NEEDED.


THANKS IN ADVANCE FOR ANY HELP

 
Have you looked at http:://bbsnotes.ugs.com/
This is the UGS supported confrencing system.
This question has been answered ther. You will need a web key username and password.
Which is free, as long as you maintance is up to date


John Joyce
Tata Technologies iKS
1675 Larimer St.
Denver, CO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor