1、ANSI INCITS 37-1999(formerly ANSI NCITS 37-1999)for Information Technology Programming Language APT:Processor Input Language andSystem-Neutral CLFILEANSI NCITS 37-1999Revision, redesignation, and conslidationof ANSI X3.37-1995,ANSI X3.37/AM 1-1998,ANSI X3.37-1995/AM 2-1998American National Standardf
2、or Information Technology Programming Language APT:Processor Input Language andSystem-Neutral CLFILESecretariatInformation Technology Industry CouncilApproved December 8, 1999American National Standards Institute, Inc.Approval of an American National Standard requires review by ANSI that therequirem
3、ents for due process, consensus, and other criteria for approval havebeen met by the standards developer.Consensus is established when, in the judgement of the ANSI Board ofStandards Review, substantial agreement has been reached by directly andmaterially affected interests. Substantial agreement me
4、ans much more thana simple majority, but not necessarily unanimity. Consensus requires that allviews and objections be considered, and that a concerted effort be madetowards their resolution.The use of American National Standards is completely voluntary; theirexistence does not in any respect preclu
5、de anyone, whether he has approvedthe standards or not, from manufacturing, marketing, purchasing, or usingproducts, processes, or procedures not conforming to the standards.The American National Standards Institute does not develop standards andwill in no circumstances give an interpretation of any
6、 American NationalStandard. Moreover, no person shall have the right or authority to issue aninterpretation of an American National Standard in the name of the AmericanNational Standards Institute. Requests for interpretations should beaddressed to the secretariat or sponsor whose name appears on th
7、e titlepage of this standard.CAUTION NOTICE: This American National Standard may be revised orwithdrawn at any time. The procedures of the American National StandardsInstitute require that action be taken periodically to reaffirm, revise, orwithdraw this standard. Purchasers of American National Sta
8、ndards mayreceive current information on all standards by calling or writing the AmericanNational Standards Institute.American National StandardPublished byAmerican National Standards Institute, Inc.11 West 42nd Street, New York, NY 10036Copyright 1999 by Information Technology Industry Council (ITI
9、)All rights reserved.No part of this publication may be reproduced in anyform, in an electronic retrieval system or otherwise,without prior written permission of ITI, 1250 Eye Street NW, Washington, DC 20005. Printed in the United States of AmericaiContentsPageAbstract viiForeword . viii1. PURPOSE A
10、ND SCOPE 1 - 11.1 Purpose. 1 - 11.2 Scope 1 - 12. METHOD AND TERMINOLOGY2.1 Introduction . 2 - 12.2 The Metalanguage 2 - 12.3 Example of Metalanguage 2 - 22.4 Nucleus and Modular Features. 2 - 22.4.1 Point-to-Point 2 - 32.4.2 2D Complex Geometry . 2 - 42.4.3 Input/Output 2 - 42.4.4 Deferred Processi
11、ng . 2 - 42.4.5 3D Geometry. 2 - 52.4.6 Lathe. 2 - 52.4.7 Extended 2D Geometry 2 - 52.4.8 Real Time Processing. 2 - 52.4.9 3D Point-to-Point. 2 - 52.4.10 Large Surfaces 2 - 52.4.11 Extended 3D Geometry 2 - 52.4.12 Regional Milling. 2 - 62.4.13 Communications . 2 - 62.5 Language Status. 2 - 62.6 Revi
12、sion Status. 2 - 63. APT INPUT LANGUAGE3.1 Introduction . 3 - 13.2 Input Language. 3 - 54. APT OUTPUT DATA4.1 Introduction . 4 - 14.2 Requesting Output Data in the SCL Format . 4 - 24.3 SCL Commands 4 - 34.4 SCL File Structure. 4 - 34.5 SCL Record Structure. 4 - 34.5.1 Length. 4 - 34.5.2 Identificat
13、ion 4 - 44.5.3 Continuation 4 - 44.6 System - Neutral CLFILE Format 4 - 5AnnexesA. ABBREVIATIONS AND DEFINITIONSA1. Abbreviations A - 1A2. Definitions .A - 1iiPageB. TUTORIALB1. INTRODUCTIONB1.1 Overview.B1 - 1B1.2 Notation Conventions .B1 - 1B1.2.1 Vocabulary Words B1 - 1B1.2.2 Required Syntax .B1
14、- 2B1.2.3 Optional Syntax B1 - 2B1.2.4 Entity SpecificationsB1 - 3B2. THE METALANGUAGE OF NCITS 37B2.1 Overview.B2 - 1B2.2 Syntax.B2 - 1B2.3 Semantics .B2 - 2B2.3.1 Rule Names B2 - 2B2.3.2 Explanatory InformationB2 - 2B2.3.3 Options .B2 - 3B2.3.4 Default Conditions B2 - 3B2.3.5 Substitute For Syntax
15、 .B2 - 3B2.4 Special Features.B2 - 4B2.4.1 RecursionB2 - 4B2.4.2 Cross Reference.B2 - 4B2.5 System Flags B2 - 5B2.5.1 Language Extensions .B2 - 5B2.5.2 Implementation Status B2 - 5B2.5.3 Revision Status.B2 - 6B2.5.4 Working Status .B2 - 6B3. DIAGNOSTICSB3.1 Overview.B3 - 1B3.2 Discussion B3 - 1B4. G
16、EOMETRYB4.1 Overview.B4 - 1B4.2 Tabulated CylinderB4 - 1B4.3 Ruled Surface .B4 - 2B4.4 Sculptured Surfaces Language B4 - 2B4.4.1 Introduction .B4 - 2B4.4.2 Space Curve .B4 - 3B4.4.3 Sculptured Surface .B4 - 8B4.4.4 Defining Points And Vectors From Space Curves And Surfaces B4 - 11B5. MOTIONB5.1 Over
17、view.B5 - 1B5.2 Initial Continuous Motion B5 - 1B5.3 Control Surfaces .B5 - 2B5.4 Cutters B5 - 3B5.5 Terminal Tool-Surface OrientationB5 - 5B5.6 Motion DirectionB5 - 5B5.7 Tool-Surface Orientation.B5 - 6B5.8 ToleranceB5 - 7iiiPageB5.9 Regional Milling Of Sculptured Surfaces B5 - 7B5.9.1 The General
18、Sculptured Milling Statement B5 - 7B5.9.2 The Single Move Sculptured Milling Statement . B5 - 13B5.9.3 The Single Cutter Path Sculptured Milling Statement B5 - 14B5.9.4 Regular APT Parameters Used By SMILL . B5 - 15B5.9.5 SMILL Examples B5 - 15B5.10 Pocketing . B5 - 17B5.10.1 Overview B5 - 17B5.10.2
19、 Simple Pocket Command. B5 - 17B5.10.3 Pocket Block B5 - 19B5.10.4 Expanded Pocket Command . B5 - 20B5.10.5 Example Of Pocket Block Use With The Expanded Pocket Command. B5 - 23B5.11 Extended CLDATA Point Record . B5 - 23B5.11.1 Introduction B5 - 23B5.11.2 Discussion B5 - 24B5.11.3 Extended MULTAX C
20、ommand. B5 - 25B5.11.4 Extended CLDATA Record B5 - 25B5.11.5 Examples . B5 - 26B6. LANGUAGE EXTENSIONSB6.1 Overview B6 - 1B6.2 Multiple Check Surface Motion Statement (CHKNUM Subset) B6 - 1B6.3 Points And Vectors From The Last Motion Command (CLDATA Subset) B6 - 2B6.3.1 Summary B6 - 2B6.3.2 Definiti
21、ons B6 - 2B6.3.3 Examples . B6 - 3B7. PROCESSOR PROGRAMMING LOGICB7.1 Structured Programming B7 - 1B7.1.1 Logical Variables B7 - 1B7.1.2 Logical Expressions . B7 - 1B7.1.3 Logical Conditional Transfer Block. B7 - 2B7.1.4 Logical Conditional Transfer Statement. B7 - 4B7.1.5 Looping Block. B7 - 4B7.1.
22、6 WHILE Conditional Transfer Block. B7 - 5B7.1.7 CASE Block B7 - 5B7.1.8 Numerical Tolerance B7 - 6B7.1.9 Block Exit Statement B7 - 7B7.2 Identifier Type Declaration . B7 - 7B7.3 Character Strings . B7 - 9B7.3.1 Overview B7 - 9B7.3.2 TEXT Definition Statements. B7 - 9B7.3.3 Implicit TEXT Definitions
23、 B7 - 13B7.3.4 Using Character Strings . B7 - 14B7.4 Deferred Programming. B7 - 15B7.4.1 Overview B7 - 15B7.4.2 Input Language B7 - 15B7.4.3 The Deferred Declare Statement with Standard Types . B7 - 15B7.4.4 The Deferred Declare Statement with User Types B7 - 16B7.4.5 System-Neutral CLFILE Record Fo
24、rmat B7 - 17ivPageB7.5 Communications Language B7 - 18B7.5.1 Communication Syntax and Semantics B7 - 18B7.5.2 Examples B7 - 20B7.6 Export Language B7 - 22B7.6.1 Export CommandB7 - 22B7.6.2 Import Command B7 - 23B7.6.3 Canonical Forms.B7 - 24B7.6.4 Examples B7 - 30B7.7 Incremental APT .B7 - 31B7.7.1
25、Introduction .B7 - 31B7.7.2 Turning Off Creation of APTs CLFILEB7 - 32B7.7.3 Packets of StatementsB7 - 32B7.7.4 The EXPORT Statement.B7 - 33B7.7.5 Statement Number Synchronization .B7 - 34B7.7.6 Error Handling.B7 - 34B7.7.7 APT Macros B7 - 35B8. LATHE LANGUAGEB8.1 Overview.B8 - 1B8.2 Shape Statement
26、 B8 - 1B8.2.1 Shape Statement Syntax B8 - 2B8.2.2 Shape Statement Parameter Definitions B8 - 2B8.3 Lathe StatementsB8 - 6B8.3.1 LATHE/ROUGHB8 - 6B8.3.2 LATHE/FINISH .B8 - 8B8.3.3 LATHE/THREAD B8 - 12B8.4 Sample Lathe Program.B8 - 20B8.4.1 Longhand Method.B8 - 20B8.4.2 Shorthand Method B8 - 21B9. PAT
27、TERN LANGUAGEB9.1 Overview.B9 - 1B9.2 General Language Forms.B9 - 1B9.3 Pattern Element Forms.B9 - 1B9.4 Detailed Description Of Pattern Elements B9 - 2B9.5 Pattern Manipulators.B9 - 10B9.6 Pattern Modifiers.B9 - 12B9.7 Combining Pattern Manipulators And Modifiers .B9 - 15B10. TOOL AXIS CONTROL LANG
28、UAGEB10.1 Overview.B10 - 1B10.2 Introduction .B10 - 2B10.3 Language ElementsB10 - 2B10.3 1 Multiple Axes B10 - 2B10.3.2 Tool Axis Specified By A Vector .B10 - 2B10.3.3 Tool Axis Normal To A Surface B10 - 2B10.3.4 Tool Axis Parallel To A Surface B10 - 3B10.3.5 Tool Axis With Computed Orientation.B10
29、- 3B10.3.6 Tool Axis Through Point .B10 - 4B10.3.7 Tool Axis Tangent To A Surface.B10 - 4B10.3.8 Tool Axis At An Angle To A Surface .B10 - 5B10.3.9 Tool Axis At Angle To Surface With Fixed Lead/Lag AngleB10 - 5vPageB10.3.10 Tool Axis With A Linearly Distributed Lead/Lag Angle. B10 - 6B10.3.11 Tool A
30、xis In A Plane. B10 - 7B11. SYSTEM-NEUTRAL CLDATA . B11 - 1B11.1 Introduction B11 - 1B11.2 Requesting Output Data in the SCL Format B11 - 2B11.3 SCL Commands. B11 - 3B11.4 SCL File Structure B11 - 3B11.5 SCL Record Structure B11 - 3B11.5.1 Length B11 - 3B11.5.2 Identification. B11 - 4B11.5.3 Continu
31、ation. B11 - 4B11.5.4 SCL Record Structure Examples . B11 - 5B11.6 SCL Number Formats B11 - 5B11.7 Generated Motion in SCL. B11 - 8B11.7.1 Linear Motion . B11 - 8B11.7.2 Circular Motion . B11 - 9B11.8 SCL Header Information B11 - 14B11.9 Deferred Records in SCL. B11 - 15B11.9.1 Blanks B11 - 15B11.9.
32、2 Scalar Values. B11 - 15B11.9.3 Non-Scalar Values . B11 - 16B11.9.4 Redefined Non-Scalar Values B11 - 16B11.9.5 Nested Computing Expression With Identifier B11 - 17B11.9.6 Nested Computing Expression Without Identifier. B11 - 17B11.9.7 Nested Canonical Form . B11 - 18B11.9.8 Subscripted Identifiers
33、 B11 - 18B11.9.9 Comments B11 - 19B11.10 Postprocessor Commands. B11 - 19B11.11 Other SCL Commands. B11 - 19B11.11.1 CUTTER. B11 - 19B11.11.2 ERROR B11 - 20B11.11.3 FINI B11 - 20B11.11.4 FROM. B11 - 20B11.11.5 INFORM. B11 - 20B11.11.6 INTOL. B11 - 21B11.11.7 OUTTOL. B11 - 21B11.11.8 PPWORD. B11 - 21
34、B11.11.9 STATNO. B11 - 22B12. REAL TIME PROCESSINGB12.1 Overview B12 - 1B12.2 Motion And Orientation B12 - 1B12.3 Frames. B12 - 1B12.4 Input/Output . B12 - 2B12.4.1 The Send Command B12 - 2B12.4.2 The Receive Command . B12 - 2B12.5 Motion B12 - 3B12.5.1 The Work Point Command. B12 - 3B12.5.2 The FRO
35、M And GOTO Commands. B12 - 3B12.5.3 The Multiple Axis Command B12 - 3viPageC. RELATED DOCUMENTSC1. Introduction .C - 1C2. American National Standards .C - 1C3. ISO Standards and Recommendations C - 1C4. National Aerospace Standards .C - 1C5. Electronic Industries Alliance Documents.C - 2C6. Other Do
36、cumentsC - 2D. PERSPECTIVESD1. ANSI X3.37-1974D - 1D2. ANSI X3.37-1977D - 1D3. ANSI X3.37-1980D - 1D4. ANSI X3.37-1987D - 2D5. ANSI X3.37:1995 D - 5D6. ANSI NCITS 37:1999D - 6viiAbstractThis fifth revision of NCITS 37 (formerly X3.37) marks a milestone in the developmentand standardization of Progra
37、mming APT, a high-level language for processing, man-ufacturing control, and data interchange. Through close cooperation with J7s ISOcounterpart, TC184/SC1/WG4, significant agreement has been reached on all phasesof the APT language - input, CLFILE, and postprocessor. J7 has focused its attentionon
38、processor and System-Neutral CLFILE language, while referencing the internation-al standards for postprocessor and ASCII CLFILE language. The international workinggroup has focused its attention on postprocessor and ASCII CLFILE language, whileleaving the further development of the input and System-
39、Neutral CLFILE language toJ7. Therefore, language unique to postprocessors has been removed from this stan-dard and normative reference made to IS 4343 for the definition of postprocessor lan-guage. In addition, the definition of the ASCII CLFILE has been removed andnormative reference made to IS 35
40、92 for the definition of that format. This Standard isbeing submitted to WG4 as a candidate for international standardization.The major focus of this revision is to increase the ability of APT to communicate be-yond itself. The System-Neutral CLFILE (SCL) is rapidly becoming the numerical-con-trol i
41、ndustry standard for output from both graphical and processor systems. It hasbeen developed with the cooperation and participation of representatives of WG4, theNumerical Control Basic Control Language (BCL) Standards Association (NCBSA),and the Department of Defenses CALS standard 1840c.The NCBSA h
42、as agreed tomake the MOVARC command of this Standard available as an alternate in their stan-dard, thus eliminating the major difference between the two documents. SCL alsoeliminates the historic APT fixed-length record requirement, that grew out of its early80-column card format, to take advantage
43、of the much longer record lengths now pos-sible in data communication. Those interested in determining compliance with the out-put format (SCL), need review only Clause 4 and Appendix B11.The ability to import and export information in the APT, STEP/PDES, and IGES for-mats has been added to facilita
44、te interaction with other numerical-control data com-munication systems. APT can now communicate with manufacturing equipmentoperators on the floor. In addition, language has been added to permit incremental ex-ecution of a part program upon the command of a controlling processor, such as acomputer-
45、aided design (CAD) system. This capability permits these systems to usethe unique power of APTs geometric construction and tool path calculation.viiiForeword (This foreword is not part of American National Standard NCITS 37-1999.)The Automatically Programmed Tools (APT) system, including both the la
46、nguageand its processor, originated at the Servomechanism Laboratory of the Massachu-setts Institute of Technology (MIT) in 1952 in a pilot model study under sponsorshipof the Air Materiel Command. In 1955 a prototype APT system was coded for theWhirlwind computer to demonstrate feasibility.This rud
47、imentary version required theuser to calculate the tool end point of each straight-line cut to be performed by themachine tool.Development of a working model was undertaken in 1957 in a joint effort by memberorganizations of the Aerospace Industries Association (AIA) under the coordination ofMIT. Th
48、is activity resulted in the release, in 1958, of an IBM 704 computer system,which was designated the APT II Field Trial version. It permitted the convenient de-scription of geometric shapes and relieved the user of most of the tedious calcula-tions previously required.In June 1958, coordination of t
49、his joint effort was assumed by the APT Project Coor-dination group of the AIA Numerical Panel, and a considerably improved version ofthe system, designated APT II Phase II, was released in June 1960. Early in 1961, acooperative effort by many companies and MIT began at San Diego and subsequent-ly produced the APT III system. The AIA selected the Armour Research Foundationto assume full responsibility for APT III and to direct its future course through the APTLong-Range Program. The Foundation changed its name to the Illinois Institute ofTechnology Research Institute and re