6.01M
Category: softwaresoftware

User Defied Events. Helping yourself

1.

User Defined Events
Helping yourself
John Joyce Manufacturing Engineer
Senior Aerospace
Enfield, CT
jjoyce@senioraeroct.com
https://www.linkedin.com/in/johnljoyce

2.

“The best place to find a helping
hand is at the end of your
own arm.” ~Swedish Proverb

3.

Senior PLC
Headquarters - Rickmansworth (London) Traded on London Stock Exchange
• Market capitalisation of approximately $ 1.25B
International manufacturing group with 33 autonomous and collaborative operations
across 14 countries - 7000+ employees
Operates through three Divisions:
• Aerospace Fluid Systems
• Aerospace Structures
• Flexonics

4.

5.

Senior Aerospace, Machining
Facility Locations
Damar, Monroe, WA
Cashmere, Wenatchee, WA
AMT, Arlington, WA
SA Connecticut, Enfield, CT
Absolute, Arlington, WA
Weston, Lancashire,
England
Ketema, El Cajon, CA
Senior Mexico, Saltillo
Mexico
AMT SC, Charleston
LPE, Lymington
England
Jet Products, San Diego, CA
SA Thailand, Chonburi,
Thailand
Upeca, Selangor
Malaysia

6.

Connecticut
Enfield, Connecticut USA
Precision military and engine
Machining
Annual Revenue $37M
53,000 Ft2 of Mfg. Space
Magnesium Resin-coating (Rock-hard)
S-92 Carrier Assy.
Gearbox Housing.
Blackhawk Gear
Housing Assy.
S-92 Swash Plate Guide
Transmission Housing
Assembly
Blackhawk Carrier Assy.
Blackhawk Main Transmission Housing
Gearbox Cover Assembly

7.

Connecticut
15” Long
18” Cube
14” Cube
Cam Assembly
Titanium Hinge Cuff Assembly
Retention Plate
Housing Assembly
Torquemeter
16” Long
Titanium Housing
Assembly
Horn Assembly

8.

Programs / Customers
Sikorsky
Blackhawk
Sikorsky S-76
GE Marine (LM2500)
Sikorsky CH53K
A350/TrentXWB
Bell-Boeing V-22 Osprey
Sikorsky
S-92®
(Rolls Royce 1107-C)
Lockheed C-130 Hercules
(Rolls Royce T-56)
Bombardier CRJ
Kaman SH-2G Super Sea Sprite
(GE CF34)

9.

10.

User Defined Events – UDE’s
User Defined Events file
Defining “events”
Customizing events
Passing events to the post
Customized output
Adding Help to a UDE

11.

User Defined Events – UDE’s
·
·
·
·
Where is the ude.cdl file?
What does the ude.cdl file do?
How can you add or remove events?
How can you add Help docs

12.

User Defined Events – UDE’s

13.

User Defined Events – UDE’s

14.

User Defined Events – UDE’s
List of available
Post commands
This list of commands
can be customized
and new commands added

15.

User Defined Events – UDE’s
Editing the ude file
and adding events

16.

User Defined Events – UDE’s
Make a copy of the original
ude.cdl file BEFORE
attempting
to make any changes!

17.

User Defined Events – UDE’s
I recommend creating a
Separate custom
Resource folder.

18.

User Defined Events – UDE’s
The NX help library
Has a section for
CAM Customization

19.

User Defined Events – UDE’s
A simple example
EVENT coolant
{
POST_EVENT "coolant_on"
UI_LABEL "Coolant On"
CATEGORY MILL DRILL LATHE
PARAM command_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive","User Defined"
UI_LABEL "Status"
}
PARAM coolant_mode
{
TYPE o
DEFVAL "Flood"
OPTIONS "On","Flood","Mist","Tap","Thru"
UI_LABEL "Type"
}
PARAM coolant_text
{
TYPE
s
TOGGLE Off
UI_LABEL "Text"
}
}

20.

User Defined Events – UDE’s
An event is what triggers the post
to perform some action
and cause output.
Events also pass variables
to the post processor

21.

User Defined Events – UDE’s
Event name
Label on Dialog
EVENT barpuller
{
UI_LABEL "Enable Barpuller"
PARAM barpuller_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive"
UI_LABEL "Status"
}
PARAM z_position_pull
{
TYPE
d
DEFVAL "10.0"
TOGGLE On
UI_LABEL " Z Position-pull"
}
}

22.

User Defined Events – UDE’s
Event name
Label on Dialog
EVENT barpuller
{
UI_LABEL "Enable Barpuller"
PARAM barpuller_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive"
UI_LABEL "Status"
}
PARAM z_position_pull
{
TYPE
d
DEFVAL "10.0"
TOGGLE On
UI_LABEL " Z Position-pull"
}
}

23.

User Defined Events – UDE’s
EVENT barpuller
{
UI_LABEL "Enable Barpuller"
PARAM barpuller_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive"
UI_LABEL "Status"
}
PARAM z_position_pull
{
TYPE
d
DEFVAL "10.0"
TOGGLE On
UI_LABEL " Z Position-pull"
}
PARAM = variable for post
TYPE = Type of variable
}

24.

User Defined Events – UDE’s
This is only half the story. You need to have the post do something
with the input we defined
How does the Post know what to do with this UDE?

25.

User Defined Events – UDE’s
The event name becomes
MOM_barpuller when passed
To the post
EVENT barpuller
{
UI_LABEL "Enable Barpuller"
PARAM barpuller_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive"
UI_LABEL "Status"
}
PARAM z_position_pull
{
TYPE
d
DEFVAL "10.0"
TOGGLE On
UI_LABEL " Z_Position_pull"
}
The variable becomes
mom_ z position_pull
Yes! the case IS important
}
The Event must have a corresponding
Procedure in the post

26.

User Defined Events – UDE’s
When is this output?

27.

User Defined Events – UDE’s
Just as it is in the real world MOM controls everything.

28.

User Defined Events – UDE’s
Name of proc

29.

User Defined Events – UDE’s
mom variables

30.

User Defined Events – UDE’s
Formatted output

31.

User Defined Events – UDE’s
Custom Proc added
to start of path

32.

User Defined Events – UDE’s
N1180 M05
N1190 G65 P9020 Z10.0000
N1200 G00 Z15.0

33.

User Defined Events – UDE’s
There has to be an easier way
to create these User Defined Events !!!!
EVENT barpuller
{
UI_LABEL "Enable Barpuller"
PARAM barpuller_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive"
UI_LABEL "Status"
}
PARAM z_position_pull
{
TYPE
d
DEFVAL "10.0"
TOGGLE On
UI_LABEL " Z Position-pull"
}
}

34.

User Defined Events – UDE’s
As with NX there is almost always more than one
way to do the same thing

35.

User Defined Events – UDE’s
Activate the UDE Editor before opening the post.

36.

User Defined Events – UDE’s
In the Machine Control area of Post Builder
Right click to create a New Machine Control Event

37.

User Defined Events – UDE’s

38.

User Defined Events – UDE’s
Integer = whole numbers
Real = real numbers ie: 1.234
Text = String of characters
Boolean = TRUE / FALSE
Option = A list of choices
Point = Select an X,Y,Z position
Vector = I,J,K components
Bitmap = an image to go with your
UDE
Group = create group section
on the UDE dialog
Variable types

39.

User Defined Events – UDE’s
Integer

40.

User Defined Events – UDE’s
Real Numbers

41.

User Defined Events – UDE’s
Text

42.

User Defined Events – UDE’s
Boolean
Output as
TRUE
or
FALSE

43.

User Defined Events – UDE’s
Options – Good for controlling
the input from users.

44.

User Defined Events – UDE’s
Point

45.

User Defined Events – UDE’s
Vector

46.

User Defined Events – UDE’s

47.

User Defined Events – UDE’s
Some Notes on Points and Vectors
• Not associative
• Output as an array
proc MOM_probex {} {
global mom_probex_status
global mom_probex_pos
Point array
if { $mom_probex_status != "ACTIVE" } { return }
set probex_pos [ format "%2.4f" $mom_probex_pos(0) ]
MOM_output_literal "G65 P9811 X$probex_pos "
}

48.

User Defined Events – UDE’s
Bitmap
Must be .bmp file located in bitmap folder
Or have path “hard coded”

49.

User Defined Events – UDE’s
By default when you save the post a .cdl file is also saved in the same folder
You can edit the .cdl file and cut and paste the custom commands
To your .cdl file

50.

User Defined Events – UDE’s

51.

User Defined Events – UDE’s
Help File

52.

User Defined Events – UDE’s
Help File

53.

User Defined Events – UDE’s
Help File

54.

User Defined Events – UDE’s
Words can be added to
The UDE events as well
As Custom commands

55.

User Defined Events – UDE’s
Deciding when to output your code.
There are times when you may want to “Hold” onto the output
From your UDE until you reach a very specific point in the program.
Put Procedure at start of path
Have second custom command to output the commands from the UDE
At the location of you choice, First Move, Approach Move etc..

56.

User Defined Events – UDE’s
Use the output from a UDE to control conditional commands
global sr_restart_flag
if { [ info exists sr_restart_flag ] && $sr_restart_flag == 1 } {
return 1
} else {
return 0
}

57.

User Defined Events – UDE’s
• Keep you ude’s simple

58.

User Defined Events – UDE’s
• Learn some basic Tcl
• Create a separate resource folder for testing – Read the Help Docs!
• Create separate configuration files for machine groups
• Make sure you do not edit the original .cdl file
• Make backups
• Consult other users to gather input and acceptance
• Test, Test, Test

59.

User Defined Events – UDE’s

60.

User Defined Events – UDE’s
English     Русский Rules