PGA 0609 en

10
SINUMERIK SINUMERIK 840D sl/SINUMERIK 828D Job Planning Preface Flexible NC programming 1 File and program management 2 Protection zones 3 Special motion commands 4 Coordinate transformation (FRAMES) 5 Transformations 6 Tool offsets 7 Path traversing behavior 8 Axis couplings 9 Motion synchronous actions 10 Oscillation 11 Punching and nibbling 12 Grinding 13 Additional functions 14 User stock removal programs 15 Tables 16 Appendix A SINUMERIK SINUMERIK 840D sl/ SINUMERIK 828D Job Planning Programming Manual 06/2009 6FC5398-2BP20-0BA0 Valid for Control System SINUMERIK 840D sl/840DE sl SINUMERIK 828D Software Version NCU system software for 840D sl/840DE sl 2.6 NCU System software for 828D 2.6

Transcript of PGA 0609 en

SINUMERIK SINUMERIK 840D sl/SINUMERIK 828D Job Planning

Preface

Flexible NC programming

1File and program management

2

Protection zones

3

Special motion commands

4Coordinate transformation (FRAMES)

5

Transformations

6

Tool offsets

7

Path traversing behavior

8

Axis couplings

9

Motion synchronous actions

10

Oscillation

11

Punching and nibbling

12

Grinding

13

Additional functions

14User stock removal programs

15

Tables

16

Appendix

A

SINUMERIK

SINUMERIK 840D sl/ SINUMERIK 828D Job Planning

Programming Manual

06/2009 6FC5398-2BP20-0BA0

Valid for Control System SINUMERIK 840D sl/840DE sl SINUMERIK 828D Software VersionNCU system software for 840D sl/840DE sl 2.6 NCU System software for 828D 2.6

Legal information Legal information Warning notice system

This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are graded according to the degree of danger.

DANGER indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.

CAUTION without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.

NOTICE indicates that an unintended result or situation can occur if the corresponding information is not taken into account.

If more than one degree of danger is present, the warning notice representing the highest degree of danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage.

Qualified Personnel The device/system may only be set up and used in conjunction with this documentation. Commissioning and operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes in this documentation qualified persons are defined as persons who are authorized to commission, ground and label devices, systems and circuits in accordance with established safety practices and standards.

Proper use of Siemens products Note the following:

WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems. The permissible ambient conditions must be adhered to. The information in the relevant documentation must be observed.

Trademarks All names identified by ® are registered trademarks of the Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.

Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions.

Siemens AG Industry Sector Postfach 48 48 90026 NÜRNBERG GERMANY

Order number: 6FC5398-2BP20-0BA0 Ⓟ 06/2009

Copyright © Siemens AG 2009. Technical data subject to change

Job Planning Programming Manual, 06/2009, 6FC5398-2BP20-0BA0 3

Preface

SINUMERIK Documentation The SINUMERIK documentation is organized in three parts: ● General Documentation ● User Documentation ● Manufacturer/service documentation Information on the following topics is available at http://www.siemens.com/motioncontrol/docu: ● Ordering documentation

Here you can find an up-to-date overview of publications ● Downloading documentation

Links to more information for downloading files from Service & Support. ● Researching documentation online

Information on DOConCD and direct access to the publications in DOConWeb. ● Compiling individual documentation on the basis of Siemens contents with the My

Documentation Manager (MDM), refer to http://www.siemens.com/mdm. My Documentation Manager provides you with a range of features for generating your own machine documentation.

● Training and FAQs Information on our range of training courses and FAQs (frequently asked questions) are available via the page navigation.

Target group This publication is intended for: ● Programmers ● Project engineers

Benefits With the programming manual, the target group can develop, write, test, and debug programs and software user interfaces.

Preface

Job Planning 4 Programming Manual, 06/2009, 6FC5398-2BP20-0BA0

Standard scope This Programming Manual describes the functionality afforded by standard functions. Extensions or changes made by the machine tool manufacturer are documented by the machine tool manufacturer. Other functions not described in this documentation might be executable in the control. This does not, however, represent an obligation to supply such functions with a new control or when servicing. Further, for the sake of simplicity, this documentation does not contain all detailed information about all types of the product and cannot cover every conceivable case of installation, operation or maintenance.

Technical Support If you have any questions, please contact our hotline: Europe/Africa Phone +49 180 5050 - 222 Fax +49 180 5050 - 223 €0.14/min. from German landlines, mobile phone prices may differ Internet http://www.siemens.de/automation/support-request

Americas Phone +1 423 262 2522 Fax +1 423 262 2200 E-mail mailto:[email protected]

Asia/Pacific Phone +86 1064 757575 Fax +86 1064 747474 E-mail mailto:[email protected]

Note You will find telephone numbers for other countries for technical support on the Internet: http://www.automation.siemens.com/partner

Preface

Job Planning Programming Manual, 06/2009, 6FC5398-2BP20-0BA0 5

Questions about the manual If you have any queries (suggestions, corrections) in relation to this documentation, please fax or e-mail us: Fax: +49 9131- 98 2176 E-mail: mailto:[email protected]

A fax form is available in the appendix of this document.

SINUMERIK Internet address http://www.siemens.com/sinumerik

"Fundamentals" and "Job Planning" Programming Manual The description of the NC programming is divided into two manuals: 1. Fundamentals

The "Fundamentals" Programming Manual is intended for use by skilled machine operators with the appropriate expertise in drilling, milling and turning operations. Simple programming examples are used to explain the commands and statements which are also defined according to DIN 66025.

2. Job planning The Programming Manual "Job Planning" is intended for use by technicians with in-depth, comprehensive programming knowledge. By virtue of a special programming language, the SINUMERIK control enables the user to program complex workpiece programs (e.g. for free-form surfaces, channel coordination, ...) and makes programming of complicated operations easy for technologists.

Availability of the described NC language elements All NC language elements described in the manual are available for the SINUMERIK 840D sl. The availability regarding SINUMERIK 828D can be found in column "828D" of the "List of statements (Page 821)".

Preface

Job Planning 6 Programming Manual, 06/2009, 6FC5398-2BP20-0BA0

Job Planning Programming Manual, 06/2009, 6FC5398-2BP20-0BA0 7

Table of contents

Preface ...................................................................................................................................................... 3 1 Flexible NC programming ........................................................................................................................ 15

1.1 Variables ......................................................................................................................................15 1.1.1 General information about variables............................................................................................15 1.1.2 System variables..........................................................................................................................16 1.1.3 Predefined user variables: Arithmetic parameters (R).................................................................19 1.1.4 Predefined user variables: Link variables ....................................................................................21 1.1.5 Definition of user variables (DEF)................................................................................................24 1.1.6 Redefinition of system variables, user variables, and NC language commands (REDEF).........31 1.1.7 Attribute: Initialization value .........................................................................................................34 1.1.8 Attribute: Limit values (LLI, ULI)...................................................................................................38 1.1.9 Attribute: Physical unit (PHU) ......................................................................................................39 1.1.10 Attribute: Access rights (APR, APW, APRP, APWP, APRB, APWB) ..........................................41 1.1.11 Overview of definable and redefinable attributes.........................................................................47 1.1.12 Definition and initialization of array variables (DEF, SET, REP) .................................................48 1.1.13 Data types....................................................................................................................................57 1.2 Indirect programming ...................................................................................................................58 1.2.1 Indirectly programming G codes..................................................................................................62 1.2.2 Indirectly programming position attributes (BP)...........................................................................63 1.2.3 Indirectly programming part program lines (EXECSTRING) .......................................................66 1.3 Arithmetic functions......................................................................................................................67 1.4 Comparison and logic operations ................................................................................................70 1.5 Precision correction on comparison errors (TRUNC) ..................................................................73 1.6 Variable minimum, maximum and range (MINVAL, MAXVAL and BOUND) ..............................75 1.7 Priority of the operations ..............................................................................................................77 1.8 Possible type conversions ...........................................................................................................78 1.9 String operations..........................................................................................................................79 1.9.1 Type conversion to STRING (AXSTRING) ..................................................................................80 1.9.2 Type conversion from STRING (NUMBER, ISNUMBER, AXNAME) ..........................................81 1.9.3 Concatenation of strings (<<).......................................................................................................83 1.9.4 Conversion to lower/upper case letters (TOLOWER, TOUPPER) ..............................................85 1.9.5 Determine length of string (STRLEN) ..........................................................................................86 1.9.6 Search for character/string in the string (INDEX, RINDEX, MINDEX, MATCH)..........................87 1.9.7 Selection of a substring (SUBSTR) .............................................................................................89 1.9.8 Selection of a single character (STRINGVAR, STRINGFELD) ...................................................90 1.10 Program jumps and branches......................................................................................................92 1.10.1 Return jump to the start of the program (GOTOS) ......................................................................92 1.10.2 Program jumps to jump markers (GOTOB, GOTOF, GOTO, GOTOC) ......................................93 1.10.3 Program branch (CASE ... OF ... DEFAULT ...) ..........................................................................97 1.11 Repeat program section (REPEAT, REPEATB, ENDLABEL, P) ................................................99 1.12 Check structures ........................................................................................................................107 1.12.1 Program loop with alternative (IF, ELSE, ENDIF)......................................................................109

Table of contents

Job Planning 8 Programming Manual, 06/2009, 6FC5398-2BP20-0BA0

1.12.2 Continuous program loop (LOOP, ENDLOOP)......................................................................... 111 1.12.3 Count loop (FOR ... TO ..., ENDFOR) ...................................................................................... 112 1.12.4 Program loop with condition at start of loop (WHILE, ENDWHILE).......................................... 114 1.12.5 Program loop with condition at the end of the loop (REPEAT, UNTIL) .................................... 115 1.12.6 Program example with nested check structures ....................................................................... 116 1.13 Program coordination (INIT, START, WAITM, WAITMC, WAITE, SETM, CLEARM) .............. 117 1.14 Interrupt routine (ASUB)............................................................................................................ 124 1.14.1 Function of an interrupt routine ................................................................................................. 124 1.14.2 Creating an interrupt routine ..................................................................................................... 125 1.14.3 Assign and start interrupt routine (SETINT, PRIO, BLSYNC) .................................................. 126 1.14.4 Deactivating/reactivating the assignment of an interrupt routine (DISABLE, ENABLE)........... 129 1.14.5 Delete assignment of interrupt routine (CLRINT) ..................................................................... 130 1.14.6 Fast retraction from the contour (SETINT LIFTFAST, ALF) ..................................................... 131 1.14.7 Traversing direction for fast retraction from the contour ........................................................... 134 1.14.8 Motion sequence for interrupt routines ..................................................................................... 137 1.15 Axis replacement, spindle replacement (RELEASE, GET, GETD)........................................... 138 1.16 Transfer axis to another channel (AXTOCHAN)....................................................................... 144 1.17 Activate machine data (NEWCONF)......................................................................................... 146 1.18 Write file (WRITE) ..................................................................................................................... 147 1.19 Delete file (DELETE)................................................................................................................. 151 1.20 Read lines in the file (READ) .................................................................................................... 153 1.21 Check for presence of file (ISFILE)........................................................................................... 157 1.22 Read out file information (FILEDATE, FILETIME, FILESIZE, FILESTAT, FILEINFO) ............. 159 1.23 Checksum calculation using an array (CHECKSUM) ............................................................... 162 1.24 Roundup (ROUNDUP) .............................................................................................................. 164 1.25 Subprogram technique.............................................................................................................. 165 1.25.1 General information................................................................................................................... 165 1.25.1.1 Subprogram .............................................................................................................................. 165 1.25.1.2 Subprogram names................................................................................................................... 166 1.25.1.3 Nesting of subprograms............................................................................................................ 167 1.25.1.4 Search path............................................................................................................................... 169 1.25.1.5 Formal and actual parameters .................................................................................................. 169 1.25.1.6 Parameter transfer .................................................................................................................... 170 1.25.2 Definition of a subprogram........................................................................................................ 173 1.25.2.1 Subprogram without parameter transfer ................................................................................... 173 1.25.2.2 Subprogram with call-by-value parameter transfer (PROC) ..................................................... 174 1.25.2.3 Subprogram with call-by-reference parameter transfer (PROC, VAR)..................................... 176 1.25.2.4 Save modal G functions (SAVE)............................................................................................... 178 1.25.2.5 Suppress single block execution (SBLOF, SBLON) ................................................................. 180 1.25.2.6 Suppress current block display (DISPLOF, DISPLON, ACTBLOCNO).................................... 187 1.25.2.7 Identifying subprograms with preparation (PREPRO) .............................................................. 192 1.25.2.8 Subprogram return M17............................................................................................................ 193 1.25.2.9 RET subprogram return ............................................................................................................ 194 1.25.2.10 Parameterizable subprogram return jump (RET ...).................................................................. 195 1.25.3 Subprogram call ........................................................................................................................ 203 1.25.3.1 Subprogram call without parameter transfer............................................................................. 203 1.25.3.2 Subprogram call with parameter transfer (EXTERN)................................................................ 205 1.25.3.3 Number of program repetitions (P) ........................................................................................... 208

Table of contents

Job Planning Programming Manual, 06/2009, 6FC5398-2BP20-0BA0 9

1.25.3.4 Modal subprogram call (MCALL) ...............................................................................................210 1.25.3.5 Indirect subprogram call (CALL) ................................................................................................212 1.25.3.6 Indirect subprogram call with specification of the calling program part

(CALL BLOCK ... TO ...) ............................................................................................................214 1.25.3.7 Indirect call of a program programmed in ISO language (ISOCALL) ........................................216 1.25.3.8 Calling subroutine with path specification and parameters (PCALL).........................................217 1.25.3.9 Extend search path for subprogram calls (CALLPATH) ............................................................218 1.25.3.10 Execute external subroutine (EXTCALL)...................................................................................220 1.25.4 Cycles ........................................................................................................................................225 1.25.4.1 Cycles: Setting parameters for user cycles ...............................................................................225 1.26 Macro technique (DEFINE ... AS) ..............................................................................................229

2 File and program management.............................................................................................................. 233 2.1 Program memory .......................................................................................................................233 2.2 Working memory (CHANDATA, COMPLETE, INITIAL) ............................................................239 2.3 Structuring instruction in step editor (SEFORM)........................................................................242

3 Protection zones.................................................................................................................................... 243 3.1 Definition of the protection zones (CPROTDEF, NPROTDEF) .................................................243 3.2 Activating/deactivating protection zones (CPROT, NPROT).....................................................247 3.3 Checking for protection zone violation, working area limitation and software limits

(CALCPOSI)...............................................................................................................................252 4 Special motion commands..................................................................................................................... 261

4.1 Approaching coded positions (CAC, CIC, CDC, CACP, CACN) ...............................................261 4.2 Spline interpolation (ASPLINE, BSPLINE, CSPLINE, BAUTO, BNAT, BTAN, EAUTO,

ENAT, ETAN, PW, SD, PL) .......................................................................................................263 4.3 Spline grouping (SPLINEPATH) ................................................................................................276 4.4 NC block compression (COMPON, COMPCURV, COMPCAD, COMPOF)..............................278 4.5 Polynomial interpolation (POLY, POLYPATH, PO, PL).............................................................281 4.6 Settable path reference (SPATH, UPATH)................................................................................288 4.7 Measurements with touch trigger probe (MEAS, MEAW) .........................................................292 4.8 Extended measuring function (MEASA, MEAWA, MEAC) (option)...........................................295 4.9 Special functions for OEM users (OEMIPO1, OEMIPO2, G810 to G829) ................................307 4.10 Feed reduction with corner deceleration (FENDNORM, G62, G621)........................................308 4.11 Programmed end-of-motion criterion (FINEA, COARSEA, IPOENDA, IPOBRKA,

ADISPOSA)................................................................................................................................309 4.12 Programmable servo parameter set (SCPARA) ........................................................................313

5 Coordinate transformation (FRAMES) ................................................................................................... 315 5.1 Coordinate transformation via frame variables ..........................................................................315 5.1.1 Predefined frame variable ($P_BFRAME, $P_IFRAME, $P_PFRAME, $P_ACTFRAME)........317 5.2 Frame variables/assigning values to frames .............................................................................323 5.2.1 Assigning direct values (axis value, angle, scale) .....................................................................323 5.2.2 Reading and changing frame components (TR, FI, RT, SC, MI)...............................................326 5.2.3 Linking complete frames ............................................................................................................328

Table of contents

Job Planning 10 Programming Manual, 06/2009, 6FC5398-2BP20-0BA0

5.2.4 Defining new frames (DEF FRAME) ......................................................................................... 329 5.3 Coarse and fine offsets (CFINE, CTRANS) .............................................................................. 330 5.4 External zero offset ................................................................................................................... 332 5.5 Preset offset (PRESETON)....................................................................................................... 333 5.6 Frame calculation from three measuring points in space (MEAFRAME) ................................. 335 5.7 NCU global frames.................................................................................................................... 339 5.7.1 Channel-specific frames ($P_CHBFR, $P_UBFR) ................................................................... 340 5.7.2 Frames active in the channel .................................................................................................... 341

6 Transformations..................................................................................................................................... 347 6.1 General programming of transformation types ......................................................................... 347 6.1.1 Orientation movements for transformations.............................................................................. 350 6.1.2 Overview of orientation transformation TRAORI....................................................................... 354 6.2 Three, four and five axis transformation (TRAORI) .................................................................. 356 6.2.1 General relationships of universal tool head............................................................................. 356 6.2.2 Three, four and five axis transformation (TRAORI) .................................................................. 359 6.2.3 Variants of orientation programming and initial setting (ORIRESET)....................................... 361 6.2.4 Programming of the tool orientation (A..., B..., C..., LEAD, TILT) ............................................. 364 6.2.5 Face milling (3D-milling A4, B4, C4, A5, B5, C5)...................................................................... 372 6.2.6 Orientation axis reference (ORIWKS, ORIMKS)....................................................................... 374 6.2.7 Programming orientation axes (ORIAXES, ORIVECT, ORIEULER, ORIRPY, ORIRPY2,

ORIVIRT1, ORIVIRT2).............................................................................................................. 377 6.2.8 Orientation programming along the peripheral surface of a taper (ORIPLANE,

ORICONCW, ORICONCCW, ORICONTO, ORICONIO).......................................................... 380 6.2.9 Specification of orientation for two contact points (ORICURVE, PO[XH]=, PO[YH]=,

PO[ZH]=) ................................................................................................................................... 385 6.3 Orientation polynomials (PO[angle], PO[coordinate])............................................................... 387 6.4 Rotations of the tool orientation (ORIROTA, ORIROTR, ORIROTT, ORIROTC, THETA)....... 390 6.5 Orientations relative to the path ................................................................................................ 393 6.5.1 Orientation types relative to the path ........................................................................................ 393 6.5.2 Rotation of the tool orientation relative to the path (ORIPATH, ORIPATHS, angle of

rotation) ..................................................................................................................................... 395 6.5.3 Interpolation of the tool rotation relative to the path (ORIROTC, THETA)................................ 397 6.5.4 Smoothing of orientation characteristic (ORIPATHS A8=, B8=, C8=) ...................................... 400 6.6 Compression of the orientation (COMPON, COMPCURV, COMPCAD).................................. 402 6.7 Smoothing the orientation characteristic (ORISON, ORISOF) ................................................. 406 6.8 Kinematic transformation .......................................................................................................... 409 6.8.1 Milling on turned parts (TRANSMIT)......................................................................................... 409 6.8.2 Cylinder surface transformation (TRACYL) .............................................................................. 412 6.8.3 Inclined axis (TRAANG) ............................................................................................................ 422 6.8.4 Inclined axis programming (G05, G07) ..................................................................................... 426 6.9 Cartesian PTP travel ................................................................................................................. 428 6.9.1 PTP for TRANSMIT................................................................................................................... 435 6.10 Constraints when selecting a transformation............................................................................ 440 6.11 Deselect transformation (TRAFOOF) ....................................................................................... 442 6.12 Chained transformations (TRACON, TRAFOOF)..................................................................... 443