Cover image for CNC programming using Fanuc custom macro B
Title:
CNC programming using Fanuc custom macro B
Publication Information:
New York : McGraw-Hill, c2010
Physical Description:
xiii, 274 p. : ill. ; 23 cm.
ISBN:
9780071713320

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010267235 TJ1189 S56 2010 Open Access Book Book
Searching...

On Order

Summary

Summary

Publisher's Note: Products purchased from Third Party sellers are not guaranteed by the publisher for quality, authenticity, or access to any online entitlements included with the product.
Master CNC macro programming

CNC Programming Using Fanuc Custom Macro B shows you how to implement powerful, advanced CNC macro programming techniques that result in unparalleled accuracy, flexible automation, and enhanced productivity. Step-by-step instructions begin with basic principles and gradually proceed in complexity. Specific descriptions and programming examples follow Fanuc's Custom Macro B language with reference to Fanuc 0i series controls. By the end of the book, you will be able to develop highly efficient programs that exploit the full potential of CNC machines.

COVERAGE INCLUDES:

Variables and expressions Types of variables--local, global, macro, and system variables Macro functions, including trigonometric, rounding, logical, and conversion functions Branches and loops Subprograms Macro call Complex motion generation Parametric programming Custom canned cycles Probing Communication with external devices Programmable data entry


Author Notes

S. K. Sinha earned his Ph.D. in mechanical engineering from the Indian Institute of Technology in 1993. He has 18 years of teaching experience in CNC programming and has been working in the CNC area for the past 10 years.


Table of Contents

Prefacep. xi
Acknowledgmentsp. xiii
1 Introductionp. 1
1.1 Part Programming Techniquesp. 2
Conventional Part Programmingp. 2
Conversational Part Programmingp. 3
Part Programming Using CAM Softwarep. 3
Macro Programmingp. 4
Comparison of the Four Methodsp. 4
1.2 Certain Applications of Macro Programmingp. 4
Complex Motionsp. 5
Families of Partsp. 5
Custom Canned Cyclesp. 6
"Intelligent" Programsp. 7
Probingp. 7
Machine Status Information/Manipulationp. 8
Communication with External Devicesp. 8
1.3 Does My Machine Have Macro Capability?p. 9
1.4 Aim of the Present Textp. 11
1.5 How to Use This Textp. 11
2 Variables and Expressionsp. 13
2.1 Macro Variablesp. 13
2.2 Macro Expressionsp. 13
2.3 Assigning a Value to a Variablep. 16
2.4 Display of Variablesp. 18
2.5 Real versus Integer Valuesp. 19
2.6 Undefined Variablesp. 22
Null Variables in Word Addressesp. 22
Null Variables in Arithmetic Operationsp. 23
Null Variables in Conditional Expressionsp. 23
2.7 A Simple Use of Macro Programming Featuresp. 24
2.8 Retaining Programs in MDI Modep. 24
3 Types of Variablesp. 27
3.1 Local and Global Variablesp. 27
3.2 Effect of System Reset on Macro Variablesp. 28
3.3 Levels of Local Variablesp. 29
3.4 Range of Values Stored in Variablesp. 33
3.5 System Variablesp. 35
System Variables versus System Parametersp. 35
System Variables on Fanuc 0i Series Controlsp. 36
Displaying System Variablesp. 36
Interface Signalsp. 37
System Variables for Input Interface Signalsp. 40
System Variables for Output Interface Signalsp. 40
Geometry and Wear Offset Valuesp. 40
Workpiece Coordinate System Shift Amountp. 43
Macro Alarmsp. 44
Time Informationp. 45
Automatic Operation Controlp. 45
Execution Pausep. 48
Mirror Image Informationp. 48
Number of Machined Partsp. 48
Modal Informationp. 49
Current Tool Positionp. 52
Work Offset Valuesp. 55
4 Macro Functionsp. 57
4.1 Types of Macro Functionsp. 57
Priority of Operations in Arithmetic Expressionsp. 57
Priority of Operations in Boolean Expressionsp. 58
Effect of Order of Calculationsp. 58
Nesting of Bracketsp. 59
4.2 Arithmetic Operationsp. 59
Division versus Block-Skip Functionp. 60
4.3 Trigonometric Functionsp. 60
4.4 Rounding Functionsp. 63
ROUND, FIX, and FUPp. 64
4.5 Miscellaneous Functionsp. 67
SQRTp. 67
ABSp. 67
LNp. 68
EXPp. 68
Arbitrary Exponent of a Numberp. 69
4.6 Logical Functionsp. 69
Bitwise Functionsp. 69
Boolean Functionsp. 71
Bitwise versus Boolean Operationsp. 72
Enabling Boolean Operationsp. 73
An Application Example of Bitwise Operationp. 73
4.7 Conversion Functionsp. 75
5 Branches and Loopsp. 79
5.1 Unconditional Branchingp. 79
5.2 Conditional Branchingp. 80
5.3 Conditional Execution of a Single Macro Statementp. 93
5.4 Execution in a Loopp. 94
5.5 Arithmetic Operations on Macro Variable Numbersp. 103
Methods of Zero Shiftp. 106
Machine Coordinate Systemp. 107
External Workpiece Coordinate Systemp. 107
G54-G59, G54.1 P1-P48 Workpiece Coordinate Systemsp. 108
Zero Shift by Manipulating Offset Distancesp. 109
Zero Shift through System Variablesp. 109
Work Offset Display on a Milling Machinep. 110
System Variables for Various Work Offset Valuesp. 111
Zero Shift through a Programp. 111
5.6 Nested WHILE Statementp. 115
6 Review of Subprogramsp. 121
6.1 Introductionp. 121
What Is a Subprogram?p. 121
Why Is It Used?p. 121
Subprograms versus Subroutines of a Conventional Computer Languagep. 122
6.2 Subprogram Callp. 122
6.3 Multiple Call of a Subprogramp. 125
6.4 Subprogram Nestingp. 132
7 Macro Callp. 137
7.1 Introductionp. 137
7.2 Macro versus Subprogramp. 137
7.3 Macro Callp. 138
Simple Call (G65)p. 138
Modal Call (G66)p. 141
Call with User-Defined G-Codep. 145
Call with User-Defined M-Codep. 147
7.4 Subprogram Call without Using M98/M198p. 148
Subprogram Call Using an M-Codep. 148
Subprogram Call Using a T-Codep. 150
7.5 Argument Specificationp. 151
Argument Specification Ip. 152
Argument Specification IIp. 153
Mixed Argument Specificationp. 154
An Example of a G-Code Macro Call with Argumentsp. 155
7.6 Processing of Macro Statementsp. 163
What Is Buffering?p. 163
How Many Blocks Are Buffered?p. 163
When Are the Buffered Blocks Processed?p. 163
Processing When the Next Block is Not Bufferedp. 163
Processing in Radius Compensation Cancel (G40) Modep. 164
Processing in Radius Compensation Mode (Case 1)p. 164
Processing in Radius Compensation Mode (Case 2)p. 164
Effect of Buffering of Macro Statements on Program Executionp. 165
8 Complex Motion Generationp. 167
8.1 Introductionp. 167
8.2 Arc with Uniformly Varying Radiusp. 167
8.3 Helical Interpolation with Variable Radiusp. 175
8.4 Parabolic Turningp. 181
Roughing Operationp. 184
Step-Removal Operationp. 184
8.5 Turning a Sine Curvep. 188
9 Parametric Programmingp. 193
9.1 Introductionp. 193
9.2 Locator Pinp. 194
9.3 Bolt Holes on a Flangep. 200
10 Custom Canned Cyclesp. 207
10.1 Introductionp. 207
10.2 Deep-Hole Peck Drilling on a Lathep. 207
10.3 Drilling with Reducing Peck Lengths on a Milling Machinep. 215
11 Probingp. 223
11.1 Introductionp. 223
11.2 Skip Function on a CNC Machinep. 224
11.3 Probing a Pocketp. 224
11.4 Finding Center of a Holep. 228
11.5 Finding Angle of an Edgep. 231
11.6 Adjusting Wear Offsetp. 233
12 Communication with External Devicesp. 237
12.1 Introductionp. 237
12.2 Switching Principlep. 237
12.3 Input Types and Wiringp. 239
12.4 Connector Pin Assignmentp. 240
12.5 Discrete Sensors for Sourcing/Sinking PLC Inputsp. 244
12.6 Output Types and Wiringp. 246
13 Programmable Data Inputp. 251
13.1 Introductionp. 251
13.2 Data Input for WCS Offset Distancesp. 252
13.3 Data Input for Additional WCS Offset Distancesp. 253
13.4 Data Input for Compensation Values on a Milling Machinep. 254
13.5 Data Input for Compensation Values on a Lathep. 255
13.6 Data Input for Parameter Valuesp. 258
A Limitation of G10 L50 Methodp. 262
Appendix A List of Complex Macrosp. 263
Appendix B List of Parametersp. 265
Indexp. 267