Вы находитесь на странице: 1из 4

u AUTOMATIC OPERATIONS

o Cont roll ing Aut om atic Ope ra t ions o Sin gle Block Cont rol o M-S-T Funct
ions Con trol o Feedhold, Feedrate and Ex act Check Con trol o Sys tems Set tings o
Cont roll ing Numb er of Mac hined Parts
u PARAMETRIC PROGRAMMIN

u AUTOMATIC OPERATIONS
o Cont roll ing Aut om atic Ope ra t ions o Sin gle Block Cont rol o M-S-T Funct
ions Con trol o Feedhold, Feedrate and Ex act Check Con trol o Sys tems Set tings o
Cont roll ing Numb er of Mac hined Parts
u PARAMETRIC PROGRAMMING o Variable Data o Benefits of Parametric Programming o
Families of Similar Parts o Macros for Machining o Macros as Custom Cycles
u PROBING WITH MACROS o Probing Fundamentals o In-Process Gauging o Part Features
Measurement o Calibration Devices o Sample Program Evaluation
Closing Comments
In no way is the pres ented prog ram outl ine off ered as the best poss i ble
course pres en tat ion. In some ways, the outl ine foll ows the mat e rial in this
handb ook, but it also dev i ates from it. Keep in mind that the handb ook has been
des igned mainly as a refe r ence res ource, not a part icu lar course ma ter ial.
How ever, the top ics pre sented can serve as ex cell ent source for build ing a
cus tom ized course on Fanuc mac ros.
306 Chapter 25
FANUC CNC Custom Macros
Copyright 2005, Industrial Press Inc., New York, NY - www.industrialpress.com
Index
A
Abbreviations of macro functions ............204 ABS
function ..................122, 284 ABSIO variables ...................193 ABSKP
variables ..................193 ABSMT variables ..................193 Absolute mode
....................59 ABSOT variables ..................193 ACOS
function ...................116 Additional work offsets ...............9, 169 ADP
function.................87, 122, 124 Agile manufacturing ..................49
Alarms and timers ................187-192 Alarm format ...................188 Alarm
generation ..................8 Alarm messages..................187 Alarm
numbers ..................187 Alarms in macro ..................188 Resetting an
alarm .................190 Timers......................191 Amplitude - Sine
curve ................185 AND function ....................176 Angular hole pattern
- version 1 ...........221-223 Angular hole pattern - version 2 ...........224-225
Arc hole pattern ...................233 Arguments......................77
Arithmetic functions .................113 Nesting .....................113 ASIN
function ....................116 Assigning variables ................93-108 ATAN
function....................116 Auto mode operations...............195-202
Automatic cornerbreak ................213 Auxiliary functions ..................196
Axis position data ................193-194 Axis type parameters .................43
B
Basic program codes ................11-20 Battery power supply .................34
Baud rate....................270-271 Baud rate setting ...................68 BCD
function ....................126 BIN function ....................126 Binary
numbers..................45, 126 Binary values ...................200 Bit-type data
....................37 Interpreting binary value...............200 Logical
sum....................200 Sum of bits ..................45, 200
Bit .........................45
Locations .....................38 Bit type parameters ..................37 Block
number search .................295 Block numbers ..................40, 72 Block
skip function ................72, 295 Bolt hole circle pattern ................229
Boole, George ....................74 Boolean operators ..............74, 124, 175
BPRNT function .................267-268 Brackets ....................86, 126
Branching and looping...............171-186 Concept of loops..................177
Conditional branching................172 Counter in loops ..................229
GOTOn function ..................173 IF function ....................172
Unconditional branching...............173 WHILE function ..................179 Byte
type parameters .................41 C
Calibration devices ..................288 Centering macro
example ...............289 Circular groove with multiple depth ...........247
Circular pocket finishing..............240, 260 Circular pocket
roughing..............236, 260 CMM .......................276 Common
variables ..............83, 106, 133 Protection ....................108 Volatile
and nonvolatile ...............106 Concept of loops...................177 Concept
of variables ................83-92 Conditional branching.................172
Conditional expressions ............175-176, 182 Constants ....................73-
74 Control models ...................138 Control parameters ..................33
Conversion functions .................126 Coordinate measuring ................276
Coordinate Measuring Machines ............276 Coordinate mode ...................50
Coordinate system rotation..............9, 288 COS function ....................116
Course outline....................301 Current value ....................112 Curves
Approximation...................185 Sine curve ....................184 Custom fixed
cycles ..................8 Custom machine features................92 Custom M-codes
...................12 Cycle Start ......................4 D
Data output functions .................268 Data settings ...................49-72
307
FANUC CNC Custom Macros
Copyright 2005, Industrial Press Inc., New York, NY - www.industrialpress.com
Block numbers ...................72 G10 command ...................50
MDI .......................65 Offsets ......................49 P-
address .....................67 R-address.....................67 Zeroing machine
axes ................70 Datum shift .....................145 Decimal
point ..................87, 229 Decimal point in G65 statement.............229
Decision making in macros...............171 Default values ..............11, 33,
47-48, 233 Dimensional tolerances ................280 Disallowed
addresses .................98 Division by zero ...................115 DNC
method.....................34 Documentation of programs...............29 DPRNT
function .................267-274 Dwell as a macro ..................192 E
Edit mode .....................296 Editing macros ...................203 Emergency
stop ...................94 Empty variables .................111, 182 Endless
loops ....................178 ENDn function....................179 English
units .....................88 EQ function.....................182 Evaluation of
functions ................126 Exact stop check control................197 Executing
block ...................164 EXP function ..................122, 124 External
output commands .............267-274 F
FALSE values ............37, 125, 172, 176, 182 Family of parts...............7,
205, 209-220 Fanuc custom macros .................1 Feedhold
control.................197, 296 Feedrate override control ...............197 FIX
function...................121, 136 Fixed cycles .....................8
Flowchart .................177, 208, 300 Formulas in macros .................134
Frame hole pattern..................224 Functions...................73-74, 109
Arithmetic ....................113 Available groups..................109 Conversion
....................126 Evaluation ....................126
Logical......................124 Miscellaneous...................122 Order of
evaluation.................128 Practical applications ................129
Rounding.....................117
Trigonometric ...................116 FUP function ..................121, 128 G
G04 command.................12-13, 192 G09 command.................12-13, 198 G10
command ...........13, 17, 50-52, 62, 66-68 G11 command ..................66, 68
G13 circle cutting cycle .............8, 240, 260 G20 command .................12-
13, 17 G21 command .................12-13, 17 G31 command .................193, 293
G61 command ................14, 18, 198 G65 command .............5, 14, 18, 66, 75,
77 G66 command .................15, 18, 98 G66.1 command ...................98 G67
command .................15, 18, 98 G68-G69 commands .................288
Gauging ...................3, 49, 275 G-codes ....................2, 10-11 G-codes
for milling .................13 G-codes for turning .................16
Groups ................13, 16, 164, 167 Modal commands .................164 Three
digit G-codes .................15 Types for turning ..................16 GE
function.....................182 Geometry offset ...............8, 53, 58, 149
GOTOn function ...................171 Groups of similar parts .................7 GT
function.....................182 H
Hiding macros.....................9 I
IF function .................171-172, 182 IF-THEN function ................171, 174
Increment system .................43-44 Incremental mode...................59
Infinite loops ....................178 Infinite values ....................128 In-
process gauging ..........3, 9, 49, 276-278, 282 Input/Output
Interface .....................133 Metric and inch format ...............270
Parameter settings ...............269-271 Printing a blank line ................274
Integer numbers ...................85 Iteration (looping) ...............30, 179,
181
308 Index
FANUC CNC Custom Macros
Copyright 2005, Industrial Press Inc., New York, NY - www.industrialpress.com
K
Knowledge for macros ................297 L
Lathe offsets.....................62 LE function ...................124, 182 Least
increment ...................88 Limitations .....................295 LN
function ...................122, 124 Local variables ................83, 93, 129
Assigning .....................94 Assignment lists ...............94-95, 168
Clearing......................94 Defining......................93 Disallowed
addresses ................98 Nesting levels ...................105 Variable as a
counter ................229 Logical functions ..............73-74, 124, 175
AND ......................125 EQ .......................124
GE .......................124 GT .......................124
LE .......................124 LT .......................124
NE .......................124 OR .......................125
XOR ......................125 Looping function .................179-181 LT function
.....................182 M
M30 function................16, 20, 94, 129 M98 function ...............16, 20, 25,
75-77 M99 function ...........16, 20, 25-26, 30, 94, 129 Machining
performance ................33 Macro call ......................75 Macro call by G-
code ...............256, 262 Macro call by M-code .................258 Macro call
command..................77 Macro definition ...................75 Macro
execution ...................295 Macro functions .................109-136 Macro in
main program .................5 Macro programming ..................4 Macro
structure ..................73-82 Macro unique features .................30 Macros
Calling ......................75 Course outline...................301
Definition .....................75 Documentation ...................29 Program
numbers..................78 Protection .....................79 Setting
definitions ..................79 Macros as custom cycles .............255-266
Macros for machin

G o Variable Data o Benefits of Parametric Programming o Families of Similar Parts


o Macros for Machining o Macros as Custom Cycles
u PROBING WITH MACROS o Probing Fundamentals o In-Process Gauging o Part Features
Measurement o Calibration Devices o Sample Program Evaluation
Closing Comments
In no way is the pres ented prog ram outl ine off ered as the best poss i ble
course pres en tat ion. In some ways, the outl ine foll ows the mat e rial in this
handb ook, but it also dev i ates from it. Keep in mind that the handb ook has been
des igned mainly as a refe r ence res ource, not a part icu lar course ma ter ial.
How ever, the top ics pre sented can serve as ex cell ent source for build ing a
cus tom ized course on Fanuc mac ros.
306 Chapter 25
FANUC CNC Custom Macros
Copyright 2005, Industrial Press Inc., New York, NY - www.industrialpress.com
Index
A
Abbreviations of macro functions ............204 ABS
function ..................122, 284 ABSIO variables ...................193 ABSKP
variables ..................193 ABSMT variables ..................193 Absolute mode
....................59 ABSOT variables ..................193 ACOS
function ...................116 Additional work offsets ...............9, 169 ADP
function.................87, 122, 124 Agile manufacturing ..................49
Alarms and timers ................187-192 Alarm format ...................188 Alarm
generation ..................8 Alarm messages..................187 Alarm
numbers ..................187 Alarms in macro ..................188 Resetting an
alarm .................190 Timers......................191 Amplitude - Sine
curve ................185 AND function ....................176 Angular hole pattern
- version 1 ...........221-223 Angular hole pattern - version 2 ...........224-225
Arc hole pattern ...................233 Arguments......................77
Arithmetic functions .................113 Nesting .....................113 ASIN
function ....................116 Assigning variables ................93-108 ATAN
function....................116 Auto mode operations...............195-202
Automatic cornerbreak ................213 Auxiliary functions ..................196
Axis position data ................193-194 Axis type parameters .................43
B
Basic program codes ................11-20 Battery power supply .................34
Baud rate....................270-271 Baud rate setting ...................68 BCD
function ....................126 BIN function ....................126 Binary
numbers..................45, 126 Binary values ...................200 Bit-type data
....................37 Interpreting binary value...............200 Logical
sum....................200 Sum of bits ..................45, 200
Bit .........................45
L

Вам также может понравиться