fanuc GFZ-62073E-2-03 Programming Manual

GE Fanuc Automation
Computer Numerical Control Products
Series 15 / 150 – Model B Macro Compiler/Executer
Programming Manual
GFZ-62073E-2/03 September 1995
Warnings, Cautions, and Notes as Used in this Publication
Warning notices are used in this publication to emphasize that hazardous voltages, currents, temperatures, or other conditions that could cause personal injury exist in this equipment or may be associated with its use.
In situations where inattention could cause either personal injury or damage to equipment, a Warning notice is used.
Caution notices are used where equipment might be damaged if care is not taken.
GFL-001
Warning
Caution
Note
Notes merely call attention to information that is especially significant to understanding and operating the equipment.
This document is based on information available at the time of its publication. While efforts have been made to be accurate, the information contained herein does not purport to cover all details or variations in hardware or software, nor to provide for every possible contingency in connection with installation, operation, or maintenance. Features may be described herein which are not present in all hardware and software systems. GE Fanuc Automation assumes no obligation of notice to holders of this document with respect to changes subsequently made.
GE Fanuc Automation makes no representation or warranty, expressed, implied, or statutory with respect to, and assumes no responsibility for the accuracy, completeness, sufficiency, or usefulness of the information contained herein. No warranties of merchantability or fitness for purpose shall apply.
©Copyright 1995 GE Fanuc Automation North America, Inc.
All Rights Reserved.
B–62073E–2/03

Table of contents

PROGRAMMING
1. GENERAL 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 OUTLINE 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 FEATURES 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2. MACRO COMPILER 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1 OUTLINE 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 FLOW FOR CREATING, REGISTERING AND SAVING PROGRAMS 7. . . . . . . . . . . . . . . . . . . . .
2.3 USE OF MACRO COMPILER 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.1 Registering a P–CODE Program in F–ROM Using a Memory Card
2.3.2 Registering the P–CODE Program in F–ROM Using a ROM Cassette
2.3.3 Compiling and Registering Custom Macro Programs in F–ROM Using the Series 15–B 19. . . . . . . . . .
2.3.4 P–CODE Program 23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.5 F–ROM 25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 COMPILE PARAMETER 27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 ERROR CODE LIST 36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
(When Compiled with a Personal Computer) 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
(When the P–CODE Program has been Compiled with the System P or a Personal Computer) 14. . . . .
3. EXECUTION MACRO 39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 INTERFACE WITH USER PROGRAM AND
EXECUTION MACRO IN P–CODE PROGRAM 39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 Call Code and Program No. 39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.2 Variables 43. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.3 Argument Designation 43. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 LIMITATION FOR EXECUTION MACRO 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.1 Argument Specification 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.2 Macro call 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.3 Variable 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.4 Custom Macro Commands 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.5 NC Commands Which Cannot be Used in Automatic Operation 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.6 Modal Call from Execution Macro 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.7 Calling a P–CODE Program from an Execution Macro Using the G, M, S, T, or B User Code 45. . . . . .
3.2.8 Calling a User Program Using an Execution Macro 45. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.9 Specifying of the G Code for Macro Calls of P–CODE Programs 45. . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.10 Calling a Macro Using a T Code 46. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.11 Macro and Subprogram Multiplexity in Execution Macro 47. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 DISPLAYING AND SETTING VARIABLES 48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.1 User Program Common Variables (#100–#199, #500–#999) 48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.2 P–CODE Program Common Variable (#100–#199, #500–#999) 48. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.3 P–CODE Program Local Variable (#1–#33) 48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.4 Variable Name Setting (SETVN) 48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 CAUTIONS 49. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4. CONVERSATIONAL MACRO FUNCTION 50. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1 OVER VIEW 50. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 CONVERSATIONAL MACRO FUNCTION 52. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 AUXILIARY MACRO FUNCTION 54. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4 COORDINATE SYSTEM SCREEN 56. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4.1 Character Coordinate System 56. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
i
Table of contents
4.4.2 Graphic Coordinate System 57. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B–62073E–2/03
4.5 VARIABLE, FUNCTION AND CONTROL CODE 58. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.1 System Variable 61. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.2 P–CODE Program Exclusive Local Variables 61. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.3 Conversational Macro P–CODE Common Variables 61. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.4 UI and UO Signal Separation for User and P–CODE Programs 62. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.5 Conversational Macro Special Variables (#30000–) 63. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.6 Expanded Conversational Macro Exclusive Variable (#40000 –) 64. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.7 Reference and Writing System Common Variables 65. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.8 Execution Control Variable 65. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.9 Key Input Control Variable 66. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.10 Character String Registered Program Control Variable #8509 68. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.11 Arrangement Type Processing of Conversational Macro Exclusive Variable 69. . . . . . . . . . . . . . . . . . . .
4.5.12 Reference of Arrangement of Conversational Macro Exclusive Variables 70. . . . . . . . . . . . . . . . . . . . . .
4.5.13 Refer to and Read CNC Program with Conversation Macro 71. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.14 Reading of Cutting Time and Cutting Distance by Conver–Sational Macro, and Preset Functions 79. . .
4.5.15 PMC Axis Control by Conversational Macro 79. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.16 Torque Limit Override Control 82. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.17 A/D Converter Data Reading by Conversational Macro 84. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.18 Conversational Macro Variable Window Function 86. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.19 Reading Relative Coordinates by Conversational Macro, and Preset 96. . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.20 Address Function 97. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.21 Screen Display Control Codes 98. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.22 Execution Control Code 105. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.23 RS–232–C Control by Conversational Macro 106. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.24 File Control 115. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.25 Functions of PMC Address 121. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.26 PMC Address Control Code (G310) 122. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.27 Variable for Reading Remaining Shift Amount 123. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.28 Referring to NC Parameter 124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6 CONVERSATIONAL MACRO DEBUG FUNCTION 125. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6.1 Overview 125. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6.2 Displaying Macro Variables 125. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6.3 Conversational Macro Debugger Function 125. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5. PARAMETER 128. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
APPENDIX
A. Macro Program Example 131. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1 DESCRIPTION OF PROGRAMS 132. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2 DESCRIPTION OF MACRO VARIABLES 133. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.3 SOURCE PROGRAM 134. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.4 FLOW CHART 139. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.5 PROGRAM EXPLANATION 143. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.6 PROGRAM DESCRIPTION 146. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.7 LIST OF KANJI AND HIRAGANA CODES 151. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.8 MACRO EXECUTOR FUNCTIONS 159. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii

PROGRAMMING

B–62073E–2/03
1
GENERAL

1.GENERAL
1.1

OUTLINE

NC programs include those which are prepared by custom macro and very seldom altered and those which may differ from one another according to relevant machining such as part programs. This function is that which converts the created custom macro program to execu–
at the machine tool builder and executes it. Further, the conversational macro can also be executed independently in parallel with a normal NC program by means of converting the conversational macro program to execution format (P–CODE program).
Macro compiler basic outline diagram
Part program strage
User program Execution macro
(Memory operation execution level)
CRT/MDI
M/T/G code call
Software key call
tion format (P–CODE program)
executer
Conversational macro
executer
Parameter 8537 Parameter 8536
(when switching on power)
Control variable #8600 Control variable #8500
Startup by system variable
Program number change
Program number change
Program number change
Auxiliary macro
executer
Startup by system variable
3
1. GENERAL
Series 15B

B–62073E–2/03
The words used in the explanation are defined as follows. “P–CODE program” –––––
Execution type macroprogram prepared by machine tool builders, being compiled and registered to ROM.
“Execution macro” –––
Program to operate machine in P–CODE program.
“Conversational macro” –––
Program operated screen in P–CODE program.
“User program” –––––
Program prepared by end–user for program edit memory.
This manual describes the following products.
Model name Abbreviation
FANUC Series 15–TB 15–TB FANUC Series 15–MB 15–MB
4
B–62073E–2/03

1.GENERAL
1.2

FEATURES

(1) Since the custom macro is converted into an execution format and
registered, the execution speed is high. This will shorten the machining time and improve the machining accuracy.
(2) The registration to the ROM eliminates prevents custom macro
damage through misoperation. This will improve the reliability.
(3) Since the converted program into execution format is not indicated
on the program display, the machine tool builder’s knowhow can be protected.
(4) Since the execution format program is registered in the ROM, the
program edit memory can effectively be used.
(5 ) The user can call the execution format program (P–CODE program)
with an easy call procedure without being conscious of the registered program.
(6) Using the conversational function and conversational macro,
execution can be performed.
(7) There is an auxiliary macro for executing regardless of the selected
mode and screen.
(8) Compiling the NC program, and ROM output can be performed by
the Series 15 itself.
(9) When compiled in Series 15, without writing the execution format
program to ROM, it can be started up as it is and execution/debug can be performed.
5
2. MACRO COMPILER

MACRO COMPILER

2

B–62073E–2/03
2.1

OUTLINE

A custom macro program is converted to executable form (hereafter called a P–CODE programs), then registered in flash ROM (hereafter called F–ROM). The registered P–CODE program can be called from the user programs and executed by using the G, M or T code (execution Macro) or by setting the program number in the associated parameter (conversational macro execution).
Custom macro programs
O9000 ; #1=#2+#5 ;
: :
M99 ;
Macro compiler (FANUC System P)
(Personal computer) (FANUC Series 15–B)
Compile parameters
8500=10000001 8501=00000001
: : :
8550=50
Set parametersRegister programs
Compile
P–CODE programs and executer
Write to ROM
F–ROM
Note
The executer executes the P–CODE program generated by compiling a custom macro program with the macro compiler.
6
B–62073E–2/03

2.MACRO COMPILER
2.2
FLOW FOR CREATING, REGISTERING AND SAVING PROGRAMS
In Series 15–B, custom macro and P–CODE programs are created, registered and saved as follows.
Series 15–B
F–ROM
P–CODE program
(2) (3)
D–RAM
P–CODE program
(1)
T ape
Custom macro
program
(4) (5)
(6)
System P
Memory card P–CODE file
ROM cassette
P–CODE
program
(7) or (8)
PMC–
writer
(7)
(9)
(8)
Personal
computer
(7)
Custom macro program
(8) or (9)
No. Process Performed by
(1) Compile Series 15–B macro compiler (2) ROM write Series 15–B macro compiler (3) Activate P–CODE program CNC (4) Load Boot system (5) Save Boot system (6) Load Boot system (7) Compile System P macro compiler (8) Compile Personal computer macro compiler (9) Compile Personal computer macro compiler
7
2. MACRO COMPILER

B–62073E–2/03
2.3
USE OF MACRO COMPILER
2.3.1
Registering a P–CODE Program in F–ROM Using a Memory Card (When Compiled with a Personal Computer)
The P–CODE program created by compiling a custom macro program can be registered in F–ROM in any one of the following ways:
(1) When the P–CODE program is compiled with a personal computer,
it can be registered in F–ROM using a memory card.
(2) When the P–CODE program is compiled with a personal computer
or System P, it can be registered in F–ROM using a ROM cassette.
(3) Series 15–B can compile the P–CODE program for registration in
F–ROM.
Note
The P–CODE program resident in F–ROM can be saved onto a memory card via the boot system and copied to another F–ROM unit.
This method uses a memory card to register a P–CODE program compiled with a personal computer in the F–ROM unit of Series 15–B. For how to compile a program, refer to the FAPT Macro Compiler (for Personal Computer) Programming Manual (B–66102E).
Custom macro programs
Personal computer
O9000 ; #1=#2+#5 ;
: :
M99 ;
Compile custom macro programs into the P–CODE program.
Memory card
Boot system
Register
F–ROM
Save
Fig.2.3.1 (a) P–CODE Program Registration Using a Memory Card
8
B–62073E–2/03

2.MACRO COMPILER
(1) Procedure for registering a P–CODE program in a memory card to
F–ROM
1) Insert the memory card in the memory card interface of the CNC unit.
PMC PSU
Series 15–B
Memory card
Fig.2.3.1 (b) Mounting of a Memory Card
Note
The PMC slot is used as the memory card interface. The memory card can be inserted or removed while the power is turned on. When the boot system is active, make sure that the main menu [see Fig. 2.3.1(c)] is displayed on the screen before inserting or removing the memory card. Otherwise, proper access is not made, and the contents of the memory card files may be destroyed.
2) Turn on the power of the CNC unit while holding down the page–up and page–down keys. The boot system is activated, and the following screen appears.
SYSTEM MONITOR
1. SYSTEM DATA LOADING
2. SYSTEM DATA CHECK
3. SYSTEM DATA SAVE
4. FILE DATA BACKUP
5. END
*** MESSAGE *** SELECT MODE AND HIT INPUT KEY
Fig.2.3.1 (c) Boot System Main Menu
9
2. MACRO COMPILER

B–62073E–2/03
3) Select ”2. SYSTEM DATA CHECK” using the cursor keys and press the input key. The contents of F–ROM are retrieved, and the following information is displayed on the screen:
SYSTEM DATA CHECK FILE DIRECTORY
1. OPTIONA3 ( 2)
2. HELP MSG ( 2)
3. DG SERVO ( 1)
4. NC BASIC (10)
5. PCD 256A ( 2)
6. PMC–NA0B ( 1)
7. MCR–CMPA ( 2) END
*** MESSAGE *** SELECT FILE AND HIT INPUT KEY
Fig.2.3.1 (d) DATA CHECK DIRECTORY Screen
Check this screen to see if any P–CODE programs are registered. If a P–CODE program is already registered, its file name is displayed (see the table below).
 2.3.1 P–CODE File Names)
File name
PCD 256A For systems without a sub–CPU (256K bytes) PCD 512A For systems without a sub–CPU (512K bytes) PCD 256M For systems with a sub–CPU (256K bytes) PCD 512M For systems with a sub–CPU (512K bytes)
Description
4) If a P–CODE file is already registered, delete it. To delete a P–CODE file, select it with the cursor, then press the ”delete” key . When no P–CODE file is registered, proceed to step 7.
5) The message “DELETE OK?” appears. Make sure that the selected file is a P–CODE file, then press the input key. If the wrong file has been selected, press the cancel key. The DATA CHECK DIRECTORY screen [Fig. 2.3.1(d)] is then displayed again.
Note
When an attempt is made to delete a system file, such as a CNC program or the macro compiler, the message ”PROTECT FILE” appears on the screen and the attempt is rejected. However, the system deletes user files, such as the PMC ladder, without asking for confirmation. Once deletion has started, the process cannot be halted. If no backup file exists on a memory card or another storage medium, the contents of the file cannot be restored in any way. To avoid such inadvertent deletion of files, make sure that the correct file has been selected before deleting it. Also, back up user files at appropriate intervals.
10
B–62073E–2/03

2.MACRO COMPILER
6) When the file has been successfully deleted, the message “DELETE COMPLETED” appears. Press the input key. The DA TA CHECK DIRECTORY screen [Fig. 2.3.1(d)] 1 is then displayed again. Confirm that the P–CODE file is no longer listed.
7) Select ”END” and press the input key. The main menu [Fig.
2.3.1(c)] is then displayed again.
8) Select “1. SYSTEM DATA LOADING” using the cursor keys, then press the input key . The directories in the memory card are listed on the screen.
SYSTEM DATA LOADING FILE DIRECTORY
1. LADDER1. ROM
2. LADDER2. ROM
3. TEST. DAT
4. MACRO. ROM END
*** MESSAGE *** SELECT FILE AND HIT INPUT KEY
Fig.2.3.1 (e) DATA LOADING DIRECTORY SCREEN
Note
If a ROM cassette error occurs, check the title. When the boot system has been activated by holding down the page–up and page–down keys, the title should read:
SYSTEM DATA LOADING. If this title is not displayed, turn off the system power once, then turn it on again.
Title
For the functions of the boot system, see 2.3.5, (1) Methods of starting up the boot system and the corresponding main menu functions.
9) Select the P–CODE file using the cursor keys, then press the input key.
10)The message ”OK? INPUT/CANCEL” appears. To register the selected program, press the input key . T o not register the selected file cancel, press the ”cancel” key. The DATA LOADING DIRECTOR Y screen [see Fig. 2.3.1 (e)] is then displayed again.
11
2. MACRO COMPILER

B–62073E–2/03
Note
The boot system registers any file having the acceptable format. Once registration has started, it cannot be halted. If no backup file exists on a memory card or another storage medium, the previously saved data of the file cannot be restored in any way. To avoid such inadvertent registration of files, make sure that the correct file has been selected before registering it. Also, back up files at appropriate intervals.
11)When the file has been successfully registered, the message ”PROGRAM COMPLETED” appears. Press the input key . The DATA LOADING DIRECTORY screen [see Fig. 2.3.1 (e)] is then displayed again.
12)Select “END” and press the input key. The main menu [Fig. 2.3.1 (c)] is then displayed again.
13)Select “2. SYSTEM DATA CHECK” to retrieve the contents of F–ROM. After confirming that the P–CODE file has been registered, press the input key to return the main menu [Fig. 2.3.1 (c)].
14)Select “END” on the main menu and press the input key. The blinking message “LOADING CNC DAT A” appears. The CNC starts up about ten seconds later.
15)Make sure that the registered P–CODE file operates normally.
16)Remove the memory card from the memory card interface. The card can be removed even when the CNC power is on.
(2) Procedure for registering a P–CODE program in F–ROM to a
memory card
1) Insert the memory card in the memory card interface of the CNC unit to activate the boot system. See steps 1 and 2 of 2.3.1 (1), Procedure for registering a P–CODE program in a memory card to F–ROM.
2) Select “3. SYSTEM DATA SAVE” using the cursor keys, then press the input key. The contents of F–ROM are retrieved, and the following information is displayed on the screen:
SYSTEM DATA SAVE FILE DIRECTORY
1. OPTIONA1 ( 2)
2. HELP MSG ( 2)
3. DGTL SRV ( 1)
4. NC BASIC (10)
5. PCD 256A ( 2)
6. PMC–NA0B ( 1)
7. MCR–CMPA ( 2) END
*** MESSAGE *** SELECT FILE AND HIT INPUT KEY
Fig.2.3.1 (f) DATA SAVE DIRECTORY SCREEN
12
B–62073E–2/03

2.MACRO COMPILER
3) Select one of the P–CODE files listed below using the cursor, then press the input key.
File name Description
PCD 256A For systems without a sub–CPU (256K bytes) PCD 512A For systems without a sub–CPU (512K bytes) PCD 256M For systems with a sub–CPU (256K bytes) PCD 512M For systems with a sub–CPU (512K bytes)
Note
System files, such as the CNC program or the micro compiler, cannot be saved (if you attempt to save one of these files, the message ”PROTECT FILE” is displayed).
4) The message “INPUT FILE NAME” appears. Input the file name using the MDI key . A file must be named according to MS–DOS file naming rules; that is, a file name consisting of up to eight characters followed by a three–character or shorter extension. During file name input:
The cursor can be moved using the cursor ( and ) keys.The cancel key functions as the backspace key.Pressing the reset key displays the DATA SAVE
DIRECTORY screen [Fig. 2.3.1 (f)] again.
Characters are input in the overwrite mode.
5) After inputting the file name, press the input key to save the file.
6) If the save operation terminates normally, the message “SAVE COMPLETED” appears. Press the input key . The DATA SAVE DIRECTORY screen [Fig. 2.3.1 (f)] is then displayed again.
7) Select “END” and press the input key . The main menu [Fig. 2.3.1 (c)] is then displayed again.
(3) Specifications and limitations of the memory card
(a) Specifications
The boot system of Series 15–B permits the use of commercially available memory cards conforming to the following specifications:
Standards : JEIDA Ver.4 or later Capacity : 512K bytes or more
(b) P–CODE file size
When a P–CODE file is saved onto a memory card, its size is as follows:
File capacity Size on memory card
256K#bytes 262272#bytes (256K#bytes + 128#bytes) 512K#bytes 524416#bytes (256K#bytes + 128#bytes)
Note
A P–CODE file cannot be divided and saved onto two or more memory cards. Prepare a memory card having enough capacity to save the whole file. Two or more P–CODE files can be saved onto the same card.
13
2. MACRO COMPILER

B–62073E–2/03
(c) Limitations
The boot system is capable of handling only root directory files. Subdirectory files are not accessible. A void using a memory card with a subdirectory for the boot system.
2.3.2
Registering the P–CODE Program in F–ROM Using a ROM Cassette (When the P–CODE Program has been Compiled with the System P or a Personal Computer)
A P–CODE program compiled with the System P or a personal computer can be registered in F–ROM of Series 15–B by using a ROM cassette. For how to compile and write programs to ROM, refer to F ANUC System P series FAPT Macro Compiler Operator’s Manual (B–66032E) and FAPT Macro Compiler (for Personal Computer) Programming Manual (B–66102E).
Custom macro programs
O9000 ; #1=#2+#5 ;
: :
M99 ;
System P
or
Personal computer
Writing the P–CODE program into ROM
ROM cassette
Boot system
Register
F–ROM
Fig.2.3.2 (a) Registering the P–CODE Program Using a ROM Cassette
14
B–62073E–2/03

(1) Writing data into a ROM cassette
2.MACRO COMPILER
System P
ROM cassette
or
Printed circuit board for the ROM cassette adapter
PMC writer
Personal computer
RS–232–C
POM cassette adapter
Series 15–B
Fig.2.3.2 (b) Writing Data into a ROM Cassette
The following are required to write data into a ROM cassette:
1) System P or a personal computer
2) RS–232–C cable
3) PMC writer (A13B–0126–B002)
4) Printed circuit board for the ROM cassette adapter (A16B–1212–0182)
5) ROM cassette: A02B–0094–C163 for 1M–bit ROM (256K bytes)/A02B–0094–C164 for 2M–bit ROM (512K bytes)
6) Compiler for System P: COMPILER (A08B–0035–J720 for P–G Mate/A08B–0036–J720 for P–G Mark II)/LIBRARY (A08B–0036–J721 for both P–G Mate and P–G Mark II)
or F APT macro compiler for a personal computer (A08B – 9001 – J540
#EN03) /FAPT macro library (A08B–9001–J640#ZZ03)
7) ROM cassette adapter (A20B–2000–0760)
15
2. MACRO COMPILER

B–62073E–2/03
Note
Items 1) to 5) were required when compiling programs for Series 15–A using System P or a personal computer. Items
6) and 7) have been required for Series 15–B additionally.
(2) Procedure for registering a P–CODE program in a ROM cassette to
F–ROM
1) Connect the ROM cassette into which the program has been written using System P or a personal computer to the ROM cassette adapter (A20B–2000–0760).
ROM cassette
Fig.2.3.2 (c) Connection of the ROM Cassette to
the ROM Cassette Adapter
ROM cassette adapter
(A20B–2000–0760)
2) T urn off the power of the CNC unit, then insert the ROM cassette adapter into the mini slot of the CNC unit. The mini slot is on the PSU and is protected with a cover when not in use.
PMC PSU
Series 15–B
ROM cassette
ROM cassette adapter
Fig.2.3.2 (d) Connection of the ROM Cassette Adapter to the CNC Unit
16
B–62073E–2/03

2.MACRO COMPILER
Note
Be sure to turn off the power of the CNC unit before inserting or removing the adapter. Inserting or removing the adapter while the CNC power is on can not only damage the CNC unit and the ROM cassette but can also destroy battery–retained data, such as NC programs and parameters.
3) T urn on the power of the CNC unit while holding down the cursor ( and ) keys. The boot system is activated, and the following screen appears:
SYSTEM MONITOR
1. SYSTEM DATA LOADING
2. SYSTEM DATA CHECK
3. SYSTEM DATA SAVE
4. FILE DATA BACKUP
5. END
*** MESSAGE *** SELECT MODE AND HIT INPUT KEY
4) Check the contents of F–ROM. If a P–CODE program is already registered, delete it. For the deletion procedure, see 2.3.1 (1) Procedure for registering a P–CODE program in a memory card to F–ROM, steps 3 to 7.
5) Select ”SYSTEM DATA LOADING” using the cursor keys, then press the input key. The following contents of the ROM cassette are read and displayed on the screen:
SYSTEM DATA LOADING (CASSETTE)
P–CODE 256K (WITHOUT SUB–CPU)
Title
ROM type
*** MESSAGE *** SELECT FILE AND HIT INPUT KEY
Fig.2.3.2 (e) DATA LOADING DIRECTORY SCREEN (for ROM Cassette)
17
2. MACRO COMPILER

B–62073E–2/03
The type of mounted ROM cassette (P–CODE file) is displayed (see the table below). If the displayed ROM cassette type does not agree with that of the connected ROM cassette, check the ROM cassette.
ROM cassette/P–CODE file Display
1M–bit ROM without a sub–CPU P–CODE 256K (without sub–CPU) 2M–bit ROM without a sub–CPU P–CODE 512K (without sub–CPU) 1M–bit ROM with a sub–CPU P–CODE 256K (with sub–CPU) 2M–bit ROM with a sub–CPU P–CODE 512K (with sub–CPU)
Note
If an alarm related to the memory card occurs or when displaying memory card directories, confirm the title. When the CNC unit has been activated with the cursor ( and ) keys pressed down, the title should read:
SYSTEM DATA LOADING (CASSETTE)
If this title is not displayed, activate the CNC unit again.
6) The message “OK? INPUT/CANCEL” appears. To register the P–CODE file, press the input key. To not resister the P–CODE file, press the “cancel” key. Then the main menu [Fig. 2.3.1 (c)] is then displayed again.
7) When the file has been successfully registered, the message “PROGRAM COMPLETED” appears. Press the input key . The main menu [Fig. 2.3.1 (c)] is then displayed again.
8) Select “2. SYSTEM DATA CHECK” to retrieve the contents of F–ROM. After confirming that the P–CODE file has been registered in F–ROM. Press the input key to return the main menu [Fig. 2.3.1 (c)].
9) Turn off the power of the CNC unit, and remove the ROM cassette adapter from the mini slot. After removing the adapter, place the cover over the slot to protect it.
Note
Avoid using the CNC unit while the ROM cassette remains in its mini slot. If the CNC unit is used without removing the ROM cassette, the data stored in the ROM cassette takes precedence, disabling the use of the micro compiler and P–CODE program resident in F–ROM. For more information, see 2.3.4 (3), Priority of the micro compiler and P–CODE program.
10)Make sure that the registered P–CODE program operates normally.
18
B–62073E–2/03

2.MACRO COMPILER
2.3.3
Compiling and Registering Custom Macro Programs in F–ROM Using the Series 15–B
Custom macro programs resident in the part–program edit memory can be compiled and registered in F–ROM using the Series 15–B.
Custom macro programs
O9000 ; #1=#2+#5 ;
: :
M99 ;
Part–program edit memory
Series 15–B
Compile
Register
F–ROM
Fig.2.3.3 (a) Compilation and Registration Using the Series 15–B
(1) Procedure for operating the micro compiler
1) In part–program edit memory register all the custom macro programs to be compiled into the P–CODE program. Be sure to compile a program into one P–CODE file at a time. Compiling a custom macro program into several P–CODE files and then combining them into one file is not allowed. The compiler only checks programs for basic syntax error.
2) Set the compile parameters. Specify parameters necessary for program compilation, including those related to the conditions for P–CODE program generation and the correspondence between call codes and program numbers. The alarm message “POWER MUST BE OFF” may be displayed on the screen while changing the compile parameters; ignore the message and proceed with the parameter setting.
Note
For details about the compile parameters, see 2.4, Compile Parameters.
19
2. MACRO COMPILER

B–62073E–2/03
3) When all the parameters have been set, turn off the power of the CNC.
4) T urn on the power of the CNC unit while holding down MDI keys 4 and 6. The utility is activated, and the following screen appears:
FANUC SERIES 15
1. MACRO COMPILER
2. TROUBLE GUIDANCE
3. END
?
Fig.2.3.3 (b) Utility Screen
5) Select “1. MACRO COMPILER” from the menu by typing ”1”, then press the input key . The macro compiler is activated, and the menu screen appears.
FANUC SERIES 15 NC PROGRAM COMPILER
1. COMPILE
2. COMPILE AND ROM WRITE
3. COMPILE AND VERIFY ROM
4. END ?
Fig.2.3.3 (c) Menu Screen
6) Select the desired operation from the menu. 1 COMPILE: Compile custom macro programs. The
P–CODE file is not registered in F–ROM.
2 COMPILE AND ROM WRITE: Compile custom macro
programs and register the P–CODE file in F–ROM.
3 COMPILE AND VERIFY ROM: Compile custom macro
programs and verify the compiled file with the P–CODE file in F–ROM.
4 END: T erminate the compiler and return to the utility screen
[Fig. 2.3.3 (b)].
20
B–62073E–2/03

2.MACRO COMPILER
Note
Since the compiled P–CODE file is also written on RAM of the CNC unit, the P–CODE program can be executed after the complier is terminated, irrespective of whether it is registered in F–ROM. While the selected operation is being performed, its number is displayed next to the question mark (?). The question mark disappears when the operation is completed.
7) The status of the operation being performed is displayed in the status indication area on the screen.
FANUC SERIES 15 NC PROGRAM COMPILER
1. COMPILE
2. COMPILE AND ROM WRITE
3. COMPILE AND VERIFY ROM
4. END
The following data items are dis­played here depending on the selected operation, one of COMPILE, F–ROM ERASE & BLANK CHECK, F–ROM WRITE, and F–ROM VERIFY.
Status indication area
Fig.2.3.3 (d) Status Indication Area
(1) COMPILE
Compilation can be suspended while it is in progress by pressing the reset key.
COMPILE
PROGRAM NO. 9010 (Note 1) BLOCK NO. 120 (Note 2) P–CODE SIZE 00012EF0 (Note 3) ALARM NO. 0000 (Note 4) DIAGNOSIS 110 (Note 5)
Fig.2.3.3 (e) Status Indication (COMPILE)
(2) F–ROM ERASE & BLANK CHECK
The displayed indication remains unchanged while this operation is being performed. This operation cannot be suspended while it is in progress.
21
2. MACRO COMPILER

F–ROM ERASE & BLANK CHECK
ADDRESS 00000000 (Note 6) ALARM NO. 0000 (Note 4) DIAGNOSIS 140 (Note 5)
Fig.2.3.3 (f) Status Indication (ERASE)
B–62073E–2/03
(3) F–ROM WRITE
Writing of F–ROM can be suspended while it is in progress by pressing the reset key. However, avoid suspending this operation while it is in progress since doing so will shorten the life of the F–ROM unit.
F–ROM WRITE
ADDRESS 00027A00 (Note 6) ALARM NO. 0000 (Note 4) DIAGNOSIS 150 (Note 5)
Fig.2.3.3 (g) Status Indication (WRITE)
(4) F–ROM VERIFY
Verification of F–ROM can be suspended while it is in progress by pressing the reset key suspending this processing does not affect the life of the F–ROM unit.
F–ROM VERIFY
ADDRESS 00027A00 (Note 6) ALARM NO. 0000 (Note 4) DIAGNOSIS 160 (Note 5)
Fig.2.3.3 (h) Status Indication (VERIFY)
22
B–62073E–2/03
O tion
256K#bytes
2.3.4
P–CODE Program

2.MACRO COMPILER
Notes
1 Number of the custom macro program being compiled
(number preceded by an O) 2 Block number assigned by the macro compiler 3 Total size of the compiled P–CODE file 4 Alarm number of the error. If an error occurs, the micro
compiler suspends its operation. For details, see 2.5,
ERROR CODE LIST. 5 This information is displayed for maintenance purposes
only. No special attention is required. 6 Address in F–ROM to which data is being written or for
which verification is being performed
(1) P–CODE file size
The size of a P–CODE file can be either 256K bytes or 512K bytes. Whether the size is 256K bytes on 512K bytes depends on the setting of parameter No.8500 (P512) and whether the option (macro executor user program memory) is used.
#7 #6 #5 #4 #3 #2 #1 #0Address
8500 P512
Bit No.
Option : Macro executer user program memory with a
capacity of 512K bytes (A02B–0162–J607)
P512 0 1
p
Used Not used
512K#bytes
Error
Error : If 1 is specified for P512 when the option is not used,
the P–CODE file size selection error (error number
4109) occurs. For details, see 2.3.5 (3), F–ROM errors and corrective action.
(2) P–CODE program size
The maximum size of a P–CODE program to be created depends on the selected P–CODE file size as shown in the table below.
File size
256K#bytes 192K#bytes 128K#bytes 512K#bytes 416K#bytes 384K#bytes (Note)
System without
sub–CPU
System with sub–CPU
Note
When a file size of 512K bytes is selected for a system with
a sub–CPU, a total of 384K bytes is allocated as the
P–CODE program area. Of these 384K bytes, 128K bytes
are used for the execution macro.
(3) Priority of the macro compiler and P–CODE program
The priority of the macro compiler and P–CODE program is as follows.
23
2. MACRO COMPILER
1. P–CODE program in resident ROM cassette
2. P–CODE program in resident F–ROM
3. Macro compiler
}

Priority changes depending on how the CNC unit is activated.
B–62073E–2/03
P–CODE program
in ROM cassette
Resident No effect on priority no ope The P–CODE program in the ROM cas-
Not resident Resident Resident no ope The P–CODE program in F–ROM is acti-
no ope : Turn on the power of the CNC unit. “4”, “6” : Hold down MDI keys 4 and 6 while turning on the power of the CNC unit.)
P–CODE program
in F–ROM
Not resident Resident no ope The P–CODE program in not activated.
Macro
compile
Not resident no ope The P–CODE program in F–ROM is acti-
Not resident no ope The P–CODE program in not activated.
How to
activate CNC
sette is activated.
“4”, “6” The compiler is not activated.
vated.
“4”, “6” The compiler is activated.
vated.
“4”, “6” The compiler is not activated.
“4”, “6” The compiler is activated.
“4”, “6” The compiler is not activated.
Result
24
B–62073E–2/03
Main menu item

2.MACRO COMPILER
2.3.5
F–ROM
SYSTEM DATA LOADING Load files from memory card to F–ROM. Load files from ROM cassette to F–ROM. SYSTEM DATA CHECK List files registered in F–ROM and check ROM data. SYSTEM DATA SAVE Save files registered in F–ROM to memory card. FILE DATA BACKUP Save battery–retained data (NC programs, parameters, etc.) to memory card and
(1) Methods of starting up the boot system and the corresponding main
menu functions The following table lists the main menu items and their functions. (The function of SYSTEM DA TA LOADING changes depending on how the boot system is started up.)
How to start up the boot system
“page up key”. “page down key” ”, “
restore these data.
(2) Files in F–ROM
The following table lists the files shown on the SYSTEM DATA CHECK DIRECTORY screen that are related to the micro compiler executer.
File name Type Description
MCR–CMPA S Micro compiler for systems without a sub–CPU MCR–CMPM S Micro compiler for systems with a sub–CPU PCD 256A U P–CODE file for systems without a sub–CPU
PCD 512A U P–CODE file for systems without a sub–CPU
PCD 256M U P–CODE file for systems with a sub–CPU
PCD 512M U P–CODE file for systems with a sub–CPU
(256K bytes)
(512K bytes)
(256K bytes)
(512K bytes)
File type
S : System files provided by FANUC.
Note) These files are used to compile custom macro programs with
the Series 15–B.
The following operations cannot be performed for these files:
Saving files to memory cardDeleting files from F–ROM
U : User–defined data files. These files are accessible in every
operation.
25
2. MACRO COMPILER

(3) F–ROM errors and corrective action
The following table lists F–ROM errors caused by erroneous operations and the corrective actions to be taken for then.
Error Cause Corrective action
Error code 4109 is output. Parameter No.8500 is set to 512K
The compiler is not activated when the CNC is powered up with MDI keys 4 and 6 pressed down.
The newly registered P–CODE pro­gram is not activated. The old one is activated instead.
The P–CODE program does not oper­ate at all.
The meassage ”USER FILE (P–CODE): ILLEGAL KIND FILE” is displayed when the CNC power is turned on.
bytes when the option (user program memory with a capacity of 512K bytes) is not used.
The ROM cassette is still in the slot. Turn off the CNC power and remove
The compiler is not registered in F–ROM.
The wrong compiler is registered. The compiler for systems without a sub– CPU is inadvertently registered for systems with a sub–CPU, or vice versa.
The ROM cassette is still in the slot. Turn off the CNC power and remove
”COMPILE AND VERIFY ROM” was selected instead of ”COMPILE AND ROM WRITE” when compiling files
The P–CODE program is not regis­tered in F–ROM.
The compiler was terminated before compilation was completed.
Parameters are not set. Set the parameters correctly , then re–
The P–CODE program for the wrong system is registered. The program for systems without a sub–CPU is inad­vertently registered for systems with a sub–CPU, or vice versa.
B–62073E–2/03
Check and correct the parameter.
the cassette. Check the SYSTEM DATA CHECK
DIRECTORY screen. If the compiler is not listed there, register it.
Check the SYSTEM DATA CHECK DIRECTORY screen. If the wrong compiler is listed there, register the correct one.
the cassette. Select ”COMPILE AND ROM WRITE”
and execute it.
Check the SYSTEM DATA CHECK DIRECTORY screen. If the P–CODE program is not listed there, register it.
Re–execute compilation.
execute compilation. Check the SYSTEM DATA CHECK
DIRECTORY screen. Delete the regis­tered P–CODE program, then register the correct one or compile the pro­grams.
26
B–62073E–2/03

2.MACRO COMPILER
2.4

COMPILE PARAMETER

#7 #6 #5 #4 #3 #2 #1 #0Address
Bit No.
8500 0 P512 VERY
Parameter input
Data format : bit type
VERY When “COMPILE AND ROM WRITE” is executed, F–ROM is
0 : not verified 1 : verified
P512 The size of the P–CODE program to be output to F–ROM is
0 : 256K bytes (the same size as that used in the 1M bit ROM
cassette)
1 : 512K bytes (the same size as that used in the 2M bit ROM
cassette) #4 Always specify a “0.” #7 Always specify a “1.”
#7 #6 #5 #4 #3 #2 #1 #0Address
8501 SEQN
Parameter input
Data format : bit type SEQN Outputs sequence number to P–CODE program
0 : does not 1 : does
#7 #6 #5 #4 #3 #2 #1 #0Address
8502 NPEF TMCC EUI0 DMV2 DBG SBK VAR DIR
Parameter input
Data format : bit type
DIR Displays directory of P–CODE program.
0 : does not 1 : does
VAR In case of debug mode, displays macro variable for macro
compiler
0 : does not 1 : does
SBK Single block stop when conversational macro is started up in
debugging function of conversational macro
0 : does not 1 : does
DBG Execution of macro compiler in debug mode
0 : does not perform 1 : performs
Note) DIR, VAR, SBK are enabled only when debugging mode (DBG
= 1). Auxiliary macro cannot be executed during debugging mode
DMV2 When not in the debug mode, micro compiler variables are
0 : not displayed
27
Loading...
+ 136 hidden pages