MACRO COMPILER for 30i-A Operators manual Page 123

Operators manual
B-66264EN/01 APPENDIX E.PARAMETERS
- 115 -
#3 LCLLV If an execution macro is called as a subprogram from a user program
(subprogram call using a M/S/T/second auxiliary function/specific
code), the local variable level:
0: Does not change.
(The local variable at the calling source is used.)
1: Changes.
(The local variable at the called destination is used (FS16
compatible mode)).
#4 P98 The execution macro for P-CODE workpiece number search is:
0: Called as a macro.
The local variable used with the execution macro cannot be used
with the main program.
1: Called as a subprogram.
The local variable used with the execution macro is passed to the
main program.
#7 #6 #5 #4 #3 #2 #1 #0
9167 NVGA INCD NTV
[Data type] Bit
#0 NTV When an "LF" is output with G336 (data transmission), a space for a
TV check is:
0: Output.
1: Not output.
#3 INCD The coordinates (X,Y,I,J) in the character coordinate system or
graphic coordinate system are:
0: Specified in the absolute specification mode at all times.
1: Switchable between the absolute specification mode and
incremental specification mode with G390/G391. (Valid for
G204, G230, G242, G243, G300, G249, G250, G01, G02, G03,
G206, and G317)
#4 NVGA This parameter is used with applications created for character cards of
the old type, and is usually set to 0.
0: Normal mode
1: Equivalent to character cards (All graphic commands are
ignored.)

Contents Summary of MACRO COMPILER for 30i-A Operators manual

  • Page 1For FANUC Series 30*-MODEL A OPERATOR’S MANUAL B-66264EN/01
  • Page 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 possi
  • Page 3B-66264EN/01 DEFINITION OF WARNING, CAUTION, AND NOTE 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, supplem
  • Page 4
  • Page 5B-66264EN/01 PREFACE PREFACE This manual describes the models indicated in the table below. For descriptions about the FANUC Series 0, 15, 16, 18, 20, and 21, refer to "FANUC MACRO COMPILER Programming Manual" (B- 66102E). In the text, the abbreviations indicated below may be used. Model name Abbrev
  • Page 6
  • Page 7B-66264EN/01 TABLE OF CONTENTS TABLE OF CONTENTS DEFINITION OF WARNING, CAUTION, AND NOTE ................................ s-1 PREFACE.................................................................................................. s-1 1 GENERAL .....................................................
  • Page 8TABLE OF CONTENTS B-66264EN/01 D.2.2 SYSTEM DATA CHECK Screen......................................................................... 85 D.2.3 SYSTEM DATA DELETE Screen ....................................................................... 88 D.2.4 SYSTEM DATA SAVE Screen .........................
  • Page 9B-66264EN/01 1.GENERAL 1 GENERAL The FANUC Macro Compiler/Executor function stores programs created using custom macros (macro programs) in FLASH ROM (called F-ROM in the following) so that machine tool builders can implement their own conversational screens. The FANUC Macro Compiler for FANUC Serie
  • Page 101.GENERAL B-66264EN/01 1.1 FEATURES (1) The symbolic macro compiler function allows macro programs to be coded in symbolic format, and also allows comments to be coded. (2) A program that references macro variables in array format can be created. (3) Compile list output makes macro program developme
  • Page 11B-66264EN/01 1.GENERAL 1.2 Overview The Macro Compiler/Executor function of FANUC Series 330i/300i/300is-A allows Series 30i/300i/300is-A users to develop their own macro program in a macro language, convert it into the macro MEM file format with the macro compiler, and execute a macro program devel
  • Page 121.GENERAL B-66264EN/01 Text Editor * Create a macro program using an editor. (An editor is not supplied.) * The macro program (source file) must be in text format. Macro Program (Source file) MCOMP30I * The macro compiler generates an object file. It also creates reference and compile lists at the s
  • Page 13B-66264EN/01 2.EQUIPMENT CONFIGURATION 2 EQUIPMENT CONFIGURATION (1) Personal computer (IBM PC/AT series) Main memory 640K bytes or more OS Microsoft Windows95/98/NT/Me/2000/XP About 1M bytes is required for install the system Hard disk (Caution 1) Floppy disk drive 3.5"Floppy Drive. (2HD) CAUTION 1
  • Page 143.SYSTEM INSTALLATION (SETUP) B-66264EN/01 3 SYSTEM INSTALLATION (SETUP) The FANUC Macro Compiler software is distributed with the two 3.5-inch (2HD) floppy disks titled "FANUC Series 30i Macro Compiler system floppy disk" and "FANUC Series 30i Macro Library system floppy disk". To use the software,
  • Page 15B-66264EN/01 3.SYSTEM INSTALLATION (SETUP) 3.1 INSTALLING THE FANUC MACRO COMPILER (FOR Series 30i) SYSTEM This section describes how to install the FANUC Macro Compiler (for Series 30i) software on the hard disk. Procedure Insert the FANUC Series 30i Macro Compiler system floppy disk into the flopp
  • Page 163.SYSTEM INSTALLATION (SETUP) B-66264EN/01 Explanation of the directories (a) \MCOMP30I\TOOL FANUC Macro Compiler system software, batch files, document files, and so forth are stored under this directory. MCOMP30I.EXE, MLINK30I.EXE, MCARD30I.EXE : System software ERROR.DOC : Compilation error code
  • Page 17B-66264EN/01 3.SYSTEM INSTALLATION (SETUP) 3.2 INSTALLING THE FANUC MACRO LIBRARY (FOR Series 30i) This operation loads the executor file under the library directory of the FANUC Macro Compiler installed by the operation of Section 3.1. Insert FANUC Macro Library system floppy disk for Series 30i in
  • Page 183.SYSTEM INSTALLATION (SETUP) B-66264EN/01 3.4 COMPILER SERIES There are four types of FANUC Macro Compiler systems. One type is for FANUC Series 30i. The other three types are provided for the systems shown below. <1> For FANUC Series 0/Series 16/Series 18/Series 20/Series 21 <2> FANUC Series 15-A/
  • Page 19B-66264EN/01 4.FUNCTIONS 4 FUNCTIONS - 11 -
  • Page 204.FUNCTIONS B-66264EN/01 4.1 MACRO COMPILER (MCOMP30I) The Macro Compiler can compile macro programs created in the text file format. The Macro Compiler outputs an object file for the macro linker, reference list file, and compile list file. Source File Object File Macro Object Program Program MCOMP
  • Page 21B-66264EN/01 4.FUNCTIONS (3) Selective compilation according to link control file specification C:\> MCOMP30I @ABC Þ Compiles all files specified in the link control file (file name: ABC.LNK). (For details on the link control file, see Section 4.2, "MACRO LINKER".) CAUTION As described in Section 3.
  • Page 224.FUNCTIONS B-66264EN/01 Macro program source file A macro program source file must be created in text file. 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
  • Page 23B-66264EN/01 4.FUNCTIONS Execution example C:\> CD MCOMP30I\USR\SAMPL → Change the current directory to the folder in which the source program is stored. C:\MCOMP30I\USR\SAMPL>MCOMP30I *.SRC → Compile all .SRC files. Execution result (The result is output to the current directory because no destinat
  • Page 244.FUNCTIONS B-66264EN/01 4.2 MACRO LINKER (MLINK30I) According to the specification in the link control file created beforehand, the macro linker links the object file and library file compiled by the Macro Compiler and creates a ROM-format file and link list file. Link control File ROM Format File
  • Page 25B-66264EN/01 4.FUNCTIONS *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 out
  • Page 264.FUNCTIONS B-66264EN/01 Sample link control file /* /* MACRO COMPILER UTILITY LINK FILE (SAMPLE) /* /* FOR F30I-A CNC=\MCOMP30I\MEX\F30iA_01.MEX P-CODE_NUMBER=01 /* Compile Parameter P9000=00010000 /* P-CODE Size 1MB P9010=100 /* M-Code Sub call O9001 P9038=8000 /* Conversational Macro program /* E
  • Page 27B-66264EN/01 4.FUNCTIONS Checking the size of ROM format file at linking macro A ROM format file that is created by linking is checked for its size whether it is overflown or not. The size of ROM format file is set by compile parameter Nos. 9000 and 9001. If a prepared ROM format file may exceed the
  • Page 284.FUNCTIONS B-66264EN/01 4.3 CONVERSION TO A MEMORY CARD FORMAT (MCARD30I) Convert a ROM-format file created by the macro linker (MLINK30I) to the memory-card format file (MEM format file) which can be loaded from the memory card using the boot function. Source File Object File Macro Object Program
  • Page 29B-66264EN/01 4.FUNCTIONS Execution example C:\> CD MCOMP30I\USR\SAMPL → Change the current directory to the folder in which the object file is stored. C:\MCOMP30I\USR\SAMPL>MCARD30I SAMPL Execution result - 21 -
  • Page 305.SYMBOLIC MACRO PROGRAM B-66264EN/01 5 Format 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,
  • Page 31B-66264EN/01 5.SYMBOLIC MACRO PROGRAM 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. - Symbolic name definition @xxxx yyyyyy xxxx : Symbolic
  • Page 325.SYMBOLIC MACRO PROGRAM B-66264EN/01 Example /* SYMBOL DEFINE @COUNT1 #100 >JUMP1 100 >SKIP 200 /* Program Meaning O0002 ; GOTO JUMP1 ; → GOTO 100 ; IF[COUNT1 LE 0]GOTO SKIP ; IF[#100 LE 0]GOTO 200 ; SKIP ; N200 ; JUMP1 M99 ; N100 M99 ; - Automatic conversion of hiragana and kanji codes (Hiragana a
  • Page 33B-66264EN/01 5.SYMBOLIC MACRO PROGRAM - Array variable coding Variables can be used as a one-dimensional array by using a simple coding method. Coding method #999 999 : Number of first variable in array By this coding method, variables can be referenced or written to as array data with
  • Page 345.SYMBOLIC MACRO PROGRAM B-66264EN/01 - 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[ && ] GOTO xxx ; IF[ || ] THEN
  • Page 35B-66264EN/01 5.SYMBOLIC MACRO PROGRAM (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 (4) and (5). IF[#100 EQ 0] THEN ; G01 X100 Y200 ;
  • Page 365.SYMBOLIC MACRO PROGRAM B-66264EN/01 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 specifi
  • Page 37B-66264EN/01 6.SYMBOL DEFINITION FILE 6 SYMBOL DEFINITION FILE When the system is installed, a symbol definition file for Series 30i is stored under the directory \MCOMP30I\TOOL. For macro program creation, the user should make full use of the symbolic names defined in the file for variables. Symbol
  • Page 387.HOW TO VIEW REFERENCE LIST/ COMPILE LIST B-66264EN/01 7 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: o
  • Page 39APPENDI
  • Page 40
  • Page 41B-66264EN/01 APPENDIX A.SYMBOL DEFINITION A SYMBOL DEFINITION • SYSTEM.DEF (ENGLISH) \MCOMP\TOOL\SYSTEM.DEF $NOLIST /* /* *************************************************** /* * symbol define * /* * for series 30i (V01.00 2003.04.24) * /* *************************************************** /* /* /*
  • Page 42A.SYMBOL DEFINITION APPENDIX B-66264EN/01 @SKYBLR G240P-6 /* Reverse Sky-blue. @WHITER G240P-7 /* Reverse White. /* @BON L1 /* Blink ON @BOF L0 /* Blink OFF /* @DRLINEK G244 /* Graphic Line kind select. @DRSTART G242 /* Draw start point. @DRLINE G01 /* Linear line display. @DRCW G02 /* Circle displa
  • Page 43B-66264EN/01 APPENDIX A.SYMBOL DEFINITION /* /* /* No.02 Conversation MACRO (TAIWA MACRO) control Variable define. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @CMACRO1 #8500 /* Conversation MACRO - 1 MAIN PROGRAM No. @TAIWAP1 #8500 @CMACRO2 #8550 /* Conversation MACRO - 2 MAI
  • Page 44A.SYMBOL DEFINITION APPENDIX B-66264EN/01 @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). @
  • Page 45B-66264EN/01 APPENDIX A.SYMBOL DEFINITION @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 /*
  • Page 46A.SYMBOL DEFINITION APPENDIX B-66264EN/01 /* ~~~~~~~~~~~~~~~~~~~~~~~ @EMPTY #0 /* "EMPTY". @ENMTY #0 /* "EMPTY". @[#_EMPTY] #0 /* @[#_UI[0]] #1000 /* Interface input signals (bit) No.0 @[#_UI[1]] #1001 @[#_UI[2]] #1002 @[#_UI[3]] #1003 @[#_UI[4]] #1004 @[#_UI[5]] #1005 @[#_UI[6]] #1006 @[#_UI[7]] #1
  • Page 47B-66264EN/01 APPENDIX A.SYMBOL DEFINITION @[#_UO[11]] #1111 @[#_UO[12]] #1112 @[#_UO[13]] #1113 @[#_UO[14]] #1114 @[#_UO[15]] #1115 @[#_UO[16]] #1116 @[#_UO[17]] #1117 @[#_UO[18]] #1118 @[#_UO[19]] #1119 @[#_UO[20]] #1120 @[#_UO[21]] #1121 @[#_UO[22]] #1122 @[#_UO[23]] #1123 @[#_UO[24]] #1124 @[#_UO
  • Page 48A.SYMBOL DEFINITION APPENDIX B-66264EN/01 @[#_OFSZ[11]] #2111 @[#_OFSZ[12]] #2112 @[#_OFSZ[13]] #2113 @[#_OFSZ[14]] #2114 @[#_OFSZ[15]] #2115 @[#_OFSZ[16]] #2116 @[#_OFS[1]] #2001 /* Tool compensation value No.1(M System) @[#_OFS[2]] #2002 @[#_OFS[3]] #2003 @[#_OFS[4]] #2004 @[#_OFS[5]] #2005 @[#_OF
  • Page 49B-66264EN/01 APPENDIX A.SYMBOL DEFINITION @[#_MAINO] #4000 /* Main Program No. @MDLG01 #4001 /* Modal G-code Group 1(Pre. Block) @MDLG02 #4002 @MDLG03 #4003 @MDLG04 #4004 @MDLG05 #4005 @MDLG06 #4006 @MDLG07 #4007 @MDLG08 #4008 @MDLG09 #4009 @MDLG10 #4010 @MDLG11 #4011 @MDLG12 #4012 @MDLG13 #4013 @MD
  • Page 50A.SYMBOL DEFINITION APPENDIX B-66264EN/01 @[#_BUFG[29]] #4029 @[#_BUFG[30]] #4030 @[#_ACTG[1]] #4201 /* Modal G-code Group 1(Act. block) @[#_ACTG[2]] #4202 @[#_ACTG[3]] #4203 @[#_ACTG[4]] #4204 @[#_ACTG[5]] #4205 @[#_ACTG[6]] #4206 @[#_ACTG[7]] #4207 @[#_ACTG[8]] #4208 @[#_ACTG[9]] #4209 @[#_ACTG[10
  • Page 51B-66264EN/01 APPENDIX A.SYMBOL DEFINITION @[#_INTG[20]] #4420 @[#_INTG[21]] #4421 @[#_INTG[22]] #4422 @[#_INTG[23]] #4423 @[#_INTG[24]] #4424 @[#_INTG[25]] #4425 @[#_INTG[26]] #4426 @[#_INTG[27]] #4427 @[#_INTG[28]] #4428 @[#_INTG[29]] #4429 @[#_INTG[30]] #4430 @[#_BUFE] #4108 /* E cord(Pre. Block)
  • Page 52A.SYMBOL DEFINITION APPENDIX B-66264EN/01 @[#_ABSIO[2]] #5002 @[#_ABSIO[3]] #5003 @[#_ABSIO[4]] #5004 @[#_ABSIO[5]] #5005 @[#_ABSIO[6]] #5006 @[#_ABSIO[7]] #5007 @[#_ABSIO[8]] #5008 @ABSMT1 #5021 /* Machine Position. @ABSMT2 #5022 @ABSMT3 #5023 @ABSMT4 #5024 @ABSMT5 #5025 @ABSMT6 #5026 @ABSMT7 #5027
  • Page 53B-66264EN/01 APPENDIX A.SYMBOL DEFINITION @[#_ABSKP[5]] #5065 @[#_ABSKP[6]] #5066 @[#_ABSKP[7]] #5067 @[#_ABSKP[8]] #5068 @[#_TOFSWX] #5081 /* X AXIS Tool offset (T system) @[#_TOFSWY] #5082 /* Y AXIS Tool offset (T system) @[#_TOFSWZ] #5083 /* Z AXIS Tool offset (T system) @[#_TOFS[1]] #5081 /* AXI
  • Page 54A.SYMBOL DEFINITION APPENDIX B-66264EN/01 @[#_WZCMN[5]] #5205 @[#_WZCMN[6]] #5206 @[#_WZCMN[7]] #5207 @[#_WZCMN[8]] #5208 @OFS54W1 #5221 /* AXIS 1 G54 workpiece reference offset. @OFS54W2 #5222 @OFS54W3 #5223 @OFS54W4 #5224 @OFS54W5 #5225 @OFS54W6 #5226 @OFS54W7 #5227 @OFS54W8 #5228 @[#_WZG54[1]] #5
  • Page 55B-66264EN/01 APPENDIX A.SYMBOL DEFINITION @[#_WZG56[8]] #5268 @OFS57W1 #5281 /* AXIS 1 G57 workpiece reference offset. @OFS57W2 #5282 @OFS57W3 #5283 @OFS57W4 #5284 @OFS57W5 #5285 @OFS57W6 #5286 @OFS57W7 #5287 @OFS57W8 #5288 @[#_WZG57[1]] #5281 @[#_WZG57[2]] #5282 @[#_WZG57[3]] #5283 @[#_WZG57[4]] #5
  • Page 56A.SYMBOL DEFINITION APPENDIX B-66264EN/01 @[#_SKPDTC[3]] #5423 @[#_SKPDTC[4]] #5424 @[#_SKPDTC[5]] #5425 @[#_SKPDTC[6]] #5426 @[#_SKPDTC[7]] #5427 @[#_SKPDTC[8]] #5428 @[#_FOFSP] #5500 /* Fixtur offset number (M system) @[#_FOFSVAL[1]] #5501 /* AXIS 1 fixture offset value (M system) @[#_FOFSVAL[2]]
  • Page 57B-66264EN/01 APPENDIX B.COMPILE ERROR CODE TABLE B COMPILE ERROR CODE TABLE The table below indicates the error codes that may occur in compile processing. Compile Error Codes Error code Meaning 0000 Compiled OK. 0201 Too many program. 0202 No program. 1001 Find out period,on BLOCKDEL number. 1002 B
  • Page 58B.COMPILE ERROR CODE TABLE APPENDIX B-66264EN/01 Compile Error Codes Error code Meaning 1025 Too many THEN statement. 1027 No EOB code after ccall_statement. 1028 IF statement, Nest too deep. 1029 Logical AND and OR, Mixed up on if statement. 1030 No ENDIF found on if then statement. 1031 Too MANY c
  • Page 59B-66264EN/01 APPENDIX B.COMPILE ERROR CODE TABLE Compile Error Codes Error code Meaning 1603 Amount of address over 50. 1604 Too larg macro number,Max 6 hold. 1605 MACRO number not >=0. 1606 MACRO number period illegal. 1607 Too long GOTO number,Max 8 hold. 1608 GOTO number with period illegal. 1681
  • Page 60C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 C COMPILE/LINK EXAMPLE The compile/link example described below is created under the directory C:\MCOMP30I\USR\SAMPL when the macro compiler utility system is installed. Details of sample: Times required for instruction execution by each of the conversati
  • Page 61B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Main program source file File name : MAIN.SRC /* /* SAMPLE Program. /* /* Conversation MACRO Execution-Time Test Program. /* (Vol 01.00 2003.04.10) /* /* /* ( MAIN Program ) /* /* /* Symbol define. /* /* System common symbole FILE Include. /* $INCLUDE C:\
  • Page 62C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 ; O1x00:x=key in data. ; FIN RETURNP LOOP ; END of conv. MACRO. /* /* $EJECT /* /* /* No. O1001 : Answer display sub program. /* /* LOOPCT : TEST Loop count. /* TIMESAV : No-operatinon Time. /* TSTTIME : Measured Time. /* O1001 ; DISPLAY X5 Y4 B0 (SAMPLE
  • Page 63B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Main program reference list file File name : MAIN.REF Fri Apr-25-2003 12:11:55 Page 1 (FS30i) Macro Compiler (Pre) V01.0 MAIN.SRC ---------- Compile Parameter ----------------------------------------- ---------- Program -----------------------------------
  • Page 64C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 Fri Apr-25-2003 12:11:55 Page 2 (FS30i) Macro Compiler (Pre) V01.0 MAIN.SRC S-Line G-Line 812 /* 813 /* No. O1000 : Main program. 814 /* 815 0001 O1000 ; 816 0002 NUMREAD ; Numeric data input. 817 0003 CURSOR OFF ; Cursol OFF 818 0004 DISPLAY X0 Y0 B0 ('E
  • Page 65B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Fri Apr-25-2003 12:11:55 Page 3 (FS30i) Macro Compiler (Pre) V01.0 MAIN.SRC S-Line G-Line 842 /* 843 /* 844 /* No. O1001 : Answer display sub program. 845 /* 846 /* LOOPCT : TEST Loop count. 847 /* TIMESAV : No-operatinon Time. 848 /* TSTTIME : Measured T
  • Page 66C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 Fri Apr-25-2003 12:11:55 Page 4 (FS30i) Macro Compiler (Pre) V01.0 MAIN.SRC ---------- Cross Reference ------------------------------------------- Symbol Define Line No. RETURN M99 861 RETURNP M99P 838 DISPLAY G243 818, 823, 851 FORM F 852, 859 DATA D 852
  • Page 67B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Main program compile list file File name : MAIN.LST ------------------------------------------------------------------ 25-Apr-2003 12:11:55 Page 1 (FS30i) Macro Compiler V01.0 MAIN.SRC ---------------------- Compile Parameter -----------------------------
  • Page 68C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 25-Apr-2003 12:11:55 Page 2 (FS30i) Macro Compiler V01.0 MAIN.SRC --------------------- Cross Reference ---------------------------------------------------------------------- #100 : 14, 16, 17, 17, #500 : 14, #501 : 19, #3001 : 15, 19, #8500 : 21, #8501 :
  • Page 69B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Subprogram source file File name : SUB1.SRC /* /* SAMPLE Program. /* /* Conversation MACRO Execution-Time Test Program. /* (Vol 01.00 2003.04.10) /* /* /* ( SUB Program ) /* /* /* Symbol define. /* /* System common symbole FILE Include. /* $INCLUDE C:\\MC
  • Page 70C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 /* /* /* (#101=#102+#103) Operation Time Test. /* /* No. O1100 : SUB program. /* /* O1100 ; NOREAD ; NO data read. ; DISPLAY X2 Y2 B0 ('#101=#102+#103 TEST') ; Operation code disp. ; COUNT = LOOPCT ; Loop counter set. TIMER1 = 0 ; Timer initialize. WHILE[
  • Page 71B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE $EJECT /* /* /* (#101=#102 AND #103) Operation Time Test. /* /* No. O1200 : SUB program. /* /* O1200 ; NOREAD ; NO data read. ; DISPLAY X2 Y2 B0 ('#101=#102 AND #103 TEST') ; Operation code disp. ; COUNT = LOOPCT ; Loop counter set. TIMER1 = 0 ; Timer ini
  • Page 72C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 $EJECT /* /* /* (#101=SIN[#102]) Operation Time Test. /* /* No. O1300 : SUB program. /* /* O1300 ; NOREAD ; NO data read. ; DISPLAY X2 Y2 B0 ('#101=SIN[#102]') ; Operation code disp. ; COUNT = LOOPCT ; Loop counter set. TIMER1 = 0 ; Timer initialize. WHIL
  • Page 73B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Subprogram reference list file File name : SUB1.REF --------------------------------------------------------------------- Fri Apr-25-2003 12:11:55 Page 1 (FS30i) Macro Compiler (Pre) V01.0 SUB1.SRC ---------- Compile Parameter ----------------------------
  • Page 74C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 Fri Apr-25-2003 12:11:55 Page 2 (FS30i) Macro Compiler (Pre) V01.0 SUB1.SRC S-Line G-Line 813 /* 814 /* 815 /* (#101=#102+#103) Operation Time Test. 816 /* 817 /* No. O1100 : SUB program. 818 /* 819 /* 820 0001 O1100 ; 821 0002 NOREAD ; NO data read. 822
  • Page 75B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Fri Apr-25-2003 12:11:55 Page 3 (FS30i) Macro Compiler (Pre) V01.0 SUB1.SRC S-Line G-Line 845 /* 846 /* 847 /* (#101=#102 AND #103) Operation Time Test. 848 /* 849 /* No. O1200 : SUB program. 850 /* 851 /* 852 0023 O1200 ; 853 0024 NOREAD ; NO data read.
  • Page 76C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 Fri Apr-25-2003 12:11:55 Page 4 (FS30i) Macro Compiler (Pre) V01.0 SUB1.SRC S-Line G-Line 877 /* 878 /* 879 /* (#101=SIN[#102]) Operation Time Test. 880 /* 881 /* No. O1300 : SUB program. 882 /* 883 /* 884 0045 O1300 ; 885 0046 NOREAD ; NO data read. 886
  • Page 77B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Fri Apr-25-2003 12:11:55 Page 5 (FS30i) Macro Compiler (Pre) V01.0 SUB1.SRC ---------- Cross Reference ------------------------------------------- Symbol Define Line No. CALL M98P 834, 866, 898 RETURN M99 841, 873, 905 RETURNP M99P 838, 870, 902 DISPLAY G
  • Page 78C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 Subprogram compile list file File name : SUB1.LST 25-Apr-2003 12:11:55 Page 1 (FS30i) Macro Compiler V01.0 SUB1.SRC ---------- Compile Parameter ----------------------------------------- ---------- program O1100 -------------------------------------------
  • Page 79B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE 25-Apr-2003 12:11:55 Page 2 (FS30i) Macro Compiler V01.0 SUB1.SRC ---------- Cross Reference ------------------------------------------- #100 : 6, 8, 10, 10, #101 : 9, #102 : 9, #103 : 9, #500 : 6, #502 : 13, #3001 : 7, 13, #8500 : 21, #8501 : 18, #8502 :
  • Page 80C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 25-Apr-2003 12:11:55 Page 3 (FS30i) Macro Compiler V01.0 SUB1.SRC ---------- program O1200 --------------------------------------------- G-Line P-Line 0023 1 O1200; 0024 2 #8502=0; 0025 3 ; 0026 4 G243X2Y2B0(*23 31 30 31 3D 23 31 30 32 20 41 4E 44 20 23 3
  • Page 81B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE 25-Apr-2003 12:11:55 Page 4 (FS30i) Macro Compiler V01.0 SUB1.SRC ---------- Cross Reference ------------------------------------------- #100 : 6, 8, 10, 10, #101 : 9, #102 : 9, #103 : 9, #500 : 6, #502 : 13, #3001 : 7, 13, #8500 : 21, #8501 : 18, #8502 :
  • Page 82C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 25-Apr-2003 12:11:55 Page 5 (FS30i) Macro Compiler V01.0 SUB1.SRC ---------- program O1300 --------------------------------------------- G-Line P-Line 0045 1 O1300; 0046 2 #8502=0; 0047 3 ; 0048 4 G243X2Y2B0(*23 31 30 31 3D 53 49 4E 5B 23 31 30 32 5D*); 0
  • Page 83B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE 25-Apr-2003 12:11:55 Page 6 (FS30i) Macro Compiler V01.0 SUB1.SRC ---------- Cross Reference ------------------------------------------- #100 : 6, 8, 10, 10, #101 : 9, #102 : 9, #500 : 6, #502 : 13, #3001 : 7, 13, #8500 : 21, #8501 : 18, #8502 : 2, - 75 -
  • Page 84C.COMPILE/LINK EXAMPLE APPENDIX B-66264EN/01 Link map list file File name : SAMPL.MAP ---------------------------------------------------------------------- Fri Apr-25-2003 12:12:0 Page 1 Macro Linker V01.0 SAMPL.MAP ---------- Macro Library List ----------------------------------------------- NO FI
  • Page 85B-66264EN/01 APPENDIX C.COMPILE/LINK EXAMPLE Fri Apr-25-2003 12:12:0 Page 2 Macro Linker V01.0 SAMPL.MAP P9105 = 00000000 P9111 = 0 P9112 = 0 P9113 = 0 P9114 = 0 P9115 = 0 P9116 = 0 P9117 = 0 P9118 = 0 P9119 = 0 P9120 = 0 P9121 = 0 P9122 = 0 P9123 = 0 P9124 = 0 P9125 = 0 P9126 = 0 P9127 = 0 P9128 =
  • Page 86D.BOOT SYSTEM APPENDIX B-66264EN/01 D BOOT SYSTEM - 78 -
  • Page 87B-66264EN/01 APPENDIX D.BOOT SYSTEM D.1 OVERVIEW The Boot System load the CNC system software (Flash RAM → DRAM), then starts it so that software can be executed. The Boot System provides the following maintenance functions for the CNC: (1) Registering a file in Flash ROM Reads a file from a Memory
  • Page 88D.BOOT SYSTEM APPENDIX B-66264EN/01 D.1.1 Displaying the Power ON Sequence (1) RAM TEST :END (2) ROM TEST :END [60W1A] (3) DRAM ID :xxxxxxxx (4) SRAM ID :xxxxxxxx (5) FROM ID :xxxxxxxx *** MESSAGE *** (7) LOADING CNC DATA-1 xxxxxx/xxxxxx END RAM TEST :END (2) ROM TEST :ERROR Processing is stopped in
  • Page 89B-66264EN/01 APPENDIX D.BOOT SYSTEM D.1.2 Starting the Boot System In ordinary system activation, the Boot System automatically transfers files from Flash ROM to DRAM in the background. The user is not aware of this operation. However, the Boot System must be operated manually, from menu screen, whe
  • Page 90D.BOOT SYSTEM APPENDIX B-66264EN/01 D.2 SCREEN CONFIGURATION AND OPERATING PROCEDURE When the Boot System is first started, the MAIN MENU screen is displayed. This screen is described below : MAIN MENU screen (1) SYSTEM MONITOR MAIN MENU 60W1 - 01 (1) Screen title. The series and edition of the BOOT
  • Page 91B-66264EN/01 APPENDIX D.BOOT SYSTEM D.2.1 USER DATA LOADING/SYSTEM DATA LOADING Screen Description This screen is used to read a system or user file from a Memory card into Flash ROM. The USER DATA LOADING screen is used to load ROM data from a Memory card to Flash memory. The SYSTEM DATA LOADING sc
  • Page 92D.BOOT SYSTEM APPENDIX B-66264EN/01 (3) When you select a file from the SYSTEM DATA LOADING screen, a ROM data confirmation screen is displayed for confirmation. SYSTEM DATA CHECK & DATA LOADING G001A_B1.MEM 1 G001 001A 2 G001 021A 3 G001 041A 4 G001 061A 5 G001 081A 6 G001 0A1A 7 G001 0C1A 8 G001 0
  • Page 93B-66264EN/01 APPENDIX D.BOOT SYSTEM D.2.2 SYSTEM DATA CHECK Screen Description This screen is used to list files in Flash ROM or Memory card, together with the corresponding numbers of management units in each file and the series and edition of the software. Screen configuration (1) SYSTEM DATA CHEC
  • Page 94D.BOOT SYSTEM APPENDIX B-66264EN/01 Screen configuration (MEMORY CARD SYSTEM screen) (1) SYSTEM DATA CHECK (1) Screen title. (2) MEMORY CARD DIRECTORY (FREE[KB]: 5123) (2) The size of the free space of the (3) 1 G001A_B1.MEM 1048704 2003-01-01 12:00 Memory card is displayed. 2 G001A_B2.MEM 1048704 2
  • Page 95B-66264EN/01 APPENDIX D.BOOT SYSTEM Others (Parity information for the system file and user file) The NC BAS-1, DGD0SRVO, and other system files in Flash ROM contain parity information in each management unit. If the file name field or parity field on the check screen contains a non-ASC II character
  • Page 96D.BOOT SYSTEM APPENDIX B-66264EN/01 D.2.3 SYSTEM DATA DELETE Screen Description This screen is used to delete a user file from Flash ROM or Memory card. Screen configuration (1) SYSTEM DATA DELETE (1) Screen title. (2) 1.FROM SYSTEM (2) Select the FROM SYSTEM screen. (3) 2.MEMORY CARD SYSTEM (3) Sel
  • Page 97B-66264EN/01 APPENDIX D.BOOT SYSTEM Screen configuration (MEMORY CARD SYSTEM screen) (1) SYSTEM DATA DELETE (1) Screen title. (2) MEMORY CARD DIRECTORY (FREE[KB]: 5123) (2) The size of the free space of the (3) 1 G001A_B1.MEM 1048704 2003-01-01 12:00 Memory card is displayed. 2 G001A_B2.MEM 1048704
  • Page 98D.BOOT SYSTEM APPENDIX B-66264EN/01 D.2.4 SYSTEM DATA SAVE Screen Description This screen is used to write a user file in Flash ROM to a Memory card. Only user files can be saved from Flash ROM to a Memory card. System files cannot be saved. Screen configuration (1) SYSTEM DATA SAVE (1) Screen title
  • Page 99B-66264EN/01 APPENDIX D.BOOT SYSTEM (4) When saving terminates normally, the system displays the following message. Press the [SELECT] key. The names of files written to the Memory card are listed. Check the file names by, for example, making a note of the list. *** MESSAGE *** FILE SAVE COMPLETE. H
  • Page 100D.BOOT SYSTEM APPENDIX B-66264EN/01 D.2.5 SRAM DATA BACKUP Screen Description This screen is used to collectively save and restore parameters, programs, and other data, retained after the CNC power in SRAM is turned off, to and from a Memory card. Screen configuration (1) SRAM DATA BACKUP (1) Screen
  • Page 101B-66264EN/01 APPENDIX D.BOOT SYSTEM (4) Upon the termination of backup, a message such as that shown below is displayed. Click the [SELECT] key to terminate the operation. *** MESSAGE *** SRAM BACKUP COMPLETE. HIT SELECT KEY. [SELECT][ YES ][ NO ][ UP ][ DOWN ] Operating procedure (Restoring the dat
  • Page 102D.BOOT SYSTEM APPENDIX B-66264EN/01 CAUTION 1 Backup files will be created with a file name of SRAMBAK.xxx, where xxx is replaced with a number between 001 and 999 sequentially. On the first Memory card, a backup file is created with a name of SRAMBAK.001. If all data is not contained on the single
  • Page 103B-66264EN/01 APPENDIX D.BOOT SYSTEM D.2.6 MEMORY CARD FORMAT Screen Description This function is used to format a Memory card. Memory cards must be formatted before they can be used for the first time or before they can be re-used after their data has been destroyed or lost because of, for example,
  • Page 104D.BOOT SYSTEM APPENDIX B-66264EN/01 D.2.7 LOAD BASIC SYSTEM Description The function is used to terminate the Boot System and activate the CNC. Operating procedure From the MAIN MENU screen, select "1. END." The system displays the "ARE YOU SURE? HIT YES OR NO" message. To terminate the Boot System
  • Page 105B-66264EN/01 APPENDIX D.BOOT SYSTEM D.3 ERROR MESSAGES AND REQUIRED ACTIONS The following table lists and explains error messages in alphabetical order. Message Description and required action D DEVICE ERROR (xxxx) An attempt to write data to Flash ROM was unsuccessful. Turn the power off and back o
  • Page 106D.BOOT SYSTEM APPENDIX B-66264EN/01 Message Description and required action M MEMORY CARD FULL. The Memory card is full. Delete any unnecessary files from HIT SELECT KEY. the Memory card. Alternatively, replace the Memory card with another card having sufficient free space. MEMORY CARD MOUNT ERROR.
  • Page 107B-66264EN/01 APPENDIX E.PARAMETERS E PARAMETERS - 99 -
  • Page 108E.PARAMETERS APPENDIX B-66264EN/01 E.1 COMPILE PARAMERTES When the power is turned on, the compile parameters are initialized to the values set in P-CODE variables. So, these parameters cannot be modified, for example, from the MDI panel. #7 #6 #5 #4 #3 #2 #1 #0 9000 M3MB M2MB M1MB M512 M256 9001 M4
  • Page 109B-66264EN/01 APPENDIX E.PARAMETERS #6 PWSR P-CODE workpiece number search is: 0: Disabled. 1: Enabled. #7 EXT1 The extended functions (CNC program reference/write, cutting distance accumulation/preset, and reader/puncher interface control) are: 0: Disabled. 1: Enabled. #7 #6 #5 #4 #3 #2 #1 #0 9003 P
  • Page 110E.PARAMETERS APPENDIX B-66264EN/01 NOTE When using a system with vertical soft keys, use bit 1 (KY100) of compile parameter No. 9160. #6 PTCH In macro variable output (G338), an EOB is output as: 0: LF. 1: LF CR CR. #7 #6 #5 #4 #3 #2 #1 #0 9004 CUTLG [Data type] Bit # 7 CUTLG Cutting distance accumu
  • Page 111B-66264EN/01 APPENDIX E.PARAMETERS No. 9165 # 0 X17CL 17th axis # 1 X18CL 18th axis : # 7 X24CL 24th axis #7 #6 #5 #4 #3 #2 #1 #0 9005 TMACC AXCLS [Data type] Bit #4 AXCLS In macro call using an axis address: 0: O9009 is called at all times as an execution macro. 1: A different execution macro is ca
  • Page 112E.PARAMETERS APPENDIX B-66264EN/01 #7 #6 #5 #4 #3 #2 #1 #0 9008 MCARG [Data type] Bit #5 MCARG In a G/M code macro call, P, L, N, and G are: 0: Not used as arguments. 1: Used as arguments. When this parameter is set to 1, the argument correspondence is: G#10, L#12, N#14, P#16. NOTE When N is used, t
  • Page 113B-66264EN/01 APPENDIX E.PARAMETERS 9016 G code for calling program number 9013 as a macro 9017 G code for calling program number 9014 as a macro 9018 G code for calling program number 9015 as a macro 9019 G code for calling program number 9016 as a macro 9020 G code for calling program number 9017 a
  • Page 114E.PARAMETERS APPENDIX B-66264EN/01 9033 M code for calling a user program as a subprogram [Data type] Integer [Valid data range] 1 to 99999999 (except 02, 30, 98, and 99) Set an M code for calling a user program as a subprogram. 9038 Conversational macro main program number (for user screen 1) 9040
  • Page 115B-66264EN/01 APPENDIX E.PARAMETERS NOTE 1 If a value not within the specifiable range is set, or a specified range is such that No. 9042 > No. 9043, subprogram call using a range specification M code is disabled. 2 An M code used for macro call/subprogram call is not used as a calling code even when
  • Page 116E.PARAMETERS APPENDIX B-66264EN/01 9124 Count of macro call using an M code (specification of 3 sets) (2nd set) 9125 Start program number of macro call using an M code (specification of 3 sets) (2nd set) 9126 Start M code of macro call using an M code (specification of 3 sets) (3rd set) 9127 Count o
  • Page 117B-66264EN/01 APPENDIX E.PARAMETERS NOTE 1 In the following cases, this call is disabled: <1> In a compile parameter, a value not within the range is set. <2> A defined M code range (start M code number + count) exceeds 99999999. <3> A defined program number range (start program number + count) excee
  • Page 118E.PARAMETERS APPENDIX B-66264EN/01 9134 Start program number of macro call using an G code (specification of 3 sets) (2nd set) 9135 Start G code of macro call using an G code (specification of 3 sets) (3rd set) 9136 Count of macro call using an G code (specification of 3 sets) (3rd set) 9137 Start p
  • Page 119B-66264EN/01 APPENDIX E.PARAMETERS NOTE 1 In the following cases, this call is disabled: <1> In a compile parameter, a value not within the range is set. <2> A defined G code range (start G code number + count) exceeds 99999999. <3> A defined program number range (start program number + count) excee
  • Page 120E.PARAMETERS APPENDIX B-66264EN/01 9056 Time-out period for waiting for transmission/reception [Data type] Integer [Unit of data] sec [Valid data range] 0 to 180 Set a time-out period to be applied when the transmission/reception function (G335 to G338) for reader/puncher interface control waits for
  • Page 121B-66264EN/01 APPENDIX E.PARAMETERS #7 #6 #5 #4 #3 #2 #1 #0 9105 BSC SSC [Data type] Bit #0 SSC Subprogram call using a S code is: 0: Disabled. 1: Enabled. #1 BSC Subprogram call using a second auxiliary function code is: 0: Disabled. 1: Enabled. #7 #6 #5 #4 #3 #2 #1 #0 9160 KY100 CUNIT [Data type] B
  • Page 122E.PARAMETERS APPENDIX B-66264EN/01 #2 PCD This parameter, combined with bit 6 (GMP) of parameter No. 6008, has the following meaning: When an execution macro is called from another execution macro Compile parameter PCDC(No. 9163#2) 0 1 - Calls using G65, M98, G66, and G66.1 are 0 allowed. Other type
  • Page 123B-66264EN/01 APPENDIX E.PARAMETERS #3 LCLLV If an execution macro is called as a subprogram from a user program (subprogram call using a M/S/T/second auxiliary function/specific code), the local variable level: 0: Does not change. (The local variable at the calling source is used.) 1: Changes. (The
  • Page 124E.PARAMETERS APPENDIX B-66264EN/01 E.2 EXECUTOR PARAMETERS When the power is turned on, the executor parameters are not initialized to the values set in P-CODE variables. So, these parameters can be modified, for example, from the MDI panel. #7 #6 #5 #4 #3 #2 #1 #0 9000 RSC STP [Input type] Paramete
  • Page 125B-66264EN/01 APPENDIX E.PARAMETERS 9003 Conversational macro/auxiliary macro sequence number subject to breaking [Input type] Parameter input [Data type] 2-word path [Valid data range] 1 to 99999999 Set the sequence number of a conversational macro/auxiliary macro subject to breaking by the debug fu
  • Page 126E.PARAMETERS APPENDIX B-66264EN/01 #7 #6 #5 #4 #3 #2 #1 #0 9011 VRM MTC [Input type] Parameter input [Data type] Bit path #0 MTC Macro call/subprogram call using a T code is: 0: Enabled. 1: Disabled. With this parameter, call using a T code enabled with bit 3 (TCAL) of compile parameter No.9002 or b
  • Page 127B-66264EN/01 APPENDIX E.PARAMETERS #1 SEP An auxiliary macro and conversational macro are: 0: Executed sequentially. (An auxiliary macro and conversational macro are executed alternately. If M99 is executed in one main program, control is transferred to the other main program.) 1: Executed in parall
  • Page 128E.PARAMETERS APPENDIX B-66264EN/01 #3 MV3 The common variables #550 to #599 used by a P-CODE macro are: 0: P-CODE macro common variables independent of the custom macro common variables. 1: Shared as custom macro common variables. #4 MV4 The common variables #600 to #699 used by a P-CODE macro are:
  • Page 129B-66264EN/01 APPENDIX E.PARAMETERS 9048 P-CODE macro number of an execution macro [Input type] Parameter input [Data type] Byte path [Valid data range] 1 to 10 Select the number of the P-CODE file where an execution macro to be executed with each path is held. NOTE 1 With a path for which this param
  • Page 130E.PARAMETERS APPENDIX B-66264EN/01 9051 Area number of P-CODE variables (#10000 and up) [Input type] Parameter input [Data type] Byte path [Valid data range] 1 to 10 Set the area number for the P-CODE variables (#10000 to #19999) used by the macro executor of each path. If the same area is selected
  • Page 131B-66264EN/01 APPENDIX E.PARAMETERS 9054 Number of extended P-CODE variables (#20000 and up) [Input type] Parameter input [Data type] 2-word path [Valid data range] 0 to 70000 Set the number of extended P-CODE variables. NOTE When this parameter is set, the power must be turned off before operation i
  • Page 132E.PARAMETERS APPENDIX B-66264EN/01 PMC internal relay (R area) address of an interlock mode signal for each axis 9069 direction [Input type] Parameter input [Data type] 2-word path [Valid data range] 0 to PMC internal relay (R area) bit position of an interlock mode signal for each 9070 axis directi
  • Page 133B-66264EN/01 INDEX INDEX BOOT SYSTEM............................................................. 78 SCREEN CONFIGURATION AND OPERATING PROCEDURE ................................................................ 82 SRAM DATA BACKUP Screen .................................... 92 COMPILE ER
  • Page 134
  • Page 135Revision Record FANUC MACRO COMPILER For Series 30i-MODEL A OPERATOR’S MANUAL (B-66264EN) 01 Jun., 2003 Edition Date Contents Edition Date Contents
  • Page 136