Fanuc marco for personal computer

1,934
-1

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,934
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
182
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Fanuc marco for personal computer

  1. 1. PROGRAMMING MANUAL B-66102E/10 For Personal Computer
  2. 2. • No part of this manual may be reproduced in any form. • All specifications and designs are subject to change without notice. The export of this product is subject to the authorization of the government of the country from where the product is exported. In this manual we have tried as much as possible to describe all the various matters. However, we cannot describe all the matters which must not be done, or which cannot be done, because there are so many possibilities. Therefore, matters which are not especially described as possible in this manual should be regarded as ”impossible”.
  3. 3. B–66102E/07 DEFINITION OF WARNING, CAUTION, AND NOTE s–1 DEFINITION OF WARNING, CAUTION, AND NOTE This manual includes safety precautions for protecting the user and preventing damage to the machine. Precautions are classified into Warning and Caution according to their bearing on safety. Also, supplementary information is described as a Note. Read the Warning, Caution, and Note thoroughly before attempting to use the machine. WARNING Applied when there is a danger of the user being injured or when there is a danger of both the user being injured and the equipment being damaged if the approved procedure is not observed. CAUTION Applied when there is a danger of the equipment being damaged, if the approved procedure is not observed. NOTE The Note is used to indicate supplementary information other than Warning and Caution. ` Read this manual carefully, and store it in a safe place.
  4. 4. B–66102E/10 PREFACE p–1 PREFACE The models covered by this manual, and their abbreviations are : Product Name Abbreviations FANUC Series 0–MODEL A, B, C 0–A/B/C Series 0–A/B/C FANUC Series 0i–MODEL A 0i–A Series 0i–A Series 0 FANUC Series 15–MODEL A 15–A FANUC Series 150–MODEL A 150–A Series 15–A FANUC Series 15–MODEL B 15–B FANUC Series 150–MODEL B 150–B Series 15–B Series 15 FANUC Series 15i–MA 15i–MA FANUC Series 150i–MA 150i–MA Series 15i–A FANUC Series 16–MODEL A 16–A Series 16–A FANUC Series 16–MODEL B 16–B FANUC Series 160–MODEL B 160–B Series 16–B FANUC Series 16–MODEL C 16–C FANUC Series 160–MODEL C 160–C Series 16–C Series 16 FANUC Series 16i–A 16i–A FANUC Series 160i–A 160i–A Series 16i–A FANUC Series 16i–B 16i–B FANUC Series 160i–B 160i–B Series 16i–B FANUC Series 18–MODEL A 18–A Series 18–A FANUC Series 18–MODEL B 18–B FANUC Series 180–MODEL B 180–B Series 18–B FANUC Series 18–MODEL C 18–C FANUC Series 180–MODEL C 180–C Series 18–C Series 18 FANUC Series 18i–A 18i–A FANUC Series 180i–A 180i–A Series 18i–A FANUC Series 18i–B 18i–B FANUC Series 180i–B 180i–B Series 18i–B FANUC Series 20 Series 20 FANUC Series 20i Series 20i Series 20
  5. 5. B–66102E/10PREFACE p–2 Product Name Abbreviations FANUC Series 21–TA 21–TA Series 21–A FANUC Series 21–TB 21–TB FANUC Series 210–TB 210–TB FANUC Series 21–MB 21–MB Series 21–B FANUC Series 210–MB 210–MB Series 21 FANUC Series 21i–A 21i–A FANUC Series 210i–A 210i–A Series 21i–A FANUC Series 21i–B 21i–B FANUC Series 210i–B 210i–B Series 21i–B *1 The Series 21–TB is available in two models: control unit A and control unit B. The manual may refer to these models as the 21–TB (controller A) or 21–TB (controller B) in those cases where their functions differ. : IBM and PC–DOS are registered trademarks of International Business Machines Corporation. : MS–DOS is a registered trademark of Microsoft corporation. All other product names identified throughout this manual are trademarks or registered trademarks of their respective companies. *1 Other manufacturers’ products referred to in this manual
  6. 6. B–66102E/10 Table of Contents c–1 DEFINITION OF WARNING, CAUTION, AND NOTE s–1. . . . . . . . . . . . . . . . . . . . . . . . . . PREFACE p–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. GENERAL 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 FEATURES 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 OVERVIEW 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. EQUIPMENT CONFIGURATION 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3. SYSTEM INSTALLATION (SETUP) 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 INSTALLING THE SYSTEM FROM THE FANUC MACRO COMPILER SYSTEM FLOPPY DISK 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 INSTALLING THE EXECUTOR FILE FROM THE FANUC MACRO LIBRARY FLOPPY DISK 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 PATH SETTING 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 COMPILER SERIES 11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 SPECIFYING ENVIRONMENT VARIABLES 12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.1 Selectinga RS–232–C/GPIB Interface Control System (MDEV) 12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.2 Specifying a Temporary File Output Destination (MTMP) 12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4. FUNCTIONS 13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 MACRO COMPILER (MCOMP0/MCOMP15/MCOMP15I) 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 MACRO LINKER (MLINK) 17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 ROM–FORMAT FILE TRANSMITTER (CNC) (FOR SERIES 16/18/20/21T–A) 21. . . . . . . . . . . . . 4.4 ROM–FORMAT FILE TRANSMITTER (FANUC PMC WRITER/FANUC FA WRITER) (FOR SERIES 0, 15–A, 16–A, 18–A) 23. . . . . . . . . 4.5 SERIAL INTERFACE UTILITY 24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 Macro Program Input 24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.2 Macro Program Output 24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 ROM–FORMAT FILE TRANSMITTER (FANUC FA WRITER, GP–IB INTERFACE) (FOR SERIES 0, 15–A, 16–A, 18–A) 25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 CONVERSION TO A MEMORY CARD FORMAT (MMCARD) (THIS FUNCTION IS USED IN THE SERIES 15–B/16–B/16–C/18–B/18–C/20/21–B/16i–A/18i–A/21i–A/ 16i–B/18i–B/21i–B/0i–A.) 26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5. SYMBOLIC MACRO PROGRAM 27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6. RS–232–C INTERFACE SETTING 33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7. GP–IB INTERFACE SETTING (FOR SERIES 0, 15–A, 16–A, 18–A) 34. . . . . . . . . . 8. SYSTEM COMMON SYMBOL DEFINITION FILE 35. . . . . . . . . . . . . . . . . . . . . . . . . . 9. HOW TO VIEW REFERENCE LIST/COMPILE LIST 36. . . . . . . . . . . . . . . . . . . . . . . .
  7. 7. B–66102E/10Table of Contents c–2 APPENDIX A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) 39. B. COMPILE ERROR CODE TABLE 53. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C. ROM WRITE/VERIFICATION PARAMETER TABLE 56. . . . . . . . . . . . . . . . . . . . . . . . D. COMPILE/LINK EXAMPLE 57. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E. MACRO CONVERTER (MCONV) OPERATION GUIDE FOR THE FANUC SERIES 16/18 SUPER CAP M/SUPER CAP II M 79. . . . . . . . . . E.1 INTRODUCTION 80. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.2 MACRO CONVERTER (MCONV) 81. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.2.1 Outline 81. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.2.2 Operation 81. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.2.3 Source File 81. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.2.4 Table Data File 82. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.2.5 Table Conversion List File 82. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.3 CONVERSION OF TABLE DATA WITH THE MACRO LINKER (MLINK) 83. . . . . . . . . . . . . . . . E.3.1 Outline 83. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.3.2 Link Control File 83. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E.3.3 Link List File 83. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F. CREATING PROGRAMS BY USING SUPER CAP II M/ SUPER CAP II T WITH SERIES 16i/18i 84. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.1 OVERVIEW 85. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.2 DEVELOPMENT ENVIRONMENT 86. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.3 CAP CONTROL MODULE 87. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.4 USER MODULES 88. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.4.1 MacroLibraries for Developing User Modules 88. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.4.2 Developing a User Module 88. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.4.3 Transferring the User Module to F–ROM 89. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.4.4 Executing the User Program 89. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.4.5 Restrictions and Notes on Developing the User Module 89. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.5 RESTRICTIONS IMPOSED ON THE SYSTEM 90. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.6 CREATING SAMPLE USER MODULES FOR SUPER CAP II T 91. . . . . . . . . . . . . . . . . . . . . . . . . . F.6.1 CreatingPrograms 91. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.6.2 Creating Link Files 92. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.7 CREATING SAMPLE USER MODULES FOR SUPER CAP II M 94. . . . . . . . . . . . . . . . . . . . . . . . . F.7.1 CreatingPrograms 94. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F.7.2 Creating Link Files 95. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G. BOOT SYSTEM (FOR SERIES 16–B/C, 18–B/C, 20, 21–B, 0i–A) 97. . . . . . . . . . . . G.1 OUTLINE 98. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.1.1 Starting the BOOT SYSTEM 98. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.1.2 System File and User File 99. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.2 OPERATION AND CORRESPONDING SCREENS 100. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.2.1 System Data Loading Screen 101. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.2.2 System Data Check Screen 104. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  8. 8. B–66102E/10 Table of Contents c–3 G.2.3 SystemData Delete Screen 106. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.2.4 System Data Save Screen 108. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.2.5 SRAM Data Backup Screen 110. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.2.6 Memory Card File Delete Screen 112. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.2.7 Memory Card Format Function 113. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.2.8 End of Boot System 114. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.3 ERROR MESSAGES AND REQUIRED ACTIONS 115. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.4 SETTING A MACRO PASSWORD (SERIES 20) 118. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.4.1 Overview 118. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.4.2 Password 118. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.4.3 Setting a Password 119. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.4.4 Specifying a Password for the Series 20 Boot System 119. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.5 FREE AREA IN FLASH MEMORY (SERIES 20) 120. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G.5.1 Determiningthe Cause of the No–space State 120. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H. BOOT SYSTEM (FOR SERIES 16i/18i/21i) 122. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.1 OVERVIEW 123. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.1.1 Starting the Boot System 123. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.1.2 System Files and User Files 124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.1.3 Boot Slot Configuration Screen 124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.2 SCREEN CONFIGURATION AND OPERATING PROCEDURE 125. . . . . . . . . . . . . . . . . . . . . . . . . . H.2.1 System Data Loading Screen 126. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.2.2 System Data Check Screen 129. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.2.3 System Data Delete Screen 131. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.2.4 System Data Save Screen 132. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.2.5 SRAM Data Backup Screen 134. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.2.6 Memory Card File Delete Screen 137. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.2.7 Memory Card Format Function 138. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.2.8 Load Basic System Function 139. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . H.3 ERROR MESSAGES AND REQUIRED ACTIONS 140. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I. P–CODE LOADER FUNCTION (FOR SERIES 16–B/C, 18–B/C, 21–TA, SERIES 16i/18i/21i–A/B) 143. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.1 OUTLINE 144. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2 PROCESSING BY P–CODE LOADER FUNCTION 145. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2.1 Starting the P-code Loader Function 145. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2.2 RAMInitializationScreen 146. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2.3 Loading Start Screen 147. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2.4 Loading Screen 148. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2.5 Loading End Screen 149. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2.6 Flash ROM Transfer Screen (Except Series 21) 152. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2.7 Flash ROM Transfer End Screen (Except Series 21) 153. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.2.8 Notes 155. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.3 PARAMETER 156. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I.4 ALARMS 159. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J. P–CODE LOADER FUNCTION (FOR SERIES 20) 160. . . . . . . . . . . . . . . . . . . . . . . . . J.1 IPL MENU 161. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J.2 PROCESSING FLOW FOR THE P–CODE LOADER FUNCTION 162. . . . . . . . . . . . . . . . . . . . . . . . J.2.1 RAM Initializing Menu 162. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J.2.2 Loading Start Menu 163. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J.2.3 Loading Menu 163. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  9. 9. B–66102E/10Table of Contents c–4 J.2.4 Loading End Menu 164. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J.2.5 Menu for Transferring Data into FLASH ROM Memory 166. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J.2.6 Menu for end of Transfer of FLASH ROM Memory 167. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J.2.7 Notes 168. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J.3 PARAMETER 169. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J.4 ALARMS 172. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K. BOOT SYSTEM (FOR SERIES 15–B/15i–A) 173. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K.1 OUTLINE 174. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K.2 MEMORY CARD SPECIFICATIONS AND RESTRICTIONS 175. . . . . . . . . . . . . . . . . . . . . . . . . . . . K.3 STARTING THE BOOT SYSTEM 176. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K.4 REGISTERING A MEM–FORMAT FILE, STORED ON A MEMORY CARD, INTO F–ROM 178. . K.5 SAVING A MEM–FORMAT FILE FROM F–ROM TO A MEMORY CARD 182. . . . . . . . . . . . . . . . . K.6 REGISTERING A ROM–FORMAT FILE, STORED ON A ROM CASSETTE, INTO F–ROM 184. . K.7 TYPES OF FILES IN F–ROM 187. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L. NAME OF MACRO LIBRARY 188. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M. PARAMETERS 191. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M.1 SERIES 15i COMPILE PARAMETERS 192. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M.2 PARAMETERS OTHER THAN SERIES 15i 203. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M.2.1 CompileParameters 203. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M.2.2 ExecuterParameter 210. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. SUPER CAP T/SUPER CAP II T LOADING TO FLASH ROM 212. . . . . . . . . . . . . . . . N.1 SYSTEM INSTALLATION (SETUP) 213. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N.2 COMPILING 214. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N.3 LINKING 215. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N.4 WRITE TO THE MEMORY CARD 216. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N.5 LOADING TO FLASH ROM MODULE 217. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  10. 10. B–66102E/10 1. GENERAL 1 1 GENERAL The MACRO Compiler/Executor function stores programs created using custom macros (macro programs) in ROM so that machine tool builders can implement their own conversational screens. The FANUC MACRO Compiler is a macro compiler utility to implement the MACRO Compiler/Executor function on personal computers available on the market. The FANUC MACRO Compiler is applicable to the following CNC systems: 1) Series 0 2) Series 15 3) Series 16 4) Series 18 5) Series 20 6) Series 21 This manual describes the procedure to store macro programs in ROM by using the macro compiler utility. For the syntax rule for creating macro programs, refer to the manuals listed below. 1) FANUC Series 0/0-Mate Programming Manual (Macro compiler/Macro executor) (B-61393E-1) 2) FANUC Series 15 Programming Manual (Macro compiler/Macro executor) (B-61213E-1) 3) FANUC Series 15–MODEL B Programming Manual (Macro Compiler/Macro executor) (B–62073E–2) 4) FANUC Series 0i/16/18/20/21 Programming Manual (Macro compiler/Macro executor) (B-61803E-1) 5) FANUC Series 15i–MODEL A Programming Manual (Macro Compiler/Macro executor) (B–63323EN–2)
  11. 11. 1. GENERAL B–66102E/10 2 (1) Macro programs can be edited using a commercially available screen editor that operates under the MS-DOS environment. (2) The symbolic macro compiler function allows macro programs to be coded in symbolic format, and also allows comments to be coded. (3) A program that references macro variables in array format can be created. (4) Compile list output makes macro program development, debugging, and maintenance much easier. (5) A linker (linkage editing) function is employed which allows partial compilation and also facilitates the development and maintenance of macro programs common to several models. (6) The macro compiler utility, used with the CNC executor RAM operation function, can transfer a ROM-format file to the CNC system. This capability allows macro programs to be developed and debugged without writing ROM. (7) Linker output (ROM-format file) operation is separated from writing to a macro ROM by the ROM file transmitter with the FANUC PMC-Writer/FA-Writer. With this feature, the same macro ROM can be created at any time by preserving ROM-format files. (8) A ROM file transmitter function based on the GP-IB interface allows connection to the FANUC FA Writer for high-speed writing to a macro ROM verification. 1.1 FEATURES
  12. 12. B–66102E/10 1. GENERAL 3 The FANUC MACRO Compiler/Executor function enables the FANUC CNC users to develop their own macro programs in a macro language, store the macro programs in ROM as a macro ROM by using the macro compiler, and execute the macro programs with the macro executor function of the FANUC CNC systems. (See the conceptual diagram on the next page.) The macro compiler utility enables macro program development, compilation, and writing to a macro ROM on a personal computer operating under the MS-DOS or PC-DOS. The macro compiler utility functions are listed below. (1) Macro compiler D Symbolic macro program analysis D Macro program compilation D Object program output D Reference list/compile list output (2) Macro linker D Linkage editing of specified object programs and macro executor/compile parameters D ROM-format file output D Link list output (3) ROM file transmitter (CNC) D ROM-format file transfer to the CNC D Macro executor RAM operation (4) ROM file transmitter (FANUC PMC Writer/FANUC FA Writer) D Writing ROM-format files to a macro cassette D Verifying a macro cassette against the ROM-format files (5) Serial interface utility D Reading/transferring programs from the CNC/FANUC SYSTEM P (6) ROM file transmitter (FANUC FA Writer (GP-IB interface) D Writing ROM-format files to a macro cassette D Verifying a macro cassette against the ROM-format files (7) Memory card format conversion D Converting macro programs to a format capable of accepting write from a memory card The macro compiler utility is distributed with a 5-inch (2HD) floppy disk as an MS-DOS/PC-DOS package utility. The utility does not provide functions such as those for editing macro programs, and saving and restoring programs to and from floppy disks. For these functions, use MS-DOS/PC-DOS commands and editors available on the market. 1.2 OVERVIEW
  13. 13. 1. GENERAL B–66102E/10 4 * The ROM format file is executed on the CNC using the following methods: · The file is transferred to CNC through RS-232-C to execute RAM operation (Series 16/18/20/21-TA). · The file is transferred to FANUC PMC Writer/ FA Writer, written in macro cassetter or ROM, then executed (Series 0/15-A/16-A/18-A). · The file is converted in Memory card format, transferred to CNC from memory card, then executed(Series15-B/16-B/18-B/16-C/18-C /20/21–B/15i–A/16i–A/18i–A/21i–A/16i–B/ 18i–B/21i–B). Macro cassette MS-DOS Editor MacroProgram (Source file) MACRO Compiler MCOMP0 MCOMP15 MCOMP15I Macro Pro- gram (Obj file) (xx.REL) LINK Control file (xx.LNK) MACRO Linker MLINK MLINK15I Macro Library file ROM format file (xx.ROM) ROM file Transmitter MTRNSC MROMWT /MROMVF CNC Series 16/18/20/21-TA RAMOperation FANUC PMC Writer FA Writer RS-232-Cline GP-IB I/F RS-232-C line * Create a macro program using an editor. (An editor is notsupplied.) * The macro program (source file) must be in standard MS-DOS text format. * The macro compiler generates an object file. It also creates reference and compile lists at the same time as the object file. * The object file is linked based on a link control file to generate a ROM-format file. The editor creates the link control file (xx.MEX). * FANUC supplies a macro library for each CNC model. * The ROM-format file contains macros in binary form output by the linker for a macro cassette. Memory Card file Converter Memory Card Reader /Writer Memory Card MMCARD MMCARD15 MMCARD15I (xx.MEM) Fig.1.2 MACRO Compiler Utility Function Conceptual Diagram
  14. 14. B–66102E/10 2. EQUIPMENT CONFIGURATION 5 2 EQUIPMENT CONFIGURATION (1) Personal computer: (Fujitsu: FMR Series) (NEC : PC98 Series) (IBM : PC-AT Series) Main memory 640K bytes or more OS (FMR/PC98) (PC-AT) MS-DOS Version 3.1 and later PC-DOS Version 3.3 and later Hard disk About 1M bytes is required for install the system (Caution 1) Floppy disk drive 5-inch floppy disk drive (2HD) 3.5-inch floppy disk drive (2HD) for 15i/16i/18i/21i (Caution 2) Serial interface RS-232-C serial interface Miscellaneous (Option) Printer (Note 1) GP-IB interface (Note 2) (2) FANUC PMC-Writer or FANUC FA-Writer Serial interface (RS-232-C) GP-IB interface (option/FANUC FA-Writer only) CAUTION 1 The macro compiler utility software is installed on hard disk. This software occupies a hard disk space of about 1M bytes. In addition, developed macro programs and list files/object files generated at compile time are output as files on hard disk. So the size of hard disk depends on the macro programs developed. 2 The macro compiler utility software is distributed with a 5-inch (2HD) or 3.5-inch (2HD) floppy disk for series 15i/16i/18i/21i floppy disk. The macro executor is also distributed with a 5-inch (2HD) or 3.5-inch (2HD) floppy disk for series 15i/16i/18i/21i floppy disk. A 5-inch or 3.5-inch floppy disk drive is needed to install the system and executor files. NOTE 1 The macro compiler and macro linker output a reference list, compile list, and link list as MS-DOS text files to hard disk. For output to the printer, use an MS-DOS/PC-DOS command. Text files are output in a format assuming an 80-character, 60-line printer. 2 The FANUC FA-Writer allows high-speed writing to ROM/verification based on the GP-IB interface. (Note that only NEC PC98 Series and IBM PC-AT Sereis currently supports this function.)
  15. 15. 3. SYSTEM INSTALLATION (SETUP) B–66102E/10 6 3 SYSTEM INSTALLATION (SETUP) The FANUC MACRO Compiler software is distributed with two 5-inch (2HD) floppy disks or 3.5-inch (2HD) floppy disk for series 15i/16i/18i/21i. To use the software, load the software to the hard disk from the system floppy disks. No. Name 1 FANUC MACRO Compiler system floppy disk 2 FANUC MACRO Library system floppy disk To install the system, some knowledge of the hardware and software of a personal computer to be used is needed. In particular, the user should be familiar with the handling of basic MS-DO/PC-DOS commands and files such as CONFIG.SYS and AUTOEXEC.BAT.
  16. 16. B–66102E/10 3. SYSTEM INSTALLATION (SETUP) 7 This operation installs the FANUC MACRO Compiler system software on the hard disk. First set the FANUC MACRO Compiler system floppy disk in the floppy disk drive, then activate MSETUP.BAT on the floppy disk. > ?: > MSETUP <in> <out> ? : : The root directory of the system floppy disk contains MSETUP.BAT. <in> : Specify the name of the drive containing the system floppy disk. <out> : Specify the drive name of the hard disk to hold the system. The system floppy disk is set in drive B:, and the system is installed on the hard disk of drive A:. > B: > MSETUP B: A: This operation creates the following directories in drive A:, and the system software and a sample program are copied to the hard disk. A:MCOMP TOOL SAMPL MEX USR a) MCOMPTOOL The FANUC MACRO Compiler system software, batch files, document files, and so forth are stored under this directory. MCOMP0.EXE/MCOMP15.EXE/MLINK.EXE/ !System software RSFMR.BAT !RS-232-C setting batch file for Fujitsu FMR Series RSPC98.BAT !RS-232-C setting batch file for NEC PC98 Series RSPCAT.BAT !RS-232-C setting batch file for IBM PC-AT Series SYSTEM.DEF !System common symbol definition file (for $INCLUDE) b) MCOMPMEX Library file is stored under this directory. This file is loaded from the FANUC MACRO Library floppy disk. c) MCOMPUSR Under this directory, create directories used to develop macro programs. A:MCOMP TOOL SAMPL MEX USR MODEL-A MODEL-B MODEL-C 3.1 INSTALLING THE SYSTEM FROM THE FANUC MACRO COMPILER SYSTEM FLOPPY DISK Examples Explanation of the directories
  17. 17. 3. SYSTEM INSTALLATION (SETUP) B–66102E/10 8 d) MCOMPUSRSAMPL Under this directory, the files including such a link control file, compiler/link result files, and program files as described in Appendix D are stored. Use these files as reference information for development.
  18. 18. B–66102E/10 3. SYSTEM INSTALLATION (SETUP) 9 This operation loads the executor file under the library directory of the FANUC MACRO Compiler system installed by the operation of Section 3.1. As with the FANUC MACRO Compiler system floppy disk, set the FANUC MACRO Library floppy disk in the floppy disk drive, then activate ESETUP.BAT on the executor floppy disk. > ?:>ESETUP <in> <out> ? : : The root directory of the library floppy disk contains ESETUP.BAT. <in> : Specify the name of the drive containing the library floppy disk. <out> : Specify the drive name of the hard disk holding the system. Set the library floppy disk in drive B:, and the library file is stored in the system installed on the hard disk of drive A:. > B:>ESETUP B: A: 3.2 INSTALLING THE EXECUTOR FILE FROM THE FANUC MACRO LIBRARY FLOPPY DISK Examples
  19. 19. 3. SYSTEM INSTALLATION (SETUP) B–66102E/10 10 All system software is contained under the MCOMPTOOL directory. So specify this directory by path setting with AUTOEXEC.BAT. 3.3 PATH SETTING
  20. 20. B–66102E/10 3. SYSTEM INSTALLATION (SETUP) 11 To match the CNC series, there are three types of the FANUC MACRO Compiler system: a) For Series 0/Series 16/Series 18/Series 20/Series 21 b) For Series 15–A/15–B c) For Series 15i–A These Compiler systems are for the respective series only. Compiling the same macro program using these compiler systems generates different object codes. For this reason, be sure to use the execution files (macro compiler/linker/memory card converter) and library files suitable to the development model. (The library file names are given in Appendix L.) If multiple systems are to be installed on the same personal computer, it is recommended that a separate directory be used for each CNC series. CNC Series and Corresponding Software (See also Fig. 4.7.) CNC series Macro compiler Macro linker Memory card format converter 0/16/18/20/21 MCOMP0 MMCARD*1 15–A/15–B MCOMP15 MLINK MMCARD15*2 15i–A MCOMP15I MLINK15I MCARD15I *1MMCARD is for the Series 16–B/16–C/16i–A/16i–B/18–B/18C/18i–A/18i–B/20/ 21–B/21i–A/21i–B/0i–A only. *2MMCARD15 is for the Series 15–B only. 3.4 COMPILER SERIES
  21. 21. 3. SYSTEM INSTALLATION (SETUP) B–66102E/10 12 A macro program or a ROM-format file is transferred via the RS-232-C/GPIB interface. The interface control systems vary between personal computer manufacturers. Control software including MPOUT, MROMWT, and MROMWTG is therefore designed to determine the control system according to the setting of the MDEV environment variable. Specify the MDEV environment variable as follows in AUTOEXEC.BAT before using control software. Setting of the MDEV environment variable set MDEV=PC98 : For the NEC PC98 Series set MDEV=FMR : For the Fujitsu FMR Series set MDEV=IBM : For the IBM PC Series When no MDEV environment variable is specified, control software runs in the control system for the NEC PC98 Series. The macro compiler or macro linker generates or deletes some temporary files (work files) for compiling or linking. The destination to which the temporary files are output can be specified with the MTMP environment variable. Setting of the MTMP environment variable set MTMP=B:TEMP If the temporary file output destination is specified as a RAM disk, compiling or linking time can be reduced. When no MTMP environment variable is specified, temporary files are generated in the current directory for compiling or linking and deleted after compiling or linking 3.5 SPECIFYING ENVIRONMENT VARIABLES 3.5.1 Selecting a RS–232–C/GPIB Interface Control System (MDEV) 3.5.2 Specifying a Temporary File Output Destination (MTMP)
  22. 22. B–66102E/10 4. FUNCTIONS 13 4 FUNCTIONS
  23. 23. 4. FUNCTIONS B–66102E/10 14 (1) Operation The macro compiler can compile macro programs created in the MS-DOS text file format. The macro compiler outputs an object file for the macro linker, reference list file, and compile list file. *1 *2 A:> MCOMP0 file-spec [parameters] ==> (For Series 0/16/18/20/21) A:> MCOMP15 file-spec [parameters] ==> (For Series 15–A/B) A:> MCOMP15I file-spec [parameters] ==> (For Series 15i–A) Source File Object File Macro Program (xx.SRC) MCOMP0 MCOMP15 MCOMP15I Object Program (xx.REL) Reference List File(xx.REF) Compile List File (xx.LST) MACRO COMPILER 1 O0001; 2 #100=#101+10; *1 file-spec This specifies a macro program source file. The extension of a source file name must be .SRC. Source files to be compiled can be specified in three ways: (1) Compilation of a single file A:> MCOMP0 ABC=> Compiles ABC.SRC. (2) Compilation of multiple cards by using a wild card A:> MCOMP0 ABC*=> Compiles all files whose names start with ABC and have the extension .SRC, (3) Selective compilation according to link control file specification A:> MCOMP0 @ABC=> Compiles all files specified in the link control file (file name: ABC.LNK). CAUTION As described in Section 3.4, even if the same macro program is compiled, the macro compiler for Series 0/16/18/20/21 creates an object file different from an object file created by the macro compiler for Series 15 and Series 15i. Select the compiler that matches a development model. 4.1 MACRO COMPILER (MCOMP0/MCOMP15/ MCOMP15i)
  24. 24. B–66102E/10 4. FUNCTIONS 15 *2 [parameters] This specifies compile conditions. –NR : Outputs no object file. If this parameter is omitted, an object file with the extension .REL is output. –L1 : Outputs no compile list file. If this parameter is omitted, a compile list file with the extension .LST is output. –L2 : Outputs no reference list file. If this parameter is omitted, a reference list file with the extension .REF is output. –L3 : Outputs a macro program file. If this parameter is omitted, no macro program file is output. A macro program file is output with the extension .PRG. –PR : Makes no symbolic macro program analysis. Specify this parameter when a program coded in standard macro program format is to be compiled. No reference list file is output. Even if this parameter is not specified, a macro program can be compiled without trouble. However, this parameter can save time required to make a symbolic macro program analysis and can also save space for reference list file output. –Fo : Specifies a destination to which an object file is output. See item (7). –Fr : Specifies a destination to which a reference list file is output. –Fl : Specifies a destination to which a compile list file is output. –Fp : Specifies a destination to which a macro program file is output. (2) Macro program source file A macro program source file must be created in MS-DOS text file format. At this time, be sure to assign the file name extension .SRC. The macro compiler can compile a macro program coded in symbolic format. For detailed information, see Chapter 5. The macro compiler can also compile a program coded in standard macro program format. In this case, specify the command parameter -PR. This parameter can save time required to make a symbolic macro program analysis and can also save space for reference list file output. (3) Object file An object file output by the compiler is subject to processing by the macro linker. The name of an object file is the same as the source file name, except that the extension .REL is assigned to the object file. (4) Reference list file The reference list file is a list file output from macro program analysis processing. A source program, errors, error codes, symbol name cross reference information are listed. The name of a reference list file is the same as the source file name, except that the extension .REF is assigned to the reference list file. For output to a printer, for example, use a standard MS-DOS command.
  25. 25. 4. FUNCTIONS B–66102E/10 16 (5) Compile list file A compile list file is output as a result of macro program compilation after symbolic macro program analysis. A source program, errors, error codes, variable cross reference information, object file size information, and so forth are listed. The name of a compile list file is the same as the source file name, except that the extension .LST is assigned to the compile list file. For output to a printer, for example, use a standard MS-DOS command. (6) Macro program file By specifying the command parameter -L3, a macro program after macro program analysis processing can be preserved as a file. The name of a macro program file is the same as the source file name, except that the extension .PRG is assigned to the macro program file. By using the serial interface utility described in Section 4.5, this file can be output to the CNC/FANUC SYSTEM P via a RS-232-C line. (7) Specifying the destinations to which the compiler outputs files The directory of the destinations to which the compiler outputs files can be specified as desired according to compiling conditions. However, this function is only effective for FANUC MACRO Compiler Version 02.1 and later versions. –Fo: Specifies a destination to which an object file is output. –Fr : Specifies a destination to which a reference list file is output. –Fl : Specifies a destination to which a compile list file is output. –Fp: Specifies a destination to which a macro program file is output. Example) Compiling TEST.SRC and outputting TEST.REL to B:OBJ MCOMP0 TEST -FoB:OBJ
  26. 26. B–66102E/10 4. FUNCTIONS 17 (1) Operation According to the specification in a link control file created beforehand, the macro linker creates a link list file and ROM-format file for creating a desired macro cassette. *1 *2 A:> MLINK file-spec [parameters] ==> (For Series 0/16/18/20/21/15–A/15–B) A:> MLINK15I file-spec [parameters] ==> (For Series 15i–A) Link control File ROM Format File Link Control (xx.LNK) MLINK MLINK15I ROM File (xx.ROM) Link List File(xx.MAP) MACRO LINKER prog. Size. 1 O0001 00100H 2 O0002 00200H Object File Object Program (xx.REL) Macro Library file (xx.MEX) *1 file-spec This specifies a link control file created in a specified format beforehand. The extension of a link control file name must be .LNK. *2 [parameters] This specifies link conditions. –NR : Outputs no ROM-format file. If this parameter is omitted, a ROM-format file with the extension .ROM is output. –NL : Outputs no link list file. If this parameter is omitted, a link list file with the extension .MAP is output. –Fm : Specifies the destination to which a link list file is output. See item (4). –Fr : Specifies the destination to which a ROM-format file is output 4.2 MACRO LINKER (MLINK)
  27. 27. 4. FUNCTIONS B–66102E/10 18 (2) Link control file The link control file specifies a library file name, compile parameters,and object file names subject to linkage. As with a source file, a link control file must be created in MS-DOS text file format. At this time, be sure to assign the file name extension .LNK. In a link control file, a library file name, compile parameters, and object file names subject to linkage are defined using keywords. A comment line can be provided by using /:. Keyword) CNC= : 1st library file name for each CNC model CNC2= : 2nd library file name for each CNC model CNC3= : 3rd library file name for each CNC model P9999= : Compile parameters 9000 to 9059 FILE= : Object file (Multiple object files can be specified with each name delimited by a comma.) HFILE= : Intel 32-bit hexadecimal file (Multiple object files can be specified with each name delimited by a comma.) SYSTEM= : path–name (Series 16i/18i/21i/15i) SYSTEM value Specified path MPATH1 First path of M series MPATH2 Second path of M series TPATH1 First path of T series TPATH2 Second path of T series LPATH1 First path of loader Example) /: /: MACRO COMPILER UTILITY LINK FILE (SAMPLE) /: /: FOR F16MB CNC=A:MCOMPMEXF16MB_07.MEX /: P9000=00010000 P9010=100 P9037=5 P9038=8000 /: JIKKOU-MACRO FILE=ABC,DEF FILE=XYZ,UVW /: TAIWA-MACRO FILE=SSS The example above is for Series 16–MB. The compile parameters (Nos. 9000. 9010, 9037, and 9038) are set, and the object files (ABC.REF. DEF.REL, XYZ.REL, UVW.REL, and SSS.REL) are linked. The specification of (=0) is assumed for those compile parameters that are not specified in the link control file. A link control file is used also as a selective compile control file by the macro compiler, as described in item (1) in Section 4.1. This function is useful in compiling all programs to be linked. A:> MCOMP0 @ABS ⇒ compiles all files specified in the link control file (file name: ABC.LNK). * MPATH1 is fixed for series 15i–A See Appendix L for details.
  28. 28. B–66102E/10 4. FUNCTIONS 19 (3) Link list file The link list file is output by the linker, and a library name, compile parameters, compile program list and size information, erroneous programnumbers, error codes, ROM-format file size informationand so forth are listed. The name of a link list file is the same as the link control file name, except that the extension .MAP is assigned to the link list file name. For output to a printer, for example, use a standard MS-DOS command. (4) Specifying the destinations to which the macro linker outputs files The directory of the destinations to which the macro linker outputs files can be specified as desired according to linking conditions. NOTE This function is effective only for FANUC MACRO Compiler Version 02.1 and later versions. –Fm : Specifies a destination to which a link list file is output. –Fr : Specifies a destination to which a ROM-format file is output. Example: Generating SAMPL.MAP to directory B:MAP and SAMPL.ROM to directory C:ROM MLINK SAMPL -FmB:MAP -FrC:ROM (5) Checking the size of ROM format file (Exclusive for Series 16-B/C, 18-B/C, 21-B, 16i–A/B, 18i–A/B, 21i–A/B, 0i–A and 15i–A) at linking macro A ROM format file that is created by linking (MLINK) is checked for its size whether it is overflown or not. The size of ROM format file is set by compile parameter No. 9000 and 9001 (No.8500 for series15i–A). If a prepared ROM format file may exceed the size that was set by compile parameter 9000 (No.8500 for series15i) and 9001 as a result of linking, an error is produced when the macro linker is executed. ERROR : ROM size over Bit No. #7 #6 #5 #4 #3 #2 #1 #0Address 9000 M3MB M2MB M1MB M512 M256 M128Compile parameter #7 #6 #5 #4 #3 #2 #1 #0Address 9001 M4MBCompile parameter M4MB M3MB M2MB M1MB M512 M256 M128 4.0MB 1 0 0 0 0 0 0 3.0MB 0 1 0 0 0 0 0 2.0MB 0 0 1 0 0 0 0 1.0MB 0 0 0 1 0 0 0 512KB 0 0 0 0 1 0 0 256KB 0 0 0 0 0 1 0 128KB 0 0 0 0 0 0 1
  29. 29. 4. FUNCTIONS B–66102E/10 20 NOTE 1 For the 21-TB (Controller A), always specify 128 KB. 2 For the Series 16, a 128-KB ROM-format file cannot be specified. 3 For the 21-MB or 21-TB (Controller B), no more than 1.0 MB can be specified. 4 For the 0i–A, no more than 512 KB can be specified. D Series 15i–A Bit No. #7 #6 #5 #4 #3 #2 #1 #0Address 8500 R10 R05Compile parameter R10 R05 1.0MB 1 0 512KB 0 1 256KB 0 0 NOTE For the Series 15i–A, only the combinations given in the table above are possible. (6) Error messages 1) When the Series 16i/18i/21i–A Macro library is linked using a macro linker (MLINK.EXE) of MACRO COMPILER version 03.2 or earlier, the following error will occur: ERROR: Executer#1 is not specified 2) When the SYSTEM keyword is not specified, the following error will occur: ERROR: Can not find SYSTEM define
  30. 30. B–66102E/10 4. FUNCTIONS 21 A linked ROM-format file can be transferred to CNC memory via a RS-232-C line, and whether the created ROM-format file operates correctly can be checked using the macro executor RAM operation function of the CNC system. NOTE The Series 0i–A or Series 21–B does not support this function. (1) Operation After placing the CNC system in the macro executor receive ready state, a linked ROM-format file is transferred with the following command: A:> MTRNSC file-spec parameters -F -S *1 file-spec This specifies a ROM-format file to be transferred. *2 parameters CNC model Number of address bits Addressing Series 16 Series 18 Series 20 Series 21-TA 32 24 24 24 00800000 800000 980000 3A0000 –F : Overwriting loader command (See item (3).) –S : Not required in the Series 16/18–A. Example: The file SAMPL.ROM is transferred to Series 16-A. A:> MTRNSC SAMPL.ROM 32 00800000 (2) RS-232-C interface For transfer, the RS-232-C serial interface channel at standard port No. 0 is used. Before a RS-232–C interface can be used, it must be set and initialized according to the conditions below. Transfer rate : Value set with the connected CNC system Data length : 7 bits Parity : Enable/even parity Stop bit : Value set with the connected CNC system Xon/off control applied For detailed information, see Chapter 6. (3) Overwriting loader command effective Only a user macro program can be transferred (execution of the overwriting loader function ) by specifying the transfer parameter. First all the files are transferred once, then only the changed user macro program is transferred. This enables the macro program to be debugged. (This function is only effective for FANUC MACRO Compiler Version 02.1 and later versions.) Example) MTRNSC SAMPL.ROM 32 00800000 -F –F : Overwriting loader command When this command is specified, only the macro program (P-code program) is transferred from the ROM-format file; execution control software (executor) is not transferred. 4.3 ROM–FORMAT FILE TRANSMITTER (CNC) (FOR Series 16/18/20/21T–A)
  31. 31. 4. FUNCTIONS B–66102E/10 22 a) Activate the P-code loader function in the initialization loader function mode specified for the CNC (bit 1 of parameter No.8701 = 0) to transfer all files from the personal computer. MTRNSC SAMPL.ROM 32 00800000 b) Debug the macro program. c) If an error is found, correct the macro program and compile or link the macro program to create the ROM-format file again. d) Activate the P-code loader function in the overwriting loader function mode specified for the CNC (bit 1 of parameter No.8701 = 1). Specifying -F transfers the macro program from the personal computer. MTRNSC SAMPL.ROM 32 00800000 -F Repeat steps b), c), and d) to debug the macro program. If the library to be linked has been modified according to the software revision, the above procedure must be followed again from step a), transferring all files.
  32. 32. B–66102E/10 4. FUNCTIONS 23 (1) Operation A linked ROM-format file is transferred to the FANUC PMC Writer or FANUC FA Writer via a RS-232-C line, and is written to a macro ROM and verified. A:> MROMWT file-spec parameters Write or write/verification A:> MROMVF file-spec parameters Verification *1 file-spec This specifies a ROM-format file to be transferred. *2 parameters -K1xx : Cassette type (1) -K2xx : Cassette type (2) -IDxxxx: ID code -VCxx : Sets Vcc (with MROMWT only). -VPxx : Sets Vpp (with MROMWT only). -Pxx : Sets pulse width (with MROMWT only). -VF : Writes a ROM-format file, then verifies it (with MROMWT only). For detailed information, see Appendix C. Example: The file SAMPL.ROM is written to a Series 0 512K-byte ROM cassette, then is verified. A:> MROMWT SAMPL.ROM –K110 –K223 –ID50B2 –VCC0 –VP64 -P01 -VF (2) RS-232-C interface For detailed information, see Chapter 6. 4.4 ROM–FORMAT FILE TRANSMITTER (FANUC PMC WRITER/FANUC FA WRITER) (FOR Series 0, 15–A, 16–A, 18–A)
  33. 33. 4. FUNCTIONS B–66102E/10 24 (1) Operation A macro program is read from the CNC/SYSTEM P via a RS-232-C line, then is stored in an MS-DOS text file for the macro compiler. A macro program is transferred from the CNC/SYSTEM P after the command below is entered and the personal computer is placed in receive ready state. A:> MPLOADA file-spec 1* file-spec This specifies the name of a text file for storing a macro program. Example: A macro program is read to A:MCOMPUSRTESTABC.SRC. A:> MPLOADA A:MCOMPUSRTESTABC.SRC CAUTION Select the ISO code as output code when transferring a macro program from the CNC/SYSTEM P. (1) Operation A macro program output with the parameter -L3 described in Section 4.1 can be output to the CNC/SYSTEM P via a RS-232-C line. After the CNC/SYSTEM P is placed in program read ready state, a macro program is transferred by the command below. A:> MPOUT file-spec parameters *1 file-spec This specifies a macro program file to be transferred. *2 parameters –Fffff : Outputs fields (null code) before and after a macro program. By ffff, specify the number of fields to be output. –CR : Specifies the output format of the EOB (;). When -CR is omitted:The EOB (;) is converted to LF(0AH)/CR(0DH)/CR(0DH). When -CR is specified:The EOB (;) is converted to LF(0AH). (2) RS-232-C interface For detailed information, see Chapter 6. 4.5 SERIAL INTERFACE UTILITY 4.5.1 Macro Program Input 4.5.2 Macro Program Output
  34. 34. B–66102E/10 4. FUNCTIONS 25 (1) Operation A linked ROM-format file is transferred to the FANUC FA Writer via a GP-IB interface, and is written to a macro cassette and verified. Since a linked ROM-format file is transferred to the FANUC FA WriterviaaGP-INinterface,thefilecanbewrittentoamacrocassette and verified at higher speed than when the file is transferred via a RS-232-C line (Section 4.4). A:> MROMWTG file-spec parameters Write or write/verification A:> MROMVFG file-spec parameters Verification *1 file-spec This specifies a ROM-format file to be transferred. *2 parameters -K1xx : Cassette type (1) -K2xx : Cassette type (2) -IDxxxx: ID code -VCxx : Sets Vcc (with MROMWTG only). -VPxx : Sets Vpp (with MROMWTG only). -Pxx : Sets pulse width (with MROMWTG only). -VF : Writes a ROM-format file, then verifies it (with MROMWTG only). For detailed information, see Appendix C. Example: The file SAMPL.ROM is written to a Series 0 512K-byte ROM cassette, then is verified. A:> MROMWTG SAMPL.ROM -K110 -K223 -ID50B2 -VCC0 -VP64 -P01 -VF (2) GP-IB interface For detailed information, see Chapter 7. 4.6 ROM–FORMAT FILE TRANSMITTER (FANUC FA WRITER, GP–IB INTERFACE) (FOR Series 0, 15–A, 16–A, 18–A)
  35. 35. 4. FUNCTIONS B–66102E/10 26 (1) Operation Convert a ROM-format file created by the macro linker (MLINK) to the memory-card format file which can be loaded from the memory card using the boot function of the Series 15-B/16-B/20. A:> MMCARD file-spec (Series 16–B/16–C/18–B/18–C/20/21-B/ 16i–A/16i–B/18i–A/18i–B/21i–A/21i–B) A:> MMCARD15 file–spec (Series 15–B) *1 file-spec This specifies a ROM-format File to be converted without extension. The name of MEM-format file is the same as ROM-format File name with the extension .MEM. Example: A:MCOMPUSRTESTSAMPL.ROM is converted into A:MCOMPUSRTESTSAMPL.MEM. A:> MMCARD15 A:MCOMPUSRTESTSAMPL Series 16-B/16–C/18-B/ 18–C/20/21-B/ 16i–A/16i–B/18i–A/ 18i–B/21i–A/21i–B/ 0i–A Memory Card File Macro Library File Link Control File Link Control (xxx.LNK) ROM File (xxx.ROM) To memory card COPY A:xxx.MEM F: (F: Memory card device number) Source File Macro Program (xxx.SRC) Object File Object Program (xxx.REL) MLINK (Sereis 15-B) MCOMP15 Macro Library (xxx.MEX) MMCARD (Sereis 15-B) MMCARD15 Memory Card File (xxx.MEM) Memory Card Series 16-B/16–C/18-B/ 18–C/20/21-B/ 16i–A/16i–B/18i–A/ 18i–B/21i–A/21i–B MCOMP0 (Sereis 15i–A) MCOMP15I MLINK15I (Sereis 15i–A) Series 15–B/16–B/16–C/ 18–B/18–C/20/21-B/ 16i–A/16i–B/18i–A/ 18i–B/21i–A/21i–B (Sereis 15i–A) MMCARD15I 4.7 CONVERSION TO A MEMORY CARD FORMAT (MMCARD) (THIS FUNCTION IS USED IN THE Series 15–B/16–B/16–C/18–B /18–C/20/21–B/ 16i–A/18i–A/21i–A/ 16i–B/18i–B/21i–B/ 0i–A.)
  36. 36. B–66102E/10 5. SYMBOLIC MACRO PROGRAM 27 5 SYMBOLIC MACRO PROGRAM A macro program is to be created according the rule described below. (1) A macro program must start with address O. Address % must be specified at the end of the file. Multiple programs can be coded in a single file. At this time, the start of each program can be identified by address O. Data after address %, if any, is ignored. When multiple programs are coded, address % must be coded at the end. O0001 #101=1; G00 X#101; : O0002 G243 X0 YX (ABS); #500=#501+#502; : % (2) One line can contain only one block. The end of block (EOB) is represented by a semicolon (;). All data after a semicolon on a line is regarded as a comment. #100=#101; COMMENT G00 X123. Y234. ; G01 ; => ”G01 ;” after ; is regarded as comment. (3) All data after /: is regarded as a comment. A line starting with /* is regarded as a comment line; such a line is not compiled. /: comment => Compiler ignores this line as comment line. /: comment /: O0001 ; /: comment => Compiler ignores this line as comment line. G00 ...; ;/: comment => Blank block containing only ; is created. M99; % (4) Programming using symbolic names A symbolic name can be defined for a variable, expression, or character string to allow programming using symbolic names. A symbolic name can be defined as described below.
  37. 37. 5. SYMBOLIC MACRO PROGRAM B–66102E/10 28 Symbolic name definition @xxxx yyyyyy xxxx: Symbolic name (String of alphanumeric characters beginning with an alphabetic character) Version of the compiler Version 1.4 or pre- vious versions Version 2.1 or subse- quent versions Maximum number of characters 8 32 yyyyyy: Definition character string (not longer than 80 characters) After a symbolic name is defined, the symbolic name used in a program is replaced by the corresponding definition character string. Example) @COUNT1 #100 @ON =1 @OFF =0 @CURSOR #8505 @RETURN M99 /: O0001 ; ==>> O0001 ; CURSOR ON ; #8505 =1 ; COUNT1 = COUNT1+1 ; #100 = #100+1 ; RETURN ; M99 ; (5) Symbolic name for sequence number A symbolic name can be assigned to a sequence number as described below. In (4) above, a symbolic name is just used for a definition character string. On the other hand, a symbolic name for a sequence number is regarded as a sequence number when it is coded at the start of a block, and is regarded as a jump (GOTO) destination number when it is coded at a position other than the start of a block. Definition of symbolic name for sequence number >xxxx 9999 xxxx: Symbolic name for sequence number (String of alphanumeric characters beginning with an alphabetic character) Version of the compiler Version 1.4 or previous versions Version 2.1 or subsequent versions Maximum number of characters 8 32 9999: Number (not longer than four digits) After a symbolic name is defined, the symbolic name used in a program is replaced by the corresponding sequence number.
  38. 38. B–66102E/10 5. SYMBOLIC MACRO PROGRAM 29 Example) @COUNT1 #100 >JUMP1 100 >SKIP 200 /: O0002 ; ==> O0002 ; GOTO JUMP1 ; GOTO 100 ; IF[COUNT1 LE 0]GOTO SKIP ; IF[#100 LE 0]GOTO 200 ; SKIP ; N200 ; JUMP1 M99 ; N100 M99 ; (6) Automatic conversion of hiragana and kanji codes Hiragana and kanji, when coded in quotation marks and parentheses as (’ ’), can be auto-matically converted to internal macro compiler codes by coding. (’ ’) ==> (:3929 3671 3872 3439 2437 245E 2439:) Kanji and hiragana must be coded using full-size characters, and alphanumeric characters, spaces, special symbols must be coded using half-size characters. Specifying a compiling condition as -FS0 enables the characters usable in the Series 0 to be checked. When -FS0 is specified, the characters unusable in the Series 0 cause a compiling error. (This specification is only effective for FANUC MACRO Compiler Version 02.1 and later versions.) MCOMP0 TEST -FS0 (7) Reference to external file ($INCLUDE control statement) By using the $INCLUDE control statement, a program, symbol definition, and so forth contained in a separate file can be referenced. With this function, definitions and processing common to multiple programs can be specified in a separate file so that each program file can reference those definitions and processing. Example) Program file /: $INCLUDE MCOMPTOOLSYSTEM.DEF /: O0003 ; ==> O0003 ; TAIWAP1 =5 ; #8500 =5 ; RETURN ; M99 ; Include file (MCOMPTOOLSYSTEM.DEF) /: @TAIWAP1 #8500 @RETURN M99 /:
  39. 39. 5. SYMBOLIC MACRO PROGRAM B–66102E/10 30 (8) Array variable coding Variables can be used as a one-dimensional array by using a simple coding method. Coding method #999<expression> 999: Number of first variable in array By this coding method, variables can be referenced or written to as array data with an index indicated by the expression and starting with the variable specified in 999. #100<#101> is equivalent to #[100+#101]. (9) Reference list page eject control ($EJECT control statement) By using the $EJECT control statement, reference list page eject operation can be freely controlled. Example) Program file /: $EJECT /: ⇐ Advances reference list page. O0003 ; D D (10)Enhancement of IF and WHILE statements The IF and WHILE statements have been enhanced. (a) Determination of an operation result Only an operation expression can be specified as the condition of the IF or WHILE statement. The execution of the IF or WHILE statement is controlled depending on whether the operation result is equal to 0. Format: WHILE[operation-expression] DOx ; ENDx ; IF[operation-expression] GOTO xxx ; IF[operation-expression] THEN<Macro statement>; Example) The left macro instructions are equivalent to the right macro instructions. WHILE[#100]DO1; å WHILE[#100 NE 0]DO1; D D D D END1; END1; IF[#100+#101]GOTO123; å IF[[#100+#101]NE 0 ]GOTO123; IF[SIN[#1]]THEN #1=0; å IF [SIN[#1] NE 0] THEN #1=0 ; (b) Logical operations, AND and OR Multiple conditions can be specified in an IF statement. The conditions ANDed or ORed control the execution of the IF statement. Format : IF[<condition>&&<condition>]GOTO xxx; IF[<condition>||<condition>]THEN<MACRO statement> ; An AND is represented with an && sign and OR with an ££ sign. Up to three ANDs or ORs can be specified in a single IF statement. However, an AND and OR must not be specified together in a single IF statement.
  40. 40. B–66102E/10 5. SYMBOLIC MACRO PROGRAM 31 IF[<condition>&&<condition>&&<condition>&& <condition>] THEN<MACRO stmnt>; –OK IF[<condition>||<condition>||<condition>|| <condition>]GOTO xxx; –OK IF[<condition>&&<condition>||<condition>] GOTO xxx ; –NG Example) IF[#100 EQ 1 && #101 GT 0] GOTO 100 ; IF[#100 E Q1 ||#101 NE 1 || #102 GT 10 ] THEN #102=1 ; (c) IF/THEN/ELSE/ENDIF The syntax of an IF statement has been enhanced. Structured programming is possible using IF/THEN/ELSE/ENDIF. The following shows the formats of syntactically valid IF statements. IF[...]GOTO 999 ; IF[...]THEN Macro-st ; IF[...]THEN Macro-st; *Macro-st: ELSE Macro-st; Macro statement IF[...]THEN ; Statement ; *Statement: D Macro or NC statement D ENDIF ; IF[...]THEN ; Statement ; D D ELSE ; Statement ; D D ENDIF ; a) When only a single macro statement is to be executed, the macro statement can be specified immediately after THEN/ELSE as shown in and . IF[#100 EQ 0] THEN #101 = 1; ELSE #101 = 2; b) When an instruction to be executed is an NC statement or multiple instructions to be executed, the NC statement or multiple instructions must be specified between the THEN/ELSE line and ENDIF line as shown in and . IF[#100 EQ 0] THEN ; GO1 X100 Y200 ; ENDIF ; When instructions with THEN and ELSE must be executed as shown in , the IF statement can be specified by combining the formats in a) and b).
  41. 41. 5. SYMBOLIC MACRO PROGRAM B–66102E/10 32 IF[#100 EQ 0] THEN #101 = 1; ELSE ; #101 = 2 ; GOO X#103 ; ENDIF ; Up to three levels of nesting of the IF statement are allowed. IF [...] THEN ; IF [...] THEN ; Statement ; ELSE ; IF [...] THEN ; Statement ; ENDIF ; ENDIF ; Statement ; ELSE ; Statement ; ENDIF ; CAUTION When only a single macro statement is to be executed, the macro statement can be specified immediately after THEN/ELSE. In this case, no ENDIF statement is usually required. However, an ENDIF statement is required when IF [...] THEN Macro-st ; is specified just before ELSE or ENDIF of the previous nesting as shown below: IF [...] THEN ; IF [...] THEN Macro-st ; IF [...] THEN Macro-st ; ENDIF ; äThe ENDIF line is required ELSE ; because IF [...] THEN Macro-st ; is specified just before ELSE or ENDIF of the previous nesting. IF [...] THEN Macro-st ; IF [...] THEN Macro-st ; ENDIF ; äThe ENDIF line is required ENDIF ; because IF [...] THEN Macro-st ; is specified just before ELSE or ENDIF of the previous nesting.
  42. 42. B–66102E/10 6. RS-232-C INTERFACE SETTING 33 6 RS-232-C INTERFACE SETTING To transfer a ROM-format file to the CNC system or FANUC PMC-Writer/FA-Writer for writing to ROM/verification or transfer a macro program, the RS-232-C interface is controlled using the DOS function call (21H) auxiliary I/O device (AUX) for MS-DOS. By device specification with CONFIG.SYS, enable RS-232-C ports to be controlled with the auxiliary I/O device (AUX). The RS-232-C interface must be set or initialized beforehand according to the conditions described below. If a transfer operation is once performed via a RS-232-C interface, and the RS-232-C is used again with the same or another command, the RS-232-C interface must be initialized. Transfer rate : Value set with the connected CNC system Data length : 7 bits Parity : Enable/even parity Stop bit : Value set with the connected CNC system Xon/off control System installation processing creates, for use by the user, a standard batch file for RS-232-C interface initialization under the directory MCOMPTOOL. (1) For Fujitsu FMR Series (MCOMPTOOLRSFMR.BAT) Contents : SETUP RSC R0,4800,BITS-7, PARITY-EVEN.STOP-2,XON (2) For NEC PC98 Series (MCOMPTOOLRSPC98.BAT) Contents : SPEED RS232-0 4800 BITS-7 PARITY-EVEN STOP-2 XON (3) For IBM PC-AT Series (MCOMPTOOLRSPCAT.BAT) Contents : MODE COM1:48,E,7,2
  43. 43. 7. GP-IB INTERFACE SETTING (FOR Series 0, 15–A, 16–A, 18–A) B–66102E/10 34 7 GP-IB INTERFACE SETTING (FOR Series 0, 15-A, 16-A, 18-A) The GP-IB interface performs interface processing by using a GP-IB BIOS driver provided by each personal computer supplier. The user is to preparea GP-IB interface board for a personal computer model to use, and to initialize the board according to the operator’s manual before usage. (1) GP-IB interface board Use the GP-IB interface boards listed below. (a) NEC PC98 Series NEC GP-IB (IEEE-488) interface board (PC-9801-29N) (b) IBM PC-AT Series NATIONAL INSTRUMENTS VAT-GPIB Interface NI-488.2 MS-DOS/NI-488.2 WindowGs SoftwareW FD3/FD5 NO.776207-1 (2) GP-IB interface board setting (a) Set the GP-IB address to 1E (hexadecimal). When an address other than 1E is to be used for some reason, the same address must be set in the parameter -MAxx of the ROM-format file transmitter command (MROMWTG/MROMVFG). When GP-IB address OF is set: A: MROMWTG SAMPL.ROM -K110 -K223 -ID40B0 -MA0F (b) Select the master mode rather than the slave mode. The master mode must be selected because the GP-IB control function is performed on the personal computer. (c) Others For other settings, refer to the operator’s manual of each GP-IB board. (3) FANUC FA Writer setting (a) Set the GP-IB address to 00 (hexadecimal). The address is factory-set to 00. (b) Set the transfer block size to 2058 bytes. The block size is factory-set to 256 bytes. (4) Switching the interface of the FANUC FA Writer (a) Switching the interface of the FANUC FA Writer to a GPIB interface. To switch the interface, turn on the power to the FANUC FA Writer while pressing the FUNCTION key. The FANUC FA Writer then enters the GPIB interface mode.
  44. 44. B–66102E/10 8. SYSTEM COMMON SYMBOL DEFINITION FILE 35 8 SYSTEM COMMON SYMBOL DEFINITION FILE When the system is installed, a system common symbol definition file is stored under the directory MCOMPTOOL. For macro program creation, the user should make full use of the symbolic names defined in the file for variables commonly used with the system. System common symbol definition file File name: MCOMPTOOLSYSTEM.DEF To use this file, use the external file reference function described in Item (7) in Chapter 5. For a usage example, see Appendix D. $INCLUDE MCOMPTOOLSYSTEM.DEF For information about the defined symbols, see Appendix A.
  45. 45. 9. HOW TO VIEW REFERENCE LIST/COMPILE LIST B–66102E/10 36 9 HOW TO VIEW REFERENCE LIST/COMPILE LIST A source program coded using symbolic macro programs is converted by the macro compiler to a program in custom macro format for compile processing. The macro compiler outputs two types of list files: one for a reference list, and the other for a compile list. Since conversion processing is performed, the comment lines and symbol definition lines in a source program are not listed. For this reason, a referencelist and compile list output two types of line numbers to identify a compile error in a source program. (1) Reference list A source program coded using symbolic macro programs, cross reference data of used symbols, error messages from conversion processing, and so forth are output in a reference list. Line number S-Line : Source program line number Line number G-Line : Line number after conversion (2) Compile list A program converted to a program in custom macro format, cross referencedata of used variables, compile error messages, and so forth are output in a compile list. Line number G-Line : Line number after conversion Line number P-Line : Line number for each program number In the example below, the compile list has an error on G-Line 0002; the same G-Line 0002 in the reference list and the line 4 in the source program have this error. Example) *Reference list (xxx.REF) ---------- Program ------------------------- S-Line G-Line 1 @ABC #100 2 /: 3 0001 O1000 ; 4 0002 ABD = 0 ; 5 0003 M99 ; 6 0004 % *Compile list (xxx.LST) ---------- program O1000 ------------------- G-Line P-Line 0001 1 O1000; 0002 2 ABD=0; error #140C -----------^ ***** ERROR : 140C Illegal function code. 0003 3 M99; 0004 4 %
  46. 46. APPENDIX
  47. 47. B–66102E/10 A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF)APPENDIX 39 A SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) D SYSTEM. DEF for series 0/16/18/20/21 $NOLIST /: /: ************************************************************** /: * System common symbol define * /: * for series 0/16/18/20/21. (V01.03 1999.07.21) * /: ************************************************************** /: /: /: No.01 Control instruction code. /: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @CALL M98P /: Sub program call. @RETURN M99 /: Return to main program. @RETURNP M99P /: Return to main program with sequence No. /: @DISPLAY G243 /: Character display. @FORM F /: Format. @DATA D /: Data. @NSUP Z0 /: No Zero suppress. @ZSUP Z1 /: Zero suppress. /: @ELASE G202 /: CRT erase. @ELASEGR G202P1 /: Graphic erase. @ELASECH G202P2 /: Charactor erase. @ELASEAL G202P3 /: Graphic Character erase. /: @RECTNG G204 /: Rectangle display. /: @GRPNT G206 /: Graphic paint out. /: @COLOR G240 /: Display color select. @BLACK G240P0 /: Black. @RED G240P1 /: Red. @GREEN G240P2 /: Green. @YELLOW G240P3 /: Yellow. @BLUE G240P4 /: Blue. @PERPLE G240P5 /: Perple. @SKYBL G240P6 /: Sky–blue. @WHITE G240P7 /: White. @REDR G240P–1 /: Reverse Red. @GREENR G240P–2 /: Reverse Green. @YELLOWR G240P–3 /: Reverse Yellow. @BLUER G240P–4 /: Reverse Blue. @PERPLER G240P–5 /: Reverse Perple. @SKYBLR G240P–6 /: Reverse Sky–blue. @WHITER G240P–7 /: Reverse White. /: @BON L1 /: Blink ON @BOF L0 /: Blink OFF
  48. 48. A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) B–66102E/10APPENDIX 40 /: @DRLINEK G244 /: Graphic Line kind select. @DRSTART G242 /: Draw start point. @DRLINE G01 /: Linear line display. @DRCW G02 /: Circle display(CW). @DRCCW G03 /: Circle display(CCW). /: @GRCSR G249 /: Graphic cursor. /: @PMCDATA G310 /: PMC relay/data read and write. @1BYTE L1 /: 1 BYTE @2BYTE L2 /: 2 BYTE @4BYTE L4 /: 4 BYTE /: @TRSVR G315 /: P–code variable transfer. @TRSVRNML G315P001/: normal transfer. @TRSVRUPT G315P002/: up transfer. @TRSVRDWT G315P003/: down transfer. @TRSVRARG G315P101/: transfer to arangement. @TRSVRUPA G315P102/: up transfer to arangement. @TRSVRDWA G315P103/: down transfer to arangement. /: @PAMAKE G320 /: CNC Prog. access. (Prog. make) @PADELET G321 /: (Prog. delete) @PACNDNS G322 /: (Prog. condense) @PAREAD G325 /: (Block read) @PAWRITE G326 /: (Block write) @PABDELT G327 /: (Block delete) @PACREAD G328 /: (Character block read) @PACWRIT G329 /: (Character block write) /: @RSOPEN G330 /: RS232C open. @RSCLOSE G331 /: close. @RSRECV G335 /: receive 1ch. @RSSEND G336 /: Data send. @RSVARRD G337 /: Variable data read. @RSVARWT G338 /: Variable data write. @RSFUNC G339 /: FANUC cassettee control. /: @PMAFEED G340 /: PMC AXIS feed. @PMACUT G341 /: cutting. @PMADWLL G344 /: dwell. @PMAREFC G345 /: reference position return. @PMAMSCL G346 /: miscellaneous function. @PMASNRD G348 /: signal read. @PMASNWT G349 /: signal write. /: /: /: No.02 Conversation MACRO (TAIWA MACRO) control Variable define. /: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @CMACRO1 #8500 /: Conversation MACRO – 1 MAIN PROGRAM No. @TAIWAP1 #8500 @CMACRO2 #8550 /: Conversation MACRO – 2 MAIN PROGRAM No. @TAIWAP2 #8550 @CMACRO3 #8551 /: Conversation MACRO – 3 MAIN PROGRAM No. @TAIWAP3 #8551 /:
  49. 49. B–66102E/10 A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF)APPENDIX 41 @KEYCONT #8502 /: MDI–KEY IN CONTROL. @NOREAD #8502=0 /: No Data read. @NUMREAD #8502=1 /: Numeric Data read. @ADRREAD #8502=2 /: Address+Numeric Data read. @ASCREAD #8502=3 /: ASCII Data read. /: @KEYCODE #8501 /: MDI–KEY IN CODE. @PAGEDW 1 /: ”Page Down” KEY pushed. @PAGEUP 2 /: ”Page Up” @CURDW 3 /: ”Cursor Down” @CURUP 4 /: ”Cursor Up” @ALTER 5 /: ”Alter” @INSRT 6 /: ”Insert” @DELET 7 /: ”Delete” @INPUT 8 /: ”Input” @START 9 /: ”Start/Output” @RESET 10 /: ”Reset” @CURRT 18 /: ”Cursor Right” @CURLF 19 /: ”Cursor Left” @PINPUT 28 /: ”Input” add decimal point /: @SFTLF 11 /: ”Soft key left” (9”CRT) @SFT1 12 /: ”Soft key 1” (9”CRT) @SFT2 13 /: ”Soft key 2” (9”CRT) @SFT3 14 /: ”Soft key 3” (9”CRT) @SFT4 15 /: ”Soft key 4” (9”CRT) @SFT5 16 /: ”Soft key 5” (9”CRT) @SFTRT 17 /: ”Soft key right” (9”CRT) /: @SFTFLF 20 /: ”Soft key left” (14”CRT) @SFTF1 21 /: ”Soft key 1” (14”CRT) @SFTF2 22 /: ”Soft key 2” (14”CRT) @SFTF3 23 /: ”Soft key 3” (14”CRT) @SFTF4 24 /: ”Soft key 4” (14”CRT) @SFTF5 25 /: ”Soft key 5” (14”CRT) @SFTF6 26 /: ”Soft key 6” (14”CRT) @SFTF7 27 /: ”Soft key 7” (14”CRT) @SFTF8 28 /: ”Soft key 8” (14”CRT) @SFTF9 29 /: ”Soft key 9” (14”CRT) @SFTF10 30 /: ”Soft key 10” (14”CRT) @SFTFRT 31 /: ”Soft key right” (14”CRT) @KEYDATA #8503 /: MDI–KEY IN DATA. @KEYADRS #8504 /: MDI–KEY IN ADDRESS. @KEYARRY #8552 /: MDI–KEY SPECIAL READ DATA VAR. No. /: @CURSOR #8505 /: CURSOR DISPLAY CONTROL. @CURSORX #8506 /: CURSOR DISPLAY POSITION (X). @CURSORY #8507 /: CURSOR DISPLAY POSITION (Y). /: @CHRPROG #8509 /: CHARACTER DEFINE PROGRAM No. @CRTFUNC #8510 /: CRT FUNCTION CONTROL. /: @ARRY2BS #8512 /: Array CONTORL @ARRY3BS #8513 /: Array CONTORL @ARRY1CT #8516 /: Array CONTORL @ARRY2CT #8517 /: Array CONTORL
  50. 50. A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) B–66102E/10APPENDIX 42 @ARRYTOP #8519 /: Array CONTORL (Top variable No.) /: @TRNSDAT #8511 /: Transfer CONTORL @TRNS2BS #8512 /: Transfer CONTORL @TRNS3BS #8513 /: Transfer CONTORL @TRNS2TO #8514 /: Transfer CONTORL @TRNS3TO #8515 /: Transfer CONTORL /: @PAPROGN #8520 /: CNC PROG. ACCESS. (PROGRAM No.) @PABLOKN #8521 /: CNC PROG. ACCESS. (BLOCK No.) @PAVARNO #8522 /: CNC PROG. ACCESS. (DATA VAR. No.) @PAPNTVN #8523 /: CNC PROG. ACCESS. (POINT DATA VAR. No.) @PAERROR #8529 /: CNC PROG. ACCESS. (RETURN CODE) /: @PABGEDT #8526 /: BG–edit status. @PAPGCNT #8527 /: Program count. @PAFPMEM #8528 /: Free program memory. /: @RSERROR #8539 /: RS232C INTERFACE (RETURN CODE) /: @MDIKEYI #8549 /: MDI Key image /: @CUTTIME #8553 /: Cutting Time. @CUTLENG #8554 /: Cutting length. /: @HELPPNM #8555 /: User’s HELP screen Prog. Num. @HELPRST #8556 /: User’s HELP return status. /: @KEYLINX #8561 /: KEY in line X potion. @KEYLINY #8562 /: KEY in line Y potion. @KEYINUM #8563 /: KEY input number. @KEYPRPT #8564 /: KEY in line prompt. @KEYCLOR #8565 /: KEY in line color. /: @ITLCNTL #8600 /: Inter Lock control. @ITLSTTS #8601 /: Skip signal movement direction. /: @PMGSLCT #8602 /: PMC AXIS select. (G–code control) /: @PCDWKNO #8610 /: P–code Work No. search. /: @TRQLTO1 #8621 /: AXIS 1 limited torque override. @TRQLTO2 #8622 /: AXIS 2 @TRQLTO3 #8623 /: AXIS 3 @TRQLTO4 #8624 /: AXIS 4 @TRQLTO5 #8625 /: AXIS 5 @TRQLTO6 #8626 /: AXIS 6 @TRQLTO7 #8627 /: AXIS 7 @TRQLTO8 #8628 /: AXIS 8 /: @CNVTAD1 #8631 /: CHANNEL 1 A/D converter. @CNVTAD2 #8632 /: CHANNEL 2 @CNVTAD3 #8633 /: CHANNEL 3 @CNVTAD4 #8634 /: CHANNEL 4 /: @MSKCLAX #8690 /: AXIS Macro call mask. @MSKCLTC #8691 /: T code call mask.
  51. 51. B–66102E/10 A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF)APPENDIX 43 /: @PMVSLCT #8700 /: PMC AXIS select. (VARIABLE control) @PMVFLG1 #8710 /: PMC 1 control flag. @PMVCMD1 #8711 /: command. @PMVCSP1 #8712 /: cutting speed. @PMVLNG1 #8713 /: length. @PMVSTS1 #8715 /: status. @PMVFLG2 #8720 /: PMC 2 control flag. @PMVCMD2 #8721 /: command. @PMVCSP2 #8722 /: cutting speed. @PMVLNG2 #8723 /: length. @PMVSTS2 #8725 /: status. @PMVFLG3 #8730 /: PMC 3 control flag. @PMVCMD3 #8731 /: command. @PMVCSP3 #8732 /: cutting speed. @PMVLNG3 #8733 /: length. @PMVSTS3 #8735 /: status. @PMVFLG4 #8740 /: PMC 4 control flag. @PMVCMD4 #8741 /: command. @PMVCSP4 #8742 /: cutting speed. @PMVLNG4 #8743 /: length. @PMVSTS4 #8745 /: status. /: @WINDIDX #8998 /: Window Index. @WINDDAT #8999 /: Window Data. /: /: /: No.03 System Variable. /: ~~~~~~~~~~~~~~~~~~~~~~~ @EMPTY #0 /: ”EMPTY”. @ENMTY #0 /: ”EMPTY”. @ALARM #3000 /: Alarm display. @TIMER1 #3001 /: Msec Timer. @TIMER2 #3002 /: Hour Timer. @SBKCNT #3003 /: Single blok/Auxilialy function control. @FLDCNT #3004 /: Feed hold/Over ride control. @SETTING #3005 /: Setting data. @DATE #3011 /: System date. @TIME #3012 /: System Time. @PARTCNT #3901 /: Part count. @PARTRQT #3902 /: Part request. @MDLG01 #4001 /: Modal G–code Group 1 @MDLG02 #4002 /: Modal G–code Group 2 @MDLG03 #4003 /: Modal G–code Group 3 @MDLG04 #4004 /: Modal G–code Group 4 @MDLG05 #4005 /: Modal G–code Group 5 @MDLG06 #4006 /: Modal G–code Group 6 @MDLG07 #4007 /: Modal G–code Group 7 @MDLG08 #4008 /: Modal G–code Group 8 @MDLG09 #4009 /: Modal G–code Group 9 @MDLG10 #4010 /: Modal G–code Group 10 @MDLG11 #4011 /: Modal G–code Group 11 @MDLG12 #4012 /: Modal G–code Group 12 @MDLG13 #4013 /: Modal G–code Group 13 @MDLG14 #4014 /: Modal G–code Group 14 @MDLG15 #4015 /: Modal G–code Group 15 @MDLG16 #4016 /: Modal G–code Group 16
  52. 52. A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) B–66102E/10APPENDIX 44 @MDLG17 #4017 /: Modal G–code Group 17 @MDLG18 #4018 /: Modal G–code Group 18 @MDLG19 #4019 /: Modal G–code Group 19 @MDLG20 #4020 /: Modal G–code Group 20 @MDLG21 #4021 /: Modal G–code Group 21 @MDLG22 #4022 /: Modal G–code Group 22 @CORDF #4109 /: F cord @CORDM #4113 /: M cord @SEQNUM #4114 /: Sequece number @PRGNUM #4115 /: Program number @CORDS #4119 /: S cord @CORDT #4120 /: T cord /: @ABSIO1 #5001 /: Block end position. 1’st @ABSIO2 #5002 /: 2’nd @ABSIO3 #5003 @ABSIO4 #5004 @ABSIO5 #5005 @ABSIO6 #5006 @ABSIO7 #5007 @ABSIO8 #5008 @ABSMT1 #5021 /: Machine Position. @ABSMT2 #5022 @ABSMT3 #5023 @ABSMT4 #5024 @ABSMT5 #5025 @ABSMT6 #5026 @ABSMT7 #5027 @ABSMT8 #5028 @ABSOT1 #5041 /: Current absolute position. @ABSOT2 #5042 @ABSOT3 #5043 @ABSOT4 #5044 @ABSOT5 #5045 @ABSOT6 #5046 @ABSOT7 #5047 @ABSOT8 #5048 @ABSKP1 #5061 /: Skip cutting position. @ABSKP2 #5062 @ABSKP3 #5063 @ABSKP4 #5064 @ABSKP5 #5065 @ABSKP6 #5066 @ABSKP7 #5067 @ABSKP8 #5068 @OFSEXW1 #5201 /: AXIS 1 External workpiece reference offset. @OFSEXW2 #5202 /: AXIS 2 @OFSEXW3 #5203 /: AXIS 3 @OFSEXW4 #5204 /: AXIS 4 @OFSEXW5 #5205 /: AXIS 5 @OFSEXW6 #5206 /: AXIS 6 @OFSEXW7 #5207 /: AXIS 7 @OFSEXW8 #5208 /: AXIS 8 @OFS54W1 #5221 /: AXIS 1 G54 workpiece reference offset. @OFS54W2 #5222 /: AXIS 2 @OFS54W3 #5223 /: AXIS 3 @OFS54W4 #5224 /: AXIS 4
  53. 53. B–66102E/10 A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF)APPENDIX 45 @OFS54W5 #5225 /: AXIS 5 @OFS54W6 #5226 /: AXIS 6 @OFS54W7 #5227 /: AXIS 7 @OFS54W8 #5228 /: AXIS 8 @OFS55W1 #5241 /: AXIS 1 G55 workpiece reference offset. @OFS55W2 #5242 /: AXIS 2 @OFS55W3 #5243 /: AXIS 3 @OFS55W4 #5244 /: AXIS 4 @OFS55W5 #5245 /: AXIS 5 @OFS55W6 #5246 /: AXIS 6 @OFS55W7 #5247 /: AXIS 7 @OFS55W8 #5248 /: AXIS 8 @OFS56W1 #5261 /: AXIS 1 G56 workpiece reference offset. @OFS56W2 #5262 /: AXIS 2 @OFS56W3 #5263 /: AXIS 3 @OFS56W4 #5264 /: AXIS 4 @OFS56W5 #5265 /: AXIS 5 @OFS56W6 #5266 /: AXIS 6 @OFS56W7 #5267 /: AXIS 7 @OFS56W8 #5268 /: AXIS 8 @OFS57W1 #5281 /: AXIS 1 G57 workpiece reference offset. @OFS57W2 #5282 /: AXIS 2 @OFS57W3 #5283 /: AXIS 3 @OFS57W4 #5284 /: AXIS 4 @OFS57W5 #5285 /: AXIS 5 @OFS57W6 #5286 /: AXIS 6 @OFS57W7 #5287 /: AXIS 7 @OFS57W8 #5288 /: AXIS 8 @OFS58W1 #5301 /: AXIS 1 G58 workpiece reference offset. @OFS58W2 #5302 /: AXIS 2 @OFS58W3 #5303 /: AXIS 3 @OFS58W4 #5304 /: AXIS 4 @OFS58W5 #5305 /: AXIS 5 @OFS58W6 #5306 /: AXIS 6 @OFS58W7 #5307 /: AXIS 7 @OFS58W8 #5308 /: AXIS 8 @OFS59W1 #5321 /: AXIS 1 G59 workpiece reference offset. @OFS59W2 #5322 /: AXIS 2 @OFS59W3 #5323 /: AXIS 3 @OFS59W4 #5324 /: AXIS 4 @OFS59W5 #5325 /: AXIS 5 @OFS59W6 #5326 /: AXIS 6 @OFS59W7 #5327 /: AXIS 7 @OFS59W8 #5328 /: AXIS 8 /: /: /: No.04 OTHER SYMBOL DEFINE. /: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @ON =1 @OFF =0 /: $LIST
  54. 54. A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) B–66102E/10APPENDIX 46 D SYSTEM. DEF for series 15i0/16/18/20/21 (Possible to use this symbol definition evenby series 15B) $NOLIST /: /: ************************************************************* /: * System common symbol define. * /: * for series15i (V01.01 1999.07.21) * /: ************************************************************* /: /: /: No.01 Control instruction code. /: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @CALL M98P /: Sub program call. @RETURN M99 /: Return to main program. @RETURNP M99P /: Return to main program with sequence No. /: @ELASE G202 /: CRT erase. @ELASEGR G202P1 /: Graphic erase. @ELASECH G202P2 /: Charactor erase. @ELASEAL G202P3 /: Graphic Character erase. /: @COLOR G240 /: Display color select. @BLACK G240P0 /: Black. @RED G240P1 /: Red. @GREEN G240P2 /: Green. @YELLOW G240P3 /: Yellow. @BLUE G240P4 /: Blue. @PERPLE G240P5 /: Perple. @SKYBL G240P6 /: Sky–blue. @WHITE G240P7 /: White. @REDR G240P–1 /: Reverse Red. @GREENR G240P–2 /: Reverse Green. @YELLOWR G240P–3 /: Reverse Yellow. @BLUER G240P–4 /: Reverse Blue. @PERPLER G240P–5 /: Reverse Perple. @SKYBLR G240P–6 /: Reverse Sky–blue. @WHITER G240P–7 /: Reverse White. /: @BON L1 /: Blink ON @BOF L0 /: Blink OFF /: @ABSMOD G390 /: Absolute mode @INCMOD G391 /: Incremental mode /: @CURSOR G230 /: Cursor display control. @CLEN L /: cirsor length /: @DISPLAY G243 /: Character display. @FORM F /: Format. @DATA D /: Data. @NSUP Z0 /: No Zero suppress. @ZSUP Z1 /: Zero suppress. /: @KEYPRPT G280 /: Prompt display. /: @RECTNG G204 /: Rectangle display. /: @DRLINEK G244 /: Graphic Line kind select.
  55. 55. B–66102E/10 A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF)APPENDIX 47 @DRSTART G242 /: Draw start point. @DRLINE G301 /: Linear line display. @DRCW G302 /: Circle display(CW). @DRCCW G303 /: Circle display(CCW). /: @PMCDATA G310 /: PMC relay/data read and write. @1BYTE L1 /: 1 BYTE @2BYTE L2 /: 2 BYTE @4BYTE L4 /: 4 BYTE /: @TRSVR G315 /: P–code variable transfer. @TRSVRNML G315P001/: normal transfer. @TRSVRUPT G315P002/: up transfer. @TRSVRDWT G315P003/: down transfer. @TRSVRARG G315P101/: transfer to arangement. @TRSVRUPA G315P102/: up transfer to arangement. @TRSVRDWA G315P103/: down transfer to arangement. /: @PAMAKE G370 /: CNC Prog. access. (Prog. make) @PADELET G371 /: (Prog. delete) @PAREAD G375 /: (Block read) @PAWRITE G376 /: (Block write) @PABDELT G377 /: (Block delete) @PACREAD G328 /: (Character block read) @PACWRIT G329 /: (Character block write) /: @RSOPEN G330 /: RS232C open. @RSCLOSE G331 /: close. @RSRECV G335 /: receive 1ch. @RSSEND G336 /: Data send. @RSVARRD G337 /: Variable data read. @RSVARWT G338 /: Variable data write. @RSFUNC G339 /: FANUC cassettee control. /: @PMAFEED G340 /: PMC AXIS feed. @PMACUT G341 /: cutting. @PMADWLL G344 /: dwell. @PMAREFC G345 /: reference position return. @PMAMSCL G346 /: miscellaneous function. @PMASNRD G348 /: signal read. @PMASNWT G349 /: signal write. /: /: /: No.02 Conversation MACRO (TAIWA MACRO) control Variable define. /: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @CMACRO1 #8500 /: Conversation MACRO – 1 MAIN PROGRAM No. @AMACRO1 #8600 /: Auxliary MACRO–1 MAIN PROGRAM No. @TAIWAP1 #8500 /: @KEYCONT #8502 /: MDI–KEY IN CONTROL. @NOREAD #8502=0 /: No Data read. @NUMREAD #8502=1 /: Numeric Data read. @ADRREAD #8502=2 /: Address+Numeric Data read. @ASCREAD #8502=3 /: ASCII Data read. /: @KEYCODE #8501 /: MDI–KEY IN CODE. @PAGEDW 1 /: ”Page Down” KEY pushed.
  56. 56. A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) B–66102E/10APPENDIX 48 @PAGEUP 2 /: ”Page Up” @CURUP 3 /: ”Cursor Up” @CURDW 4 /: ”Cursor Down” @CURLF 5 /: ”Cursor Left” @CURRT 6 /: ”Cursor Right” @INPUT 8 /: ”Input” @RESET 10 /: ”Reset” @SFTRT 11 /: ”Soft key right” @SFT1 12 /: ”Soft key 1” @SFT2 13 /: ”Soft key 2” @SFT3 14 /: ”Soft key 3” @SFT4 15 /: ”Soft key 4” @SFT5 16 /: ”Soft key 5” @SFT6 17 /: ”Soft key 6” @SFT7 18 /: ”Soft key 7” @SFT8 19 /: ”Soft key 8” @SFT9 20 /: ”Soft key 9” @SFT10 21 /: ”Soft key 10” /: @KEYDATA #8503 /: MDI–KEY IN DATA. @KEYADRS #8504 /: MDI–KEY IN ADDRESS. @KEYARRY #8552 /: MDI–KEY SPECIAL READ DATA VAR. No. /: @CHRPROG #8509 /: CHARACTER DEFINE PROGRAM No. @CRTFUNC #8530 /: CRT FUNCTION CONTROL. /: @ARRY2BS #8512 /: Array CONTORL @ARRY3BS #8513 /: Array CONTORL @ARRY1CT #8516 /: Array CONTORL @ARRY2CT #8517 /: Array CONTORL @ARRYTOP #8519 /: Array CONTORL (Top variable No.) /: @TRNSDAT #8511 /: Transfer CONTORL @TRNS2BS #8512 /: Transfer CONTORL @TRNS3BS #8513 /: Transfer CONTORL @TRNS2TO #8514 /: Transfer CONTORL @TRNS3TO #8515 /: Transfer CONTORL /: @PAPROGN #8520 /: CNC PROG. ACCESS. (PROGRAM No.) @PABLOKN #8521 /: CNC PROG. ACCESS. (BLOCK No.) @PAVARNO #8522 /: CNC PROG. ACCESS. (DATA VAR. No.) @PAPNTVN #8523 /: CNC PROG. ACCESS. (POINT DATA VAR. No.) @PAERROR #8529 /: CNC PROG. ACCESS. (RETURN CODE) /: @PABGEDT #8526 /: BG–edit status. @PAPGCNT #8527 /: Program count. @PAFPMEM #8528 /: Free program memory. /: @RSERROR #8539 /: RS232C INTERFACE (RETURN CODE) /: @MDIKEYI0 #8540 /: MDI Key image @MDIKEYI1 #8541 /: MDI Key image @MDIKEYI2 #8542 /: MDI Key image @MDIKEYI3 #8543 /: MDI Key image @MDIKEYI4 #8544 /: MDI Key image @MDIKEYI5 #8545 /: MDI Key image @MDIKEYI6 #8546 /: MDI Key image
  57. 57. B–66102E/10 A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF)APPENDIX 49 @MDIKEYI7 #8547 /: MDI Key image @MDIKEYI8 #8548 /: MDI Key image @MDIKEYI9 #8549 /: MDI Key image /: @CUTTIME #8553 /: Cutting Time. @CUTLENG #8554 /: Cutting length. /: @ITLCNTL #8605 /: Inter Lock control. @ITLSTTS #8606 /: Skip signal movement direction. /: @PMGSLCT #8602 /: PMC AXIS select. (G–code control) /: @PCDWKNO #8610 /: P–code Work No. search. /: @TRQLTID #8990 /: Limited torque override ID. @TRQWT 100 /: write. @TRQRD 101 /: read. @TRQLTAX #8991 /: axis no. @TRQLTVL #8992 /: value.(0–255) @TRQLTER #8993 /: return code. /: @CNVADID1 #8997 /: A/D converter ID1. @ADGEN 400 /: general. @ADSPDL 401 /: spindle. @ADAXS 402 /: axis. @CNVADID2 #8998 /: ID2. @CNVADVAL #8999 /: value. @CNVADERR #8996 /: return code. /: @MSKCLAX #8690 /: AXIS Macro call mask. @MSKCLTC #8691 /: T code call mask. /: /: /: No.03 System Variable. /: ~~~~~~~~~~~~~~~~~~~~~~~ @EMPTY #0 /: ”EMPTY”. @ENMTY #0 /: ”EMPTY”. @ALARM #3000 /: Alarm display. @TIMER1 #3001 /: Msec Timer. @TIMER2 #3002 /: Hour Timer. @SBKCNT #3003 /: Single blok/Auxilialy function control. @FLDCNT #3004 /: Feed hold/Over ride control. @MDLG01 #4001 /: Modal G–code Group 1 @MDLG02 #4002 /: Modal G–code Group 2 @MDLG03 #4003 /: Modal G–code Group 3 @MDLG04 #4004 /: Modal G–code Group 4 @MDLG05 #4005 /: Modal G–code Group 5 @MDLG06 #4006 /: Modal G–code Group 6 @MDLG07 #4007 /: Modal G–code Group 7 @MDLG08 #4008 /: Modal G–code Group 8 @MDLG09 #4009 /: Modal G–code Group 9 @MDLG10 #4010 /: Modal G–code Group 10 @MDLG11 #4011 /: Modal G–code Group 11 @MDLG12 #4012 /: Modal G–code Group 12 @MDLG13 #4013 /: Modal G–code Group 13 @MDLG14 #4014 /: Modal G–code Group 14 @MDLG15 #4015 /: Modal G–code Group 15
  58. 58. A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) B–66102E/10APPENDIX 50 @MDLG16 #4016 /: Modal G–code Group 16 @MDLG17 #4017 /: Modal G–code Group 17 @MDLG18 #4018 /: Modal G–code Group 18 @MDLG19 #4019 /: Modal G–code Group 19 @MDLG20 #4020 /: Modal G–code Group 20 @MDLG25 #4025 /: Modal G–code Group 25 @MDLG26 #4026 /: Modal G–code Group 26 @CORDF #4109 /: F cord @CORDM #4113 /: M cord @SEQNUM #4114 /: Sequece number @PRGNUM #4115 /: Program number @CORDS #4119 /: S cord @CORDT #4120 /: T cord /: @ABSIO1 #5001 /: Block end position. 1’st @ABSIO2 #5002 /: 2’nd @ABSIO3 #5003 @ABSIO4 #5004 @ABSIO5 #5005 @ABSIO6 #5006 @ABSIO7 #5007 @ABSIO8 #5008 @ABSIO9 #5009 @ABSI10 #5010 @ABSMT1 #5021 /: Machine Position. @ABSMT2 #5022 @ABSMT3 #5023 @ABSMT4 #5024 @ABSMT5 #5025 @ABSMT6 #5026 @ABSMT7 #5027 @ABSMT8 #5028 @ABSMT9 #5029 @ABSMT10 #5030 @ABSOT1 #5041 /: Current absolute position. @ABSOT2 #5042 @ABSOT3 #5043 @ABSOT4 #5044 @ABSOT5 #5045 @ABSOT6 #5046 @ABSOT7 #5047 @ABSOT8 #5048 @ABSOT9 #5049 @ABSOT10 #5050 @ABSKP1 #5061 /: Skip cutting position. @ABSKP2 #5062 @ABSKP3 #5063 @ABSKP4 #5064 @ABSKP5 #5065 @ABSKP6 #5066 @ABSKP7 #5067 @ABSKP8 #5068 @ABSKP9 #5069 @ABSKP10 #5070 @OFSEXW1 #5201 /: AXIS 1 External workpiece reference offset. @OFSEXW2 #5202 /: AXIS 2 @OFSEXW3 #5203 /: AXIS 3
  59. 59. B–66102E/10 A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF)APPENDIX 51 @OFSEXW4 #5204 /: AXIS 4 @OFSEXW5 #5205 /: AXIS 5 @OFSEXW6 #5206 /: AXIS 6 @OFSEXW7 #5207 /: AXIS 7 @OFSEXW8 #5208 /: AXIS 8 @OFSEXW9 #5209 /: AXIS 9 @OFSEXW10 #5210 /: AXIS 10 @OFS54W1 #5221 /: AXIS 1 G54 workpiece reference offset. @OFS54W2 #5222 /: AXIS 2 @OFS54W3 #5223 /: AXIS 3 @OFS54W4 #5224 /: AXIS 4 @OFS54W5 #5225 /: AXIS 5 @OFS54W6 #5226 /: AXIS 6 @OFS54W7 #5227 /: AXIS 7 @OFS54W8 #5228 /: AXIS 8 @OFS54W9 #5229 /: AXIS 9 @OFS54W10 #5230 /: AXIS10 @OFS55W1 #5241 /: AXIS 1 G55 workpiece reference offset. @OFS55W2 #5242 /: AXIS 2 @OFS55W3 #5243 /: AXIS 3 @OFS55W4 #5244 /: AXIS 4 @OFS55W5 #5245 /: AXIS 5 @OFS55W6 #5246 /: AXIS 6 @OFS55W7 #5247 /: AXIS 7 @OFS55W8 #5248 /: AXIS 8 @OFS55W9 #5249 /: AXIS 9 @OFS55W10 #5250 /: AXIS10 @OFS56W1 #5261 /: AXIS 1 G56 workpiece reference offset. @OFS56W2 #5262 /: AXIS 2 @OFS56W3 #5263 /: AXIS 3 @OFS56W4 #5264 /: AXIS 4 @OFS56W5 #5265 /: AXIS 5 @OFS56W6 #5266 /: AXIS 6 @OFS56W7 #5267 /: AXIS 7 @OFS56W8 #5268 /: AXIS 8 @OFS56W9 #5269 /: AXIS 9 @OFS56W10 #5270 /: AXIS10 @OFS57W1 #5281 /: AXIS 1 G57 workpiece reference offset. @OFS57W2 #5282 /: AXIS 2 @OFS57W3 #5283 /: AXIS 3 @OFS57W4 #5284 /: AXIS 4 @OFS57W5 #5285 /: AXIS 5 @OFS57W6 #5286 /: AXIS 6 @OFS57W7 #5287 /: AXIS 7 @OFS57W8 #5288 /: AXIS 8 @OFS57W9 #5289 /: AXIS 9 @OFS57W10 #5290 /: AXIS10 @OFS58W1 #5301 /: AXIS 1 G58 workpiece reference offset. @OFS58W2 #5302 /: AXIS 2 @OFS58W3 #5303 /: AXIS 3 @OFS58W4 #5304 /: AXIS 4 @OFS58W5 #5305 /: AXIS 5 @OFS58W6 #5306 /: AXIS 6 @OFS58W7 #5307 /: AXIS 7 @OFS58W8 #5308 /: AXIS 8 @OFS58W9 #5309 /: AXIS 9 @OFS58W10 #5310 /: AXIS10
  60. 60. A. SYSTEM COMMON SYMBOL DEFINITION (MCOMPTOOLSYSTEM.DEF) B–66102E/10APPENDIX 52 @OFS59W1 #5321 /: AXIS 1 G59 workpiece reference offset. @OFS59W2 #5322 /: AXIS 2 @OFS59W3 #5323 /: AXIS 3 @OFS59W4 #5324 /: AXIS 4 @OFS59W5 #5325 /: AXIS 5 @OFS59W6 #5326 /: AXIS 6 @OFS59W7 #5327 /: AXIS 7 @OFS59W8 #5328 /: AXIS 8 @OFS59W9 #5329 /: AXIS 9 @OFS59W10 #5330 /: AXIS10 /: /: /: No.04 OTHER SYMBOL DEFINE. /: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @ON =1 @OFF =0 /: $LIST
  61. 61. B–66102E/10 B. COMPILE ERROR CODE TABLEAPPENDIX 53 BCOMPILE ERROR CODE TABLE The table below indicates the error codes that may occur in compile processing. Compile Error Codes (1/3) Error code Meaning 0000 Normal termination 0201 Too many programs 0202 There is no program. 1001 Block delete number contains decimal point. 1002 Block delete number other than 1 to 9 is coded. 1003 Program number is coded not at start of program. 1004 Sequence number is coded not at start of block. 1005 NC statement has format error. 1006 Code other than EOB is present at end of macro statement. 1007 Equal sign cannot be found with macro statement. 1008 DO nesting depth exceeded 3 levels. 1009 Relation operator cannot be found in conditional expression. 100a IF is not followed by GOTO. 100b Closing bracket (]) cannot be found for IF[conditional-expres- sion]. 100c GOTO n is followed by code other than EOB. 100d DO m is followed by code other than EOB. 100e END m is followed by code other than EOB. 100f Identification number of END does not match DO. 1010 END to match DO cannot be found. 1011 WHILE is not followed by DO. 1012 Closing bracket (]) cannot be found for WHILE[conditional-ex- pression]. 1013 Block not identifiable as NC statement or macro statement is present. 1014 DO to match END cannot be found. 1015 Program number of directory does not match program number in program. 1016 Program number is missing at start of program. 1017 Error in the IF [...] THEN part 1018 Error in the SETVN statement 1019 Error in DEFADD 101a Error in the POPEN command 101b Error in the PCLOS command 101c Error in the BPRNT command 101d Error in the DPRNT command
  62. 62. B. COMPILE ERROR CODE TABLE B–66102E/10APPENDIX 54 Compile Error Codes (2/3) Error code Meaning 101e Error in the PGN command 101f Error in the FDEL command 1020 Error in the FOPEN command 1021 Error in the FCLOS command 1022 Error in the FREAD command 1023 Error in the FWRITE command 1024 Error in the FPSET command 1025 Too many IF [...] THEN parts 1027 ”ccall” not followed by EOB code 1028 The multiplicity of IF [...] THEN parts exceeds 3. 1029 AND and OR conditions in the IF [...] part 1030 ”ENDIF” not found for the IF [...] THEN part 1031 More than four ANDs or ORs 1033 The number of ”ELSEs” does not match that of IF [...] THEN parts. 1034 The number of ”ENDIFs” does not match that of IF [...] THEN parts. 1035 The number of ”THENs” does not match that of IF [...] THEN parts. 1201 Nesting depth of parentheses exceeded 5 levels. 1202 Closing bracket (]) cannot be found for #[expression]. 1203 Closing bracket (]) cannot be found for [expression]. 1204 Second opening bracket ([) cannot be found for ATAN[expres- sion]/[expression]. 1205 Slash (/) cannot be found for ATAN[expression]/[expres- sion]. 1206 First closing bracket (]) cannot be found for ATAN[expres- sion]/[expression]. 1207 Closing bracket (]) cannot be found for function [expression]. 1208 Format of expression contains error. 1209 Format of expression on left side of assignment statement contains error. 120a Format of expression in address[expression], ad- dress-[expression], or GOTO[expression] contains error. 120b Error in the array 1401 Numeric value longer than 8 digits is present. 1402 Decimal point is followed by code other than number. 1403 Macro variable number is longer than 6 digits. 1404 # is not immediately followed by number or opening bracket ([). 1405 Program number is longer than 4 digits. 1406 Sequence number is longer than 4 digits. 1407 Opening bracket ([) cannot be found for function [expres- sion]. 1408 Opening bracket ([) cannot be found for IF[expression] or WHILE[expression]. 1409 Number m in DO m or END m is longer than 1 digit.

×