Download presentation
Presentation is loading. Please wait.
Published byCarol Blake Modified over 9 years ago
1
1 Introduction General information Comparison to subprogramming … to computer programming … to canned cycles Application categories Limitations Computer related features CNC related features Presentation links page for lesson one
2
For CNC Machining Centers and Turning Centers Parametric Programming Copyright 2003 (Custom Macro B) Welcome to Parametric Programming class!
3
Parametric Programming Eight lessons in this class: 1)Introduction 2)Variable techniques 3)Arithmetic functions 4)Logic and program flow control 5)Looping 6)System variables 7)Other features of parametric programming 8)Approaching applications Here are the lesson titles
4
CNC’s best kept secret! Fanuc calls it Custom macro B Okuma calls it User task 2 Fadal calls it Macro This class covers Fanuc’s custom macro B Parametric Programming There are few in the industry that even know what parametric programming is… …let alone how to use it!
5
. N035 M98 P1000. Main program O1000 N001 X4.5 Y4.0 N002 X3.5 Y3.0 N003 X2.5 Y2.0 N004 X1.5 Y1.0 N005 X0.5 Y0 N005 M99 Subprogram Comparison To Subprogramming Let’s compare parametric programming to things you already know… You know M98 calls a subprogramP word specifies program numberControl executes subprogramM99 causes return to calling program
6
. N035 M98 P1000. Main program O1000 N001 X4.5 Y4.0 N002 X3.5 Y3.0 N003 X2.5 Y2.0 N004 X1.5 Y1.0 N005 X0.5 Y0 N005 M99 Subprogram Subprogramming can be used Comparison To Subprogramming With subprograms, nothing can change from one time the subprogram is called to the next
7
Subprogramming cannot be used Comparison To Subprogramming Again, nothing can change from one time to the next
8
N035 M98 P1000 X1. Y1. D.25 W3. H1. X Y H W D N035 G65 P1000 Comparison To Subprogramming G65 is the same as M98, but… …with G65, you can pass variables
9
Consider times you’d like to write general purpose subprograms: Bolt hole pattern Thread milling Grooving Comparison To Subprogramming Parametric programming lets you develop very helpful subprograms, commonly called macros
10
Comparison To Computer Programming Parametric programming can also be compared to computer programming languages…
11
Two popular programming languages… BASICC Language begin input “Enter interest rate %:” ; a input “Enter starting balance:” ; b c = b for d = 1 to 12 c = c + (a *.01 / 12) next d print “Total after one year” ; c end Variables Arithmetic Logic Looping Parametric programming is like having a computer programming language built right into your CNC control! Comparison To Computer Programming A sample computer program Parametric programming has many computer programming features
12
Comparison To Canned Cycles All controls have some form of canned cycles to simplify programming…
13
N050 G81 X0.5 Y0.5 R0.1 Z-.75 F3.0 X1. Y1. D.25 W3. H1.N35 G65 P1000 Comparison To Canned Cycles Canned cycle commandG81 invokes drilling cycleVariables that specify how the hole is to be drilled A calling command to a custom macro Call custom macro program O1000 Variables (arguments) to be passed to the custom macro Parametric programming lets you create your own canned cycles! …machining centers have hole machining canned cycles
14
Five Application Categories 4 Part families 4 User created canned cycles 4 Utilities 4 Complex motions and shapes 4 Driving accessories All applications for parametric programming will fall into one of five categories...
15
Five Application Categories 4 Part families 4 User created canned cycles 4 Utilities 4 Complex motions and shapes 4 Driving accessories Many companies make similar products in varying sizes…
16
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories O0001 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. O0002 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.5 Y1.75 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.5 N035 X4.5 N040 X5.5 N045 G90 N050 G91 G28 Z0 M19 N055 M01. Are you changing one program to create another? Values that changeValues for another workpiece
17
Five Application Categories Do you have prints with variables? Variable dimensions Chart with actual values
18
Five Application Categories O0001 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. O0002 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. O0003 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. O0004 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. O0005 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. O0006 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. O0007 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. O0008 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X2.0 Y1.5 N020 G43 H01 Z0.1 N025 G81 R0.1 Z-.2 F5.0 N030 X3.0 N035 X4.0 N040 X5.0 N045 G90 N050 G91 G28 Z0 M19 N055 M01. Currently you have many programs! If you must make a change, all programs must be changed! O0001 N005 T01 M06 N010 G54 G90 S700 M03 N015 G00 X#24 Y#25 N020 G43 H01 Z#3 N025 G81 R0.1 Z-#7 F5.0 N030 X[#24+#101*.5] N035 X[#24+#101+1.0] N040 X[#24+#101+1.5] N045 G90 N050 G91 G28 Z0 M19 N055 M01. Parametric programming lets you handle all parts in the family with one program!
19
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Canned Cycles All CNC controls have some canned cycles to simplify programming
20
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes Consider a special two-surface drill cycle Example of canned cycles on mills and lathes
21
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes Consider a special two-surface drill cycle Example of canned cycles on mills and lathes Drill first surface
22
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes Consider a special two-surface drill cycle Example of canned cycles on mills and lathes Rapid move
23
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes Consider a special two-surface drill cycle Example of canned cycles on mills and lathes Drill second surface
24
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes Consider a special two-surface drill cycle Example of canned cycles on mills and lathes Full retract Most controls don’t have this kind of drilling cycle… …but with parametric programming, you can create one!
25
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes What don’t you like about G83? Example of canned cycles on mills and lathes
26
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes What don’t you like about G83? Example of canned cycles on mills and lathes
27
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes What don’t you like about G83? Example of canned cycles on mills and lathes
28
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes What don’t you like about G83? Example of canned cycles on mills and lathes
29
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes What don’t you like about G83? Example of canned cycles on mills and lathes
30
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes What don’t you like about G83? Example of canned cycles on mills and lathes
31
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes What don’t you like about G83? Example of canned cycles on mills and lathes
32
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes What don’t you like about G83? Example of canned cycles on mills and lathes
33
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes The last peck will not be the same Example of canned cycles on mills and lathes
34
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes The last peck will not be the same Example of canned cycles on mills and lathes
35
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes The last peck will not be the same Example of canned cycles on mills and lathes
36
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Thread milling 6 Pocket milling 6 Face milling 6 Circle milling 6 Grooving 6 Tapping 6 Bar feeding 6 Cut-off 6 Dovetail milling 6 Hex milling 6 Double tapping 6 Special holes The last peck will not be the same Example of canned cycles on mills and lathes With parametric programming, you can modify the way G83 works!
37
User Created Canned Cycles % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Think of all the times you’ve wished you had more canned cycles!
38
4 Part families 4 User created canned cycles 4 Utilities 4 Complex motions and shapes 4 Driving accessories Five Application Categories Utilities enhance the way your CNC machine behaves
39
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 6 Reduce setup time 6 Reduce tool maintenance time 6 Make programs easier to verify 6 Make programs easier to run 6 Make machines safer to run Utilities can… Examples…
40
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories 2.0234 +0.0004 -0.0002 2.0235 2.0239 Reduce offset by 0.0004 Consider how operators change offsets Print dimension Target value Operator must calculate deviation Measured value It would be easier if the operator didn’t have to calculate the target value… …or the deviation.. …and could simply enter the measured value Parametric programming allows you to modify the way offsets are used!
41
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Do you have setups so tall that they interfere with tool changing? Tool change okay
42
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Do you have setups so tall that they interfere with tool changing? Tool change okay
43
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Do you have setups so tall that they interfere with tool changing? Tool change not okay Wouldn’t it be nice if you could error trap your tool changer so that it would never try to make a tool change if the spindle is over the fixture?
44
4 Part families 4 User created canned cycles 4 Utilities 4 Complex motions and shapes 4 Driving accessories Five Application Categories Parametric programming allows you to create motion types!
45
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Consider how linear and circular interpolation work Movement is divided into tiny single axis departures Circular motion works the same
46
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Consider how helical interpolation works Again, tiny single axis departures are created
47
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories What if you have a tapered thread to mill? Normal helical interpolation cannot be used! Radius is different from start point to end point Wouldn’t it be nice if you could create spiral interpolation to mill taper threads? With parametric programming, you can!
48
Five Application Categories % Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Just about any shape that can be defined with an arithmetic formula can be machined with a parametric program! Spherical shape can be milled
49
G65 P1002 A1.75 B-.6 C1. I12. J1.75 I35. J1.625 I175. J1.1 I25. J1.25 I113. J1.75 Circular cam can be milled
50
4 Part families 4 User created canned cycles 4 Utilities 4 Complex motions and shapes 4 Driving accessories Five Application Categories
51
% Part families % User created canned cycles % Utilities % Complex motions and shapes % Driving accessories Some machines have probes and post process gauges These devices are interfaced with parametric programming
52
Driving Accessories S Door open/close S Automatic clamping S Indexer activation S Pallet changer activation You can even add M codes with parametric programming!
53
Limitations m Option m Skill & time for preparation m Memory capacity m Compatibility m Execution time There are some limitations to parametric programming…
54
Limitations m Option m Skill & time for preparation m Memory capacity m Compatibility m Execution time There are some limitations to parametric programming… Parametric programming is an option that must be purchased at an extra price (for most controls)
55
Limitations m Option m Skill & time for preparation m Memory capacity m Compatibility m Execution time There are some limitations to parametric programming… Parametric programs take time to prepare (more than for standard programs)
56
Limitations m Option m Skill & time for preparation m Memory capacity m Compatibility m Execution time There are some limitations to parametric programming… Parametric programs reside in memory (and take up memory space)
57
Limitations m Option m Skill & time for preparation m Memory capacity m Compatibility m Execution time There are some limitations to parametric programming… There are different versions of parametric programming from different control manufacturers
58
Limitations m Option m Skill & time for preparation m Memory capacity m Compatibility m Execution time There are some limitations to parametric programming… Calculation and logic commands take time to execute (this can be a problem when quantities are high)
59
Computer Related Features q Variables q Arithmetic q Logic & program flow control q Looping
60
Computer Related Features q Variables q Arithmetic q Logic & program flow control q Looping Again, you can write general purpose programs
61
Computer Related Features q Variables q Arithmetic q Logic & program flow control q Looping Just about anything you can do with a scientific calculator can be done within a parametric program!
62
Computer Related Features q Variables q Arithmetic q Logic & program flow control q Looping This feature gives parametric programming a decision-making capability
63
Computer Related Features q Variables q Arithmetic q Logic & program flow control q Looping This feature allows a parametric program to repeat commands If you are familiar with any computer programming language (like C language), you’re well on your way to understanding parametric programming!
64
CNC Related Features q Offsets q Axis position q Current modal states q Alarm generation q Certain control panel functions q Timers Parametric programming gives you access to certain CNC functions
65
CNC Related Features q Offsets q Axis position q Current modal states q Alarm generation q Certain control panel functions q Timers Parametric programming gives you access to certain CNC functions You can write and read values to and from the offset registers
66
CNC Related Features q Offsets q Axis position q Current modal states q Alarm generation q Certain control panel functions q Timers Parametric programming gives you access to certain CNC functions You can access current position in several ways
67
CNC Related Features q Offsets q Axis position q Current modal states q Alarm generation q Certain control panel functions q Timers Parametric programming gives you access to certain CNC functions You can determine current modes (like absolute versus incremental) from within a program
68
CNC Related Features q Offsets q Axis position q Current modal states q Alarm generation q Certain control panel functions q Timers Parametric programming gives you access to certain CNC functions You can make the control generate an alarm if you’re parametric program determines that something is wrong
69
CNC Related Features q Offsets q Axis position q Current modal states q Alarm generation q Certain control panel functions q Timers Parametric programming gives you access to certain CNC functions You can turn on and off certain functions (like feed hold, feedrate override, and single block
70
CNC Related Features q Offsets q Axis position q Current modal states q Alarm generation q Certain control panel functions q Timers Parametric programming gives you access to certain CNC functions You can time events from within a program
71
CNC Related Features q Protection for needed programs q Creation of new G & M codes q Communication of data Additionally: The computer and CNC related features blend parametric programming into a very powerful programming tool!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.