Contents Summary of SERIES 15-150 MODEL B Programming manual
Page 1GE Fanuc Automation Computer Numerical Control Products Series 15 / 150 – Model B Macro Compiler/Executer Programming Manual GFZ-62073E-2/03 September 1995
Page 2GFL-001 Warnings, Cautions, and Notes as Used in this Publication Warning 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 situ
Page 6B–62073E–2/03 1.GENERAL 1 GENERAL 1.1 NC programs include those which are prepared by custom macro and very seldom altered and those which may differ from one another according to OUTLINE relevant machining such as part programs. This function is that which converts the created custom ma
Page 71. GENERAL 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. “Conversation
Page 8B–62073E–2/03 1.GENERAL 1.2 (1) Since the custom macro is converted into an execution format and FEATURES 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 dam
Page 92. MACRO COMPILER B–62073E–2/03 2 MACRO COMPILER 2.1 A custom macro program is converted to executable form (hereafter called a P–CODE programs), then registered in flash ROM (hereafter OUTLINE called F–ROM). The registered P–CODE program can be called from the user programs and executed
Page 10B–62073E–2/03 2.MACRO COMPILER 2.2 In Series 15–B, custom macro and P–CODE programs are created, registered and saved as follows. FLOW FOR CREATING, Series 15–B REGISTERING AND F–ROM Memory card SAVING PROGRAMS (4) (5) (9) P–CODE program P–CODE file (2) (3) (6) ROM cassette D–RAM P–CODE
Page 112. MACRO COMPILER B–62073E–2/03 2.3 The P–CODE program created by compiling a custom macro program can be registered in F–ROM in any one of the following ways: USE OF MACRO (1) When the P–CODE program is compiled with a personal computer, COMPILER it can be registered in F–ROM using a me
Page 12B–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
Page 132. 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 (
Page 14B–62073E–2/03 2.MACRO COMPILER 6) When the file has been successfully deleted, the message “DELETE COMPLETED” appears. Press the input key. The DATA 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 pre
Page 152. 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 w
Page 16B–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 (256
Page 172. MACRO COMPILER B–62073E–2/03 (c) Limitations The boot system is capable of handling only root directory files. Subdirectory files are not accessible. Avoid using a memory card with a subdirectory for the boot system. 2.3.2 A P–CODE program compiled with the System P or a personal comp
Page 18B–62073E–2/03 2.MACRO COMPILER (1) Writing data into a ROM cassette Personal System P computer or RS–232–C Printed circuit board for the ROM cassette adapter ROM cassette POM cassette adapter PMC writer Series 15–B Fig.2.3.2 (b) Writing Data into a ROM Cassette The following are required
Page 192. 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) C
Page 20B–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 a
Page 212. 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–
Page 22B–62073E–2/03 2.MACRO COMPILER 2.3.3 Custom macro programs resident in the part–program edit memory can Compiling and be compiled and registered in F–ROM using the Series 15–B. Registering Custom Custom macro programs Macro Programs in O9000 ; F–ROM Using the #1=#2+#5 ; Series 15–B : : M
Page 232. MACRO COMPILER B–62073E–2/03 3) When all the parameters have been set, turn off the power of the CNC. 4) Turn 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 GUID
Page 24B–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 i
Page 252. MACRO COMPILER B–62073E–2/03 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) (3) F–ROM WRITE Writing of F–ROM can be suspended while it is in progress by pressing the reset key. However, avoid s
Page 26B–62073E–2/03 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 opera
Page 272. MACRO COMPILER B–62073E–2/03 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. P–CODE program P–CODE program Macro How to Result in ROM cassette in F–ROM compile activate CNC
Page 28B–62073E–2/03 2.MACRO COMPILER 2.3.5 F–ROM (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 DATA LOADING changes depending on how the boot system is started up.)
Page 292. MACRO COMPILER B–62073E–2/03 (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 Check an
Page 30B–62073E–2/03 2.MACRO COMPILER 2.4 Bit No. COMPILE Address #7 #6 #5 #4 #3 #2 #1 #0 8500 0 P512 VERY PARAMETER 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
Page 312. MACRO COMPILER B–62073E–2/03 1 : displayed EUI0 For the P–CODE program (execution, conversational, and auxiliary macros), the UI and UO signals range from 0 : UI00/UO00 to UI15/UO15 1 : EUI00/EUO00 to EUI15/EUO15 TMCC Macro calls by T codes are 0 : invalid 1 : valid NPEF In RS–232–C c
Page 32B–62073E–2/03 2.MACRO COMPILER 0 : Does not suspend data sending or receiving. 1 : Cancels the wait state for data sending or receiving. STDM On the conversational macro screen, status display (mode and status display) is: 0 : Not masked. 1 : Masked. PMC-NB If the system features PMC–NB,
Page 332. MACRO COMPILER B–62073E–2/03 0 : performs 1 : does not perform BCAL Sub program call by B code (O9028/#146) 0 : disabled 1 : enabled CUTL Cutting distance 0 : does not integrate 1 : integrates EXT1 Reference/writing of CNC program, reading/ preset of cutting distance function, and cir
Page 34B–62073E–2/03 2.MACRO COMPILER Address 8513 Custom macro G–CODE for calling O9010 8514 Custom macro G–CODE for calling O9011 8522 Custom macro G–CODE for calling O9019 Parameter input Data format : word type Data range : 1 to 255 (except for 65 to 67) Specifies G–CODE to perform macro ca
Page 352. MACRO COMPILER B–62073E–2/03 Sets the program number of the auxiliary macro to be executed at power–on. This value is set in conversational macro execution control variable 2 (#8600). Address 8538 Calls by range specified M–CODE, lower limit M–CODE 8539 Calls by range specified M–CODE
Page 36B–62073E–2/03 2.MACRO COMPILER Set the key code for executing the conversational body macro up to trigger point when in conversational macro debug mode. Refer to (Note) for the correspondence between the key note to be set and the key. Note) Setting the MDI/CRT key for the conversational
Page 372. MACRO COMPILER B–62073E–2/03 Address 8547 Conversational macro Trigger program number Parameter input Data format : long type Data range : 0 to 9999 Set the trigger program number of the conversational macro when in conversational macro debugging mode. Address 8548 Conversational macr
Page 38B–62073E–2/03 2.MACRO COMPILER Address 8552 First program number among the programs to be called Parameter input Data range : Word Valid data range : 0 and 9000 to 9999 Sets the first program number among the programs to be called by the G codes added for calling P–CODE macros. 35
Page 392. MACRO COMPILER B–62073E–2/03 2.5 ÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔ The meanings of error codes which should occur in compilation are given below. ÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔ ERROR CODE LIST ÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔ Table 2.5 Error code list (1/3) Error Meaning code 0201
Page 40B–62073E–2/03 2.MACRO COMPILER ÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔ ÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔ Table 2.5 Error code list (2/3) Error Meaning code 1409 m of ”DO m” or ”END m” exceeds 1 digit. 140A m of ”DO m” or ”END m” is another than 1–3. 140B A code other than a numeric code is fou
Page 412. MACRO COMPILER B–62073E–2/03 ÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔ ÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔ Table 2.5 Error code list (3/3) Error Meaning code 3001 There is no receive data. PC–writer is busy. 3002 Number of characters in transmitted data does not match. 3003 Parity error occurre
Page 42B–62073E–2/03 3. EXECUTION MACRO 3 EXECUTION MACRO 3.1 Only a registered P–CODE program cannot be executed. It is called from the user program by G, M, T code, or specified code by parameter setting, INTERFACE WITH and executed. In case of macro call, argument designation is possible, an
Page 433. EXECUTION MACRO B–62073E–2/03 Variable number in Called program which the specified Parameter to be spe- Call code Call mode number code is stored cified M Macro call 9020–9029 Unused No. 8523–8532 Special Subprogram call 9004, 9005 #146, #147 ACL1, ACL2 (No. 8508#0, #1) No. 8544, 854
Page 44B–62073E–2/03 3. EXECUTION MACRO G100 ; Modal call state ON X10.; Calls O9010 after move. X10.; Calls O9010 after move. G90; Does not call O9010. Y20.; Calls O9010 after move. G67; Modal call state OFF P–CODE program 09010; Z5.; Z–5.; M99; Notes 1 No P
Page 453. EXECUTION MACRO B–62073E–2/03 Example When parameter No. 8538=50 No. 8539=60 M50–M60 become the M codes to call “09009”. Notes 1 When parameter No. 8538 is 0, this processing cannot be performed. 2 When the value of parameter No. 8538 is specified as greater than the value of 8539, it
Page 46B–62073E–2/03 3. EXECUTION MACRO (10)Macro call by M code (O9020 – O9029) By commanding designated M codes, the P–CODE programs ”O9020 – O9029” can be called by macro. Local variables without argument designation will become . N_ _ M Argument designation>; 3.1.2 Variables (1)
Page 473. EXECUTION MACRO B–62073E–2/03 3.2 Source program for registration custom macro (P–CODE program) is programmed by the Custom macro used for FANUC Series 15. But, there LIMITATION FOR are some limits for execution in Series 15. The P–CODE program custom EXECUTION MACRO macro is describe
Page 48B–62073E–2/03 3. EXECUTION MACRO 3.2.7 Because a P–CODE program is called using a user G, M, S, T, or B code, Calling a P–CODE the following is inhibited: calling of a user G code during a P–CODE call by a user G code, and the calling of a user M code, S code, T code, B code, Program fro
Page 493. EXECUTION MACRO B–62073E–2/03 The specifiable G code range is 1 to 9999, and the specifiable program number range is 9000 to 9999. Up to 40 programs can be called at a time. Example Parameter No.8546 : 10 No.8551 : 1000 No.8552 : 9500 When the parameters are set as shown above, the co
Page 50B–62073E–2/03 3. EXECUTION MACRO Variable Data to be transferred #1–#26 Address data for each variable #27 T code #28 G code #29 G code #30 G code #31 G code #32 G code Example G91G28X123.45678T5678: #24=123.456 #27=5678.0 #28=28.0 #29=91.0 Other variables = < vacant > Note The L specifi
Page 513. EXECUTION MACRO B–62073E–2/03 3.3 DISPLAYING AND SETTING VARIABLES 3.3.1 In the user program, creation and execution of Series 15 custom macro User Program format custom macros can be performed as a standard. Common variables can also be displayed and set as a standard on the common C
Page 52B–62073E–2/03 3. EXECUTION MACRO 3.4 (1) Separate compiler of a program cannot be made. Register the whole CAUTIONS program to the edit memory, and then to the ROM. Max. 400 programs can be registered to the ROM. (2) In one program, limit the sequence number used for branch destination (
Page 534. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4 CONVERSATIONAL MACRO FUNCTION 4.1 The conversational macro function is the function to independently execute the compiled macro program by the P–CODE program compiler OVERVIEW and the normal NC part program operation. This function is exec
Page 54B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION If both the auxiliary and conversational macro functions have been specified, the following operations are performed: 1) Conversational macro screen Conversational and auxiliary macros are alternately executed, in this order. 2) Other than co
Page 554. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.2 The execution of the conversational macro function is processed internally at a lower level than the automatic operation processing. CONVERSATIONAL Therefore, the execution of the conversational macro function is not MACRO FUNCTION influ
Page 56B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION (1) Starting up conversational macro program Conversational macros can be executed by pressing the TALK MACRO soft key or when activated by an auxiliary or execution macro. The program to be started up is the program number of the value of th
Page 574. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.3 The auxiliary macro function is executed at an execution level the same as the conversational macro function. AUXILIARY MACRO The following functions can be executed in this function. FUNCTION Macro command (definition of variable, rep
Page 58B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION The larger the value of N, the longer the delay in displaying the program on the CNC screen. (4) Note In an auxiliary macro program, do not write data into system common variables (custom–macro common variables) frequently. Read common variab
Page 594. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.4 COORDINATE SYSTEM SCREEN 4.4.1 In the conversational macro function the coordinate system using Character Coordinate character display and cursor display is called the character coordinate system. The character coordinate system sets lef
Page 60B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION (2) Mask of Status Display on Conversational Macro Screen The status display (mode and status) on the conversational macro screen can be masked using parameter STDM (No.8507#3). 4.4.2 In conversational macro function, the coordinate system us
Page 614. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5 (1) Variables which can be used in the conversational macro function are VARIABLE, All the Series 15 system variables and the following. FUNCTION AND CONTROL CODE Conver Variable Function R/W sational Auxiliary Execution number macro mac
Page 62B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION Conver Variable sational Auxiliary Execution number Function R/W macro macro macro CNC–program reference/write #8520 Designating a program number R/W f f × #8521 Designating a block number R/W f f × #8522 Designating the number of a variable
Page 634. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 (2) Functions which can be used in the conversational macro functions are all the Series 15 custom macro functions and address functions. (3) Control codes which can be used in the conversational macro functions are the following. Control Me
Page 64B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION Control Meaning of code Function code G340 Rapid traverse command PMC axis G341 Cutting feed command control G344 Dwell command G345 Reference point return command G346 Auxiliary function command G348 Status signal reading command G349 Comman
Page 654. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5.4 The user program and the P–CODE program can use different signals for UI and UO Signal the system variables (UI: #1000 to #1015, #1032, UO: #1110 to #1115, #1132). Separation for User How to set the parameter: and P–CODE Programs When
Page 66B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 4.5.5 Conversational macro special variables can be used with a P–CODE Conversational Macro program. Special Variables An arbitrary number of conversational macro special variables starting with #30000 can be used. (#30000–) To specify the va
Page 674. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5.6 Expanded conversational macro exclusive variables starting from #40000 Expanded can be arbitarily used. This variable can be selected to be floating decimal point format variable the same as normal macro variable, or to be fixed Conver
Page 68B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION (5) The expanded macro exclusive variable is displayed on macro variable display screen (SETTING). Further, input from MDI is possible. (6) Cannot express when paramter EVF=1 is set (fixed decimal point format). 4.5.7 Reference and w
Page 694. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5.9 Key Input Control (1) Command key input variable (#8501) Command key input can be read by #8501. The correspondence Variable between command key input and the value of #8501 is as shown below. If there is no command input, the value of
Page 70B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION When #8502 is 1, “NUM” is displayed to data input line and numerical data input can be performed. The inputted numerical data can be read by numerical data variable #8503. When #8502 is 2, first ”ADRS” is displayed to the data input line,
Page 714. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 #506=54 #507=65 #508=66 #509=67 #510=68 #511= : #531= #8501=8 Caution (1) Until the INPUT key is pressed, the previous value remains for the contents of macro variable from number specified in #8552. The INPUT key is pressed an
Page 72B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 4.5.11 This is the function to control the processing for arrangement type Arrangement Type variables or one group of variable rows. Processing of 1) Clearing arrangement type variables, variable rows (continuous reading of specified data) Co
Page 734. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5.12 Conversational macro exclusive variables (#30000...) can be referred to Reference of by the two or three–dimensional arrangement types. Set a proper value to the following arrangement control variables beforehand and the Arrangement o
Page 74B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 4.5.13 Refer to and Read CNC (1) Summary Recording, deleting and changing of NC part program is possible by Program with the conversation macro function. Control the CNC program with Conversation Macro program number and block number. Count t
Page 754. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 (2) Recording of a new program G370 ; Specify the program number you wish to record and instruct G370 to you record a new program. Example: If you want to record O0002; #8520=2 ; G370 ; IF[#8529 NE 0] GOTO 900 ; Recording end N900 ; Error Co
Page 76B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION Error The following program data is housed from #100 which is specified by housed variable number #8522, if you execure the above described instruction; #100=7 Address “G” #101=90 Number #102=7 Address “G” #103=0 Number #104=24 Address “X” #1
Page 774. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 #8522=100 ; #100=7 ; #101=1 ; #102=24 ; #103=20.5 ; #104=6 ; #105=1000 ; #106=20.7 ; G376 P7 ; IF[#8529 NE 0] GOTO900 ; End of writing N900 ; Error If you execute the above instruction, a block is input as follows; O0004 ; G92 X0. M08 ; G1 X
Page 78B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION = 6 A1.234568 * = 7 A1.2345678 * The data after decimal point specification is rounded off. When #8523 is 0, least input increment for specified address is set. (7) Block deletion G377 ; Blocks which are specified by a program number and bloc
Page 794. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 #104 : 91 (5BH) “[” #105 : 35 (23H) “#” #106 : 50 (32H) “2” #107 : 93 (5DH) “]” #108 : 59 (3BH) “;” When a character–type block is read using the word–type block reading function (G375), completion code 253 is returned to #8529. If this code
Page 80B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION (14)End code (#8529) Check the end code after running every processing. #8526 Contents 0 Normal Completion 1 Double open has occurred 2 Cannot open because being used by another user 3 Cannot open because program does not exist 4 Attempted to
Page 814. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 (17)Special code list Instruction Decimal Hexadecimal IF 258 102H WHILE 259 103H GOTO 260 104H DO 261 105H END 262 106H GE 264 108H GT 265 109H LE 266 10AH LT 267 10BH NE 268 10CH EQ 269 10DH MOD 270 10EH THEN 271 10FH XOR 272 110H OR 273 11
Page 82B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 4.5.14 Cutting distance and cutting time can be read and preset with the macro Reading of Cutting variable of the conversational macro. Time and Cutting Use it for the control of a tool life. Distance by (1) Reading and presetting of cutting
Page 834. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 #8602 Control axis 4 4th axis 5 5th axis 6 6th axis 7 7th axis 8 8th axis Caution 1) When other than 1–8 is specified to #8602, the control command is ignored. 2) #8602=0 occurs when turning on the power. (2) Control code details 1) Rapid tr
Page 84B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 3. MFnX (auxiliary function reading signal) Auxiliary function command (G346) is executed and becomes HIGH until auxiliary function complete signal FINX is inputted. 4. BUFx (buffer full notification signal) Becomes HIGH when axis command blo
Page 854. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 change command is performed. It is set to 100% when turning on the power. (3) Caution 1) Command buffering Buffering of command block is performed on CNC side in order to continuously carry out multiple commands in the axis control function
Page 86B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION Notes 1 The torque limit override of each axis becomes 100% when turning on the power. 2 This function is programmed as an execution macro. 3 When attempting to set a value other than 0–255 to #8992, that command will be ignored. 4 Enable/dis
Page 874. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5.17 Data can be read from the A/D converter by conversational macro. A/D Converter Data The following items are A/D conversion data which can be read. Reading by General purpose analog input Conversational Macro Analog input in which
Page 88B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 1) AC analog servo AC Rating motor Formula Form la for conversion to digital current value Load current I Digital value model (Arms) 5–0 128+102I 0.49 (0.69) 178 (199) 4–0 128+30.7I 0.93 (1.3) 156 (168) 4–0 128+30.7I 0.93 (1.3) 156 (168) 2–0
Page 894. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5.18 The following system information can be referenced by conversational Conversational Macro macro by the window function. 1. Alarm information Variable Window 2. External alarm information Function 3. Machining parts total number, shift
Page 90B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION If (above) is set, the machining parts total number is set to #500. Further, the information of whether the window function in #501 has executed normally or not is set. Caution In the following cases, when the window function is executed, –1
Page 914. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 Alarm basic flag I.D No. Error Bit name Information contents (#8997) code BGPS (01H) Background P/S alarm FGPS (02H) Foreground P/S alarm OHALM (04H) OH alarm – (08H) Undetermined – (10H) Undetermined SWON (20H) SW alarm OTALM (40H) OT alarm
Page 92B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION OH alarm flag I.D No. Error Bit name Information contents (#8997) code OHLOK (01H) NC cabinet is over–heated OH001 – (02H) Undetermined – (04H) Undetermined – (08H) Undetermined 2 – (10H) Undetermined – (20H) Undetermined – (40H) Undetermined
Page 934. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 OT alarm flag 1 I.D No. Error Bit name Information contents (#8997) code – (01H) Undetermined SPOH (02H) Spindle motor is overheated OT 101 SPVE (04H) Deviation between spindle motor OT 012 commanded speed and actual speed is excessive (15–2
Page 94B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION OT alarm flag 3 I.D No. Error Bit name Information contents (#8997) code OTPCD (01H) Position coder disconnection has OT 116 been detected OTADH (02H) External data input/output I/F signal OT 120 upper rank 4 bits are not defined Address (maj
Page 954. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 OT alarm flag 4 I.D No. Error Bit name Information contents (#8997) code OTHW (01H) Numerical value inputted by exter- OT 127 nal data input data signal EID32–EID47 has exceeded per- missable range. OTLL (02H) Numerical value inputted by ext
Page 96B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION OT axis type alarm flag 1 I.D No. Error Bit name Information contents (#8997) code OTSP1 (01H) Entered prohibited areas of stored OT 001 stroke limit 1 during shift in + direc- tion. OTSM1 (02H) Entered prohibited areas of stored OT 002 strok
Page 974. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 OT axis type alarm flag 3 I.D No. Error Bit name Information contents (#8997) code OTAD2 (01H) A/D converter failed. OT 151 OTABS (02H) No correspondence between abso- OT 032 lute pulse coder count value and device coordinate – (04H) Undeter
Page 98B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION SV axis type alarm flag 2 I.D No. Error Bit name Information contents (#8997) code SVSTP (01H) Position deviation amount during SV 008 stop exceeds parameter setting. SVMOV (02H) Position deviation amount during SV 009 process exceeds paramet
Page 994. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 SV axis type alarm flag 4 I.D No. Error Bit name Information contents (#8997) code – (01H) Undetermined SVABS (02H) Absolute pulse coder failure or SV 101 device position for greatly moving the device when turning on power was not correctly
Page 100B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION #8996 : Complete code #8997 : Information I.D. #8998 : Axis number #8999 : Relative coordinate value Macro Contents Variable Information ID #8997 500: Reading relative coordinate #8998 Axis number (1 to 8) #8999 Relative cordinate value Compl
Page 1014. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5.21 There exist the following screen display control codes. The meanings of Screen Display Control the control codes and addresses differ from the meanings of the normal NC character addresses. Codes G230 : Cursor display G202 : Screen de
Page 102B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION (1) Cursor control code Performs cursor display. G230XxYyLl ; 1. Commands cursor display position by address X, Y in character coordinate system. 2. Commands cursor length by address L. Note A cursor with cursor length of 0 is deleted. (2) Sc
Page 1034. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 Note When both X, Y are commanded you must continue to command. 2. Address A commands size of character. A=1 : Standard character A=2 : Double character A=3 : Triple character Only alphanumerics can be displayed with double size. When double
Page 104B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 7. Address C commands a character code you want to directly display. Codes which can be commanded are 32–95 (20–5F in hexadecimal) or 160–223 (A0–DF in hexadecimal). Example: G243 C65 ; “A” is displayed. Note For the code, use ASCII code. 8.
Page 1054. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 (7) Prompt character display (G280) The prompt character is the character to prompt input. This can be displayed to the character row input mode (when input control variable #8502=3). The specification method for the character row is the sam
Page 106B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION Example: G242 X0.0 Y0.0 ; G391 G301 X200.0 ; G302 X–200.0 I–100.0 ; G303 X–200.0 I–100.0 ; G301 X200.0 ; If the above described program is executed, the drawing below will be performed in the graphic coordinate system. 14” CRT 216 100 0 –100
Page 1074. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 Notes 1 The color used to fill in a graphic (specified in G320) must be the same as the color of the line drawing the graphic. 2 When specifying black as the color used to fill in the graphic (deletion of the graphic), set the value of P to
Page 108B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 4.5.22 The following control codes are provided for execution control. The Execution Control number of times the conversational macro program call can be performed is 4 times. Code G65 : Conversational macro program macro call M98 : Conversat
Page 1094. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 (4) Auxiliary macro program end (M99) M99 or M99P(Sequence number) ; The final part of the main program must command “M99”. The following describes the main program “M99”. 1. If “M99” is commanded, the auxiliary macro execution ends. 2. If “
Page 110B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 1:50 2:100 3:110 4:150 5:200 6:300 7:600 8:1200 9:2400 10: 4800 11: 9600 S : Number of stop bits 1 : 1 stop bit, without parity 2 : 2 stop bits, without parity 11: 1 stop bit, with parity 12: 2 stop bit, with parity Note When FANUC Cassette o
Page 1114. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 (b) When the I/O device has received more data than it can handle (over flow), it turns off the CS signal it sends to the CNC (the RS signal of the I/O device). After it detects the OFF CS signal the CNC stops data transmission within two ch
Page 112B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION (5) Canceling data–receive wait (G335/G336) In the conventional RS–232–C control by the conversational macro function, the system remains in a wait state in the G335 block (one–byte read function) until data is received from the external devi
Page 1134. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 A valid information area starting with an LF and ending immediately before the next LF is called a block; one block contains the data of a macro variable. Intra–block address N represents a variable number. Address P represents variable data
Page 114B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION PTCR=0: The CR code is not output after an LF when macro variable data is output. % LF N30000P1234 LF P5678 LF % PTCR=1: Two CR codes are output after an LF when macro variable data is output. % LF CR CR N30000P1234 LF CR CR P1234 LF CR CR %
Page 1154. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 For address P/B/S/C specification, see the description of G330 (opening a line). Note that read control (101/102/ . . .) must be specified in address P, and ISO(0) must be specified in address C. Select address L, F, or A according to the de
Page 116B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION Example:Creating a file named ABCD In 17 variables from #100 to #116, set 65 (A), 66 (B), 67 (C), 68 (D), 32, . . . , 32 (space). G330 P201 B10 S12 C0 L100 ; Notes 1 A file name must always be 17 characters long. A file name shorter than 17 c
Page 1174. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 Open a line in a directory information control mode. Read directory information. Close the line. Open the line in a directory information control mode. Delete a file. Close the line. (i) Directory information read G339 P1 Ff Ll Ss ; By speci
Page 118B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION #8539 Meaning 0 Normal termination 1 Invalid command was specified. 2 Command not usable with selected I/O device was specified. For example, file search was specified when FANUC Cassette is not used. 3 There is no line function option. 10 Li
Page 1194. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 SYSTEM GENERATER CHECK SYSTEM LABEL :PASS CURRENT AREA : 0M – (1) USER FILE AREA?10 – (2) CURRENT FILE : 0 – (3) PROGRAM FILES ?10 – (4) FILES MUST BE CLEARED !! 7:PROGRAM DIRECTORY 30:USER FILE DATA CLEAR FILE OK ?Y – (5) (1) The size of th
Page 120B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 1. File creation command (FGEN) Function: Creates file. Description: FGEN (file number, file size, status variable number) Explanation: sets number to file to be created. File is accessed using this number. For the value, refer
Page 1214. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 Example: FOPEN (200,1,100) Opens the file with file no. 200 in the writing and reading modes. Further, the result is returned to macro variable #100. 4. Command for closing files (FCLOS) Function: Commands closing of files. Description: FCLO
Page 122B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION specifies what type the data that is going to be written will be. For the data type, refer to table 3. specifies the data that is going to be written. Further, the execution result of the command is returned to the status v
Page 1234. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 Table 5: Status value 0 : Ended normally 1 : File does not exist 2 : File has not had OPEN performed 3 : Number of files which can OPEN (10) has been exceeded) 4 : Number of files which can be created has been exceeded 5 : File area exceeded
Page 124B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION FREAD (200, 0, 120) ; Substitutes 1st data to reading #120 IF[#110 NE 0] GOTO 90 ; FREAD (200, 0, 121) ; Substitutes 2nd data to reading #121 IF[#110 NE 0] GOTO 90 ; FREAD (200, 0, 122) ; Substitutes 3rd data to reading #122 IF[#110 NE 0] GOT
Page 1254. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 4.5.26 PMC Address Control (1) PMC address write control G310 Dd Qq Ll ; Code (G310) G310 Rr Qq Ll ; G310 Cc Qq Ll ; G310 Kk Qq Ll ; (L1/2/4) The data specified in address Q having the byte length specified in address L is written to PMC add
Page 126B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION parameter 8507 is set to 0, the data is arranged in the same sequence as in PMC–NA format. If the system features PMC–NB, and if bit 4 of parameter 8507 is set to 1, the bytes are arranged in a sequence such that the low–order byte is assigne
Page 1274. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 Note Data cannot be written to this variable. 4.5.28 Referring to NC NC parameter can be read, however cannot be described to the left side of the calculation because it is exclusive reading. Parameter The format is as follows. It cannot be
Page 128B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 4.6 CONVERSATIONAL MACRO DEBUG FUNCTION 4.6.1 The debug function creates a highly efficient conversational macro Overview program. In the debug function there is a function to display macro variables and a function to debug conversational mac
Page 1294. CONVERSATIONAL MACRO FUNCTION B–62073E–2/03 (2) Debugger functions 1) Conversational macro single block Set the parameter to enable conversational macro single block no. 8502#2 to 1. If the conversational macro is started up, it can execute by single block. ON/OFF can be set by settin
Page 130B–62073E–2/03 4.CONVERSATIONAL MACRO FUNCTION 1) 2) 3) *O00001234 N00000000 SBK:1 TR:1 4) 5) Conversational macro status of 1) is displayed as * and enters conversational macro break point setting status. Break point program number and sequence number are displayed to 2), 3). “1” is disp
Page 1315. PARAMETER B–62073E–2/03 5 PARAMETER Bit No. Address #7 #6 #5 #4 #3 #2 #1 #0 8000 NLMP Parameter input Data format : bit type NLMP Macro executor parameter from F–ROM cassette 0 : performs loading 1 : does not perform loading Note This parameter is used by the machine tool builder at h
Page 133B–62073E–2/03 A.MACRO PROGRAM EXAMPLE A MACRO PROGRAM EXAMPLE Circular Cutting Input Circular Cutting Display Layout : and Execution The cursor is moved, using the cursor key or “±” “°”, or soft keies “RADIUS”, “FEED” or “OFSNUM”. Key in data from MDI at the cursor position and press “INPUT
Page 134A. MACRO PROGRAM EXAMPLE B–62073E–2/03 A.1 DESCRIPTION OF Program Function number PROGRAMS O0001 Main program memory list O0010 Key input test O0011 Software key display O0020 Cursor test O0030 Display test O0031 BLINK test O0032 Character row data O0040 Address value test O0050 True circle
Page 135B–62073E–2/03 A.MACRO PROGRAM EXAMPLE A.2 DESCRIPTION OF Program Function number MACRO VARIABLES #100 to Used as variable temporary store, etc. for work piece #103 #142 Key input value (#8501) #143 Character row data offset #144 Numerical data input value (#8503) #145 Address data input val
Page 141B–62073E–2/03 A.MACRO PROGRAM EXAMPLE A.4 FLOW CHART O0001 (Main program) O0010 (Key input test) (START) (START) Screen clearing Screen clearing Cursor OFF Title display Menu display Soft key display Soft key display Was any data No keyed in? Key input variable Yes reading Key input variabl
Page 142A. MACRO PROGRAM EXAMPLE B–62073E–2/03 O0020 (Cursor test) O0030 (Display test) (START) (START) 1 Screen clearing Screen clear Cursor position calculation Cursor OFF Cursor display OFF Title display Soft key display Cursor display Soft key display Title display M99 Counter = 0 Character dis
Page 143B–62073E–2/03 A.MACRO PROGRAM EXAMPLE O0032 (Blink test) 00050 (Circuit cutting) (START) (START) Title display Screen clear Blink display Cursor display X=13, Y=2 M99 Cursor display ON Character string display for data O0040 (Address variable test) (START) Graphic display Screen clear Data
Page 144A. MACRO PROGRAM EXAMPLE B–62073E–2/03 2 3 No No Soft key 2? Soft key 4? Yes Yes Execution macro start Cursor pointer = 1 up Message display 1 Data display No Soft key 3? Yes M99 Cursor pointer = 2 4 Is cursor ° No pressed? Yes Cursor pointer = –1 Is cursor ± No pressed? Yes Cursor pointer
Page 145B–62073E–2/03 A.MACRO PROGRAM EXAMPLE A.5 PROGRAM (1) O0001 explanation EXPLANATION 0030 G202 P3 Screen deletion P1 : Character screen P2 : Graphic screen P3 : Character and graphic screens 004 0 G230 L0 Cursor control L0 : Cursor OFF L1 : Cursor ON cursor length 1 0050 G243 X0 Y0 A1 B0 (SA
Page 146A. MACRO PROGRAM EXAMPLE B–62073E–2/03 (2) O0011 Explanation 0030 WHILE [Condition expression] D01 0070 END1 In WHILE macro, performs processing while condition expression is being calculated and while DO–END and when not calculated executes by the next block after corresponding E
Page 147B–62073E–2/03 A.MACRO PROGRAM EXAMPLE F5.2 means total digits are 5, and there are 2 digits after decimal point by digit number specification when displaying numerical data. Example: when 1234.567 is contained in #100 Displayed as 234.57 (5) O0032 Explanation 0030 N0011 G243 X3 Y11 A1 B1 (B
Page 148A. MACRO PROGRAM EXAMPLE B–62073E–2/03 A.6 PROGRAM DESCRIPTION (1) Main Program 00010 O0001 ; Main 00020 G390 ; Absolute mode specification 00030 G202 P3 ; Screen clear 00040 G230 L0 ; Cursor OFF 00050 G243 X0 Y0 A1 B0 (SAMPLE PROGRAM) ; 00060 X2 Y3 (1 –– KEY TEST) ; 00070 X2 Y5 (2 –– COUSO
Page 149B–62073E–2/03 A.MACRO PROGRAM EXAMPLE 00120 #143 = 100 ; Software key display 00130 M98 P0011 ; 00140 #100 = 0 ; Cursor display position pointer 00150 #146 = 2 ; X axis direction cursor position 00160 N001 #142 = #8501 ; Key input control variable save 00170 IF [ #142 EQ 0 ] GOTO 20 ; Key i
Page 150A. MACRO PROGRAM EXAMPLE B–62073E–2/03 00090 N104 (*0020 3D2A 4E3B 0020*) ; 00100 N200 (*0020 483E 3742 0020*) ; 00110 N201 (*0020 422E 4559 0020*) ; For internal code, encloses (*” and *)” 00120 N202 (*0020 4A64 4035 0020*) ; Note: kanji codes use two characters for display 00130 N203 (*00
Page 151B–62073E–2/03 A.MACRO PROGRAM EXAMPLE 00200 N40 IF [ #142 NE 14 ]GOTO 50 ; 00210 #147 = 2 ; Cursor pointer is 2 if software key 3 is pressed 00220 GOTO 90 ; 00230 N50 IF [ #142 NE 2 ]GOTO 60 ; 00240 #147 = #147 – 1 ; If cursor “±” pointer–1 00250 GOTO 90 ; 00260 N60 IF [ #142 NE 1 ]GOTO 70
Page 152A. MACRO PROGRAM EXAMPLE B–62073E–2/03 00220 G243 X41 Y18 A1 B0 (I) ; 00230 M99 ; 00010 O0054 ; Mode check, message display 00020 #1 = F03.5 ; Puts F03.5 to #1 00030 IF [ #1 EQ 1 ]GOTO 10 ; Whether memory mode or not 00040 G240 P–3 ; Color specification (yellow reversal) 00050 G243 X0 Y16 B
Page 161B–62073E–2/03 A.MACRO PROGRAM EXAMPLE A.8 MACRO EXECUTOR FUNCTIONS Conversa- Auxiliary Execution Item Function Description tional macro macro macro 4.5.4 UI/UO separation Different signals can be used for macro DI/DO f f f system variables in a user program and P–CODE program 4.5.5 P–CODE m
Page 162A. MACRO PROGRAM EXAMPLE B–62073E–2/03 Conversa- Auxiliary Execution Item Function Description tional macro macro macro 4.5.26 PMC address control Data can be read and written for PMC f f addresses. 4.5.27 Reading remaining travel–dis- Remaining travel distance along the control f f tan
Page 163B–62073E–2/03 Index [A] [E] A/D Converter Data Reading by Conversational Mac- Error Code List, 36 ro, 84 Execution Control Code, 105 Address Function, 97 Execution Control Variable, 65 Argument Designation, 43 Execution Macro, 39 Argument Specification, 44 Expanded Conversational Macro Exclusive Var
Page 164Index B–62073E–2/03 [N] Registering a P–CODE Program in F–ROM Using a Memory Card (When Compiled with a Personal NC Commands Which Cannot be Used in Automatic Computer), 8 Operation, 44 Registering the P–CODE Program in F–ROM Using a ROM Cassette (When the P–CODE Program has been Compiled with the S
Page 165Revision Record FANUCĄSeriesĄ15–MODEL BĄPROGRAMMING MANUAL (Macro compiler/Macro executor) B-62073E-2 03 Sep.,’95 S Correction of error S Appendix 1.8, “Macro Executor Functions,” has been added. S Typographical errors have been corrected. 02 Dec.,’93 01 Sep., ’93 Edition Date Contents Edition Date
Page 166· No part of this manual may be reproduced in any form. · All specifications and designs are subject to change without notice.