Contents Summary of FANUC POWER MATE i-MODEL D/H Macro Compiler/Macro Executer Programming manual
Page 1GE Fanuc Automation Motion Control Products Power Mate – Models D and H Power Mate i – Models D and H Macro Compiler / Macro Executor Programming Manual B-62093EN-1/02 September 1998
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 3B–62093E–1/02 DEFINITION OF WARNING, CAUTION, AND NOTE DEFINITION OF WARNING, CAUTION, AND NOTE This manual includes safety precautions for protecting the user and preventing danger to the machine. Precautions are classified into Warning and Caution according to their bearing on safety. Also, supple
Page 10B–62093E–1/02 PROGRAMMING 1. OUTLINE 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 relevant machining such as part programs. This function will convert the custom macro prepared by a machine too
Page 111. OUTLINE PROGRAMMING B–62093E–1/02 The models covered by this manual, and their abbreviations are : Model name Abbreviation FANUC Power Mate–MODEL D Power Mate–D PM–D FANUC Power Mate–MODEL D Power Mate–D (two–path control) (two–path control) PM–D, (two–path control), PM–D2 FANUC Power Mate–MODEL
Page 122. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR 2 MACRO COMPILER AND MACRO EXECUTOR 5
Page 132. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 2.1 The NC program is converted into an execution form (P–CODE program), transfer the Power Mate to execute the registered P–CODE MACRO COMPILER program to be called from the user program by means of G, M and T codes FOR SYSTEM P or spec
Page 142. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR 2.1.2 Connect Power Mate to CN2 or CN3 for SYSTEM P series. Equipment Connection CN2,3 SYSTEM P series RS–232–C Power Mate–D Channel 1 NOTE Use CN1 normally for PPR. 2.1.3 Compiling Procedure (Main Flow) (START) Source program preparatio
Page 152. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 2.1.4 (1) Equipment connection Compiling Procedure Connect Power Mate to CN2 or CN3 of SYSTEM P series using the RS–232–C cable. Using System P Series Generally, connect FANUC PPR to CN1. (Details) (2) Turning on power of SYSTEM P series
Page 162. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR (6) Test compile 1. For no initial screen, press a few times. 2. “R0” (Start) 3. “ = ON ” : Displays a source program during compile. “ = OFF” : Displays o[NL]y program No. during compile. 4. No. = “1” (Test compile) 5.
Page 172. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 2.1.5 Table for Editing by P–G Mate Job Keyboard y input p Major Command (enter NL at end of Notes Minor classification command) classification Paper tape, keyboard, floppy Input terminated by the string INPUT IN [ string] disk specifi
Page 182. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR Job Keyboard input Major Command (enter NL at end of Notes Minor classification command) classification REN[ intial value Renumber lines RENUMBER [ , increment]] Change character used to dis- EOB EOB Character play EOB Display list of co
Page 192. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 2.1.6.1 (1) The communication parameters of the Power Mate are used to set communications for loading. So, set the channel, baud rate, and so Operation through the forth on the parameter screen beforehand. CRT/MDI When the Power Mate–D (
Page 202. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR (5) When a Power Mate model other than the PM–D (two–path control) is used, or a path is selected with the PM–D (two–path control), the memory of the macro executor is initialized. When the memory has been initialized, the loading screen
Page 212. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 Address bit Address s Model Remarks width pecification Power Mate–D 24 3A0000 Power Mate–D 24 360000 (two–path control) path 1 Power Mate–D 24 340000 (two–path control) path 2 Power Mate–H 24 980000 Specify –S. Power Mate i–
Page 222. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR (8) When loading is completed successfully, the screen below appears. (a) For the Power Mate–D MACRO COMPILER/EXECUTOR P–CODE LOADER (I/O PARAMETERS) (DATA TRANSFER) ADRxxxxxxH:xx I/O CHANNEL = 0 (MAPPING–128KB) I/O UNIT = 0 ************
Page 232. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 (c) For the Power Mate–H, Power Mate i–D, and Power Mate i–H MACRO COMPILER/EXECUTOR P–CODE LOADER (I/O PARAMETERS) (DATA TRANSFER) ADRxxxxxxH:xx I/O CHANNEL = 0 (MAPPING–128KB) (Note) I/O UNIT = 0 *************** BAUDRATE =11 __________
Page 242. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR (9) If an error occurs during loading, the screen below appears. (a) For the Power Mate–D MACRO COMPILER/EXECUTOR P–CODE LOADER (I/O PARAMETERS) (DATA TRANSFER) ADRxxxxxxH:xx I/O CHANNEL = 0 (MAPPING–128KB) I/O UNIT = 0 * * * * * * * * *
Page 252. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 (c) For the Power Mate–H, Power Mate i–D, and Power Mate i–H MACRO COMPILER/EXECUTOR P–CODE LOADER (I/O PARAMETERS) (DATA TRANSFER) ADRxxxxxxH:xx I/O CHANNEL = 0 (MAPPING–128KB) (Note) I/O UNIT = 0 * ______________ BAUDRATE =11 _________
Page 262. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR (b) For the Power Mate–D (two–path control) and Power Mate–H MACRO COMPILER/EXECUTOR P–CODE LOADER EXECUTOR OPTION NOTHING PUSH 0 KEY : EXIT When the numeric key 0 is pressed, the P–code loader function is terminated. (c) For the Power M
Page 272. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 2.1.6.2 Use the procedure below when using the P–code loader function from the Operation from the DPL/MDI with the Power Mate–D, Power Mate–D (two–path control), and Power Mate–H. DPL/MDI (1) The communication parameters of the Power Mat
Page 282. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR (7) When the Power Mate receives data, the state of data reception is displayed as shown below. DATA TRANSFER ADRXXXXXXH: X : Transfer address (updated every 10 hours) : Transferred data (8) When loading is completed successfully, the sc
Page 292. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 (b) For the Power Mate–D (two–path control) LOAD ERR02 /1 (Alarm message) RETRY?(PUSH CAN) When the MDI key (CAN) is pressed, the screen display returns to the path selection screen for procedure 4. If an error such as a Power Mate commu
Page 302. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR 2.1.6.3 (1) As the loading I/O channel, use channel 1. Notes (2) ASCII or ISO code is transferred. EIA code is not used. Whether to use ASCII or ISO is determined by bit 3 (ASI) of parameter No. 0101, No. 0111, and No. 0121. (3) The I/O
Page 312. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 No. 0102 I/O device specification number I/O UNIT Data type: Byte Set an I/O device specification number. Set 0 when using the P–code loader function. No. 0103 Baud rate BAUDRATE Data type: Byte Set an I/O device baud rate. Set the same
Page 322. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR 2.1.6.5 Alarms Alarm message for Description/cause CRT/DPL ILLEGAL CHARACTER Data transferred is incorrect. LOAD ERR00 OVERRUN Overrun error LOAD ERR01 FRAMING ERROR Framing error LOAD ERR02 ILLEGAL CHANNEL A channel other than channel 1
Page 332. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 2.2 MACRO COMPILER (FOR THE PERSONAL COMPUTER) 2.2.1 The figure below shows the basic development procedure of a macro Macro Executor executor on the personal computer. Development Procedure Symbol definition Source program file (*.DEF)
Page 342. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR 2.2.2 A created macro source program is compiled by the macro compile Compile (Mcomp0) command Mcomp0. Command format: n:>MCOMP0 The table below lists the compile options specifiable in . –NR Does not
Page 352. MACRO COMPILER AND MACRO EXECETOR PROGRAMMING B–62093E–1/02 (Example of link control file creation) /* Macro library CNC=c:¥mcomp¥mex¥PMID_01.MEX /* Path setting */ SYSTEM=MPATH1 /* Compile parameters P9000=10000100 P9001=00000001 P9003=00100100 P9004=10010000 P9100=00000001 P9037=60 P9038=1 P903
Page 362. MACRO COMPILER AND B–62093E–1/02 PROGRAMMING MACRO EXECUTOR 2.3 The macro executor controls the execution of the P–CODE program created by the macro compiler. MACRO EXECUTOR CONTROLS The P–CODE program (execution macro) can be called and executed by specifying G (M, T) or original code set by par
Page 373. EXECUTION MACRO PROGRAMMING B–62093E–1/02 3 EXECUTION MACRO 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, and executed. In case of macro call, argument designation is possible, and it is compared as
Page 38B–62093E–1/02 PROGRAMMING 3. EXECUTION MACRO 3.1 To call a P–CODE program from the user program, the codes shown in Table 3.1 are used. CALL CODE AND PROGRAM NO. Table 3.1 Codes for Calling P–CODE program Common variables in Program num- Codes for call Type of call which a specified Parameters to be
Page 393. EXECUTION MACRO PROGRAMMING B–62093E–1/02 (2) Difference between Subprogram Call (T, M) and Macro Call (G, M) (a) Argument designation can be made in macro call. In subprogram call, however, argument designation is not possible without T code, special code and call code. (b) In subprogram call, a
Page 40B–62093E–1/02 PROGRAMMING 3. EXECUTION MACRO 3.1.4 By commanding G codes which is designated, the macro programs Calling Macros “O9010–O9019” registered as P–CODE program can be called. O9010–9019 by G Code Local variables without argument designation are . N_ G< Argument designation>; 3
Page 413. EXECUTION MACRO PROGRAMMING B–62093E–1/02 3.1.7 By setting compile parameter TMACC(No.9005#7) to 1, P–CODE Calling a Macro Using program (No.9008) can be called macros by specifying a T code in a user program. a T Code All addresses specified in this block are used as arguments except that the T
Page 42B–62093E–1/02 PROGRAMMING 3. EXECUTION MACRO 3.1.8 The code specified by compilation parameters 9045 to 9047 can be used Calling Macros with a to call the corresponding P–CODE macro programs registered in Power Mate. G Code by Specifying the Range Specifying call arguments is the same as calling mac
Page 433. EXECUTION MACRO PROGRAMMING B–62093E–1/02 3.1.9 Axis address commands enable calling macros. Function for Calling When AX1CL to AC8CL of compilation parameter 9005#0 to #3, Macros with an Axis 9008#0 to #3 are set to 1, the programs registered to Power Mate can be Address called by the axis addre
Page 44B–62093E–1/02 PROGRAMMING 3. EXECUTION MACRO 3.2 Argument designation is possible when calling a call. It can be referred to as a local variable at the P–CODE program side. Argument ARGUMENT specification 1 and argument specification 2 are possible. DESIGNATION For arguments designation, negative sy
Page 453. EXECUTION MACRO PROGRAMMING B–62093E–1/02 3.3 Source program for registration custom macro (P–CODE program) is programmed by the Custom macro from custom macro. But, there are LIMITATION FOR some limits for execution in Power Mate. The P–CODE program custom EXECUTION MACRO macro is described belo
Page 46B–62093E–1/02 PROGRAMMING 3. EXECUTION MACRO (8) Cautions (a) Separate registration of a program cannot be made. Register the whole program to the edit memory, and then to the Power Mate. Max. 400 programs can be registered to the Power Mate. (b) In one program, limit the sequence number used for br
Page 474. CONVERSATIONAL MACRO FUNCTION AND AUXILIARY MACRO FUNCTION PROGRAMMING B–62093E–1/02 4 CONVERSATIONAL MACRO FUNCTION AND AUXILIARY MACRO FUNCTION 40
Page 484. CONVERSATIONAL MACRO FUNCTION B–62093E–1/02 PROGRAMMING AND AUXILIARY MACRO FUNCTION 4.1 The conversational macro function executes a program compiled by the macro compiler independently of the normal NC part program. This CONVERSATIONAL function basically is not affected by operation modes of NC
Page 494. CONVERSATIONAL MACRO FUNCTION AND AUXILIARY MACRO FUNCTION PROGRAMMING B–62093E–1/02 The conversational macro function is executed only when the conversational screen is selected with the function key CUSTOM . The conversational macro function executes its macro program whose program No. is the v
Page 504. CONVERSATIONAL MACRO FUNCTION B–62093E–1/02 PROGRAMMING AND AUXILIARY MACRO FUNCTION Bad example Good example O1234 ; O1234 ; NO NO Key input ? Key input ? YES YES Key input process Key input process M99 ; M99 ; Program the conversational program so that it will be a cyclic like the PMC ladder pr
Page 514. CONVERSATIONAL MACRO FUNCTION AND AUXILIARY MACRO FUNCTION PROGRAMMING B–62093E–1/02 4.2 The auxiliary macro is always executed regardless of the selection screen while the conversational macro function is executed only when the AUXILIARY MACRO FUNCTION conversational macro screen is selected in
Page 524. CONVERSATIONAL MACRO FUNCTION B–62093E–1/02 PROGRAMMING AND AUXILIARY MACRO FUNCTION 4.3 The following control codes are prepared for execution control. EXECUTION M98 : Macro subprogram call CONTROL CODE M99 : Macro subprogram end (1) Macro subprogram call (M98) M98 Pp ; A macro subprogram specif
Page 534. CONVERSATIONAL MACRO FUNCTION AND AUXILIARY MACRO FUNCTION PROGRAMMING B–62093E–1/02 4.4 Three screens are available for execution of the conversational macro. CONVERSATIONAL These screens are selected by pressing the function key CUSTOM . The three MACRO EXECUTION screens correspond with those f
Page 555. MACRO VARIABLES PROGRAMMING B–62093E–1/02 5.1 MACRO VARIABLES Conversational Executable mac- Variable No. User program Auxiliary macro macro ro Local variable #1 to #33 (#99) Ę ∆ — (NOTE 1) Common variable #100 and up Ę Ę #500 and up (Common variable) P–CODE variable #10000 and up Ę Extended P–
Page 56B–62093E–1/02 PROGRAMMING 5. MACRO VARIABLES 5.4 It is possible to use optional quantity of the P–CODE variables starting with #10000 on 100–pc. basis. P–CODE VARIABLES #10000– A 100 times as many as the numerical value preset on the compiling parameter No. 9037 will be the usable quantity of P–CODE
Page 575. MACRO VARIABLES PROGRAMMING B–62093E–1/02 5.5 The variables of the expanded P–CODE which start from #20000 can be used for the optional number, if the capacity of tape memory is 160m. VARIABLES OF This variable can be selected for numbers with floating decimal points, EXPANDED P–CODE the same as
Page 58B–62093E–1/02 PROGRAMMING 5. MACRO VARIABLES 5.6 The variables used for P–CODE programs, such as local variables, common variables, P–CODE variables, and extended P–CODE DISPLAYING VARIABLES variables, can be displayed by pressing the function key OFFSET SETTING several times. The values of these va
Page 596. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6 FUNCTIONS OF THE MACRO EXECUTOR Table 6 (a) Functions (1/2) Conversa- Execut- No. Function Outline Auxiliary tional able 6.1 Screen display function Controls the display of the conversational 1 Screen display control macro screen. Ę 2 Fu
Page 606. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR Table 6 (a) Functions (2/2) Conversa- Execut- No. Function Outline Auxiliary tional able 6.21 Separation of P–CODE program UI/UO Separates the system variables for macro Ę Ę Ę DI/DO into the signals for user programs and those for P–CODE p
Page 616. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 Table 6 (b) Functions of the Macro Executor and the Associated G Codes and Macro Variables (1/2) Associated G Associated macro vari- Conversa– Executa– No. Function Auxiliary code able tional ble 6.1 Screen display function G202, G243 #850
Page 626. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR Table 6 (b) Functions of the Macro Executor and the Associated G Codes and Macro Variables (2/2) Associated G Associated macro vari- Conversa– Executa– No. Function Auxiliary code able tional ble 6.24 Masking screen switching Ę wit
Page 636. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.1 SCREEN DISPLAY FUNCTION 6.1.1 The coordinates system used for character display and cursor display in Coordinates System of the conversational macro program is called the character coordinates system. Screen (1) Display unit with 9–inc
Page 646. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.1.2 It is possible to make the screen freely by commanding the contents of the Screen Display Control screen display with the conversational macro program. The following control codes are prepared for the screen display. Code 1. G243 Cha
Page 656. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 Command character size at the address A. A1 = Normal size A2 = Full size A3 = Triple size The following characters and symbols can be displayed at full size: Alphabetic characters, numeric characters, kana characters, blanks, the plus sign
Page 666. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR G243 Xxx Yyy Ponnnn; o : A number from 0 to 8 to select a program in the character–string registration program group nnnn : Sequence number 0001 to 9999 Example 1) #8509 = 1000 ; G243 P10 ; ⇒ Displays the character string with sequence num
Page 676. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 CAUTION Process sequence of modal address Program is processed by block in the normal NC program, but it is processed in sequence of address command in the conversation macro program. (Example) 1 F8.3 ; G243 F5.1 D#100 ; 2 F8.3 ; G243 D#10
Page 686. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.1.3 Writing a desired value in parameter 8510 enables displaying any Function Screen function screen. Reading the value of parameter 8510 enables checking which function screen is currently displayed. Control Function The following table
Page 696. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.2 The address functions are the functions to return the address of PMC or the contents of the parameter as the function values. However, as the ADDRESS address functions cannot be written, it is impossible to describe them on FUNCTIONS t
Page 706. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.3 (1) PMC address write control READING AND Data of one, two, or four bytes can be written when address L is specified with control code G310. WRITING A PMC G310 Dd Qq Lx; ADDRESS G310 Rr Qq Lx; G310 Cr Qq Lx; G310 Kr Qq Lx; These comman
Page 716. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 The address function can read data the specified number of bytes at a time. However, the following must be noted: As the address function handles and converts the read data as a signed value (in two’s complement), the read data may be chan
Page 726. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.4 READER PUNCHER INTERFACE CONTROL BY CONVERSATIONAL MACRO 6.4.1 The conversation macro function allows the reader/puncher interface to Outline be controlled. The control is performed by combining the following four control codes. When t
Page 736. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 No control of 1 byte reading (G335) can be carried out when the reader/puncher interface circuit is opened in the transmission control mode (End code = 8). There is an end code to check to see if the commanded control code has been properl
Page 746. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR (2) Circuit closing (G331) G331 ; The circuit, which is currently open, is closed. There is no end code for the circuit closing processing. It always ends normally. (3) 1 byte reading (G335) G335 Pp ; p : Reading variable number Data 1 byt
Page 756. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 Dd → Data command Pp → Block number command Kk → Null code command Cc → 1–character command See screen display control code G243 (character display) for string commands 1 and 2 and address F, Z, D, P, and K commands since they are similar.
Page 766. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR LF N_ P_ LF P_ LF % Leader part Variable Tape end number Start to input Variable data Information before “LF” which appears on the tape at first is all disregarded. The tape to the end (“EOR”) from the first “LF” is analyzed as significant
Page 776. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (2) Outputting Macro Variable Values(G338) G338 Pp Qq Ff Zz ; A specified macro variable is changed into a prescribed tape format and output from reader puncher interface which opened with the transmit control mode. Output code is selected
Page 786. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.4.4 The conversational macro can input and output a macro variable via the Extending the Function reader/punch interface. This function can be extended so that two or more variable groups can be output at a time and the output data can b
Page 796. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 %;P___;P___; .. ;P___;P___;P___; ... ;P___;P___;P___; ... ;P___;% |←#10000 to #10009→|←#11000 to #11019→|←#12000 to #12009→| “R11” “R31” “R21” (2) Function for inputting macro variables By adding address Q to G337 described in (1) of Secti
Page 806. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.4.5 File data on the FANUC Handy File, FANUC FLOPPY CASSETTE, FA FANUC Floppy CARD or FANUC PROGRAM FILE Mate can be read, prepared and deleted, by an opening command and the instruction of control code Cassette Control “G339”. Read file
Page 816. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (Example) When making a head call of the next file which is being called now G330 P11 B10 S2 C2 A1 ; (2) Making Files and Writing Data (G330) G330 PpBb Ss Cc (Ll/Ff) ; New files are made and data can be written on a FANUC cassette by speci
Page 826. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR (3) Control of Directory Information (G330/G339) The control of directory information is possible with control code “G339”. Read directory information (G339 P1) Delete file (G339 P2) Change file name (G339 P3) The control mode at line open
Page 836. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (b) Deleting a file (G339 P2) G339 P2 Ll/Ff ; The relevant file can be deleted by the specification of “G339 P2”. Specify the head variable number of the variable string which houses the file name (ASCII code) you wish to delete by address
Page 846. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.5 REFERENCING AND READING NC PROGRAM WITH CONVERSATIONAL MACRO 6.5.1 Recording, deleting and changing of NC part program is possible by the Outline conversational macro function. Control the NC program with program number and block numbe
Page 856. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.5.2 G320 ; Recording of a New Specify the program number to #8520 and instruct G320 to record a new Program program. (Example) To record O0002, #8520=2 ; G320 ; IF[#8529 NE 0] GOTO 900 ; Recording end N900 ; Error Conduct similar process
Page 866. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.5.4 (1) Reading a specified block coded in words (G325) Reading a Specified When issuing this command, specify a program number, block Block number, and the number of the variable into which the block is to be read. From the correspondin
Page 876. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (Example) If O0004 ; G92 X0. M08 ; % #100=28 Address “EOR” If the function for reading a specified block coded in words (G325) reads a block which is not coded in words, completion code #8529 is set to 253 to indicate the fact. When the co
Page 886. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.5.5 (a) Writing a block coded in words (G326Pp) Block Writing Prepared program data can be written in the variable area after the block specified by the program number and block number. Specify the maximum number of variable data by addr
Page 896. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (1) Decimal point specification of every address in block writing The number of digits after the decimal point of every address can be specified. With this specification, the contents of the variable number which was specified to #8523 bec
Page 906. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR NOTE This command cannot catalog a program. If an attempt is made to catalog a program with this command (if the data to be written begins with O), an error code is indicated and #8529 is set to 202. 6.5.6 G327 ; Block Deletion A block spe
Page 916. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.5.9 Address Code Table Address Code Address Code Address Code A 1 B 2 C 3 D 4 E 5 F 6 G 7 H 8 I 9 J 10 K 11 L 12 M 13 N 14 O 15 P 16 Q 17 R 18 S 19 T 20 U 21 V 22 W 23 X 24 Y 25 Z 26 EOB 27 EOR 28 / 29 Statement Decimal Hexadecimal State
Page 926. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.6 Continuous input by cursor and page key is possible with the conversational macro key input control (#8501). CONTINUOUS INPUT BY CURSOR AND (Address code table) PAGE KEY #8501 can be read with the following timing if the cursor and pag
Page 936. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.7 O, N number appearance can be erased on the CUSTOM screen. MASKING OF O, N O, N numbers does not appear when compile parameter “ONMSK=1” NUMBER (No.9003#0). APPEARANCE 6.8 Cutting distance and cutting time can be read and preset with t
Page 946. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.9 Relative coordinates can be read and preset with the conversational macro. READING AND PRESETTING RELATIVE COORDINATES BY CONVERSATIONAL MACRO 6.9.1 Reading of relative coordinates can be informed by the window function. Reading Relati
Page 956. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.10 (1) Key–input control variable #8501 KEY–INPUT AND You can read out the key input with #8501. The following is the correspondence of the key input and #8501. DATA–INPUT CONTROL Table 6.10 Display unit with 9″CRT Key input Value Key in
Page 966. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR A ...1 B ...2 C ...3 D...4 E ...5 F ...6 G ...7 H ...8 I ...9 J ..10 K ..11 L ...12 M ..13 N..14 O ..15 P ..16 Q ..17 R ..18 S ..19 T ..20 U ..21 V ..22 W ..23 X..24 Y ..25 Z ..26 #8503 and #8504 values will be held till the input control
Page 976. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.11 It will be possible to display the cursor by setting the value at the cursor control variable #8505. CURSOR CONTROL #8505= 0 .. Cursor erase = 1 .. Cursor display #8505 value is 0 at power ON. It will be possible to display the cursor
Page 986. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.12 (1) Reference of array type P–CODE variables for conversational macro PROCESSING In conversational macro, two or three–dimensional array type P–CODE variables (#10000...) can be referred. Set a proper value to ARRAY TYPE the following
Page 996. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (2) Processing array type P–CODE variables This is a function which controls processing of array type variable or of variable string when P–CODE variables are used in the conversational macro. 1) clearing array type number, variable string
Page 1006. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR (Example) If #8512=10000, #8514=10010, G315 P2 K3 ; has the following disposition. #10010=#10000 ; #10011=#10001 ; #10012=#10002 ; G315 P3 K3 ; has the following disposition #10012=#10002 ; #10011=#10001 ; #10010=#10000 ; 93
Page 1016. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.13 The torque limit override can be modified to the specified value by setting values to the #8621 to #8628. TORQUE LIMIT CONTROL #8621 1st axis #8625 5th axis #8622 2nd axis #8626 6th axis #8623 3rd axis #8627 7th axis #8624 4th axis #8
Page 1026. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.14 On the conversational macro screen, a key–in line is displayed at a point whose X and Y coordinates are 0 and 12 respectively. Up to 32 key–in KEY–IN LINE line can be input. The prompt and key–in lines are displayed in light blue. CON
Page 1036. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.15 The conversational and auxiliary macros can read the CNC background editing status with a variable. READING THE #8526: Background editing status BACKGROUND 0 : The background editing is halted. EDITING STATUS 1 : The background editin
Page 1046. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.19 PMC AXIS CONTROL 6.19.1 The conversational macro can control the PMC control axis through the PMC Axis Control by PMC axis control interface. The seven control codes listed below are used for this purpose. The PMC control axis to be c
Page 1056. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 NOTE 1 With the Power Mate–D (two–path control), the PMC axis control function cannot be used. 2 A control axis is selected by setting the bit of the input signal G136 or by setting the PMC control axis selection variable (#8700). Set the
Page 1066. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR (d) Reference position return command (G345) G345; The reference position return command is issued to the PMC control axis. (e) Miscellaneous function command (G346) G346 Mmm; The miscellaneous function command is issued to the PC control
Page 1076. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (c) Contention for the PMC axis control function The situation in which both the PMC and this function issue commands to an identical PMC control axis must be avoided. When this function is used for a PMC control axis, the PMC can control
Page 1086. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR NOTE 1 With the Power Mate–D (two–path control), the PMC axis control function cannot be used. 2 A control axis is selected by setting #8700 (PMC control axis selection variable). 3 For details of the PMC axis control interface and so fort
Page 1106. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.20 The interlock control variable for a single axis direction, #8600, determines the direction for which interlocks are provided. Variable INTERLOCK #8601 indicates the axis and direction of a movement when the SKIP FUNCTION FOR AXIS sig
Page 1116. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.21 This function allows the signals of the system variables of the P–CODE program (UI: #1000 to #1015, #1032, UO: #1100 to #1115, #1132) to FUNCTION FOR be different from those of the user program. SEPARATING UI When the program is compi
Page 1126. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.22 An execution, conversational, or auxiliary P–CODE program can reference and write common variables (#100 to #149, #500 to #531) used REFERENCING by a user program for custom macro B. With variables #99100 to #99149 COMMON and #99500 t
Page 1136. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.25 When compilation parameter PWSR (No. 9002, #6) is set to 1, the function for finding a P–CODE work number can be used. FUNCTION FOR FINDING A P–CODE When an operation program created in the program editing memory makes a G–, M–, or T–
Page 1146. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.26 FUNCTION FOR CALLING A USER PROGRAM BY AN EXECUTION MACRO 6.26.1 Using the M code specified by compilation parameter, a P–CODE Function program (execution macro program) called by a G, M, or T code from a user program can call another
Page 1156. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (2) Calling from an execution macro A user program can be called from an execution macro which was called by a user program. However, user program cannot be called doubly from an execution macro program. (User program) (Execution macro pro
Page 1166. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR (3) Multiple calls D The number of multiple calls of user programs and execution macro programs are limited, respectively. The number of multiple calls of user programs called from execution macro programs is calculated independently of th
Page 1176. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.27 OPERATION FUNCTIONS (LOGARITHM, EXPONENT, ARCSINE, ARCCOSINE) 6.27.1 The following operation functions can be used: Overview Logarithm (LN) Exponent (EXP) Arcsine (ASIN) (Unit: Degrees) Arccosine (ACOS) (Unit: Degrees) The functions a
Page 1186. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.28 FUNCTION FOR IDENTIFYING THE PRESSED MDI KEY USING A CONVERSATIONAL MACRO 6.28.1 A control variable has been added so that the MDI number corresponding Overview to the MDI key being pressed can be read using a conversational macro. Th
Page 1196. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (00H – 7FH) 0 1 2 3 4 5 6 7 0 Space 0 @ P 1 1 A Q 2 2 B R 3 # 3 C S 4 4 D T 5 5 E U 6 & 6 F V 7 7 G W 8 ( 8 H X 9 ) 9 I Y A ; * J Z (EOB) B + K [ C ’ L D – = M ] E . N F / ? O 112
Page 1206. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR (80H – FFH) 8 9 A B C D E F 0 Reset F0 1 F1 2 F2 3 F3 4 Shift Insert F4 5 Delete 6 CAN Alter 7 8 Cur→ Input 9 Cur← A Cur↓ Help B Cur↑ C D E Page↓ FR F Page↑ FL 113
Page 1216. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.29 WINDOW FUNCTION 6.29.1 The window function can now reference system information. Overview Conversational macro variable No.8998: System information ID number No.8999: System information Method of using the function By setting a desire
Page 1226. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.29.2 Referenced System Information Referenced System Information and ID No. List (1/4) ID No. Information Contents of Information 1 Alarm check flag 5 Overheat alarm 6 Spindle alarm No.750 to 763(767) 11 P/S Alarm number 12 P/S Alarm num
Page 1236. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 Referenced System Information and ID No. List (2/4) ID No. Information Contents of Information 81 1st axis of APC alarm No.301 to 308 82 2nd axis of APC alarm No.301 to 308 83 3rd axis of APC alarm No.301 to 308 84 4th axis of APC alarm No
Page 1246. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR Referenced System Information and ID No. List (3/4) ID No. Information Contents of Information 411 Ist axis servo motor load current value 412 2nd axis servo motor load current value 413 3rd axis servo motor load current value 414 Servo mo
Page 1256. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 Referenced System Information and ID No. List (4/4) ID No. Information Contents of Information 8030 PMC version 4th digit 8031 PMC version 3rd digit 8032 PMC version 2nd digit 8033 PMC version 1st digit 8035 PMC edition 2nd digit 8036 PMC
Page 1266. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.29.3 Alarm information Detailed Description of Axis/coordinate position information Reference System Miscellaneous information including the total number of machined parts Information Diagnosis information System configuration informatio
Page 1286. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR (b) Overheat alarms A one–byte data, ID No. 5, representing a number from 0 to 255 indicates which overheat alarm was issued. Example : When bit 3 is 1 (on), 8 is output. When bit 5 is 1 (on), 32 is output. When bit 3 and bit 5 are 1 (on),
Page 1296. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 Spindle Alarm Table ID No. Bit information Alarm No. Meaning Bit (0001h) 749 S–SPINDLE LSI ERROR This alarm is issued if the spindle control unit of a system with serial spindles is not started normally when the power is turned on. Four ca
Page 1306. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR (e) Overtravel alarms Each of ID Nos. 20 to 27 corresponds to an alarm number. The Information of each ID number indicates the axis in which the alarm occurred. For one–byte data, see Section 6.29.3.(1)(b). For the meaning of each bit, see
Page 1316. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 Servo Alarm Table ID No. Bit information Alarm No. Meaning Bit (01h) 400 Overload signal is turned on. Ready signal (DRDY) of servo Bit (02h) 401 amplifier turned off. Bit (04h) Bit (08h) The ready signal (MCON) i
Page 1326. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR Servo Alarm Table ID No. Bit information Alarm No. Meaning Bit (01h) 411 Position error during movement is larger than set value. Bit (02h) 413 Error register contents exceeds "2**31. Bit (04h) 415 A speed larger than 511875 detection unit
Page 1336. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (h) Absolute pulse coder (APC) alarms First check ID No. 70. If bit 0 is on, check the following: ID No. 71 to 78 ID No. 81 to 88 ID No. 90 to 98 Each of ID No. 71 to 78 corresponds to an axis; bit 5, if on, indicates that alarm No. 300 ha
Page 1346. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR ID No. Bit information Alarm No. Meaning APC communication error Bit (01h) 301 (Data transmission fault) APC over time error (Data Bit (02h) 302 transmission fault) APC framing error (Data Bit (04h) 303 transmission fault) APC Parity error
Page 1356. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 (2) Detailed information of Axis and Coordinate Axis and Coordinate Detailed Information ID No. Meaning 100 No. of CNC controlled axes 101 No. of PMC controlled axes 102 No. of axes 110 1st axis relative coordinate value 111 2nd axis relat
Page 1366. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR ID No. Meaning 411 1st axis servo motor load current 412 2nd axis servo motor load current 413 3rd axis servo motor load current 414 4th axis servo motor load current 415 5th axis servo motor load current 416 6th axis servo motor load curr
Page 1376. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 Diagnose Detailed Information ID No. Bit Information Meaning Bit (01h) M,S,T function is being executed. Bit (02h) Move command is being executed in automatic operation. Bit (04h) Dwell is being executed. Bit (08h) Inposition check is bein
Page 1386. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR ID No. Meaning 800 1st axis position error 801 2nd axis position error 802 3rd axis position error 803 4th axis position error 804 5th axis position error 805 6th axis position error 806 7th axis position error 807 8th axis position error
Page 1396. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.30 EXECUTION MACRO CALL MASK FUNCTION 6.30.1 An execution macro call can be masked by using the executor parameter Function or macro variable. The following execution macro calls can be masked: Axis address call T code macro call T code
Page 1406. FUNCTIONS OF THE MACRO B–62093E–1/02 PROGRAMMING EXECUTOR 6.30.2 Macro Variables Variable Function Conversa– Auxiliary Execution number tional #8690 Execution macro call R/W R/W R/W mask function variable 1 #8691 Execution macro call R/W R/W R/W mask function variable 2 R: Read enabled/W: Write e
Page 1416. FUNCTIONS OF THE MACRO EXECUTOR PROGRAMMING B–62093E–1/02 6.31 Each of the T, K, C, D, and R areas of the PMC can be accessed using the system variables #1200 to #1959. PMC T/K/C/D/R AREA Variable 1 PMC area name READ/WRITE #1200 to #1219 Variable timer (T) #1220 to #1224 Keep relay (K) #1225 to
Page 1427. FUNCTIONS FOR STOPPING A B–62093E–1/02 PROGRAMMING CONVERSATIONAL MACRO 7 FUNCTIONS FOR STOPPING A CONVERSATIONAL MACRO The macro executor can stop the execution of a conversational macro program at a particular program and sequence specified by parameters. Parameters of the macro executor 1) No.
Page 1438. PICTURE DISPLAY FUNCTION PROGRAMMING B–62093E–1/02 8 PICTURE DISPLAY FUNCTION 136
Page 144B–62093E–1/02 PROGRAMMING 8. PICTURE DISPLAY FUNCTION 8.1 The following functions are available as the CNC function of the Picture Display function. CNC FUNCTIONS 1. The Directory of the files on the memory card 2. The Directory of the files of the stored Graphic Data 3. The Inputting function of th
Page 146B–62093E–1/02 PROGRAMMING 8. PICTURE DISPLAY FUNCTION 8.1.1 It is possible to display the Directory of the memory card by the following Directory of the operations. Memory Card (1) Set the memory card to the SLOT of the Power Mate. (2) Press the [M–DIR] soft key at the operating screen of the “Pictu
Page 1478. PICTURE DISPLAY FUNCTION PROGRAMMING B–62093E–1/02 8.1.2 It is possible to display the Directory of the stored Graphic File in the Directory of the Input Power Mate by the following operations. Graphic File (1) Press the [F–DIR] soft key at the operation screen of “Picture Display” function. (Fig
Page 148B–62093E–1/02 PROGRAMMING 8. PICTURE DISPLAY FUNCTION 8.1.3 It is possible to input and entry the Graphic Data from the memory card The Inputting Function into the Power Mate–MODEL D/H by the following operations. of the Graphic Data (1) Set the memory card to the slot of the Power Mate. (ONE/ALL) (
Page 1498. PICTURE DISPLAY FUNCTION PROGRAMMING B–62093E–1/02 8.1.4 It is possible to display the Graphic Data on the screen by the following Display of the Input operations for confirming. Graphic Data (1) Press the [S–DISP] soft key in the operating screen of the “Picture Display” function. (2) Input the
Page 157B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE A.1.2 Specification A.1.2.1 (1) Initial screen Type of screen X–axis 0 1 MACRO EXAMPLE 2 3 4 SOFTKEY SELECT Y–axis 1 – EXAMPLE A 2 – EXAMPLE B 3 – EXAMPLE C 9 4 – EXAMPLE D 5 – EXAMPLE E 14 [ EX.A ] [ EX.B ] [ EX.C ] [ EX.D ] [ EX.E ] Press CUSTOM key:
Page 158A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 (3) Menu–2 (EX.B) X–axis 0 EXAMPLE A 1 2 PROG NO – _9999 3 4 DATA SET1 _9999 _9999 _9999 _9999 DATA SET2 _9999 _9999 _9999 _9999 Y–axis DATA SET3 _9999 _9999 _9999 _9999 DATA SET4 _9999 _9999 _9999 _9999 DATA SET5 _9999 _9999 _9999 _9999 9 14 [ ] [ ] [
Page 160A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 (3) Variables used in menu #10050 PROG. NO #10060 PROG. NO (EX. 1) (EX. 2) #10051 DATA 1 #10061 2 DATA 2 2 DATA SET 1 3 DATA 3 3 4 DATA 4 4 5 DATA 5 5 6 DATA 6 6 DATA SET 2 7 DATA 7 7 8 9 70 DATA SET 3 1 2 3 4 DATA SET 4 5 6 7 8 DATA SET 5 9 80 A.1.3 P
Page 161B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE A.1.4 Flow Chart 2 START O8000 29 DR3 EX. B Screen display 9 DRI Intial screen display (O8013) (O8011) KEYIN KEYIN KCONT = 16 ? Yes KCONT = 12 ? Yes No No 1 No Yes KCONT = 8 ? M99 KCONT = 13 ? Yes No 2 Data Setting 9 (M99) (N100) 29 1 (M99) O8001 19 EX
Page 162A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 A.1.5 Coding (1) Main program 00010 O8000 ; 00020 N1 M98 P8011 ; Initial screen display 00030 N9 M98 P9503 ; KEY IN 00040 IF [#102 EQ 12] GOTO 100 ; Soft key #1, #2 ? 00050 IF [#102 EQ 13] GOTO 200 ; 00060 M99 P9 ; 00070 N100 M98 P8012 ; Screen (EX. A)
Page 163B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE (2) Initial screen display (Subprogram) 00010 O8011 ; 00020 M98 P9506 ; 00030 G243 X0 Y1 A3 (MACRO EXAMPLE) ; 00040 X2 Y4 A1 (SOFTKEY SELECT) ; 00050 X3 Y6 (1 – EXAMPLE A) ; 00060 X3 Y7 (2 – EXAMPLE B) ; 00070 X3 Y8 (3 – EXAMPLE C) ; 00080 X3 Y9 (4 – E
Page 166A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 00310 #10035 = 4 ; 00320 #10036 = 6 ; 00330 #10037 = 1 ; 00340 #10038 = 4 ; 00350 #10039 = 5 ; 00360 #10040 = 1 ; 00370 #10041 = 0 ; 00380 #8500 = 8000 ; 00390 M99 ; 00400 ; 00410 ; 00420 ; 00430 ; 00440 ; Make this program so that it is executed only
Page 167B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE A.2 STANDARD MACRO PROGRAM A.2.1 Standard Routine List No Routine Program Explanation Name number 1 DDPL O9501 Data display to cursor position 2 CDPL O9502 Cursor display 3 KEYIN O9503 Key input control 4 VDPLX O9504 One– row display of variable data 5
Page 168A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 (2) Cursor control data #10000 CADR1 CSNO 1 KOSU1 Cursor data (1) CADR2 2 KOSU2 CADR3 3 KOSU3 Cursor data Cursor data for CSNo.1 · (2) · · Cursor data for CSNo.2 1. CSNO (Cursor control No.) 1, 2, 3...are assigned to screen No. requiring cursor control
Page 169B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE (3) Explanation of cursor data CADRI CPX Cursor position X CPY Cursor position Y X increment for group: 0 for no CnX group Y increment for group: 0 for no CnY group X number for group: 1 for no group CNX CNY Y number for group:1 for no group CINP Data
Page 170A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 6. CXYF Specify the direction of cursor movement within the group. When CXYF = 0 When CXYF = 1 (4) Sample preparation of cursor data X–axis 01234 9 14 18 24 29 34 39 0 AAAAAAAAA 1 BB _99 CC _99 DD _99999 2 3 DD 4 1 _9999 _9999 _9999 _9999 2 _9999 _9999
Page 172A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 A.2.4 To use the routines (O9501, O9502, O9503) with which the cursor Standard Routine position is associated among the following routines, the cursor data corresponding to the screen selected at that time should be selected. Specifically, set the foll
Page 173B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE (3) KEYIN O9503 1. Function This function accepts key input of numerical data, executing the following processing with its value. (a) Cursor key # : Moves the cursor forward by one. " : Moves the cursor backward by one. (b) Other than the cursor key #8
Page 174A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 2. Calling format #140=F #141=Z #142=X Display position on CRT #143=Y #144=V Variables No. (head) #145=N No. of displays #146=E End code #147=nY Deviation in Y–direction on the CRT M98 P9505 E : End code The display ends when the data which coincides w
Page 175B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE A.2.5 List for Source Program 00010 O9501 ; 00020 IF [#100 EQ 0] GOTO 900 ; 00030 #145 = #[10000 + [#100 – 1] * 2] ; 00040 IF [#145 EQ 0] GOTO 900 ; 00050 #145 = #104 * 8 + #145 ; 00060 IF [#[#145+7] EQ 1] GOTO 10 ; 00070 #139 = FIX [#105 / #[#145 + 4]
Page 179B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE A.2.6 Explanation of Program 00010 O9501 ; Display of data in cursor position 00020 IF [#100 EQ 0] GOTO 900 ; #100: Cursor control No. 00030 #145 = #[10000 + [#100 – 1] * 2] ; #145: Cursor data head address 00040 IF [#145 EQ 0] GOTO 900 ; 00050 #145 =
Page 180A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 00010 O9502 ; Cursor display 00020 IF [#100 EQ 0] GOTO 900 ; 00030 #145 = #[10000 + [#100–1] * 2] ; 00040 IF [#145 EQ 0] GOTO 900 ; #145: Cursor data head address 00050 #145 = #104 * 8 + #145 ; 00060 #146 = #[#145 + 4] * #[#145+5] ; No. of displays in
Page 181B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE 00010 O9503 ; Key input control 00020 #8502 = 1 ; Numerical data input 00030 #102 = #8501 ; Key input variable read 00040 #103 = #8503 ; Numerical data read 00050 #140 = 1 ; Advance the cursor. 00060 IF [#102 EQ 3] GOTO 10 ; 3:For cursor#, advance the
Page 182A. MACRO PROGRAM EXAMPLE APPENDIX B–62093E–1/02 00120 ; 00130 ; 00140 ; 00010 O9506 ; Screen clear 00020 G243 X0 Y0 K560 ; Blank of 560 value 00030 #8505 = 0 ; Cursor off 00040 X1 Y16 K6 ; Leaving the “frame” of the soft 00050 X9 K6 ; key, erase the other part. 00060 X17 K6 ; Erase the soft key 0007
Page 183B–62093E–1/02 APPENDIX A. MACRO PROGRAM EXAMPLE A.3 SCREEN LAYOUT X –axis 0 1 2 3 4 5 6 7 8 9 10 SSSS SSSS 30 31 32 33 34 35 36 37 38 39 0 O0010 N0790 1 2 3 4 5 6 7 Y–axis 8 9 10 11 12 NUM 12345 13 14 NOT READY BUF AUTO 15 16 177
Page 185B–62093E–1/02 APPENDIX B. MACRO COMPILER OPERATION B.1 OPERATION ON P–G B.1.1 First, special notes on operation are described below. Special Notes (1) When coming to a deadlock, press key. Press key several times. The display returns to the initial screen. Next, checking what should be ope
Page 186B. MACRO COMPILER OPERATION APPENDIX B–62093E–1/02 4. “R1” Correction/cancellation: the current data is corrected and canceled on the screen. The cursor is moved to the upper left part of the screen. 5. “R2” Page shift backward , “R3” Page shift forward (5) After correction, press the ”CHG” key once
Page 187B–62093E–1/02 APPENDIX B. MACRO COMPILER OPERATION B.1.4 (Return to) Initial Screen – OFF and press “R2” Correcting Macro NO=1 Program PROGRAM =O Program No. (Number to be corrected) (Command Edit) EDIT= Command Edit D Check that left lower part of the screen is “EDIT = ”. D Chec
Page 188B. MACRO COMPILER OPERATION APPENDIX B–62093E–1/02 B.1.5 (Return to) Initial Screen ON : ON as needed and press Outputting Files to “R2” Floppy Disk NO = 1 PROGRAM = OUT ALL or OUT O (Program No.) FD0= (For first time) I7 0 OK , / Date ,@ File name (NL) INT 1 FD0= (2nd time
Page 189B–62093E–1/02 APPENDIX B. MACRO COMPILER OPERATION B.1.7 (1) File name directory Handling Floppy Disk (Return to) Initial Screen and turn ON as needed and press R3. 0 REQUEST = FD LIST L, 1 1 sector = 256 characters Converted to No. of characters if the size is multiplied by 256. Upon comp
Page 190C. DATA ON MACRO COMPILER APPENDIX B–62093E–1/02 C DATA ON MACRO COMPILER 184
Page 191B–62093E–1/02 APPENDIX C. DATA ON MACRO COMPILER C.1 It is possible to specify parameters for macro calls that can be referred to as local variables by the P–CODE program. In the parameter ARGUMENT specification method for the custom macro of the custom macro B type, TRANSFER the parameter specifica
Page 192C. DATA ON MACRO COMPILER APPENDIX B–62093E–1/02 C.2 The table below lists the system variables that can be used with the macro executor of the Power Mate. For details, refer to the operator’s manual SUMMARY OF of each model. SYSTEM VARIABLES Variable number Function Custom macro variables #100 to #
Page 193B–62093E–1/02 APPENDIX C. DATA ON MACRO COMPILER Variable number Function #3012 Clock (hours/minutes/seconds) (NOTE 1) #3901 Number of machined parts #3902 Number of parts required Modal information #4001 to #4022 G codes (groups 00 to 12) #4109 F code #4111 H code #4113 M code #4114 Sequence number
Page 194D. MACRO VARIABLES USED IN THE MACRO EXECUTOR FUNCTIONS APPENDIX B–62093E–1/02 D MACRO VARIABLES USED IN THE MACRO EXECUTOR FUNCTIONS Kinds of macro Variable No. Function R/W Conversa- Auxiliary Execut- tional able Macro varlables #1 – #33 Local variables R/W Ę #1 – #99 Array–type variables R/W Ę Ę
Page 195D. MACRO VARIABLES USED IN THE B–62093E–1/02 APPENDIX MACRO EXECUTOR FUNCTIONS Kinds of macro Variable No. Function R/W Conversa- Auxiliary Execut- tional able #8515 Three–dimensional array number (transfer destination) R/W Ę Ę #8516 Maximum number of one–dimensional array elements R/W Ę Ę #8517 Max
Page 196D. MACRO VARIABLES USED IN THE MACRO EXECUTOR FUNCTIONS APPENDIX B–62093E–1/02 Kinds of macro Variable No. Function R/W Conversa- Auxiliary Execut- tional able #8722 PMC cutting feedrate variable (Area B) (Caution 2) R/W Ę Ę #8723 Variable for traveling distance controlled by PMC (Area B) R/W Ę Ę (C
Page 197D. MACRO VARIABLES USED IN THE B–62093E–1/02 APPENDIX MACRO EXECUTOR FUNCTIONS Kinds of macro Variable No. Function R/W Conversa- Auxiliary Execut- tional able Window function #8998 System information ID (Note 4) R/W Ę Ę #8999 System information (Note 4) R Ę Ę Reading custom macro variables #99000 t
Page 198E. DIFFERENCES BETWEEN Series 0 AND Power Mate APPENDIX B–62093E–1/02 E DIFFERENCES BETWEEN Series 0 AND Power Mate 192
Page 199E. DIFFERENCES BETWEEN Series 0 AND B–62093E–1/02 APPENDIX Power Mate E.1 Double size can be specified for character size specification A (only for alphanumeric characters). CHARACTER DISPLAY (G243) ⇒ An alphanumeric character is displayed having the same size as a kanji character. (1) A1 (2) A2 (3)
Page 200E. DIFFERENCES BETWEEN Series 0 AND Power Mate APPENDIX B–62093E–1/02 E.4 Signed values consisting of 1 to 4 bytes can be written. PMC WRITE G310 Dd Lȏ Qq ; CONTROL CODE G310 Rr Lȏ Qq ; G310 Cc Lȏ Qq ; G310 Kk Lȏ Qq ; D: Data table number of the PMC R : Internal relay number of the PMC C : Counter K
Page 201E. DIFFERENCES BETWEEN Series 0 AND B–62093E–1/02 APPENDIX Power Mate E.7 CALLING A Compile parameter #7 #6 #5 #4 #3 #2 #1 #0 SUBPROGRAM WITH 9005 AXCLS AX4CL AX3CL AX2CL AX1CL AN AXIS ADDRESS AX1CL 0 : Subprogram call by the 1st address is invalid 1 : Subprogram call by the 1st address is valid AX2
Page 202E. DIFFERENCES BETWEEN Series 0 AND Power Mate APPENDIX B–62093E–1/02 E.8 P–CODE program O9008 can be called from the user program using a T code. CALLING A MACRO WITH A T CODE User program P–CODE program O0001; O09008; : : compilation parameter T#27; ⇒Outputs to the PMC. T123; 9005#7=1 :
Page 203E. DIFFERENCES BETWEEN Series 0 AND B–62093E–1/02 APPENDIX Power Mate E.9 In FS0, a command such as #100=P100.2; can be specified. In Power Mate, however, use a command such as #100=[P100 AND 4]/4; instead. A BIT CANNOT BE SPECIFIED TO READ A PARAMETER. E.10 THE ROM SIZE IS SPECIFIED Compile paramet
Page 204E. DIFFERENCES BETWEEN Series 0 AND Power Mate APPENDIX B–62093E–1/02 E.11 THE USE OF P–CODE Compile parameter DEDICATED 9037 Number of P–CODE dedicated variables to be used (0 to 60) VARIABLES HAS Sets the number of P–CODE dedicated variables to be used in units BEEN EXTENDED. of 100. CAUTION For P
Page 205E. DIFFERENCES BETWEEN Series 0 AND B–62093E–1/02 APPENDIX Power Mate E.12 THE METHOD FOR Executor DISPLAYING P–CODE parameter #7 #6 #5 #4 #3 #2 #1 #0 9000 NDP VARIABLES #10000 OR LARGER HAS #1 (NDP) 0 : Local and common variables for a P–CODE program are not displayed. BEEN CHANGED. 1 : Local and c
Page 206F. G CODES THAT CAN BE USED BY THE CONVERSATIONAL AND AUXILIARY MACROS APPENDIX B–62093E–1/02 F G CODES THAT CAN BE USED BY THE CONVERSATIONAL AND AUXILIARY MACROS NOTE 1 The conversational macro can issue all G codes. The auxiliary macro cannot issue commands relating to screen display (F). The exe
Page 207F. G CODES THAT CAN BE USED BY THE CONVERSATIONAL B–62093E–1/02 APPENDIX AND AUXILIARY MACROS Conversa- G code Function Standard command format M/1S Auxiliary tional G339 RS–232–C: Controls the FANUC cassette. G339 P_ F_ L_ S_ ; 1S f f G340 PMC axis control: Issues a rapid traverse G340 X_ ; 1S f f
Page 213B–62093E–1/02 APPENDIX H. PARAMETERS H PARAMETERS 207
Page 214H. PARAMETERS APPENDIX B–62093E–1/02 H.1 COMPILE #7 #6 #5 #4 #3 #2 #1 #0 PARAMETERS 8000 ROMM M30 M02 M99 (Exclusive for FANUC SYSTEM P–MODEL G) M99 0 : M99 does not terminate compilation of a single program. 1 : M99 terminates compilation of a single program. M02 0 : M02 does not terminate compilat
Page 215B–62093E–1/02 APPENDIX H. PARAMETERS Examples) GOTO #101; M99 P100; #7 #6 #5 #4 #3 #2 #1 #0 9002 EXT1 PWSR DAUX XDIL EVF ACL2 ACL1 TCAL TCAL 0 : Makes invalid the sub–program call with T code 1 : Makes effective the sub–program call with T code ACL1 0 : Makes invalid call by the specific code 1 : Ma
Page 216H. PARAMETERS APPENDIX B–62093E–1/02 #7 #6 #5 #4 #3 #2 #1 #0 9004 CUTLG NOP_B NOP_B 0 : When no other address is specified in a block that calls a subprogram by a T or M code, the block is executed. 1 : The block is not executed. CUTLG 0 : Does not count cutting distance 1 : Count cutting distance #
Page 217B–62093E–1/02 APPENDIX H. PARAMETERS #7 #6 #5 #4 #3 #2 #1 #0 9006 CNCHG DAUXR STDM KEYC DIOC DIOC 0 : Standard UI:G54/G55 and UO:F54/F55 are used for UI/UO(#1000–#1132) of execution macro/ conversational macro. 1 : UI:G82/G83 and UO:F84/F85 are used for UI/UO (#1000–#1132) of execution macro/ conver
Page 218H. PARAMETERS APPENDIX B–62093E–1/02 9010 M code calls sub–program O9001 9011 M code calls sub–program O9002 9012 M code that calls sub–program O9003 9013 G code that calls custom macro O9010 S S S S S S 9022 G code that calls custom macro O9019 9023 M code that calls sub–program O9020 S S S S S S 9
Page 219B–62093E–1/02 APPENDIX H. PARAMETERS 9037 Used number of (1/100) of conversational macro exclusive variable 9038 Conversational macro execlusion program at the time of power supply input (CUSTOM screen) 9039 Auxility macro execution program number 9040 Conversational macro execution program number a
Page 220H. PARAMETERS APPENDIX B–62093E–1/02 H.2 EXECUTOR #7 #6 #5 #4 #3 #2 #1 #0 PARAMETER 9000 L2R MKG RSC EXS STP NDP SQN SQN 0 : Displays program number and sequence number of called user program during execution of a recorded program. 1 : Displays program number of recorded program and sequence number
Page 221B–62093E–1/02 APPENDIX H. PARAMETERS CAUTION When compilation parameter bit 4 of No. 9005 (AXCLS) is set to 1, MA1 masks O9031, MA2 masks O9032, MA3 masks O9033, and so on. #7 #6 #5 #4 #3 #2 #1 #0 9011 MTC MTC 0 : Does not mask a T code execution macro call. 1 : Masks a T code execution macro call.
Page 222I. ERROR CODES APPENDIX B–62093E–1/02 I ERROR CODES 216
Page 223B–62093E–1/02 APPENDIX I. ERROR CODES I.1 (1) Display of error codes The error codes are displayed as follows when an error occurs. COMPILER ERROR CODES (SYSTEM P) *ME000 *NO. = 0000–0000–0000 Block number Sequence number Program number Error message number If the program does not contain any sequen
Page 224I. ERROR CODES APPENDIX B–62093E–1/02 No. Explanation 044 The second ’]’ of the ATAN []/[] is not found. 045 The ’]’ of the ATAN []/[] is not found. 046 The first ’]’ of the ATAN []/[] is not found. 047 The ’]’ of the function [
Page 225B–62093E–1/02 APPENDIX I. ERROR CODES No. Explanation 131 Memory write error. 132 Memory read error. 140 File open parameter error. 141 Floppy disk hard error. 142 File not found. 143 Wrong file format. 144 Floppy disk already in use. 145 File is protected. 146 File name already in use. 147 Password
Page 226I. ERROR CODES APPENDIX B–62093E–1/02 I.2 The table below indicates the error codes that may occur in compile processing. COMPILE ERROR CODE TABLE (FOR PERSONAL Compile Error Codes (1/2) COMPUTER) Error code Meaning 0201 There are more than 400 programs. 0202 There is no program. 1001 Block delete n
Page 227B–62093E–1/02 APPENDIX I. ERROR CODES Compile Error Codes (2/2) Error code Meaning 1404 # is not immediately followed by number or opening bracket ([). 1405 Program number is longer than 4 digits. 1406 Sequence number is longer than 4 digits. 1407 Opening bracket ([) cannot be found for function [
Page 228I. ERROR CODES APPENDIX B–62093E–1/02 I.3 The following is an explanation of the supplementary P/S error codes that may occur at the time of execution of P-CODE program. EXECUTOR ERROR CODE Code Explanation 110 The absolute value of the data of the fixed decimal point display exceeds the allowable r
Page 229J. THE MAKING OF THE GRAPHIC DATA B–62093E–1/02 APPENDIX FOR THE PICTURE DISPLAY FUNCTION J THE MAKING OF THE GRAPHIC DATA FOR THE PICTURE DISPLAY FUNCTION This chapter explains about the environments when you make the Graphic Data for the Picture Display, and how to make it. 223
Page 230J. THE MAKING OF THE GRAPHIC DATA FOR THE PICTURE DISPLAY FUNCTION APPENDIX B–62093E–1/02 J.1 (1) The using hardware f Personal Computer THE ENVIRONMENTS • PC/AT Compatible OF MAKING THE • PC-9800 series GRAPHIC DATA (REMARK) This function is needed the MS–Windows environments. Besides, take into co
Page 231J. THE MAKING OF THE GRAPHIC DATA B–62093E–1/02 APPENDIX FOR THE PICTURE DISPLAY FUNCTION J.2 This parts explains how to make the Graphic Data for the Picture Display function on the Power Mate. HOW TO MAKE THE GRAPHIC DATA J.2.1 Template file: (Color mode) The Contents in the (for the FANUC FONT) T
Page 232J. THE MAKING OF THE GRAPHIC DATA FOR THE PICTURE DISPLAY FUNCTION APPENDIX B–62093E–1/02 <1–2> The creating of the Graphic Please set the following contents by the “OPTION”–“COLOR AND SIZE OF CAMPUS”. color...Monochrome unit ...Dot width...640 height..400 Please create the desired graphic by drawin
Page 233J. THE MAKING OF THE GRAPHIC DATA B–62093E–1/02 APPENDIX FOR THE PICTURE DISPLAY FUNCTION <2–5–3> Apply the transparentized Graphic part file “GRAPH.BMP”. Just after applying, only the “GRAPH.BMP” is displayed. But “KANATMP.BMP” (/“KANJITMP.BMP”) and GRAPH.BMP can be overlapped on the screen by the
Page 234J. THE MAKING OF THE GRAPHIC DATA FOR THE PICTURE DISPLAY FUNCTION APPENDIX B–62093E–1/02 J.3 The following example is the combination of the Picture Display function and MACRO EXECUTOR function. EXAMPLE (THE CREATING THE DYNAMIC CHARACTER DISPLAY PART BY THE MACRO EXECUTOR) CANNED CYCLES SETTING DA
Page 235J. THE MAKING OF THE GRAPHIC DATA B–62093E–1/02 APPENDIX FOR THE PICTURE DISPLAY FUNCTION (THE COMBINATION SCREEN OF THE GRAPHIC DATA AND MACRO CHARACTERS) CANNED CYCLES SETTING DATA OFFSET = 0.022 mm R = 5.213 mm R Z = _ mm Z Please set the value of Z. [ MAIN ][ SETNG1 ][ SETNG2 ][MONIT][ EXEC ]
Page 236B–62093E–1/02 Index ƠAơ Cursor Control, 90 A Bit Cannot be Specified to Read a Parameter., 197 ƠDơ Address Code Table, 84 Address Functions, 62 Data on Macro Compiler, 184 Alarms, 25 Definition of Warning, Caution, and Note, s–1 Area of Variable Used, 161 Deleting a Program, 78 Argument Designation,
Page 237INDEX B–62093E–1/02 ƠGơ Masking of O, N Number Appearance, 86 Modal Call Using G Code, 33 G Codes that can be Used by the Conversational and Auxiliary Macros, 200 Graphic Screen Display Control, 61 ƠOơ Operation, 110 ƠHơ Operation from the DPL/MDI, 20 Operation Functions (Logarithm, Exponent, Arcsin
Page 238B–62093E–1/02 INDEX Screen Display Function, 56 The Method for Displaying P–CODE Variables #10000 or Larger has been Changed., 199 Screen Layout, 177 The ROM Size is Specified Differently., 197 Source Program List, 146 The Use of P–code Dedicated Variables has been Extended., Specification, 151 198
Page 239Revision Record FANUCĄPower Mate-MODEL D/H, i-MODEL D/H (Macro Compiler/Macro Executor) PROGRAMMING MANUAL (B–62093E–1) Addition of following models D Power Mate–H 02 Sep., ’98 D Power Mate i–D D Power Mate i–H 01 Edition Date Contents Edition Date Contents
Page 240· No part of this manual may be reproduced in any form. · All specifications and designs are subject to change without notice.