1、ANSI INCITS 37-1999(formerly ANSI NCITS 37-1999)for Information Technology Programming Language APT:Processor Input Language andSystem-Neutral CLFILECopyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted without li
2、cense from IHS-,-,-Copyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted without license from IHS-,-,-ANSI NCITS 37-1999Revision, redesignation, and conslidationof ANSI X3.37-1995,ANSI X3.37/AM 1-1998,ANSI X3.37-1
3、995/AM 2-1998American National Standardfor Information Technology Programming Language APT:Processor Input Language andSystem-Neutral CLFILESecretariatInformation Technology Industry CouncilApproved December 8, 1999American National Standards Institute, Inc.Copyright American National Standards Inst
4、itute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted without license from IHS-,-,-Approval of an American National Standard requires review by ANSI that therequirements for due process, consensus, and other criteria for approval havebeen met by the stand
5、ards 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 means much more thana simple majority, but not necessarily unanimity. Consensus requires tha
6、t 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 preclude anyone, whether he has approvedthe standards or not, from manufacturing, marketing, pur
7、chasing, 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 American NationalStandard. Moreover, no person shall have the right or authority to issue
8、 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 the titlepage of this standard.CAUTION NOTICE: This American National Standard may be revise
9、d 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 Standards mayreceive current information on all standards by calling or writing the AmericanN
10、ational 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)All rights reserved.No part of this publication may be reproduced in anyform, in an elect
11、ronic retrieval system or otherwise,without prior written permission of ITI, 1250 Eye Street NW, Washington, DC 20005. Printed in the United States of AmericaCopyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted w
12、ithout license from IHS-,-,-iContentsPageAbstract viiForeword . viii1. PURPOSE AND 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 - 3
13、2.4.2 2D Complex Geometry . 2 - 42.4.3 Input/Output 2 - 42.4.4 Deferred Processing . 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 Region
14、al Milling. 2 - 62.4.13 Communications . 2 - 62.5 Language Status. 2 - 62.6 Revision 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 Str
15、ucture. 4 - 34.5 SCL Record Structure. 4 - 34.5.1 Length. 4 - 34.5.2 Identification 4 - 44.5.3 Continuation 4 - 44.6 System - Neutral CLFILE Format 4 - 5AnnexesA. ABBREVIATIONS AND DEFINITIONSA1. Abbreviations A - 1A2. Definitions .A - 1Copyright American National Standards Institute Provided by IHS
16、 under license with ANSINot for ResaleNo reproduction or networking permitted without license from IHS-,-,-iiPageB. TUTORIALB1. INTRODUCTIONB1.1 Overview.B1 - 1B1.2 Notation Conventions .B1 - 1B1.2.1 Vocabulary Words B1 - 1B1.2.2 Required Syntax .B1 - 2B1.2.3 Optional Syntax B1 - 2B1.2.4 Entity Spec
17、ificationsB1 - 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 .B2 - 3B2.4 Special Features.B2 - 4B2.4.1 Recursi
18、onB2 - 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. GEOMETRYB4.1 Overview.B4 - 1B4.2 Tabulated Cylinder
19、B4 - 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 Overview.B5 - 1B5.2 Initial Continuous Motion B5 - 1B5
20、.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 - 7Copyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or network
21、ing permitted without license from IHS-,-,-iiiPageB5.9 Regional Milling Of Sculptured Surfaces B5 - 7B5.9.1 The General 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
22、 Parameters Used By SMILL . B5 - 15B5.9.5 SMILL Examples B5 - 15B5.10 Pocketing . B5 - 17B5.10.1 Overview B5 - 17B5.10.2 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.
23、11 Extended CLDATA Point Record . B5 - 23B5.11.1 Introduction B5 - 23B5.11.2 Discussion B5 - 24B5.11.3 Extended MULTAX Command. 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 Subse
24、t) B6 - 1B6.3 Points And Vectors From The Last Motion Command (CLDATA Subset) B6 - 2B6.3.1 Summary B6 - 2B6.3.2 Definitions 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
25、Conditional Transfer Block. B7 - 2B7.1.4 Logical Conditional Transfer Statement. B7 - 4B7.1.5 Looping Block. B7 - 4B7.1.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 C
26、haracter Strings . B7 - 9B7.3.1 Overview B7 - 9B7.3.2 TEXT Definition Statements. B7 - 9B7.3.3 Implicit TEXT Definitions 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 Sta
27、ndard Types . B7 - 15B7.4.4 The Deferred Declare Statement with User Types B7 - 16B7.4.5 System-Neutral CLFILE Record Format B7 - 17Copyright American National Standards Institute Provided by IHS under license with ANSINot for ResaleNo reproduction or networking permitted without license from IHS-,-
28、,-ivPageB7.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 Introducti
29、on .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 B8 - 1B8.
30、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. PATTERN LANGU
31、AGEB9.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 LANGUAGEB10.1
32、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 - 3B10.3.6
33、 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 - 5Copyright American National Standards Institute Provided by IHS under license with ANSINot for Resal
34、eNo reproduction or networking permitted without license from IHS-,-,-vPageB10.3.10 Tool Axis With A Linearly Distributed Lead/Lag Angle. B10 - 6B10.3.11 Tool Axis In A Plane. B10 - 7B11. SYSTEM-NEUTRAL CLDATA . B11 - 1B11.1 Introduction B11 - 1B11.2 Requesting Output Data in the SCL Format B11 - 2B
35、11.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 Continuation. 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 L
36、inear 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.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
37、 With Identifier B11 - 17B11.9.6 Nested Computing Expression Without Identifier. B11 - 17B11.9.7 Nested Canonical Form . B11 - 18B11.9.8 Subscripted Identifiers B11 - 18B11.9.9 Comments B11 - 19B11.10 Postprocessor Commands. B11 - 19B11.11 Other SCL Commands. B11 - 19B11.11.1 CUTTER. B11 - 19B11.11.
38、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 - 21B11.11.9 STATNO. B11 - 22B12. REAL TIME PROCESSINGB12.1 Overview B12 - 1B12.2 Motion And Orientation B12 - 1B12.3 Frames. B12 - 1B12.4 Input
39、/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 FROM And GOTO Commands. B12 - 3B12.5.3 The Multiple Axis Command B12 - 3Copyright American National Standards Institute Provided by IHS under l
40、icense with ANSINot for ResaleNo reproduction or networking permitted without license from IHS-,-,-viPageC. RELATED DOCUMENTSC1. Introduction .C - 1C2. American National Standards .C - 1C3. ISO Standards and Recommendations C - 1C4. National Aerospace Standards .C - 1C5. Electronic Industries Allian
41、ce Documents.C - 2C6. Other DocumentsC - 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 - 6Copyright American National Standards Institute Provided by IHS under license with ANSINot for
42、ResaleNo reproduction or networking permitted without license from IHS-,-,-viiAbstractThis fifth revision of NCITS 37 (formerly X3.37) marks a milestone in the developmentand standardization of Programming APT, a high-level language for processing, man-ufacturing control, and data interchange. Throu
43、gh 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 processor and System-Neutral CLFILE language, while referencing the internation-al standards for pos
44、tprocessor 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-Neutral CLFILE language toJ7. Therefore, language unique to postprocessors has been removed from thi
45、s 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 3592 for the definition of that format. This Standard isbeing submitted to WG4 as a candidate for inte
46、rnational 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 industry standard for output from both graphical and processor systems. It hasbeen developed with the
47、 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 has agreed tomake the MOVARC command of this Standard available as an alternate in their stan-dard, t
48、hus 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 of the much longer record lengths now pos-sible in data communication. Those interested in determini
49、ng 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 facilitate 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 incre