Professional Documents
Culture Documents
PROGRAMMING MANUAL
B-61393E-1/02
• No part of this manual may be reproduced in any form.
• All specifications and designs are subject to change without notice.
The export of this product is subject to the authorization of the government of the country
from where the product is exported.
In this manual we have tried as much as possible to describe all the various matters.
However, we cannot describe all the matters which must not be done, or which cannot be
done, because there are so many possibilities.
Therefore, matters which are not especially described as possible in this manual should be
regarded as ”impossible”.
This manual contains the program names or device names of other companies, some of
which are registered trademarks of respective owners. However, these names are not
followed by or in the main body.
CONTENTS
PROGRAMMING
l.OUTLlNE ........................................................... 1
APPENDIX
1. OUTLINE
NC programs include those which are prepared by custom macro and very seldom altered and
those which may differ from one another according to relevant machining such as part programs.
A batch handling of these programs of different characters may cause t quicker battery
consumption, or spoil the custom macro in case of misoperation.
To solve a problem, this function will convert the custom macro prepared by a machine tool
builders into an execution format, register it to the ROM cassette, and enables it to be executed.
(1) Since the custom macro is converted into an execution format and registered, the execution
speed is high. This will shorten the machining time and improve the machining accuracy.
(2) The registration to the ROM eliminates battery consumption and prevents custom macro
damage through misoperation. This will improve the reliability.
(3) Since the registered program is not indicated on the program display, the machine tool
builder’s knowhow can be protected.
(4) Since the custom macro is registered in the ROM, the program edit memory can effectively be
used.
(5) The user can call the macro with an easy call procedure without being conscious of the
registered program. On the program edit memory, custom macros can be prepared and
executed in the standard manner.
(6) The Series 0 can compile custom macro programs and register them to the ROM.
(7) Conversational macro function can compile machine tool builders original screen.
1. GENERAL
FANUC Series 0 - TF 0- TF
Page keys can be used to display the screens for other variables.
The words used in the explanation are defined as follows.
Custom macto
(Note) FAPT MACRO Compiler/Executor can be used to compile macro programs, created with
the macro language, on a PC (personal computer). For details, refer to the FAPT MACRO
COMPILER (for PC) Programming Manual (B-661 02E).
2. MACRO COMPILER
Micro cassette
l 64 Kbyte + AOZB-009 I -C 11 I
;ce,
Macro compiler cassette
l 0-TC 4 AOZB-0091-3551 #OA46
l O-MC + AOZB-0091-3551 ROA45
Series 0
Main Unit
P-G ..
P-G Mate
both allowed .
cl
0
7
disk
(prepared at
cutomer’s end)
/
MACRO cassette
064 Kbyte + AOZB-009LClll
l 128 Kbyte -) AOZB-009LC113
0256 Kbyte + AOZB-0091-Cl15 P-G Mark II
0512 Kbyte 4 A02B-0091C117 *MACRO compiler A08B-003LJ540
l l Mbyte + A02B-0098C118 *MACRO library AOBB-0036-3541
I n
PMC
WRITER
MODEL D
cl Series0
Reader punch
interface
PMC
WRITER
MODEL 0
(START)
I
Source
program
preparation
,
I
Compile * If a compiling error
parameter occurs, correct a
source program and
re-start compiling.
I I
.
Test compile
b *
I
2. MACRO COMPILER
(START)
1performance 1
Equipment connection
Connect PMC writer to CN2 or CN3 of P-G.
Generally, connect FANUC PPR to CNl.
P-G power On
Turn P-G power ON.
System loading
Load the FAPT MACRO compiler system disk to either drive unit.
Keep pressing the “LOAD” key on the left upper side of the keyboard for a few seconds.
When the menu is displayed, loading operation is completed.
Test compile
For no initial screen, press [NL] a few times.
“RO” (Start)
“IF31 = ON ” : Displays a source program during compile.
“[ F3) = OFF” : Displays only program No. during compile.
No. = “1” (Test compile) [NL]
If an error occurs during, compile by correcting a program.
ROM writing
For no initial screen, press [NL] a few times.
“ RO” (start)
“[F7] = OFF, F9 = ON” : (PMC writer selection)
“tF3] = ON ” : Displays a source program during compiling.
” [F3] = OFF” : Displays only program No. during compiling.
No. = : ‘*2” : (ROM writing) [NC]
PMC writer PC CASSETTE ROM MODULE lamp flickers, starting data writing to ROM.
Writing is completed within a few minutes to 10 minutes or so.
If compile parameter “9000.0 = 0” is selected, no comparison after ROM writing is made, thus
making it possible to reduce the writing time.
Parameter
L%!lEI
2. MACRO COMPILER
q:
4
Parameter 002 1 * * * * 0 * 1
Parameter PI)11
Since alarm 100 is lighting, press “CAN” and “RESET” keys at the same time to reset the
7 6 5432 10
-lO-
2. MACRO COMPILER
,
Parameter 9000 1 t******
.
0:
If the MACRO compiler ROM cassette is not installed, the 9,000 level parameters are not
displayed.
-1l-
2. MACRO COMPILER
7 6 543210
0 1 0 1 Bubble cassette
-12-
2. MACRO COMPILER
Addition from keyboard KEYIN K-OLD, line number, Data added several line at a
increment time
I
Data display Display filenames for FDLIST FDL
files on floppy disk
Any line LIST L (-line number] Display from the specified
line number
Lines containing the LIST L _ @string @
specified string
Data output Punch space SPACE SP-n Punch n spaces
, I, @string2@11, { GL )
Copy and add a MOVE MOV [line number 1, line Copy and add the data
specified block num ber2] from line number1 to line
number2
Deletion Deletion n whole lines DELETE Line number1 [, line Delet the data from line
number21 number1 to line number2
,
Delete string DELETE D-@character@,
n
{ ALL 1
Delete address data ADELETE AD. address character
Delete lines containing a BDELETE BD,atring The string can be an
particular string address character
Scaling to Multiple of a specific SCALE S-address character/n n is the stalling factor
require values address
Multiple of incremental ASCALE AS-address character/n n is the stalling factor
NC data
Adding and sorting sequence numbers SEQNO SEQJntial value If n is given, add a sequence
[,increment [,n J] number every n blocks
Copy paper tape COPY COPY Copies any sort of data on
paper tape.
Modification Renumber lines RENUMBER REN [,intial value
support I,increment)j
Change character used EOB EOB-Character
, to display EOB
Display list of commands HELP H
NC data TH, TV check THTV THTV Read in NC data from tape
reader, and check TH, TV’
-13-
2. MACRO COMPILER
LNC data
ADD a specified amount ADD ADD-Xl In1 [,Xi/ni J Fz2
The macro executor controls the execution of the P-CODE program created by the macro compiler.
The P-CODE program (execution macro) stored in the ROM can be called and executed by
specifying G, M, T or original code set by parameter during compilation in the user program. .
Custom macros can be created and executed in the user program, independently of P-CODE
program.
-14-
3. EXECUTION MACRO
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 a local variable at the P-CODE (execution macro)
side.
Moreover, if a minus value is set to a parameter for macro call by G code, modal call of P-CODE
program can be done by corresponding G code. Refer to 3.1.5 for details.
00001; I 09010; I
J---
MO2;
d
:---
I Compile
-1
i parameter
! 9013[yicq
L ------- -1
(Note) Execution macros can be called in MDI mode, but only when the MDI-B function is
provided. Execution macros cannot be called in ordinary MDI mode.
-15-
3. EXECUTION MACRO
Compile parameter ,.
T Macro call 9008 #27
TMACC(No.9005#7)
.
M (range
Sbprogram call 9009 #148 Compile parameters No.9042,9043 .
specification)
G (range
Macro call Parameter None Compile parameters No.90459047
specification)
.
Compile parameter
Address for axis Macro call 9009 #27
A>CCL(No.9005#0-#3, No.9008#0-#3)
(Note) These codes cannot be used in combination. For example, a macro call by a T code
cannot be executed together with a subprogram call by an M code.
Correspondence between codes that call macro programs or subprograms and program numbers
of called programs, and whether or not to call a subprogram or a macro , are determined by
compile parameters. Since these parameters are registered to the ROM at compilation, be sure to
designate them at compilation. Exclusive codes that call subprograms shall be set to CNC
parameter (No, 0244, 0245) in executing.
(1) The return sequence number definition for returning to the user’s program
When operational control is returned to the user’s program from the P-CODE program,
control passes to the sequence number of the user’s program defined by address P.
ClOOX123Y456; ) 09010;
(300x789; #100=#24+#25;
.
N 1OOCOOY
999; M99PlOO;
M02;
-169
3. EXECUTION MACRO
(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.
(w In subprogram call, after execution of another command than T- or M-code, it will branch to
a subprogram. In macro call, however, it will branch off without doing anything.
(c) In subprogram call, single block stop is made when another command than T- or M-code is
commanded. In macro call, however, no stop is made.
The P-CODE program 09000 registered to the ROM can be called by a T code.
The commanded T code is stored as an argument in the common variable #149.
All the local variables will become <Vacant > .
By setting character codes (decimal notation of ASCII codes) to the parameters (No. 0244, 0245)
of CNC, the P-CODE program (09004, 09005) corresponding to the address can be called as a
subprogram. The defined integer will be stored as a parameter to the macro variable (#146, #l47).
The actual use of this function is decided by specifying the appropiate compilation parameter
(No. 9002#1, 9002#2, ACLl, ACL2).
M02; t
(Note 1) A decimal point can be specified for those addresses for which it is valid.
(Note 2) When B is used as the address for calling a subprogram:
For the O-M, a decimal point can be specified in an argument.
For the O-T/O-G, a decimal point cannot be specified in an argument.
-17-
3. EXECUTION MACRO
By commanding G codes which is designated by compilation parameter (No. 9013 to 9022), the
macro programs “09010-09019” registered to the ROM can be called.
Local variables without argument designation are < Vacant > .
GlOOX123Y456; * 09010
X709 2678; w for each block the defined address is called
.. * as a parameter of “09010” and executed.
..
C167;
(Modal call cancelled or code set to
compile parameter No. 9034.)
480
3. EXECUTION MACRO
By commanding M codes which is designated by compilation parameter (No. 9023 to 9032). the
programs “09020 - 09029” registered to the ROM can be called.
-19-
3. EXECUTION MACRO
For example, suppose programs are compiled with 200 specified for parameter 9045, 100 specified
for parameter 9046, and 1000 specified for parameter 9047. When G2OOto G299 are specified,
100 programs from 01000 to 01099 compiled on the ROM can be called.
(Note 1) Specifying call arguments is the same as calling macros with the G code specified by
compilation parameters 9013 to 9022.
(Note 3) When the G code specified with compilation parameters 9013 to 9022 is specified, the
specified parameters 9013 to 9022 are effective.
Parameter 9013 = 250
Parameter 9045 = 200
Parameter 9046 = 100
Parameter 9047 = 1000
When G250 is issued with the settings above, program 09010 is called.
(Note 4) (3167 cannot be used as the calling G code (modal call cancel G code).
\
Variable No. Address
I
#l to #26 Usual argument address
-200
3. EXECUTION MACRO
(Note) The addresses those can be used and the range of the values specified to those
addresses are the same as those allowed to each CNC model concerned.
The addresses transferred as arguments specified in a block used to call a macro make changes
modal information of the CNC when calling the macro. In the above example, the CNC model of
absolute/incremental command changes to G91 (incremental command) when a macro is called.
B I #2 II P I #16
C I #3 II Q I #17
I I #4 II R I #18
J I #5 II S I #I9
K I #6 II T I #20
D I #7 II U I ~- #21
E I #8 II V I #22
F I #9 II W I #23
G I #lo II X I #24
H I #ll II Y I #25
L I n12 II -~ z -1 #26
M I n13 II I
-21-
3. EXECUTION MACRO
(3) Variable
Expression, argument, etc. of variables are the same as those of the Custom macro B.
(Note) Common variables referred by a P-CODE program and Common variables referred by
user program are completely different.
Refer to “5.3 Common variable”.
(a) P-CODE variable (#lOOOO - )
Any number of 100 unit of P-CODE exclusive variables starting from #lOOOO can be used.
Since it can be used from execution, it is considered as extension of common variable
#500.
However, execution macro cannot refer to P-CODE variable in arrangement type.
For details, refer to “5.4 P-CODE exclusive variable”.
Operation command
Operation commands can be used as with the custom macro 8.
Control command
Both divergence and repetition commands can be used.
-220
3. EXECUTION MACRO
(8) Cautions
a) Separate registration of a program cannot be made. Max. 200 programs can be registered
to the ROM.
W In one program, limit the sequence number used for branch destination (GOTO) to 99. In
one program, the same sequence No. cannot be designated for others.
Cl One block can accept designation of only one sequence number. Except the program No.
“0” and the optional block skip “I”, designate a sequence No. at the block head.
(Example)
00901ONlOX100.0; .. .. .. . . OK
/N20Y200.0; . .. .... .. .. .. . OK
N30#1=#5; ... .... .. .. . .. OK
d) The end of program must end with EOB (‘I;“) or EOR (‘I%“).
(Example)
09010;
.
09011;
.
NIOOM99;
NllO . . . . . . . . . . . . . . . . . . . ERROR
%
-230
4. CONVERSATIONAL MACRO FUNCTION AND
AUXILIARY MACRO FUNCTION
(Note) The execution of the conversational macro function is processed at a lower level than that
of the CNC operation internally. Therefore, the execution of the conversational macro function will
not affect the processing speed of the CNC operation, but the processing speed of the
conversational macro function may become slow while the CNC operation is ON.
1
- Part program storage memory ROM
M code call
. , 1 code call r P-CODE e-1
r
Main program
G code call
Execution macro program
Special code call I
I
Memory operation execution level (high
r CRT / MDI
I
IEl ClIt--=-
Conversation macro and auxiliary macro execution levei (lower eve0
r P-CODE I
I
Program number specification
l ) Control variable #8500 + Conversation macro program
I I
I
Program number modification I
1 / f,“,“,:‘i;;z;;;o execution
Execution (always)
-240
4. CONVERSATIONAL MACRO FUNCTION AND
AUXILIARY MACRO FUNCTION
The conversational macro function is executed only when the conversational screen is selected
with the function key AUX.
The conversational macro function executes its macro program whose program No. is the value of
the conversational macro execution control variable #8500. The value of the conversational macro
execution control variable #8500 is to be set with the parameter No. 9038 at compiling. The
conversational macro function will not be executed when there is not a conversational macro
program compiled whose program No. is the value of the conversational ma ro execution control
variable #8500.
The conversational macro program, as well as NC part program, consists of macro sentences and
NC sentences (specific G code commands).
The conversational macro program can describe all the macro statements used for the custom
macro. And all the system variables and common variables which can be referred to in the P-
CODE program can be read and written. But the conversational macro program has no local
variables except for #l to #99. They are used to refer an array type P-CODE variables #lOOOO ‘s.
Also, P-CODE variables are prepared for the conversational macro control.
It is impossible to execute the NC part program statement with the NC statement of the
conversational macro program. They will be ignored though commnded. It is impossible to use
any codes except the screen display codes and the execution control codes described in the
following sections. And be sure that the NC statement of the conversational macro program have
the addresses whose meanings and usage are different from those of the NC part program
statement.
The AUX screen started by the conversational macro program is under the same control as the
other screens (POS screen, etc.). Therefore, finishing of the AUX screen is necessary for
changing over from one screen to another. Decide the timing to finish when executing M99 of the
main program. Be careful about the condition of the conversational macro program, because if it is
of a bad program example as shown below, it will be impossible to change the screen to another
and HANGUP STATE will be held. When another function key is pressed mistake, press AUX
again.
01234; 01234;
YES YES
I
M99 ; M99 ;
-25-
4. CONVERSATIONAL MACRO FUNCTION AND
AUXILIARY MACRO FUNCTION
Program the conversational program so that it will be a cyclic like the PMC ladder program. That
is, execute M99 without fail and it will return to the head of the main program or to the sequence
No. specified with M99Pp.
Thus, avoid the programming that the divergence destination by GOT0 will reverse direction.
The conversation macro function and auxiliary macro function are executed at the same
execution level (lower level).
The execution processing is as shown in the following when both the conversation macro
function and auxiliary macro function are specified.
(Note 1) The screen is locked while the reader/punch interface is being controlled using an
auxiliary macro.
(Note 2) The execution of a large auxiliary macro requires a long time, thus reducing the screen
drawing speed.
-260
4. CONVERSATIONAL MACRO FUNCTION AND
AUXILIARY MACRO FUNCTION
A macro subprogram specified by address P is called. Frequency of calling the macro subprogram
shall be up to quadruple.
(2) Subprogram end (M99)
M99 Pp ;
When command is done in the c lled subprogram, the calling program will be restored. When the
address P is specified, the block of the sequence No. specified at P of the calling program will be
restored.
Command M99 without fail at the end of the main program. The command of M99 in the main
program is explained below. -
When M99 is commanded in the main program, execution of the conversational macro function is
finished once.
Once execution of the conversational macro function is started, the screen will not change over to
another though the function key is depressed until execution of the conversational macro function
ends at M99. Accordingly, it is necessary to command M99 at the end of the main program.
When the function key is depressed during the execution of the conversational macro program,
both character display and graphic display will be erased after the conversational macro program
ends, and a corresponding screen will take place. When the function key AUX is depressed again,
the execution of the conversational macro program will be started according to the value of the
conversational macro execution control variable #8500. At this time, the program will be executed
from the beginning regardless of the command of the address P in block of M99.
When M99 is executed, the value of the conversational macro execution control variable #8500 will
be checked. When the value of #8500 is rewritten, both character display and graphic display will
be erased and the control will be transferred to a new conversational macro program. If not,
neither the character display nor the graphic display will be erased, and execution of the same
conversational macro program will be repeated. In this case, when the address P is commanded,
execution will be started at the block of the sequence No. specified at P.
Once M99 is executed, the graphic display will not be output on th screen until the graphic screen
is erased next. Consequently, when the same conversational macro program is still executed, the
second and the following graphic displays will not be output on the screen When you want to
redisplay the graphic display in 1 conversational macro program, command the graphic screen to
be erased once.
-270
4. CONVERSATIONAL MACRO FUNCTION AND
AUXILIARY MACRO FUNCTION
When the function key AUX’MENUMACRO is pressed, a conversational macro whose program
number is specified by a value of the conversational macro execution control variale is executed.
Compile parameters (No.9038,No.9040,No.9041) set values of the conversational macro execution
control variable effected at power on. When the value of the conversational macro execution
control variable is re-written, another conversational macro is controlled. When the value is re-
written, characters and graphics are erased after completion of M99 of the currently executed
conversational macro program(main) and the new conversational macro is controlled.
If the value of the conversational macro execution control variable is not re-written, the same
conversational macros are repeatedly executed. In this case, no characters and graphics are
erased.
4.5 Notes
The conversational macro and auxiliary macro must be programmed so that M99 of the main
program is executed.
The conversational macro, auxiliary macro and standard CNC display (POS screen, etc.) are
executed on the same level. If a wait is programmed in any macro not having M99, the following
occurs:
. If the wait is executed by the conversational macro, the auxiliary macro is not executed.
. If the wait is executed by the auxiliary macro. the conversational macro is not executed.
The CNC display (POS screen, etc.) is not updated.
-280
5. MACRO VARIABLES
5. MACRO VARIABLES
5.1 Macro Variables
(Note 1) To be used when the P-CODE variables of array type are referenced.
(Note 2) The variables for controlling screen display and key input cannot be used.
5.2 Local Variables (#l to #33 or for referencing the P-CODE variables of
array type, #l to 899)
The local variables can be used for executable macros.
These local variables are different from those used for the user programs.
The local variables can be used for auxiliary and conversational macros to reference the P-CODE
variables of array type.
-29-
5. MACRO VARIABLES
The lower limit of the P-CODE variables is 10000. For example, the P-CODE variables can be
used as follows:
(Note 1) For P-CODE variables, about 1.27 meter of part program memory is consumed per 100
pieces of variables when part program storage is 10 to 80m. The more P-CODE are used, the
more part program memory decreases. The maximum no. of the usable P-CODE variables
depends on the capacity of the part program memory.
(Note 2) The P-CODE variables still maintain their values after the power is turned off.
(Note 3) Before executing the conversational macro with the complied ROM cassette loaded,
erase all the programs in the part program storage memory once.
(Turn on the power while pushing DELETE key with the setting (PWE = I).)
With this operation all the conversational macro functions will be initialized to be “blank”.
Array type variables for P-CODE in conversational macro #IO000 - can be refered to in 2 to 3
dimentional array type. (See 6.12 (1) )
N times the number set paramater No.9044 is the number of the usuable variables for the P-
CODE the same as the exclusive variables for the P-CODE (#lOOOO ---). The P-CODE variables
cannnot be used, if parameter No. 9044 is 0.
The number of n is 12 with the floating decimal point type, and is 30 with the integer type.
-3o-
5. MACRO VARIABLES
In the case of the integer type, one of -32768 to 32767 can be set. Digits under the decimal point
are rounded off when a value is substituted to the left side of the substitution statement.
Furthermore, this variables is evaluated after converted into the floatingdecimal point type, if this
varables occurs in expression.
About a 0.15 meter of part program memory is used per set (number of parameter No. 9044) of
the variables of the expanded P-CODE.
The part program memory being used is displayed on the program library screen. The maximum
number of P-CODE variables depends on the capacity of the part program memory.
Part program memory 120m: Parameter No. 9044 = 831
Part program memory 320m: Parameter No. 9044 = 2111
-3l-
5. MACRO VARIABLES
P-CODE VARIABLE
0 123.45678 10 123.45678
1 123.45678 11 123.45678
2 123.45678 12 123.45678
3 123.45678 13 123.45678
4 123.45678 14 123.45678
5 123.45678 15 123.45678
6 123.45678 16 123.45678
7 123.45678 17 123.45678
8 123.45678 18 123.45678
9 123.45678 19 123.45678
NW. ---
[ 1 I 1 1 I I ] [NO-SEL]
Page keys can be used to display the screens for other variables.
(1) #lOO--Ml9
(2) #120-#139
(3) #140-#149
(4) #500-#519
(5) #520-#531
(6) #l-#20
(7) #21-#33
The desired value can be entered for the variable at the cursor position using the numeric keys and
the [INPUT] key. However, no values can be entered in local variables or write-inhibited system
variables.
(Note 1) The setting of NDP, bit 1 in parameter 9000, for the executor depends on whether
variables to be used for P-CODE programs are displayed. To display the variables, set bit 1 of
parameter 9000 to 1.
Up to 20 P-CODE variables can be displayed starting from an arbitrary number. Specify the
number of the P-CODE variable from which display is to be started, using parameter No. 9001.
(Note 2) To change the screen from the P-CODE VARIABLE screen to another screen such as
current position screen or conversational macro screen, press the correspondence function key
such as POS and AUX.
(Note 3) The PCODE variable display screen can display macro variables having an integer
part of up to seven digits (up to eight digits with a decimal place). A blank is displayed for a
variable having an integer part exceeding seven digits.
-320
6. FUNCTIONS OF THE MACRO EXECUTOR
COnverSa- Executa-
No. Function Outline
tional Auxiliary b+e
6.5 Reading and writing an NC program Reads NC programs from and writes 0 0 X
them onto the CNC tape.
6.6 Continuous input with the cursor and Continuoustyinputs data with the cursor 0 X X
Page keys and page keys.
6.7 Masking the display of 0 and N Clears the display of 0 and N numbers 0 X X
numbers on the conversational macro screen.
6.8 Reading and presetting the cutting time Reads and presets the cutting time and 0 0 X
and cutting distance the cutting distance.
6.9 Reading and presetting the relative Reads and presets the relative 0 0 X
coordinates coordinates.
3.10 Key/data input control Reads the states of MDI keys and the 0 X X
values of entered data.
5.16 Interlock along each axis Applies interlocks along each axis and 0 0 X
reads the travel axis and the direction of
movement along the axis when the skip
signal goes high.
l
5.17 Separation of P-CODE program UVUO Separates the system variables for macro 0 0 0
DVDO into the signals for user programs
and those for P-CODE programs.
-330
6. FUNCTIONS OF THE MACRO EXECUTOR
6.18 Referencing the common variables for Reads the common variables for the user 0 0 0
custom
macros program from and writes them to the P-
CODE program.
_ _~~ _ - ~- ~ .~
6.19 Searching for a P-CODE workpiece Directly executes the P-CODE program X X 0
number registered in an executable macro
variable.
6.20 Function for calling a user program Catls a user program from the P-CODE X X 0
withan executable macro programs for executable macros.
6.22 MDI key image read function by MDI key image that reflects MDI key 0 x X
conversational macro status (pressed/or released) can be read
from the conversational macro.
0 .. Usable A .
. Partially usable x: Unusable
(Note)To use the arithmetic function in the execution macro, custom macro B option must be
combined in the CNC.
-349
6. FUNCTIONS OF THE MACRO EXECUTOR
Table 6 (b) Functions of the Macro E :ecutor and the Associated G Codes
and Macro Variables (112:
6.5 Reading and writing of an NC G320, G321, G325, #8520, #8521, #8522, 0 0 X
PcoW~ G326, G327, G328, #8523, #8529
G329
6.8
Masking the display of 0 and
N numbers
0
X
0
X
X
cutting time and cutting
distance I I
6.13
5.14
Torque limit control
0
I 0
0
0
X
#8634
0 : Usable A .
. Partially usable X: Unusable
-35
6. FUNCTIONS OF THE MACRO EXECUTOR
Table 6 (b) Functions of the Macro Executor and the Associated G Codes
and Macro Variables (212)
Separation of P-CODE
program WlJO
(Note) To use the arithmetic function in the execution macro, custom macro B option must be
combined in the CNC.
The coordinates system used for character display and cursor display in the conversational macro
program is called the character coordinates system.
The coordinate system used for graphic display in the conversational macro program is called the
graphic coordinate system.
As for the character coordinates system, the horizontal direction is X coordinate and the vertical
direction is Y coordinate. Specify the X coordinates from 0 to 39 from left to right and the Y
coordinates from 0 to 15 from top to bottom for 9” CRT. Any command of display exceeding the
above range will be ignored. 1 unit is 1 character.
Since the 13th is used for the input section and the 14th is used for the state display section, they
cannot be specified. Furthermore, the soft key frame section cannot be specified either.
-360
6. FUNCTIONS OF THE MACRO EXECUTOR
1 2 3
0123456789012345678901234567890123456789
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0123456789012345678901234567890123456789
1 2 3
The coordinates system used for graphic display in the conversational macro function is called the
graphic coordinates system.
As for the graphic coordinates system, too, the horizontal direction is the X coordinate and the
vertical direction is the Y coordinate. Specify the X coordinates from -160 to 159(-320 to 319)
from left to right and the Y coordinates from -112 to 112(-200 to 199) from bottom to top.(Vakm in
parenthesis is for high resolution mode.) Any command of display outreaching the above range
will be ignored. 1 unit is 1 dot.
The center of the screen will be (X, Y) = (0, 0).
Y
c
4
I
Screen
+112(199) Value in parenthes is is for high
resolu tion mode.
-160(-3
l20) +159(319)
.
-112(-200)
I
Fig. 6.1.1 (b) Graphic coordinate system
(a ) Standard mode
Use the same coordinate system as that of the series 0 standard 9 inch CRT.
Center of screen
(X coordinates, Y coordinates) = (0, 0)
Left and right of screen
(X coordinates) = ( - 160 - 159)
-370
6. FUNCTIONS OF THE MACRO EXECUTOR
Center of screen
(X coordinates, Y coordinates) = (0, 0)
Left and right of screen
(X coordinates) = ( - 320 - 319)
Top and bottom of screen
(Y coordinates) = ( - 200 - 199)
Graphic display macro prepared in the series 0 standard 9 inche CRT can almost be used
unchanged in standard mode. The high resolution graphic mode allows highly accurate display that
was not possible in standard mode.
Character coodinate system instructs in the range of O-79 for the left and righ directions (X
coodinates), and O-24 for the up and down directions (Y coordinates). The 20th line is used for
input and the 21st line is used by the system for status display and can not be satisfied. The
space for the software key also cannot be satisfied.
1 6 7
0123456789012-
,,78901234567890123456789,
i, , /##, , , ,‘I
0123456789012- 678901234567890123456789
-380
6. FUNCTIONS OF THE MACRO EXECUTOR
Center of screen
(X coordinates, Y coordinates) = (0, 0)
Left and right of screen
(X coordinates) = (-320-319)
Up and down of screen
(Y coordinates) = (-200 - 199)
It is possible to make the screen freely by commanding the contents of the screen display with the
conversational macro program. The following control codes are prepared for the screen display.
G202, G242 and G244 are the one-shot G codes. All the other G codes are the modal G codes
and they are considered as belonging to the same G code group.
(Note 1) Addresses X and Y are used as common modal addresses for both character display
and graphic display. Absolute values must be specified for coordinates (X, Y, I, and J). The
following values are set for the addresses upon the start of a conversational macro program:
G= 0
X=O,Y =o
I = 0,J = 0
A=l,B=O
F = 8.3
-390
6. FUNCTIONS OF THE MACRO EXECUTOR
Z=l
Q= 0
If a sequence number is specified at the end of the main program (M99Ppppp), the program is
continuously executed.
(Note 2) For all addresses, variables as well as numeric values can be specified.
[ < expression ) ] .can also be specified.
(Note 3) Optional block skip cannot be specified.
(Note 4) The meanings of the control codes and addresses differ from those of the addresses
used for NC statements. NC statements cannot be used in a conversational macro.
Conversational macro control statements cannot be executed as an NC part program.
Those which you can command by enclosing with parentheses are the alphabet, numbers, minus
marks, and decimal points only.
b) Commandto display a character string by bounding with “(*I’ and “7” by internal codes:
G243 (*46 41 4E 55 43’) ; “FANUC” will be displayed.
G243 (*4E 43 4175 4356’) ; ” NC system” will be displayed.
Command with hexadecimal number. Divide the internal codes with blanks. Take a space for 2
characters aside for hiragana and kanji. The coordinates will be renewed when a character string
is displayed.
For the character string, it is possible to specify up to maximum total 255 characters in 1 block.
Count hiragana and kanji as 2 characters respectively.
Also, it is possible to command the character code to display directly at the address C by decimal
number. The commandable codes are 32 - 95 (20 - 5F with hexadecimal number) or 160 - 223 (A0
- DF with hexadecimal number).
C42 +* CSl -+ =
Command the display of the character strings at the addresses X and Y with the
character coordinates.
The triple size is 3 times as wide as and 2 times as long as the normal size. The characters which
can be displayed with the triple size characters are the alphabet, numbers, minus marks, decimal
points and blanks. No other characters can be displayed with the triple size.
-4o-
6. FUNCTIONS OF THE MACRO EXECUTOR
q
8
@ Triple-size character (3.by-2 character)
G243 Xx Yy A3 (8)
(Note) When a blink is specified, the display is energized or deenergized according to the timer
condition when the display is commanded. Therefore, when the display is not repeated, it will be
kept energized or deenergized.
Command the number of blanks at the address K. The blanks as many as commanded at K will be
displayed. When the blanks are displayed, the coordinates will be renewed.
Command the format to display the numeric values at the address F. Command the number of
display figures on the left of the point and the number of figures under the point on the right of the
point.
Command at the address 2 whether you do “leading zero suppress” or not when displaying the
numeric values.
Z = 0 .. leading zero suppress will take place.
- 1 .. leading zero suppress will not take place.
(Standard value is “I”.)
(Note 1) When 1 is set for address Z, a minus sign (-) is displayed if the value is negative.
When 0 is set, a minus sign is not displayed
(Note 2) Z can be used to specify whether OS or spaces will be used for padding when the value
to be displayed is shorter than the number of digits specified with F.
Command the sequence No. that the character string is cataloged at the address P. The character
displayed will be the character string in one block of the sequence No. commanded with P in the
program set at the character string registered program control variable #8509. The variable for
-41-
6. FUNCTIONS OF THE MACRO EXECUTOR
controlling character-string registration programs (#8509) is defined as the number of the first
program in the character-string registration program group. Use the five digits for address P to
select the desired character-string registration program in the group.
Example 2)
09000; 08000;
. I :
#85;9 = 8000; i NlO(IJK);
XOYO; I
G243(ABC)P20; i N20(XYZ);
.. .
M99
In this case, one block of the sequence No. 20 in the program No. 8000 will be executed.
In the above example, “ABCXYZ” will be executed.
And address P executes the specified block after the process of the corresponding block is
finished. Consequently, “ABCXYZ” will be displayed though command is done as follows with the
above example.
G243 P20 (ABC) ;
Nothing but the character string will be described at the block specified by P.
When #8509 is 0, the block of the sequence No. specified in the current program will be executed.
-420
6. FUNCTIONS OF THE MACRO EXECUTOR
G240 Pp Lt ;
When color CRT is used, colors of segments and character strings specified by conversational
program can be designated.
If no designation is made, a segment and a character string are white without blink.
P = 0 .. Black
= 1 . . Red
= 2 .. Green
= 3 .. Yellow
= 4 .. Blue
= 5 .. Purple
= 6 .. Blueish green
= 7 .. White
G244 Pp ;
P = 0 .. Full line
= 1 .. Broken line
= 2 .. l-dot line
= 3 . . 2-dot line
= 4 .. Erase
The graphic line is full line at power ON.
G242 Xx Yy ;
Command the display start point with the absolute coordinates at the addresses X and Y.
Next display will start at this point.
GO1 Xx Yy :
-430
6. FUNCTIONS OF THE MACRO EXECUTOR
Command the coordinate of the end of the straight line with the absolute coordinate at the
addresses X and Y.
A straight line will be made with the line commanded with G244 from the current position to the
commanded coordinate. The coordinates will be renewed.
GO2 Xx Yy Ii Jj Qq ;
GO3 Xx Yy Ii Jj Qq ;
GO2 display the arc clockwise and GO3 counter-clockwise.
Command the end of the arc with the absolute coordinate at the adresses X and Y.
[No. of quadrants]
Command the center coordinate of the arc with the absolute coordinate at the address 1 and J.
Command the number of quadrant (0 - 4) of the arc at the address Q. The arc will be graphed with
the line commanded with G244 from the current position to the coordinate of the commanded end.
The coordinate will be renewed.
-440
6. FUNCTIONS OF THE MACRO EXECUTOR
When high-resolution CRT is used, the graphic function for conversational macros enables painting
the specified field.
(1) Description
The field to be painted is drawn using a solid line with the graphic function. Then the paint
command is used together with control code G206 to specify any point inside the field and the
boundary color. The field is filled with the color which is used as standard when G206 is issued.
G206PpXxYy;
Correct Incorrect
(Note 2) To use the painting command on the high-resolution 9” monochrome CRT, set HRGC
of compilation parameter 9004 to 1 to make the CRT enter the intensity modulation mode.
-45-
6. FUNCTIONS OF THE MACRO EXECUTOR
(2) Examples
G24OPl;
G244PO; b ........................... .......
.
............ -1
Blue ...................................................
..........................................................................
................
............
.........................................................................................................
........................................................................................................
...........................................................................
G242XOYO; .........................................................................................................
.........................................................................................................
.........................................................................................................
............................................................................
.........................................................................................................
GolXlOo;
...........................................................................
.........................................................................................................
.........................................................................................................
Red .........................................................................................................
.............................................................
:~~~~~~~~~~~~~ 81ue ~~~~~i”
.............................
YlOO; :.‘.~.~.~.~.~.‘.~.-.~.~.-.~.~.~.~.~.~:.~.~.~.~.~.~.-.-:.~.~.~:
............................................................
x0; ............................................................................................
............................................................................................
YO; ............................................................................................
............................................................................................
............................................................................................
‘.‘.~.~.~.~.‘:.-.-.~.‘.~.~.~.~.~.~.-.~.~.~.~.~.-.~.~.~.~.~.~.~.~.~
G240P4;
G242X50Y50;
G01X150;
Y150;
X50:
Y50;
G206P8Xll OYl10:
(b) When the same color is specified for the fill and the boundary (p = 0)
A line with another color in the field to be painted is painted.
G240Pl;
Blue
G244PO;
G242XOYO;
GOlXloo;
YlOO;
x0;
YO;
G240P4;
G242X50Y50;
GOlX150;
Y150;
x50;
Y50;
G206POXllOY110;
Writing a desired value in parameter 8510 enables displaying any function screen. Reading the
value of parameter 8510 enables checking which function screen is currently displayed.
The following table shows the correspondence between function screens and the values of
parameter 8510.
-460
6. FUNCTIONS OF THE MACRO EXECUTOR
< Address ) < Address No. > or < Address ) < Address No. ). < Bit position ) (parameter cannot
be used)
Address P indicates the parameter and the other addresses indicate PMC addresses.
For example, P5.3 returns the contents of bit 3 of parameter No. 005.
PlOO returns the contents of the parameter No. 100 as function values respectively.
Since the bit position cannot be specified for parameters, if it is required, take the bit data using
AND instruction.
Also, G100.1 returns the contents of the bit 1 of PMC address Gl 00 ,and GlO5 returns the
contents of PMC address G105 as function values respectively.
It is possible to describe <Address No. > and < Bit position ) with variables or # [ < Expression > ]
or [ < Expression ) 1, instead of numbering them with numerical values directly.
-47
6. FUNCTIONS OF THE MACRO EXECUTOR
The usable addresses are “P” for parameter and X, Y, F, G, R and D of PMC addresses.
Format conforms to that used for ladder diagram.
Refer to the operator’s manual for the detail of parameters and to the PMC programming manual
for details of the PMC addresses.
(Note) Refer to the section titled “PMC Address Write Control Code (G310)” for writing data to
the PMC addresses R and D.
G310 Dd Qq Lx;
G310 Rr Qq Lx;
These commands write the data indicated by address Q at the PMC address indicated by address
D or R a number of bytes at a time as indicated by address L. The data cannot be specified in
.
bits
The write data indicated by address Q is rounded as follows: Decimal places of 0.5 and over are
counted as a whole number and the rest are discarded. Then the data is expressed in binary form
and written. When the data is a negative value, it is handled and converted as two’s complement.
When the following is specified, the data is written in the PMC data area (D300 to D303) as shown
in the table below:
#lOO = -500.0;
G310 0300 Q#lOO L4;
.
Bit 7 6 5 4 3 2 1 0
In two’s complement, the
0300 0 0 0 0 1 1 0 0 decimal number - 500
0301 1 1 1 1 1 1 1 0 becomes FFFFFEOCH in
0302 1 1 1 1 1 1 1 1 hexadecimal.
0303 1 1 1 1 1 1 1 1
When the specified data contains more bytes than that indicated by address L, only the data of the
length specified by address L is written. This will not cause an error. (If Ll is specified in the
example above, the identical data is written only in 0300.)
G310 Dd Pp Lx;
G310 Rr Pp Lx;
G310 Cr Pp Lx;
G310 Kr Pp Lx;
-480
6. FUNCTIONS OF THE MACRO EXECUTOR
These commands read the data which starts from the PMC address indicated by address 0, R, C,
K or A and whose length is indicated in bytes by address L into the variable indicated by address
P. The read data is handled as binary data consisting of the specified number of bytes, converted,
“.-9
and assigned to the variable.
If (3310 0400 PlOl L2; is specified when the PMC data area (0400 to 0401) has the data shown
below, - 500.0 is input in #lOl.
0
.
Btt 7 6 5 4 3 2 1 0
L A
0400 0 0 0 0 1 1 0 0
0401 1 1 1 1 1 1 1 0
\
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 changed.
If the following is specified with the example shown above, - 2.0 and 254.0 are read into #102 and
#103 respectively.
(Note 1) When address Q is specified, write control is executed. When address P is specified,
read control is executed. If both addresses Q and P are specified, write control is executed.
(Note 2) Addresses other than 0, R, C, K (X, Y, G, F...) cannot be specified.
(Note 3) With address L, 1, 2, or 4 can be specified. If another value is specified, or if address
L is omitted, the data is written or read the specified number of bytes at a time.
(Note 4) For details of the PMC address, refer to the PMC programming handbook.
(Note) For the Series 21, or other models with the available tape length of less than 80 meters,
setting EXTl to 1 reduces this by 1.22 meters.
-49-
6. FUNCTIONS OF THE MACRO EXECUTOR
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 properly executed or not.
Check the end code after executing G330 to G338.
#8539 : End code (only for reading)
However, the circuit closing processing always ends normally.
-so-
6. FUNCTIONS OF THE MACRO EXECUTOR
Select the channel and control method used by the specification of address “P@‘.
1 : Channel 1 User macro control
2 : Channel 2 User macro control
11 : Channel 1 Reading control (DCliDC3 automatic control)
12 : Channel 2 Reading control (DC1/DC3 automatic control)
21 : Channel 1 Transmission control (DC2/DC4 automatic control)
22 : Channel 2 Transmission control (DC2/DC4 automatic control)
Specify the baud rate by the specification of address “B”.
1 : 50bk 2 : 1OOb/s 3 : 11Oh/s
4 : 150bk 5 : 200bk 6 : 3OObk
7 : 600bk 8 : 1200b/s 9 : 2400b/s
10 : 48OObk 11 : 9600bls
Specify the stop bit and parity by the specification of address I’S”.
1 : 1 stop bit, No parity
2 : 2 stop bits, No parity
11 : 1 stop bit, Odd parity
12 : 2 stop bits, Odd parity
21 : 1 stop bit, Even parity
22 : 2 stop bits, Even parity
Specify the output code on transmitting data by the specification of address “C”.
1 : Output code (ASCCI)
2 : Output code (ISO)
G331 ;
The circuit, which is currently open, is closed.
There is no end code for the circuit closing processing.
It always ends normally.
-51-
6. FUNCTIONS OF THE MACRO EXECUTOR
Example)
NlOO G335 PlOO;
IF [#8539 EQ 2551 GOTOlOO;
IF [#8539 NE 0] GOT0900;
Reading processing ended
(#loo: Received data)
N900 error processing
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.
The commanded string is converted into either ASCII or IS0 code and is transmitted by the
specification on opening.
However, the code output by address K is not the space but the null code (no punching).
in the one-character command by address C, no code conversion processing is carried out.
Use it when the code is output other than the control code (DC1 - DC4) or ASCII/IS0 code.
Example)
G336 Cl8 K20 (FANUC) K20 C20;
IF [#8539 NE 0] GOT0900;
-52-
6. FUNCTIONS OF THE MACRO EXECUTOR
Macro variable data input and output can be conducted simply by an instruction via reader puncher
interface. Instruct the control with the following G code.
An end code #8539 is provided to check that input and output processing runs correctly or not.
Check the end code #8539 after running G337, G338.
G337 Pp ;
p : the head variable number which mounts the macro variable (omissible)
A macro variable data, which is input from reader puncher interface that opened with the read
control mode, is read and set it to the correspondenting variable.
c3
@ : Leader part
C3 : Start to input
0 : Variable number
@ : Variable data
@ : Tape end
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 information.
A section which is spaced with “LF” and “LF” into significant information segments called a block,
and one block shows one macro variable data.
-53-
6. FUNCTIONS OF THE MACRO EXECUTOR
Address @IN”can be omitted. In this case, the variable number is interpreted to be (the variable
number of the preceding block) + 1. If “N” is omitted at the head block, the variable number is
assumed to be the one specified by address “P” with instruction G337. Therefore, a tape without
“N” is made out, and arbitrary variables are read by the instruction of “337” ” Pp”.
Address “P” on the tape indicates the value of the variable and cannot be omitted. “LF” is
specified after “P” for value zero (#0) without specifying the value.
“LSK” or “EDIT” goes on and off under the right of the screen if the data is being read. If the data
is being read, the screen cannot be changed.
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 between IS0 and ASCII code by the open command.
For output tape format, same as the input format, the head variable number address “N” and
variable values with address “P” at the head block, then variable values are continuously output
with P in the following blocks and finally, the tape end (“EOR”) code is output.
“CR” code of every block can be output by the compile parameter PTCR(No.9003#6) . Use this
.
code to make carriage return of a printer, etc.
PTCR = 0: “CR” is not output after “LF”, when outputting macro variable values.
\
% LF NlOOOOPl234 LF P5678 LF %
-54-
6. FUNCTIONS OF THE MACRO EXECUTOR
PTCR = 1: ‘CR” is output twice after ” LF”, when outputting macro variable values.
. 4
% LF CR CR NtOOOOP1234 LF CR CR P1234 LF CR CR %
L
Control of the feed part does not act at output. Conduct with “G336Kk” data transmission to feed
with a paper tape puncher, etc.
“EDIT” goes on and off at the lower right of the screen if a data is outputting. Screen cannot
change if data is outputting.
(Note 1) G338 is a one-shot G code.
(Note 2) Only IS0 code or ASCII code can be used for output.
(Note 3) An end code is communicated by 115 when an invalid data is specified to a variable
number, and the outputting stops.
6.4.4 Extending the function for inputting and outputting a macro variable
The conversational macro can input and output a macro variable via the 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 be read into another variable.
(Command format)
G338 Pp Qq Ff Zz Rr;
(a) When variable numbers are not output, the function for inputting a macro variable (G337) can
read the output variable data into a variable indicated by address P.
(b) When % (EOR) is not output at the beginning and/or end of a tape, two or more variable
groups can be output to form a single tape format.
-55-
6. FUNCTIONS OF THE MACRO EXECUTOR
(Example)
G330 Pp Bb . .. ;
G338 PlOOOO Q10 F8.3 21 Rll; = > At the beginning, % (EOR) is output. Then the data of
iF[#8539NEOJGOT0999; #lOOOO to #lo009 is output without variable numbers.
At the end, % (EOR) is not output.
G338 PllOOO Q20 F8.3 Zl R31; = > At the beginning and end, % (EOR) is not output. The
lF[#8539NEO]GOT0999; data follows the data output above to form a single tape
format.
G338 PI2000 QlO F8.3 21 R21; = ) At the end, % (EOR) is output. The tape format is
IF[#8539NEO]GOT0999; closed.
G331;
%;P ;P ; .a :P ;P ;P ; a** :P :P tP t l *o tP :%
(Command format)
G337 Pp Qq R99;
-~---~-~-
P : Number of the variable to be read (Valid when variable number N is not specified on the
input tape)
Q : Number of variables to be read (Can be omitted)
R99 : Reading to be continued (Can be omitted)
(a) When address Q is specified, the number of variables to be read can be specified. After the
specified number of variables are input, completion code #8539 is set to 99 to indicate that
data reading can be continued. If % (EOR) is read before reading the specified number of
variables, completion code #8539 is set to 0. If address Q is omitted, the system assumes that
an infinite number is specified.
(b) When R99 is specified, the remaining variable data can be read after the specified number of
variables are read and completion code #8539 is set to 99. If data reading is continued without
R99, the data of a variable is lost in the middle of reading because of a significant information
check. (The data up to the first “;(LF)” is skipped.)
-3
_ 3
-56-
6. FUNCTIONS OF THE MACRO EXECUTOR
(Example) Reading the tape output according to the example described above
G330 Pp Bb .. . ;
G337 P100 Q10 ; => The data of the first ten variables is read into #lOO to #109.
lF[#8539 NE 99)GOT0888; (After the data is normally read, #8539 is set to 99.)
G337 PI5000 Q20 R99 ; = ) The data of twenty variables is read into #I5000 to #I501 9.
lF[#8539 NE 99JGOT0888: (After the data is normally read, #8539 is set to 99.)
G337 PI6000 R99 ; => The remaining variable data is read into #16000 to #16009.
lF[#8539 NE OlGOT0888; (After the data is normally read, #8539 is set to 0.)
G331 ;
File data on the FANUC FLOPPY CASSETTE, FA CARD or FANUC PROGRAM FILE Mate can be
read, prepared and deleted, by an opening command and the instruction of control code “G339”.
G330 Pp Bb Ss Cc LI;Ff!Aa ;
Specify one of the address “L!F/A” at the time when the line is open by read control mode. At the
result of this action, the head of specified file and file data reading is conducted. Refer to Section
6.4.2( 1) “Circuit open” about address “P/BSC”. However, specify reading control (11112) for
address “P” and ISO(2) for address (C).
Select one of addresses L,F, or A depending on the process.
(Example)
When calling the file name “ABCD”, set 65(A), 66(B), 67(C), 68(D), 32...32(space) to 17
variables of common variables #I 00-l 16.
-s7-
6. FUNCTIONS OF THE MACRO EXECUTOR
(Example)
When making a head call of file number 3
G330 Pll B10 S2 C2 F3 ;
(Example)
When making a head call of the next file which is being called now
New files are made and data can be written on a FANUC cassette by specifying one of address L
or F when the communication line is opened with transmission control mode.
Refer to 6.4.2(l) “Circuit open” for the specification of address “P/B/S/C”. Be sure to specify
transmission control (21122) for address “P”, and IS0 (2) for address “C”.
Select one of address L or F by processing.
(Example)
If you make a file of file name “ABCD”;
65(A), 66(B), 67(C), 68(D), 32...32(space) shall be set to the 17 common variables of #loo-
116
(Note 1) A file name is fixed to 17 characters. Be sure to fill spaces(code 32), if the file name is
less than 17 characters.
-580
6. FUNCTIONS OF THE MACRO EXECUTOR
(Note 2) Specify a file name with alphanumeric and spaces. Alarm 8 will be generated if the
32(space) code is specifyed at the head of the file name.
(Note 3) A new file is added to the end of recorded files.
(Example)
To make file No.3, specify as follows:
G330 P21 BlO S2 C2 F3 ;
(Note 1) If you make a file with the file number, be careful that every file which was previously
input in the specifyed file number, and all subsequent file numbers are deleted.
(Note 2) Preparation of files by file number can only be conducted for the existing files. Files
I .
can be added only by file name specification.
The control mode at line opening shall be of directory information to use this function. Instruct
P = 31132 at the opening time for specification of directory information.
G330 Pp Bb Ss Cc ;
Refer to the section on line opening for address “B/S/C”. Be sure to specify IS0 (2) for address
0 @I
C .
Do not instruct several functions continuously in one opening time for every function of directory
reading, file deleting, file name changing if you open with the control mode of directory information.
For instance, close the line once to delete the file after reading and checking directory information,
as follows;
-59-
6. FUNCTIONS OF THE MACRO EXECUTOR
G339 PI Ff Ll Ss ;
File directory information can be read to a specified variable by specifying “G339 Pl”.
Specify the file number( l-9999) for which the directory information is to be read by address “F”.
Address @‘L” specifies the head variable number of a continuous 17 variables which houses the
read file name. The file name is read with decimalized ASCII code every character.
Address “S” specifies the variable number which houses the read file size.
If you have specified (F specification) the file number once, the next directory information can be
read by instructing “G339 Pl” without F specification.
End code = 11 reports that the directory of the specified file number does not exist.
G339 P2 LI!Ff
Specify the head variable number of the variable string which houses the file name (ASCII code)
you wish to delete by address “L”, or specify the file number of the file you want to delete by
address ” F” .
Be carefull when deleting with the file number because subsequent file numbers will change after
deletion.
G339 P3 Ff LI ;
The recorded file name can be changed by the specification of “G339 P3”.
Specify the file number (I-9999) of the file name you wish to change, by address “F”.
Specify the head variable number of the variable string that houses the file name (ASCII code) to
‘2
_ i
be changed, with address @‘L”.
-6O-
6. FUNCTIONS OF THE MACRO EXECUTOR
Check the end code when G330-G339, has been instructed. There is no end code for line closing
processing. It is always a normal end.
~
#8539
__
1 Contents
0 INormal end
1
ILine doesn’t open
7 I Line use
8 Error in parameter
G335 instructed with transmit control mode
G336 instructed with read control mode
10
I Error on file number
11 File of file number specified to read directory information does not exist
I
115 I Undefined variable number specified
Recording, deleting and changing of NC part program is possible by the conversational macro
function. Control the NC program with program number and block number. The block numbers are
counted on each EOB regarding the block with address “0” being the No.1 block. For NC
programs in the converational macro , one word is expressed by 2 variables of an address code
and a number, and several words construct a block.
Set extension function valid (Parameter EXTl (No. 9002#7)) to ” 1” at compiling when using this
function.
(Note) For the Series 21, or other models with the available tape length of less than 80 meters,
setting EXTl to 1 reduces this by 1.22 meters.
Make the control instruction using G codes (G320-G327) in the conversational macro.
There is an end code #8529 to check that the instructed function run correcctly or not. Check end ’
code after running G320-G327.
The end is normal when the end code #8529 is 0, and in the cases other than 0, the same number
as the P/S alarm in the usual editing process will be notified.
-61-
6. FUNCTIONS OF THE MACRO EXECUTOR
Control variable
#8520 . .. Specification of program number
#8521 .. . Specification of block number
#8522 .. . Specification of housed variable number
#8523 .. . Variable number of a variable that specifies the number of digits under a decimal
point.
#8529 .. . End code(for reading only)
Control codes
G320 .. . Record a new block
G32l . .. Delete block
G322 . .. Condensation of program
G325 .. . Read specified block
G326 . .. Write block
G327 . .. Delete block
G320 ;
Specify the program number to #8520 and instruct G320 to record a new program.
(Example)
To record 00002,
#8520 = 2 ;
G320 ;
lF(#8529 NE 0] GOT0 900 ;
Recording end
N900 ;
Error
Conduct similar processing as the edit “Oxxxx” +“INSERT” when recording a new program. EOB
is not inserted.
00002
%
-62-
6. FUNCTIONS OF THE MACRO EXECUTOR
G321 ;
(Example)
To delete 00003
#8520=3 ;
G321 ;
IF[#8529 NE 0] GOT0900 ;
End of deletion
N900 ;
Error
When issuing this command, specify a program number, block number, and the number of the
variable into which the block is to be read. From the corresponding NC program coded in words,
the corresponding block is read into the specified variable area. Each word contains two variables:
an address code and numerical value.
(Example)
00004 ;
G92 X0. MO8 ;
G90 GO0 X10.5 MO5 ;
#8520 = 4 ;
#8521=3 ;
#8522 = 100 ;
G325 ;
lF[#8529 NE 0] GOT0900 ;
End of reading
N900 ;
Error
The following program data is loaded from HO0 which is specified by variable number #8522, when
the above instruction is executed.;
-63-
6. FUNCTIONS OF THE MACRO EXECUTOR
EOF? (28) is housed as an address, if EOB is not at the end block of the program or EOR position
is specified with block number.
Reading is not conducted as the end code becomes “255”, if a block No. exceeding the block of
EOR is specified.
(Example)
00004 ;
G92 X0. MO8 ;
MO2
%
(Example)
If .
00004 ;
G92 X0. MO8 ;
%
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.
(Note 1) When reading a specified block, a decimal point is added to any data specified without
a decimal point, at the position specified with the parameter for calculator type decimal point input
(No. 015.7).
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 address P. If
address “EOB” is present within the specified data, program is written up to “EOB”; if “EOR” is
present, program is written up to the EOR; and if neither “EOB” nor “EOR” is present, program-3is :
_
written by the number of data specified by address “PC’. *
(Example)
00004;
-640
6. FUNCTIONS OF THE MACRO EXECUTOR
#8520=4 ;
#8521=2 ;
#8522 = 100 ;
#100=7 ;
#lOl = 1 ;
#102=24 ;
#103 = 20.5 ;
#104=6 ;
#105= 1000 ;
#106 = 20.7 ;
G326 P7 ;
lF[#8529 NE 0] GOT0900 ;
End of writing
N900 ;
Error
00004 ;
G92 X0. MO8 ;
Gl X20.5 FlOOO. ;
G90 GO X10.5 MO5 ;
End code becomes “255” and it is impossible to conduct writing, if the specification of block
number is EOF? block only or higher numbers.
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 becomes the
number of digits after the decimal point of address A, and it is possible to determine the number of
digits after the decimal point of every address, as shown below.
#8523 = 501 ;
#501 is the number of digits after the decimal point of address A
#502 is the number of digits after the decimal point of address B
-650
6. FUNCTIONS OF THE MACRO EXECUTOR
Specify <vacant) or 0 - 7 for the number of digits after the decimal point. In the case of
< vacant ), it is considered that no decimal point exists in the address.
(Example)
If address code = A, number = 1.2345678
When #8523 is 0, auto setting is conducted by the system conditions (mm input/inch input, 0.1 pm
instruction) and specified address. #8520 - #8523 is set to 0 when the power is turned on.
G327 ;
-660
6. FUNCTIONS OF THE MACRO EXECUTOR
44529 Contents
254 Program editing is prohibited by setting the memory protection key [when
compilation parameter bit 1 of No. 9006 (KEYC) is set to 01.
6.5.8 Notes
Selection processing by work number search etc. is required when foreground operation IS
executed for a program which has been prepared and edited under background.
\
Address Code Address Code Address Code
r
A 1 K 11 U 21
B 2 L 12 V 22
C 3 M 13 W 23
D 4 N 14 X 24
E 5 0 15 Y 25
I
F 6 P 16 Z 26
G 7 Q 17
H 8 ‘R 18 EOB 27
I 9 S 19 EOR 28
J 10 T 20 / 29
-670
6. FUNCTIONS OF THE MACRO EXECUTOR
#8501 can be read with the following timing if the cursor and page key, are continuously pressed.
Page key ON
OFF
#8501= data
#**oMJuLnJL
l+wG4P4
(MSEC)
The time only for instruction of GO1 (linear interpolation) and G02,G03 (circular interpolation) can
be counted by #8553.
The unit is the same as the macro variable (#3002).
The distance only for instruction of GOl(linear interpolation), and G02, GO3 (circular interpolation)
can be counted by #8554.
It is valid also for helical instruction.
Parameters (No.9002#7 / EXTI ) and (No.9004#7 / CUTLG) have to be on at compiling to use this
function.
The unit is
... O.OOl(mm) for the mm input system.
... O.OOOl(inch) for the inch input system. -3
Y z
As the tool movement distance is added to #8554 at the time of starting the cutting block, the
distance of block movement is added even when cutting stops during a block due to resetting, etc.
-68-
6. FUNCTIONS OF THE MACRO EXECUTOR
(Example)
If the relative coordinates value of the 1st axis is - 123.456
#8998 = 110; ((Include the contents of ID No.1 10)
#500 = #8999;
Contents of #500 is -123456.
-69-
6. FUNCTIONS OF THE MACRO EXECUTOR
(a) 9 “CRT”
INPUT I 8
RESET I 10
CURSOR RIGHT I 18
CURSOR LEFT I 19
(b) 14 “CRT”
The soft function keys for 14” CRT follows:
The other keys are the same as 9” CRT. .
-709
6. FUNCTIONS OF THE MACRO EXECUTOR
Once there is a key input, #8501 holds its value till it is input with the macro statement, and the
following key inputs will be ignored. When #8501 is input, the status gets ready to accept the key
input and #8501 will be 0.
It is impossible to write a value into #8501.
(2) Data input control variable #8502, numerical data variable #8503, address data variable #8504
Control the input of numeric data and address data by setting the following values to #8502.
When #8502 is 0, nothing will be displayed on the data input line and it will be impossible to input
data, either.
When #8502 is 1, NUM will be displayed on the data input line and input of numeric data will be
possible. When #8502 is 2, ADRS will be displayed on the data input line. After address data is
input, NUM is displayed and it is possible to input the numeric data. #8502 value is 0 at switching
on the power.
When the key-input control variable #8501 is key-input to the value other than 0, the data input line
will return to the initial state. It is possible to read out the input numeric value and address with the
numeric data variable #8503 and the address data variable #8504 respectively. The following is the
correspondence of the input address and #8504.
#8503 and #8504 values will be held till the input control variable #8501 is key-input to the value
other than 0.
When numerical data and address data are not input, #8503 and #8504 will be “vacant“
respectively.
It is impossible to write any values to #8503 and #8504.
Conversational Macro Extented Data Input Control Function (Full key specification onlv)
If you set 3 to #8502, and a variable number to #8552, the character string input mode is entered,
and < apears on the input line, and it is possible to input addresses and number data.
The data input line changes to the initial state when key input status variable #8501 changes to
other than 0. 32 variables from a variable number which is set to variable #8552 can read the input
-2
T ;
numbers and addressesfor as ASCII codes.
<blank) input a 32 number series if there is no input data.
-71-
6. FUNCTIONS OF THE MACRO EXECUTOR
(Example)
Set for
#8502=3 ;
#8552 = 500 ;
and input
0123456ABCD <
and press return key, then the following values are set to the variables.
#500 = 48, #501= 49, #502 = 50, #503 = 51, #504 = 52, #505 = 53, #506 = 54, #507 = 65,
#508 = 66, #509 = 67, #510 = 68, #511= <blank ) to #531= <blank ), #8501= 8
The values of #8503, #8504 are not guaranteed.
It will be possible to display the cursor at any optional position by setting the values for the cursor
X position control variable #8506 and the cursor Y position control variable #8507. Specify the
cursor position with the character coordinates system.
(Note) Variables #l to #99 for convesational macro are different from local variables #l to #33
for execution macro.
Array control variable:
#8512 Two-dimensional array number
#8513 Three-dimensional array number
#8516 Maximum value of one-dimensional array number
#8517 Maximum value of two-dimensional array number
#8519 Array top variable number
Specify an array type by the array control variables #8516 to #8519 and specify the
array number referred to by the #8512 and #8513. Variables #l to #99 are used to
refer the values.
The correspondence between the P-CODE variables and array elements is as shown below: ?-- -
P-CODE variable number r
= #8519 + ((#8516 x#8517) x (#8513 - 1)) + (#8516X (#8512 - l)(Specified variable number - 1)
-720
6. FUNCTIONS OF THE MACRO EXECUTOR
Example)
M(hen the #8516, #8517, and #8519 are set to 10, 5, and 10100, respectively:
1) When both of #8512 and #8513 are set to 1, the value for #l corresponds to that for
#Ho1 00.
2) When the #8512 and #8513 are set to 3 and 2, respectively, the value for #lO corresponds
to that for #lo1 79.
Each variable of #8512 to #8517 and #8519 are set to 1 and 10000, respectively when the power is
turned on.
Thus, the #8513 and #8517 can be used in the case of use as the two-dimensional array. No
check is carried out on minimum value of each variable P-CODE variable number after calculation.
use the macro program when needed.
(Note 1) This function can be used in the conversation macro program and auxiliary macro
program.
In the execution macro, the #l to #33 are local variables and the #34 to #99 are variables which
cannot be used and would result in an alarm.
1) clearing array type number, variable string (continuous writing of specified data)
2) transferring to variable string from array type variables or variable string
r
tvery processing commands control code “G315” after defining an array or variable string or data
to the following control numbers.
Control code
G315 P (Processing code) K (a number of processing data) ;
Processing code specifies the type of processing with a 3-digit number. High-order “OS” can be
supressed.
PO01 (Pl) : Loads data of #8511 to K continuous numbers from the number which was
specified at #8514.
PO02 (P2) : Transfers K continuous data which was specified at #8512 to K continuotrs -
variables from the variable which was specified at #8514 (ascending order). -
-730
6. FUNCTIONS OF THE MACRO EXECUTOR
PO03 (P3) : Transfers K continuous data which was specified at #8512 to K continuous
numbers from the number which was specified at #8514 (descending
order).
PlOl : Loads data of #8511 to K continuous array numbers of array number #1
which was specified at #8514, #8515.
P102 : Transfers K continuous array variables starting with variable #l which was
specified at #8512 and #8513, to the continuous array variable which was
specified at #8514 and #8515 (ascending order).
P103 : Transfers K continuous array ariables starting with variable #1 which was
specified at #8512 and #8513, to the continuous array variable which was
specified at #8514 and #8515 (dscending order).
The difference of P2 and P3, or P102 and P103 results from whether transfer processing is
conducted from a small number or from a large number.
(Example)
If #8512= 10000, #8514= 10010,
128 500/o
255 100%
The values on power on are 100%. z -
(Note 1) #8621 to #8624 can be used even at the memory operation execution level.
6. FUNCTIONS OF THE MACRO EXECUTOR
When reading operation is performed in the conversational macro program, the ND converted data
of each channel at that timing is input.
#8631 A/D converted data of channel 1
#8632 A/D converted data of channel 2
#8633 ND converted data of channel 3
#8634 A/D converted data of channel 4
(Note 1) The ND converted data variables #8631 to #8634 can be used for read only.No data
can be written in them.
Correct #lOO = #8631
IF [HI631 GT 1000) GOT0 100 ;
#lOl = #8634/200 ;
Incorrect #8631 = 2000 ;
(Note 2) The Al board (analog interface board) is required when this function is used.
The conversational macro can control the PMC control axis through the PMC axis control interface.
The seven control codes listed below are used for this purpose. The PMC control axis to be
controlled is specified by the PMC control axis selection variable, #8602.
-75
6. FUNCTIONS OF THE MACRO EXECUTOR
The controlled axes to be selected vary with whether specification A or B is selected. Parameter
No. 032.6 (EBCSB) is used to select either specification A or B.
Specification *A Specification B
#8602
OT OM OT OM
0 3rd axis 1st to 4th axis 1st to 4th axis(2) 1st to 4th axis(?)
* 1st to 4th axis(?)
1 4th axis -(1) 1st to 4th axis(?)
*1) For the O-M of specification A, the X-, Y-, Z-, or 4th axis is selected according to parameter No.
30 (EACl and EACO). Specifying #8602 = 1 causes control commands to be ignored.
‘2) For specification B, an axis is selected according to the bit setting of signal G144,’ or the PMC
controlled axis selection variable (#8700). Set the Gl44 bits using the PMC. For details, refer. to
the Connection Manual (B-61 393E). .
Control codes
The rapid traverse command is issued to the PMC control axis. Specify the incremental traveling
distance after address X.
The cutting feed command is issued to the PMC control axis. Specify the incremental traveling
distance after address X. Specify the feedrate after address F.
G344 Pxxx:
The dwell command is issued to the PMC control axis. Specify the dwell time after address P.
The reference position return command is issued to the PMC control axis.
-760
6. FUNCTIONS OF THE MACRO EXECUTOR
G346 Mmm;
The miscellaneous function command is issued to the PC control interface. Specify the
miscellaneous function code after address M.
G348 Pppp;
The status signals (F270, F273, F1470, F1473) of the corresponding PMC axis control interface are
read into the variable indicated by address P. A one-byte signal is expressed in decimal and input
to the variable. The EBSY signal is always input as 0.
7 6 5 4 3 2 1 0
.
EBSY EOTN EOTP EGEN EDEN EIAL ECKZ EINP
For details of the signals, refer to the CONNECTION MANUAL (B-61393E) for each Series.
G348 Pl 00;
G349 Pppp;
A numeric value indicated by address P is written into the command signals (G210, G218, Gl410,
G1418) of the corresponding PMC axis control interface. The EBUF and EFIN signals cannot be
written.
7 6 5 4 3 2 1 0
For details of the signals, refer to the CONNECTION MANUAL (B-61393E) for each Series.
-770
6. FUNCTIONS OF THE MACRO EXECUTOR
(2) Notes
(a ) Buffering a command
The PMC axis control function buffers command blocks in the CNC unit so that it can execute
two or more commands sequentially. While a block is being executed, the next block can be
specified if the CNC buffer has sufficient free space. If the CNC buffer has no free space, the
next command is in the wait state until the previous command block is executed and space in
the buffer becomes free. Meanwhile, the display level is locked.
For details, refer to the CONNECTION MANUAL (B-61393E) for each Series.
The conversational macro can control the PMC control axis with variables through the PMC axis
control interface.
The macro uses the following variables for PMC axis control:
Variable area
Name of variable I
Area A Area B
I 1
PMC command signal variable #8710 #8720
1
PMC control command variable #8711 #8721
I
PMC cutting feedrate variable #8712 #8722
-789
6. FUNCTIONS OF THE MACRO EXECUTOR
The controlled axes to be selected vary with whether specification A or B is selected. Parameter
No. 032.6 (EBCSB) is used to select either specification A or B.
*
Area B 4th axis -( 1) 1st to 4th 1st to 4th
7th to 8th axis(‘2) 7th to 8th axis(‘2)
L
*1) For the O-M of specification A, the X-, Y-, 21, or 4th axis is selected according to parameter
No. 30 (EACl and EACO). Specifying #8602 = 1 causes control commands to be ignored.
“2) For specification B? an axis is selected according to the PMC controlled axis selection variable
(#8700).
For details, refer to the CONNECTION MANUAL (B-61393E) for each Series.
(1) Variables
7 6 5 4 3 2 1 0
I
EBUF ECLR ESTP ESOP ESBK EFIN
7 6 5 4 3 2 1 0
I
~2 ;
7 6 5 4 3 2 1 0
EIF7 EIF6 EIFS ElF4 EIF3 EIF2 ElFl EIFO
7 6 5 4 3 2 1 0
EID7 EID6 EID5 ElD4 EID3 El02 ElDl EIDO
7 6 5 4 3 2 1 0
EBSY EOTN EOTP EGEN EDEN EIAL ECKZ EINP
4
For details of the signals, refer to the CONNECTION MANUAL (B-61393E) for each Series.
The interlock function for a single axis direction is validated only when the following two conditions
are satisfied: The system is in the mode in which an interlock is provided for a single axis
direction, that is, the JOG or HNDL mode. The signal of the internal PMC relay (R area) which
was specified by compilation parameters (No. 9035 [Address] and No. 9036 [Bit] is set on.
When the values of variables #8600 and #8601 are expressed in binary, each digit corresponds to
a single axis direction as shown below:
7 6 5 4 3 2 1 0
M Series 4- 4+ Z- Z+ Y- Y+ X- X+
T Series 4- 4+ 3- 3+ Z- Z+ X- X+
-8O-
6. FUNCTIONS OF THE MACRO EXECUTOR
When the values of #8600 and #8601 are 00000001 in binary, for example, they indicate the
positive direction along the X-axis. When they are 00000010 in binary, they indicate the negative
direction along the X-axis.
When the value of variable #8600 is 0, interlocks are provided for all axes whenever the SKIP
signal is set on.
When the value of variable #8600 is other than 0, interlocks are provided for the axis direction
indicated by the value.
When the power is turned on, the value of #8600 is set to 0.
(2) Variable indicating the axis and direction of movement when the SKIP signal is set on, #8601
When the state of the SKIP signal changes from off to on, variable #8601 indicates the axis along
.
which the last movement was made and the direction of movement.
The value of #8601 is retained until the state of the SKIP signal changes from off to on next time.
No value can be written in variable #8601.
PMC interface
Input signal
7 6 5 4 3 2 1 0
G135 EU107 EU106 EUlO5 EU104 EU103 EU102 EUlOl EUIOO
l
-81-
6. FUNCTIONS OF THE MACRO EXECUTOR
Output signal
7 6 5 4 3 2 1 0
F182 EU007 EU006 EUOOS EU004 EU003 EU002 EUOOl EUOOO
r
Fl83 EU015 EU014 EU013 EU012 EUOll EUOlO EU009 EU008
When an operation program created in the program editing memory makes a G-, M-, or T-code
call, generally an execution macro (program) is called and executed as a subprogram or a macro
program. If automatic operation is started with this function, an execution macro program
cataloged in the ROM can be directly activated.
A conversational or auxiliary macro is used to write the number of the P-CODE program to be
started in the P-CODE work number control variable (#8610).
If the value of #8610 is not null or 0 when the automatic operation is started in the automatic
operation mode while the CNC unit is in the reset state, the P-CODE program having the number
indicated by the value of #8610 is found and executed from the beginning.
If the value of #86lO is null or zero, the user program currently selected by the CNC unit is
executed as usual.
If the program started by this function ends with M99, the currently selected program is executed
after M99.
-820
6. FUNCTIONS OF THE MACRO EXECUTOR
(Note) When #8610 is a value other than zero, this function starts a P-CODE program regardless
of the program currently selected by the CNC unit (the user program displayed on the CNC
screen). When this function is used, measures to prevent an operator error must be taken. For
example, an alarm lamp activated by an auxiliary macro or the PMC and interlock processing are
helpful.
Using the M code specified at compilation, a P-code program (execution macro program) called by
a G, M, or T code from a user program can call another user program as a subprogram.
00001;
GlOO x10. 220.; I * OgolOt
0
.
MO2 . :
Mmm PlOOO;
:
:
01000; -e I M99;
.l
0
H99;
Mmm Ppppp;
6.20.3 Notes
A user program called from an execution macro cannot call another user program or execution
macro program.
The macro executor cannot check whether the called user program contains the following
commands:
If any of the above commands is specified, a malfunction occurs but no error message is output.
-830
6. FUNCTIONS OF THE MACRO EXECUTOR
It is impossible to specify the sequence number to will be returned from the called
user program.
6.21.2 Operation
To find the value assumed by a function for a given value, enter the given value in #lOI, then
execute the corresponding instruction indicated below. Then, the result is substituted into #lOl.
#lOO = LN[#lOl] ;
#lOO = ASIN[#lOl] ;
#lOO = ACOS[#lOl] ;
-84-
6. FUNCTIONS OF THE MACRO EXECUTOR
6.22 Function for Identifying the Pressed MDI Key Using a Conversational
Macro
6.22 1 Overview
A control variable has been added to enable reading of the MDI key image signal corresponding to
the pressed MDI key using a conversational macro. The control variable allows a conversational
macro to identify the pressed MDI key.
6.22.2 Function
By reading the values of control variables #8540 to #8548, the pressed MDI key can be identified.
These variables are MDI key image signals. Each variable can be read as an 8-bit binary value.
Key images corresponding to the bits of the variables vary with the series and MDI key type.
There are six key image patterns, as follows:
1. OM/9” CRT/standard keyboard
2. OM/9”CRT/fulI keyboard
3. OM/14”CRT/full keyboard
4. OT/9”CRT/standard keyboard
5. OT/9”CRT/full keyboard
6. OT/I 4”CRT/full keyboard
6.223 Example
The following program causes “PUSH” to blink while the “START” key is pressed:
#lOO = #8501 ;
IF [#lo0 NE 9) GOT020 ;
NlO G243 X0 YO Al 82 (PUSH) ;
#101=#8542 AND 16 ;
IF [#lo1 EQ 0) GOT020 ;
M99 PlO ;
N20 G243 X0 YO Al K4 ;
r
Number 7
I 6
I
5
I
4
I
3
I 2
I 1
I 0
II
#8540 7 0 6 2 5 Y 4 X 3 R 2 F 1 H 0 S
1 #8541 1 /#: 1 KJI I4thB 1 Q P 1 . T 1 - M 1 9 G 1 8 N 1
-85-
6. FUNCTIONS OF THE MACRO EXECUTOR
Number 7 6 5 4 3 2 1 0
I I I I I I
#8540 7 61 51
#8541 can
.
9
I 91 8
#8542 1 shift 1 out&t 1 input 1 delet 1 insrt 1 alter
~~ _
#8543 macro menu 1 opialm 1 aux/gr I dgnjpr 1 offset I progm 1 POS
Number 1 7 1 6 5 4 3 I 2 1 I 0
#8540 71 6 5 4 II 0
91
I
#854l / 8
#8542 shift outkt input I delet insrt -1 alter
#8543 macro 1 menu op/alm aux/gr dgn/pr I offset progm I Pas
#8544 B sp 1 D H Q 1 p [ pager I page1 curt 1 cur 1
#8545 reset 1 sft 31 sft 2 sft 1 1 sft LF
#8546 sft RT 1 sft 10 sft 9 sft 8 sft 7 1 sft 6 sft 5 I sft 4
#8547 4th 1 2 W Y v x u
#8548 L+IT* s = M #
Number 7 6 I
1
5 4 3 2 1
I 0
#8540 7 0 6 F 1 5 2 4 x 3 R 2 w 1uIos
-860
6. FUNCTIONS OF THE MACRO EXECUTOR
#8540 7 6 /I 51 41 3 2 ‘I 0
#8541 can .
9
I / . -
91 a
#8542 l shift out&t input delet ~ insrt 1 alter
Number 7 6 5 4 3 I 2 1 0
#a540 7 6 5 4 1 I 0
#a541 can . I # 9 8
9
-880
6. FUNCTIONS OF THE MACRO EXECUTOR
Contents of Information
ID No. Information r
OM OT
-89-
6. FUNCTIONS OF THE MACRO EXECUTOR
Contents of Information
ID No. lnformation r
OM OT
Contents of Information
ID No. Information L
OM OT
9901 Alarm check flag Alarm check flag
9902 P/S alarm number P/S alarm number
9903 Overheat alarm Overheat alarm
9904 Overtravel Overtravel
9906 Saw0 alarm Saw0 alarm
9911 APC alarm check flag APC alarm check flag
9934 APC condition : 5th axis APC condition : 5th axis
9935 : 6th axis : 6th axis
9944 APC alarm : 5th axis APC alarm : 5th axis
9945 5th and 6 th : 6th axis : 6th axis
9954 Axes Control Spc alarm : 5th axis
: 5th axis SPC alarm
Information
9955 : 6th axis : 6th axis
9964 Servo alarm : 5th axis Servo alarm : 5th axis
9965 : 6th axis : 6th axis
9991 Machine coordinate : 5th axis Machine coordinate : 5th axis
9992 : 6th axis : 6th axis
9993 . Absolute coordinate : 5th axis Absolute coordinate : 5th axis
9994 : 6th axis : 6th axis
9995 Relative coordinate : 5th axis Relative coordinate : 5th axis
9996 : 6th axis : 6th axis
Alarm information
Axis/coordinate position information
Miscellaneous information including the total number of machined parts
Diagnosis information
5th/6th axis information
First check the information of ID No. 1, then proceed to the processing of each alarm.
-91-
6. FUNCTIONS OF THE MACRO EXECUTOR
#7 #6 #5 #4 #3 #2 #l #o output
information
Bit (0001 h) 0 0 0 0 0 0 0 1 1
Bit (0002h) 0 0 0 0 0 0 1 0 2
Bit (0004h) 0 0 0 0 0 1 0 0 4
Bit (OOOSh) 0 0 0 0 1 0 0 0 8
Bit (001 Oh) 0 0 0 1 0 0 0 0 16
Bit (0020h) 0 0 1 0 0 0 0 0 32
Bit (0040h) 0 1 0 0 0 0 0 0 64
Bit (008Oh) 1 0 0 0 0 0 0 0 128
For the meaning of each bit, see the alarm check flag table.
ID No. Meaning
I
2 P/S alarm number
-92-
6. FUNCTIONS OF THE MACRO EXECUTOR
#7 #6 #5 #4 #3 #2 #l #O output
information
Bit (Olh) 0 0 0 0 0 0 0 1 1
Bit (02h) 0 0 0 0 0 0 1 0 2
Bit (04h) 0 0 0 0 0 1 0 0 4
Bit (08h) 0 0 0 0 1 0 0 0 8
Bit (10h) 0 0 0 1 0 0 0 0 16
Bit (20h) 0 0 1 0 0 0 0 0 32
Bit (40h) 0 1 0 0 0 0 0 0 64
Bit (80h) 1 0 0 0 0 0 0 0 128
For the meaning of each bit, see the overheat alarms table.
Bit (Olh)
Bit (02h)
Bit (04h)
Bit (08h)
3 Bit (10h) FAN MOTER
Bit (2dh) 700 Overheat of master PCB
Bit (40h)
L
Bit (80h) 704 Spindle overheat by spindle speed fluctuation
detection
-93-
6. FUNCTIONS OF THE MACRO EXECUTOR
(d) Overtravel
ID No. 4 and 5 indicate details of overtravel using one-byte bit information between 0 and 255.
Read each byte in the same way as for an overheat alarm, as described in (c), above.
Meaning
ID No. Bit information
(Descriptions enclosed in parentheses apply to the OT.)
Bit (Olh) The X-axis stroke limit in the positive direction has been
I exceeded.
Bit (02h) 520 The Y(Z)-axis stroke limit in the positive direction has
been exceeded.
Bit (04h) 530 The Z(3)-axis stroke limit in the positive direction has
been exceeded.
Bit (08h) 540 The 4-axis stroke limit in the positive direction has been
exceeded.
Bit (IOh) 511 The X-axis stroke limit in the negative direction has
been exceeded.
Bit (20h) 521 The Y(Z)-axis stroke limit in the negative direction has
been exceeded.
Bit (40h) 531 The Z(3)-axis stroke limit in the negative direction has
been exceeded.
Bit (80h) The 4-axis stroke limit in the negative direction has been
exceeded.
Meaning
(Descriptions enclosed in parentheses apply to the OT.)
I Bit (Olh)
I
512 The X-axis stroke limit in the positive direction has been
I exceeded.
The Y(Z)-axis stroke limit in the positive direction has
Bit (02h) 522
I been exceeded.
Bit (04h) 532 The Z(3)-axis stroke limit in the positive direction has
been exceeded.
Bit (08h) 542 The 4-axis stroke limit in the positive direction has been
r I exceeded.
5
Bit (10h) 513 The X-axis stroke limit in the negative direction has
been exceeded.
Bit (20h) 523 The Y(Z)-axis stroke limit in the negative direction has
been exceeded.
Bit (40h) 533 The Z(3)-axis stroke limit in the negative direction has’
been exceeded.
I Bit (80h)
I
543 The 4-axis stroke limit in the negative direction has been
I exceeded.
6. FUNCTIONS OF THE MACRO EXECUTOR
Each ID is one-byte bit information. For details of one-byte bit information, see the description
of overheat alarms. The following tables list the meanings of all bits.
I Bit (80h)
I
308 The battery voltage for the APC has fallen to a level
where the battery must be replaced. (APC alarm)
-960
6. FUNCTIONS OF THE MACRO EXECUTOR
10 No. Meaning
22 Alarm number of external alarm 1
23 Alarm number of external alarm 2
24 Alarm number of external alarm 3
25 Alarm number of external afarm 4
ID No. Meaning
I
29 I Custom macro alarm number I
-97-
6. FUNCTIONS OF THE MACRO EXECUTOR
ID No. 1 Meaning
Meaning
I 200
201
202
Total number of machined parts
Run hour
Cycle time
-98-
6. FUNCTIONS OF THE MACRO EXECUTOR
ID No. 700, 701, and 712 indicate one-byte bit information between 0 and 255.
I Bit (40h) The system is waiting for the spindle speed reached signal to be
turned on.
I Bit (80h)
I Bit (04h) The system is waiting for the index table to be clamped/unclamped
before/after B-axis index table indexing.
701
Emergency stop, external reset, reset & rewind, or the reset key on
the MDi panel is turned on.
I Bit (80h)
I ID No.
I System
information I
Meaning
I 710
I O-255 Upon the occurrence of a TH alarm, indicates the position of the
character at which the TH alarm occurred.
I 711
I O-255 Indicates the read code for the character at which the TH alarm
occurred.
-99-
6. FUNCTIONS OF THE MACRO EXECUTOR
For diagnosis information ID No. 720 to 775, the unit digit of each number corresponds to an
axis number.
Bit (0th) Emergency stop has been turned on or a servo alarm has occurred.
Bit (02h)
Bit (04h)
Bit (08h) The reset key has been turned on.
Bit (10h) Reset & rewind has been turned on.
_
Bit (20h) External reset, emergency stop, reset & rewind, or the reset key on
the MDI panel has been turned on.
712
Bit (40h) The system is waiting for the spindle speed reached signal to be
turned on.
Bit (80h) This flag causes pulse distribution to stop in the following cases:
(1) External reset has been turned on.
(2) Reset & rewind has been turned on.
(3) Emergency stop has been turned on.
(4) Feed hold has been turned on.
(5) The reset key on the MD1 panel has been turned on.
(6) Manual mode has been selected.
(7) An alarm other than the above has occurred.
-1 oo-
6. FUNCTIONS OF THE MACRO EXECUTOR
Bit (Olh) A software phase data error alarm has been detected.
Bit (02h) A clock alarm has been detected.
I
Bit (04h) A zero battery alarm has been detected.
760 Bit (08h) A rotation speed count error alarm has been detected.
765 Bit (10h) A phase data error alarm has been detected.
Bit (20h) A low battery atarm has been detected.
Bit (40h) _~ A check sum alarm has been detected.
I
Bit (80h) A serial pulse coder is connected.
I Bit (Olh) I-
I Bit (02h) 1
Bit (04h)
Bit (08h)
ID No. Meaning
z :
3 c
-lOl-
6. FUNCTIONS OF THE MACRO EXECUTOR
002A 002B ooze OOZD OOZE OOCE OOCF OODO OODl OODZ
+ + 9 m . rf; 7 Nz Is f
OOZF 0030 0031 0032 0033 OOD3 OOD4 OOD5 OOD6 OOD7
/ 0 1 2 3 * v J 3 3
0034 0035 0036 0037 0038 OODB OOD9 OODA OODB OODC
4 5 6 7 8 'I II, t 13 T7
0039 003A 003B 003c 003D OODD OODE OODF 2137 2421
9 .. C =
.
; 2 . 4 15
003E 003F 0040 0041 0042 2422 2423 2424 2425 2426
> ? e A B 2bj c\ b' 3 3
0043 0044 0045 0046 0047 2427 2428. 2429 242A 242B
C D E F G It ji ss fj 79%
0048 0049 004A 004B 004c 242C 242D 2423 242F 2430
H I J K L d' s F < c
004D 004E 004F 0050 0051 2431 2432 2433 2434 2435
M N 0 P Q 1s v t &,- 3
0052 0053 0054 0055 0056 2436 2437 2438 2439 243A
R S T U V 5 L c -f T
0057 0058 0059 005A 005B 243B 243C 243D 243E 243F
W X Y z I * e -? ? k
005c 005D 005E 005F OOAO 2440 2441 2442 2443 2444
4 1 A - - t: r; s;z 3 7
OOAl OOAZ OOA3 OOA4 OOA5 2445 2446 2447 2448 2449
0 r J - . 3 7 T L t-
OOA6 OOA7 OOAB OOA9 OOAA 244A 2448 244C 244D 2443
7 7 4 9 1. tr tt h ta a)
OOAB OOAC OOAD OOAE OOAF 244F 2450 2451 2452 2453
f t a 3 Y I;t rf lb 0 v
OOBO OOBl OOBZ OOB3 OOB4 2454 2455 2456 2457 2458
Y 4 It r v & s s -
OOB5 OOB6 OOB7 OOBB OOB9 2459 245A 245B 245C 245D
d- ?l * 3 9 ^; 4 ci cr 1%
OOBA OOBB OOBC OOBD OOBE 2453 245F 2460 2461 2462<
f7 sf -> x + zt t& t br3 G -
OOBF ooco OOCl ooc2 ooc3 2463 2464 2465 2466 2467
'1 9 3- y F 9 + 9 N 8
-102-
6. FUNCTIONS OF THE MACRO EXECUTOR
2468 2469 246A 2468 246C 323E 323F 3241 3243 3244
L /j 0 a tt f/z f?J efi m iiT
246D 246E 246F 2472 2473 3248 324A 324C 3254 3255
3 b ;h e XI at Tt* #k -f% fa
2641 2642 2F40 2F41 2F42 3259 325D 3261 3268 3271
u B f t i;;i II% ’
a ii!ii e
2F43 2F44 2F45 2F46 2F47 3272 3273 327E 3323 3326
\ r( 1 L M q at hk *
2F48 2F49 2F4A 2F4B 2F4C 3328 3328 332C 3330 3335
2F50 2F51 2F52 2F53 2F60 333A 3346 3348 334A 334B
V w w v w w a a at ts t.%
2F61 2F62 2F63 2F64 2F65 334E 3351 3354 3356 3358
Fe * fb MI *
2F66 2F67 2F68 2F69 2F6A 3358 335D 3364 3368 342C
a #!I# a i% e
2F6B 2F6C 2F6D 2F6E 2F6F 3430 3439 3441 3446 3449
% #t iR g- w
2F70 2F71 2F72 2F73 2F74 344A 3451 3453 3466 3458
s * ti e& RI!
302E 3035 3037 3042 3045 3521 3522 3524 352C 352D
a! & @k a; a# ta dfI % % iz
304A 304c 304F 3055 305B 352F 3530 353B 353F 3541
1% @ Ia I!! Je %s #L a R a
305c 3063 3068 306C 3075 3551 3552 3555 3559 355E
.
fs j& fB - EfJ @ 1$ & w ifb
l
307A 3122 3123 3126 313F 3561 3565 3566 3569 356B
31 I% I?. . * z * 3E3t R #k I@
3146 3154 315B 315F 3168 356C 356E 3576 3577 3621
#j acd a!! PI iB 18 * 8+ Jr! #
316F 3173 317A 317B 317c 3626 362D 362F 3635 3648
#% a IY 9\ a # ?IE !a 4ik #.
317D 317E 3221 3223 322B 364A 3651 3652 3658 365Az
a Kc # # ?@ I e m # fi?i -
322F 3230 3239 323C 323D 3661 3662 3668 366B 366E
fs R! ia T 4t: i!f & _ Izc . s , @
-103-
6. FUNCTIONS OF THE MACRO EXECUTOR
3671 3675 3676 3679 3721 3B45 3B48 3B4D 3B4F 3B51
372B 3732 3738 3739 373F 3B52 3B57 3B58 3B5F 3B65
fs %! s. e )Br % m *WI R s
3757 375A 3765 3767 3768 3B75 3B76 3B77 3B7D 3B7E
lit es #f7 A 8? Ia s !a )4 w
376A 3768 376F 3821 3822 3C21 3623 3628 3C2A 3C2B
R #it f$ Hk # Yc ti % T B
3826 382A 382B 3833 3835 3c30 3c34 3C3A 3c3c 3C4I
m M RJ # z s @II !k s z
3836 3839 383A 3838 383D 3C42 3c4c 3C4D 3c50 3c54
M s& * is 42 % w # #t *
3840 3842 3844 3846 3847 3C56 3C5A 3C61 3C65 3667
I3 I!!! m . •B s
e % fit R bil
384A 384C 385F 3865 3866 3C68 3C69 3C6A 3C6C 3C6F
2, a E t4t fiD mt 9 + * a
386C 386D 3863 3872 387A 3c75 3c77 3c79 3C7D 3C7E
a# I!!! ar 2 Rh 8 * #t a RiJ
387C 387D 387E 3926 3929 3024 3D2A 3D38 3D3D 3D3E
Q a m 71 I t5 P. % + fit
392A 3921) 3933 3935 3939 3D44 3D45 3D50 3D51 3D52
393B 393D 3942 3945 3953 3D60 3D63 3D67 3D68 3D69
et # t# isi R * Hi M & #I
3954 395D 395F 3960 3962 3D6A 3D71 3D75 3D78 3D7C
3F36 3F37 3F3B 3F3c 3F3F 434D 434E 434F 4356 4357
a #i *
l t% PF fiik 9En a!! t zk
3F47 3F48 3F4A 3F4D 3F4F 4359 4365 4366 436C 436D
# !# &. A 31 a * rp e &
3F5E 3F62 3F64 3F65 3F6D 4372 437A 4425 4427 4434
Ia ai ak * ai # T a @Sk c19
3F74 3F78 4023 4029 402D 4436 4439 443A 443B 443E
a sit iE kk m la . Ia . f&i # e
I
403D 4044 404A 4050 4051 446C 4478 4479 4478 452A
I
4053 4056 405A 405c 405E 452C 4534 453A 453E 4540
I
405F 4061 4062 4064 4068 4541 4545 4550 4553 4559
.
&k m m #a se iz x s & Is
I
4069 406C 4075 407B 407E 456A 4576 4579 4628 4626
.
+ * a & s St &i * a BJI
412A 4130 4133 4134 4146 4630 4631 4633 463B 4640
I
iir m )h
.... St t!R #I m 8 i# ?#
4147 414F 4150 415B 415c 4643 4648 4649 464C 464D
* @J z el
l&* I!!! e @ 1% r!Il %
.
415E 4160 4161 416A 4160 465F 4662 4679 467C 467E
m t# 9 tiii ae @ii PI m E3 A
.
4175 4176 4177 417D 4226 4724 4727 472E 472F 473B
.
z 2 is e iRl fz a #k * t#
4227 4228 422C 422D 422E 473c 473D 474B 474F 4753
RI WJ M a i!k M #z f& s #
3
4230 4233 4238 423B 423E 4754 4755 4758 475B 475c
R a! Iv #R a Wk e w az te
423F 4240 4247 424E 4250 4772 4776 4822 482F 4834
.
* k IT # 34 B I!! @ s tk
4254 4256 4258 4260 4265 4836 483D 483E 483F 4842
I+ 5 . .
,‘b 8 d! ft # I?J * E a?
.
4266 4267 4268 426A 4263 4844 4846 484C 484F 4856
l9 A 3R WT * #i iR at ati #
4272 4323 432B 4331 4335 4866 4869 486F 4873 487%
R is 8 * #z ft: Ai vi # ml
433A 433B 433c 4347 434A 4879 487E 492c 4934 4938
.
-1 OS-
6. FUNCTIONS OF THE MACRO EXECUTOR
493D 4941 4943 494A 4954 4E61 4E63 4E64 4E69 4373
J?e ei f!tb ii ?r; + m e *1 91
4955 495B 4961 4969 4974 4374 4E7D 4F22 4F29 4F3F
ti e * 9. IRS s i#r is I% i%
497A 497B 497c 497D 4A23 4F40 IF42 IF43 4F44 4F48
R NJ fR M a ah al II
% E I#4
4A2A 4A2C 4A34 4A38 4A39
% 53 Ia * w
4A3B 4A3F 4A42 4A44 4A47
f# T I& IY!l F4
4A4C 4A51 4A52 4A54 4A55
511 Tic rt #ii z
4A56 41959 4A5B 4A5D 4A62
iIt &h SF f% 26
4A64 4A6F 4A71 4A73 4A7C
I@ #it a t% I&
4A7D 4821 4B3A 4B40 4B5C
z iik ,I?l t& *
4860 4B67 4B68 4B76 4B7C
@ ac s * 7j:
* l * 8 #!e % te
4c40 4c47 4c4c 4c57 4C5A
!Y iHi Kl R *
4c5c 4C61 4C64 4C67 4c73
R R H r9 $9
4675 4C7D 4D2D 4D33 4D3D
‘di *hIi * Eh T
4D3E 4D3F 4D46 4D49 4D4D
&. 9 Is a t#
4D4F 4D51 ID57 4D5E 4D6D
i8 m E RJ #a
4D6E 4D70 4D77 4D78 4D7D
Ri a R *u a
4E22 4E25 4E28 4E29 4E2C
s s * 2 a
4E3B 4E3E 4E41 4E49 4E4C =I
_
7 i@ !f+ & *
4E4E 4E4F 4E50 4E58 4E60
%I a ta ak m
-106-
6. FUNCTIONS OF THE MACRO EXECUTOR
.. ..A
7. FUNCTIONS FOR STOPPING A CONVERSATIONAL MACRO
Specify the numbers of the program and sequence at which the conversational macro program is
to be stopped and execute the conversational macro program on the CUSTOM screen. When an
attempt is made to execute the block corresponding to the specified program and sequence, TSTP
is automatically turned on. The execution of the conversational macro is stopped. If parameter No.
9002 is set to 0, this function is invalidated. In usual operation, it must be set to 0.
When this function is used, compilation parameter SEQ must be set to 1 to output sequence
numbers to the P-CODE program.
-108-
APPENDIX 1 MACRO PROGRAM EXAMPLE
I (RADIUS) =
F (FEED) =
D (OFS NUM) =
Y = axis
I NUM
Al-l
APPENDIX 1 MACRO PROGRAM EXAMPLE
-
00010 00001 ;
00020 NO00 6202 P3 ;
00030 #8505--O ;
00040 G243 X0 YO Al BO (SAMPLE PROGRAM) I'
00050 x2 Y3 (1 -- KEY TEST) ;
00060 x2 Y5 (2 -- CURSOR TEST) ;
00070 x2 Y7 (3 -- DISPLAY TEST) ;
00080 x2 Y9 (4 -- ADDRESS VARIABLE) ;
00090 x2 Yll (5 -- CIRCLE) r'
00100 #8509=0033 ;
00110 #143=300 ;
00120 M98 PO011 r'
00130 NO01 #142=#8501 ;
00140 IF [#142 EQ 0] GOT0 99 ;
00150 IF [#142 LT 121 GOT0 99 ;
00160 IF (1142 GT 161 GOT0 99 ;
00170 #8500=[#142-111 "10 ;
00180 M99
00190 NO99 M99 Pl ;
00200 ;
00210
00220
00230 ;
00240 :
Al-2
APPENDIX 1 MACRO PROGRAM EXAMPLE
00010 00011 ;
00020 #lOO=O ;
00030 WHILE [#lo0 LT 51 DO 1 I'
00040 G243 X[#lOO*8+1] Y16 Al BO P[#143+#100] I'
00050 #100=#100+1 ;
00060 END 1 ;
00070 M99;
00080 ;
00090 ;
00100 r'
00110 ;
00120 ;
00010 00020 ;
00020 6202 P3 ;
00030 #8505=0 r'
00040 #8502=0 ;
Al-3
00050 NO08 C243 X0 Yl (CURSOR TEST -- MOVE CURSOR -0) ;
00060 6243 X0 93 (A) ;
00070 6243 X0 Y4 (B) ;
00080 G243 X0 Y5 (C) ;
00090 G243 X0 Y6 (D) ;
00100 6243 X0 Y7 (E) ;
00110 6243 X0 Y8 (F) ;
00120 #143=100 ;
00130 M98 PO011 I'
00140 #lOO=O ;
00150 18506~2 ;
00160 NO01 #142=#8501 r'
00170 IF [#142 EQ 0] GOT0 3 ;
00180 IF [#142 NE 31 GOT0 2 r'
00190 #100=#100+1 ;
00200 NO02 IF [/142 NE 41 GOT0 3 ;
00210 #100=#100-1 ;
00220 NO03 #100=#100+6 r'
00230 #lOO=#lOO-[FIx[#100/6]]*6 ;
00240 #8507=#100+3 ;
00250 #8505--l ;
00260 NO99 IF [#142 NE 161 GOT0 97 r'
00270 NO98 #8500=1 ;
00280 M99 ;
00290 NO97 M99 Pl ;
00300 :
00310 :
00320 t
00330 r’
00340 ;
Al-4
OOlSO G243 X0 Y4 Al BO K200 ;
00160 #141=100 ;
00170 M98 PO031 ;
00180 G243 X0 Y4 Al BO K200 r'
00190 X0 Y4 (*3441 2438 4932) 3C28 OOC3 OOBD OOC4*) ;
00200 #141=300 ;
00210 M98 PO031 ;
00220 6243 X0 Y4 Al BO K200 r'
00230 #141=100 r'
00240 M98 PO031 ;
00250 G243 X0 Y4 Al BO K200 ;
00260 X0 Y4 (INT. CODE ) (*2F40 2F48 2F79 2F53*) ;
00270 #141=300 ;
00280 M98 PO031 ;
00290 G243 X0 Y4 Al BO K200 ;
00300 #141=100 ;
00310 M98 PO031 ;
00320 X0 Y4 A3 BO (3 MULTI) r'
00330 #141=300 ;
00340 M98 PO031 r'
00350 G243 X0 Y4 Al BO K200 ;
00360 #141=100 ;
00370 M98 PO031 ;
00380 M98 PO032 I'
00390 #141=100 ;
00400 M98 PO031 ;
00410 G243 X0 Y4 Al BO K200 r'
00420 X0 Y4 (DATA DISPLAY TEST 1234.567) ;
00430 #100=1234.567 ;
00440 G243 X0 Y6 F8.3 20 K200 ;
00450 X0 Y6 (F8.3 ) DflOO ;
00460 #141=300 ;
00470 M98 PO031 I'
00480 G243 X0 Y6 F8.3 21 K200 ;
00490 #141=100 ;
00500 M98 PO031 ;
00510 X0 Y6 (F8.3 ) D#lOO ( LEADING ZERO NEG.) r'
00520 #141=300 ;
00530 M98 PO031 ;
00540 6243 X0 Y6 F5.2 K200 ;
00550 #141=100 ;
00560 M98 PO031 ;
. 00570 X0 Y6 (F5.2 ) D#lOO ;
00580 #141=300 ;
00590 M98 PO031 ;
00600 #8509=0033 ;
Al-5
APPENDIX 1 MACRO PROGRAM EXAMPLE
00010 00031 ;
00020 NO01 SF [#la1 LT 0] GOT0 99 I’
00030 #141=g141-1 ;
00040 GOT0 1 ;
00050 NO99 #142=#8501 ;
00060 IF [#142 EQ 161 GOT0 97 ;
00070 M99 r'
00080 NO97 M99 P98 ;
00090 ;
00100 r'
00110 r’
00120 ;
00130 ;
00010 00032 ;
00020 G243 X0 Y4 Al BO (BLINK TEST) r’
00030 #100=200 ;
Al-6
APPENDIX 1 MACRO PROGRAM EXAMPLE
Al-7
APPENDIX 1 MACRO PROGRAM EXAMPLE
00250 r’
00260 r’
00270 ;
00280 ;
Al-8
APPENDIX 1 MACRO PROGRAM EXAMPLE
00010 00041 ;
00020 #lOO=O I'
00030 WHITE [#lo0 LT 51 DO 1 r'
00040 G310 D699 Q#lOO ;
00050 $141=10 ;
00060 M98 PO031 r'
00070 #100=#100+1 ;
00080 END 1 ;
00090 #lOO=D699 ;
00100 G243 X0 Y6 (DATA TABLE -- ) F3.0 D#lOO ;
00110 #141=300 ;
00120 M98 PO031 I'
00130 M99 ;
00140 t
00150 :
00160 r'
00170 r'
00180 t
00010 00050 ;
00020 G202 P3 ;
00030 #8506=13 ;
00040 #8507=2 r'
00050 #8505=1 ;
00060 #147=0 ;
00070 G202 P3 ;
00080 M98 PO052 ;
00090 M98 PO053 ;
00100 M98 PO051 ;
00110 NO01 #8502=1 ;
00120 #142=)18501 ;
00130 #144=#8503 ;
00140 IF [#142 EQ 0] GOT0 99 ;
00150 IF [#142 NE 121 GOT0 3 I’
Al-9
APPENDIX 1 MACRO PROGRAM EXAMPLE
00160 #147=0 ;
00170 COT0 9 r'
00180 NO03 IF [#142 NE 131 GOT0 4 ;
00190 #147=1 ;
00200 GOT0 9 r'
00210 NO04 IF [#142 NE 141 COT0 5 r'
00220 #147=2 ;
00230 GOT0 9 I'
00240 NO05 IF [#142 NE 41 GOT0 6 ;
00250 #147=/147-l ; -
00260 GOT0 9 r'
00270 NO06 IF [#142 NE 31 GOT0 7 ;
00280 #147=#147+1 ;
00290 GOT0 9 ;
00300 NO07 IF [#142 NE 151 GOT0 8 ;
00310 #140=1 ;
00320 M98 PO054 ;
00330 GOT0 10 r'
00340 NO08 IF [#142 NE 81 GOT0 10 r'
00350 NO09 #147=/147+3 I'
00360 #147=X147-FIX[#l47/3]" 3 r'
00370 IF [#144 EQ #O] GOT0 10 ;
00380 #[500+#147]=#144 I'
00390 G243 Xl4 Y[#147+2] 21 F4.0 D#[#147+500] ;
00400 NO10 M98 PO051 ;
00410 NO99 IF [#142 NE 161 GOT0 97 ;
00420 NO98 $8500=1 I'
00430 M99 ;
00440 NO97 M99 Pl ;
00450 ;
00460 ;
00470 ;
00480 ;
00490 ;
Al-10
APPENDIX 1 MACRO PROGRAM EXAMPLE
00100 ;
00110 f
00120 ;
00130 ;
00010 00053 ;
00020 6244 PO ;
00030 G242 X80 Y20 ;
00040 GO1 Xl10 Y50 ;
00050 GO2 Xl40 Y20 1110 520 QO ;
00060 GO2 X140 Y20 I80 520 44 ;
00070 GO2 Xl10 Y-10 1110 520 QO r'
00080 GO1 x80 Y20 ;
00090 G244 P2 ;
00100 G242 X80 Y20 ;
00110 GO1 Y-70 ;
00120 G242 X20 Y20 ;
00130 GO1 Y-70 ;
00140 G244 Pl ;
00150 G242 X80 Y-65 r'
00160 GO1 X20 r'
00170 G243 X25 Y12 Al BO (I) ;
00180 M99 ;
00190
00200
Al-l 1
APPENDIX 1 MACRO PROGRAM EXAMPLE
00210 ;
00220 ;
00230 ;
00010 00054 ;
00020 G310 D699 Q[#140+16] ;
00030 #141=5 ;
00040 M98 PO031 ;
00050 G310 D699 Q[f140+48] ;
00060 x141=5 r'
00070 x98 PO031 r'
00080 6310 D699 Q[#140+16] ;
00090 #141=5 ;
00100 M98 PO031 r'
00110 G310 D699 QO r'
00120 M99 ;
00130 t
00140 t
00150 t
00160 ;
00170 r’
Al-12
APPENDIX 1 MACRO PROGRAM EXAMPLE
1 1
I Screen clearing
- +
I
I Title display
I
Menu display I
I Soft key display I
I
Counter = 0
Soft key 3? Yes
I
Counter + 1 RET
.
Al-13
APPENDIX 1 MACRO PROGRAM EXAMPLE
I
1
I- Screen clear
I
. d / M99
Counter = 0
1 CursorX-cootvnate = 2 jl
-I Mgg1
Al-14
APPENDIX 1 MACRO PROGRAM EXAMPLE
1
I Title display I ,ti,
I Counter = 200
I I Titie display
I
I
Character display by
Bl (Blink) I
h Counter -1
Counter > O?
Character display by
1 1 B2 (Blink high-speed) 1
“Press Emergency
Stop Button “display I “Reset Emergency
Stop Button “display
I Counter -1
I RET
I
Al-15
APPENDIX 1 MACRO PROGRAM EXAMPLE
Counter + 1
Character string
c display for data I,
Yes
Graphic display
L3 RET ,
Data display
No
No
Cursor pointer = 0
l \
Al-16
APPENDIX 1 MACRO PROGRAM EXAMPLE
.
2
.
Cursor pointer t 1
Cursor pointer f 2
I Data display
Q-l
1
Cursor pointer -1
I
-=
Al-17
APPENDIX 1 MACRO PROGRAM EXAMPLE
I
Program No. and AUTO
so that the external program
mode selecting signal
No. from machine side
OW@
becomes invalid.
Time chart
c 1
L-
8
Further, start signal is
‘MC-A 1-L
OlJwt
\
MC. S r-l
I Timer
Timer
\
.
Program No. and AUTO Unless the AUTO mode signal
, ;n seiecti; signal , isturned OFF finally, and
selection from the operator’s
panel is invalid.
1
0699
7 6 5 4
I I 3H
(1) 00001
0020 NO00 G202 P3
Screen erase
PI : Character screen
P2: Graphic screen
P3: Character and graphics
0030 #8505 = 0
Cursor control
Al-18
APPENDIX 1 MACRO PROGRAM EXAMPLE
090 39,0
Character coordinate -
0,16 39,16
(2) 00011
0030 WHILE [Conditional Expression] DO1
I
END1
Al-19
. APPENDIX 1 MACRO PROGRAM EXAMPLE
00020
0220 NO03 #100=#100+6
#100=#100-[FIX[#100/6]]*6
This calculation is made to find the cursor position.
Add 6 in advance so that cursor position does not become negative on the 220th line. “6”
means that the cursor moves at 6 places.
*‘FIX” on the 230th line is a function which omits the figure below the decimal place of the
answer for the quotient. Find the remainder divided by 6.
00030
0090 G243 X0 Y2 Al BO K200
Write 200 blanks, using K200.
If a triple character is specified with A3, the blank of a triple character is written by the
specified number.
0190 XOY4('34412438493D......*)
When internal codes, such as Chinese characters are used for the screen display, enclose
them with “(*‘and “7”.
For Chinese characters, space for 2 letters are used.
0570 X6Y6(5.2)
#100=1234.567
When the display is made in 2 digits below the decimal place, using F5.2 format, the figure is
half-adjusted to ” 1234.57”.
00032
G243---B1(-)
Al-20
APPENDIX 1 MACRO PROGRAM EXAMPLE
For blink display, display instructions are given only once but repeated.
00040
0100 #lOO=Gl21.4
Gl21.4 (emergency stop) condition is read to common variable #lOO.
(3) 00054
Use data table No. 699 for data transfer with PMC, and write Program No., AUTO mode
selection and cycle start signal.
0699
•?
MC. s MC. A PN8M PN4M PN2M PNlM
7 6 5 4 3 2 1 0
In the PMC sequence program, the external Program No. from the machine side was made
invalid and Program No. from the macro valid when the AUTO mode from the macro (MC.A) is
received.
When MC.A signal is input, the mode on the operator’s panel is changed to “AUTO” automatically.
When the timer preset time elapses after the mode selection, turn the cycle start signal ON.
Within PMC, this signal is “OR” with the cycle start signal on the operator’ s panel.
PNl-8M -
MC. A -L
MC-S 1
Al-21
APPENDIX 1 MACRO PROGRAM EXAMPLE
PNlN MC.A
AUTO.
k M MDX. M JOG. M HOME. M HND. M
41
t-
MC. A
d
t-
~ AUTO. L
Al-22
APPENDlX 1 MACRO PROGRAM EXAMPLE
4
00160 IF [#142 GT 161 GOT0 99 ;
00170 #8500=[#142-111 *lO ;
Separate to program
00180 M99
per softkeys
00190 NO99 M99 Pl ;
00200 ;
00210 ;
00220 ;
00230 r'
00240 r'
Al-23
APPENOIX 1 MACRO PROGRAM EXAMPLE
.= _
Al-24
APPENDIX 1 MACRO PROGRAM EXAMPLE
Al-25
APPENDIX1 MACROPROGRAMEXAMPLE
Al-26
APPENDIX 1 MACRO PROGRAM EXAMPLE
00780 M99 ;
00790 NO97 M99 Pl ;
00800 ;
00810 ;
00820 r'
00830 I'
00840. ;
Al-27
APPENDIX 1 MACRO PROGRAM EXAMPLE
00070 END 1 ;
00080 G243 X0 Y6 Al BO K20 ; screen partially erased
00090 #141=100 I'
Timer
00100 M98 PO031 ; >
00110 #100=200 ; Loop counter setting
00120 WHILE [tlOO GT 0] DO 2 ;
00130 ~100=/100-1 ;
00140 NO02 G243 X0 Y6 Al B2 (BLINK FAST) ; Loop for blinking
00150 END 2 ;
00160 G243 X0 Y4 Al BO K200 ; screen partially erased
00170 M99 ;
00180 t
00190 :
00200 t
00210
00220 r’
Al-28
APPENDIX 1 MACRO PROGRAM EXAMPLE
2 _
Al-29
APPENDIX 1 MACRO PROGRAM EXAMPLE
Al-30
APPENDIX 1 MACROPROGRAMEXAMPLE
00470 :
00480 :
00010 00041 r'
00020 #lOO=O ; Counter
00030 WHILE [#lo0 LT 51 DO 1 ;
00040 G310 D699 Q#lOO ; Write Q data on the data
00050 x141=10 r' table specified by D.
00060 M98 PO031 ; > Timer
00070 #lOO=#lOO+l ; Counter +1
00080 END1 r’
00090 #lOO=D699 ;
00100 G243 X0 Y6 (DATA TABLE -- ) F3.0 D#lOO r'> Answer display
00110 #141=300 ;
Timer
00120 M98 PO031 ; >
00130 M99 ;
00140 t
00150 ;
00160 ;
00170 r’
00180 r’
Al-31
APPENDIX 1 MACRO PROGRAM EXAMPLE
Al-32
APPENDIX 1 MACRO PROGRAM EXAMPLE
00450 ;
00460 ;
00470 ;
00480 ;
00490 ;
00130 ;
Al-33
APPENDIX 1 MACRO PROGRAM EXAMPLE
Al-34
APPENDIX 1 MACRO PROGRAM EXAMPLE
Al-35
APPENDIX 1 MACRO PROGRAM EXAMPLE
Al-36
APPENDIX 1 MACRO PROGRAM EXAMPLE
00010 08001
00020 #10000 = 10010 r'
00030 #lOOOl = 2 ;
00040 #10002 = 10026 ;
00050 #10003 = 2 r'
00060 #lOOlO = 13 ;
00070 #lOOll = 2 ;
00080 #10012 = 0 ;
00090 #10013 = 0 ;
00100 110014 = 1 r'
00110 #lOOlS = 1 ;
00120 X10016 = 1 ;
00130 #10017 = 0 ;
00140 #lo018 = 10 I'
OOlSO #10019 = 4 r'
00160 110020 = 0 ;
00170 #10021 = 1 r'
00180 #10022 = 1 r'
00190 #lo023 = 7 r'
00200 #lo024 = 1 r'
00210 #lo025 = 1 ;
00220 110026 = 13 ;
00230 (cl0027 = 2 ;
00240 #lo028 = 0 r'
00250 #10029 = 0 ;
00260 (110030 = 1 ;
00270 #10031 = 1 ;
00280 X10032 = 1 ;
00290 1110033 = 0 ;
00300 #10034 = 11 ;
00310 #10035 = 4 ;
00320 X10036 = 6 ;
00330 #10037 = 1 ;
00340 #lo038 = 4 ;
00350 x10039 = 5 ;
00360 #10040 = 1 ;
00370 #10041 = 0 ;
00380 #8500 = 8000 :
00390 M99 I'
00400 ;
00410 ;
00420 t
00430 t
00440 :
Al-37
APPENDIX 1 MACRO PROGRAM EXAMPLE
00010 08011 ;
00020 M98 P9506 r'
00030 G243 X0 Yl Al (MACRO EXAMPLE) ;
00040 X2 Y4 Al (SOFTKEY SELECT) ;
00050 X3 Y6 (1 - EXAMPLE A) ;
00060 x3 Y7 (2 - EXAMPLE B) ;
00070 X3 Y8 (3 - EXAMPLE C) r'
00080 x3 Y9 (4 - EXAMPLE D) ;
00090 x3 YlO(5 - EXAMPLE E) ;
00100 X2 YlG(EX.A) ;
00110 XlO(EX.B) ;
00120 Xl8(EX.C) r'
00130 X26(EX.D) ;
00140 X34(EX.E) ;
00150 #loo = 0 ;
00160 M99 r'
00170 r’
00180 r’
00190 r’
00200 r’
00210 t
00010 08012 ;
00020 M98 P9506 ;
00030 G243 Xl YO Al (EXAMPLE A) ;
00040 X3 Y2 ( PROG NO ) C61 ;
00050 x0 Y4 ( DATA 1 ) C61 r'
00060 x0 Y5 DATA 2 ) C61 ;
00070 X0 Y6 DATA 3 ) C61 ;
00080 x0 Y7 DATA 4 ) C61 ;
00090 X0 Y8 DATA 5 ) C61 ;
00100 x0 Y9 DATA 6 ) C61 ;
00110 x0 YlO( DATA 7 ) C61 ;
00120 X34 Y16 (END) ;
00130 G243 Xl4 Y2 F4.0 20 D#10050 ;
00140 #lSO = 5.2 ;
00150 #141 = 1 ;
00160 #142 = 11 r'
00170 #143 = 4 ;
00180 #144 = 10051 ;
00190 #la5 = 7 ;
00200 (1146 = -9999 ;
00210 #147 = 1 ;
00220 M98 P9505 ;
00230 #loo = 1 ;
00240 ilO4 = 0 I'
Al-38
APPENDIX 1 MACRO PROGRAM EXAMPLE
00250 #105 = 0 ;
00260 #140 = 0 ;
00270 M98 P9502
00280 M99 ;
00290 ;
00300 t
00310 t
00320 r’
00330 t
00010 08013 ;
00020 M98 P9506
00030 6243 Xl YO Al (EXAMPLE B) I'
00040 x3 Y2 PROG NO 1 * 3D *) :
00050 x0 Y4 DATA SET1 t
00060 x0 Y5 DATA SET2
00070 X0 Y6 DATA SET3
00080 x0 Y7 DATA SET4
00090 X0 Y8 (DATA SETS) ;
00100 X34 Y16 (END) ;
00110 G243 Xl4 Y2 F4.0 20 D#10060 ;
00120 #llO = 0 r'
00130 WHILE [$llO LE 41 DO 1 I'
00140 #140 = 4.0 ;
00150 #141 = 0 ;
00160 #142 = 12 ;
00170 #143 = #llO + 4 r'
00180 f144 = 10061 + #llO * 4 ;
00190 1145 = 4 ;
00200 #146 = -9999 ;
00210 #147 = 6 ;
00220 M98 P9504 ;
00230 ill0 = #llO + 1 r'
00240 END 1 ;
00250 ilO0 = 2 ;
00260 #104 = 0 ;
00270 #lo5 = 0 I'
00280 #lSO = 0 r'
00290 M98 P9502 ;
00300 M99 ;
00310 t
00320 t
00330 :
00340 ;
00350 ;
00360 t
Al-39
APPENDEX 1 MACRO PROGRAM EXAMPLE
2.2 Specification
2.2.1 Type of screen
X-axis
9
0
1 MACRO EXAMPLE
y 2
3
- 4 SOFTKEY SELECT
a
X 1 - EXAMPLE A
i 2- EXAMPLE B
S 3- EXAMPLE C
9 4- EXAMPLE D
S- EXAMPLE E
14
EX.A 1 EX.B 1 EX.C 1 EX.D 1 EX.E
I
Press AUX key: this screen will be displayed. On this screen, select a menu.
However, in this example, EX.C, EX.D, and EX.E menu screens are not prepared.
X-axis
0 EXAMPLE A
1
2 PROG NO = -9999
3
y 4 DATA 1 = -999.99 _
DATA 2 = -999.99
a DATA 3 = -999.99
X DATA 4 = -999.99
i DATA S = -999.99
s 9 DATA 6 = -999.99
DATA 7 = -999.99
14
END
Press soft key END : the display will return to the initial screen.
” indicates the cursor position. Actually, the cursor is displayed always at one place.
X-axis
0 EXAMPLE A
1
PROC NO = -9999
Y 2
-3
DATA SET1 -9999 -9999 -9999 -9999
a 4 DATA SET2 9999 9999 9999 9999
X
DATA SET3 19999 29999 19999 I9999
i DATA SET4 -9999 -9999 -9999 -9999
S
DATA SETS -9999 -9999 -9999 -9999
9
I
14 ’
END
Press soft key END : the display will return to the initial screen.
81
” indicates the cursor position. Acutally, the cursor is displayed always at one place.
Al-40
APPENDEX 1 MACRO PROGRAM EXAMPLE
70
#10000 1 10010 #lOOlO
1
I 2 1
2 2
1 10026
I 2 3 3
4 4
5 5
6
6
7
8
a 7
8
9
20 9
1 80
2
3
4 2.3 Program Structure
5
#lo026
a ~1 INIT;AL SCREEN DISPLAY ICSNO = 1
7
8
CSNO = 2 CSNO = 3
9 t ,
EX. A EX. B EX. C EX. D EX. E
30 4
\ /
1 v
2 I 1 1 These are not
3 program
END key (Soft key)
a
4
5
6
7
8
9
40
Al-41
APPENDEX 1 MACRO PROGRAM EXAMPLE
08000
L 1
KEYIN
KEYIN
Yes
Yes
KCONT = 16?
KCoNT
=‘*? I No
I
No
Yes
I
KCONT = 8 ?
KCONT = 13?
Yes
No
2 I
a Data Setting
W9)
(NIOO)
u7-u KEVIN
#8500 + 8000
KCONT
KCONT
I
= 16?
= 8 ?
No
Yes
No
M99
23 M99
-7
Yes
I
Data Settinq
(M99)
Al-42
APPENDEX 1 MACRO PROGRAM EXAMPLE
2.5 Coding _
Al-43
APPENDEX 1 MACRO PROGRAM EXAMPLE
Al-44
APPENDEX 1 MACRO PROGRAM EXAMPLE
Al-45
APPENDEX I MACRO PROGRAM EXAMPLE
00300 M99 ;
00310 ;
00320 ;
00330 ;
00340 ;
00350 ;
00360 r’
Al-46
APPENDEX 1 MACRO PROGRAM EXAMPLE
00360 #lo040 = 1 I’
00370 /10041 = 0 ;
00380 #8SOO = 8000 ;
00390 M99 ;
00400 ;
00410 r’
00420 ;
00430 ;
00440 ;
Make this program so that it is executed only once after power ON.
Al-47
APPENDIX 1 MACRO PROGRAM EXAMPLE
Routine 0
No Explanation
Name Number
Al-48
APPENDIX 1 MACRO PROGRAM EXAMPLE
#lOoc CSNO
Cursor control No. of
screen being now selected
1 Vacant
2 (CON-I-
CPNT
Cursor pointer
( 0, 1,2, l-•)
SUBP
Cursor subpointer
( 0, 1,2, l--)
Spare
work
area
#148
#149
For macro call using
r code (RESERVE)
Al-49
APPENDIX 1 MACRO PROGRAM EXAMPLE
zmor
data (1)
Cursor
:ursot data for
iata (2) . CSNo. 1
.. . .. .. .. .. .. ,
Cursor
............. data for
’ CSNo.2
..............
@ CADDRI
It is necessary to prepare cursor data corresponding to cursor control No., but set its top address ’
to CADDRI.
Al-50
@ KOSUI
Specify the number of cursor data required on one screen.
CAX
X increment for group:
0 for no group
CAY
Y increment for group:
.
0 for no group
CNX
X number for group:
1 for no group
I
Y number for group:
CNY
1 for no group
0 Cursor data
One cursor data corresponds to one cursor.
However, when the cursors are arranged in line regularly, those cursors are regarded as one
group, which corresponds to one cursor data.
Al-51
APPENDIX 1 MACRO PROGRAM EXAMPLE
@ CXYF
Specify the direction of cursor movement within the group.
When CXYF = 0:
WhenCXYF = 1:
X coordinate
01234 9 14 18 24 29 34 39
0 AAAAAAAAA
1 88 -99 cc -99 DO -99999
‘f
c 4
DO
1 -9999 -9999 -9999 -9999
0
2 -9999 -9999 -9999 -9999
0
3 -9999 -9999 -9999 -9999
F 4 -9999 -9999 -9999 -9999
5 -9999 -9999 -9999 -9999
14
The position of @’ “ above indicates the position where the cursor moves.
(Actually, the c&or is always displayed at one place.)
Cursor movement
Al-52
APPENDIX 1 MACRO PROGRAM EXAMPLE
BBICC
CURSOR
71 0
I=
8 28
9 1
F
20 0
1 0 D
2 1
cursor
3 1
4 1
5 0
6 I-- 7
71 4
81 7
91 1
LMatrix
30
cursor
To use the routines (09501, 09502, 09503) with which the cursor position is associated among
the following routines, the cursor data corresponding to the screen selected at that time should be
selected. Specifically, set the following;
P-CODE variables
#lOO = Cursor control No. of screen being selected at present
#104 = Cursor pointer (Initial value 0)
#105 = Cursor subpointer (Initial value 0)
#IO4 and #105 values are automatically changed each time the cursor key is depressed.
On the screen with no cursor, set WOO to “0”
Al-53
APPENDIX 1 MACRO PROGRAM EXAMPLE
@ Calling format
#I40 = f (F) : Total digits and digits under decimal point
#I41 = t (Z) : Reading zero
M98 P9501
@ Remark
When this routine is executed , the cursor display position advances by one.
#I40 are #14l values are saved.
@ Calling format
#140 = n
M98 P9502
n = 0: No cursor pointer changes.
1 : The cursor pointer is advanced by one, displaying the cursor.
2 : The cursor pointer is retracted by one, displaying the cursor.
@ Remark
After this routine is executed, the #140 value is saved.
Al-54
APPENDIX 1 MACRO PROGRAM EXAMPLE
To display a continuous variable value, this function deviates it in the X-direction from the
specified place on the CRT screen.
(Within one line)
0 Calling format
#14O=F (F)
#141 =z (2)
1
#142=X Display position on CRT
#143=Y
#144=V Variable No. (head)
#145=N No. of display
#146=E End code
#147=AX Deviation in the X-direction on
the CRT
M98 P9504
E : END code
The display ends when the data which coincides with the end code is reached even within
the number of displays.
0 Remark
After this routine is executed, #140 - #147 values are saved.
E : End code
The display ends when the data which coincides with the end code is reached even within
the number of displays.
@ Remark _
After this routine is executed, #140-#147 values are saved.
Al-55
APPENDIX 1 MACRO PROGRAM EXAMPLE
(6) DSPC09506
0 Function
This function clears the screen, including the soft key.
@ Calling format
M98 P9506
@ Remark
The soft key is not cleared with G202.
Remark
After this routine is executed, #I 40 - #142 are saved.
VCOPY 09508
Function
This function copies the data in a continuous variable area to another area.
Calling format
#I40 = ADD& Address of original data
to be copied
#141= ADDRo Address of data to be
copied
#142=N No. of variables
M98 P9508
Remark
After this routine is executed, the #140 - #142 values are saved.
Al-56
APPENDEX 1 MACRO PROGRAM EXAMPLE
00010 09501 ;
00020 IF [#lo0 EQ 0] GOT0 900 I'
00030 #145 = #[10000 + [#lOO - l] * 21 f
00040 IF [#145 EQ 0] GOT0 900 ;
00050 Xl45 = #104 * 8 + f145 ;
00060 IF [#[#145+7] EQ l] GOT0 10 :
00070 ((139 = FIX [#105 / #[f145 + 411 ;
00080 #148 = #lo5 - #139 * 1([#145 + 41 r'
00090 GOT0 20 ;
00100 NlO #148 = FIX [#IO5 / #I#145 + 511 ;
00110 #139 = 1105 - $148 * #[#145 + 51 r'
00120 N20 G243 F#140 Z#141 ;
00130 X[#[#145]+#[#145+2]*#148+#[#145+6]] Y[#[#145+1]+#[#145+3],*#139]
D#l03
00140 1147 = #140 ;
00150 #140 = 1 ;
00160 M98 P9502 ;
00170 x140 = #147 ;
00180 N900 M99 ;
00190 t
00200 r’
00210 t
00220
00230 ;
Al-57
APPENDEX 1 MACRO PROGRAM EXAMPLE
00010 09502 r’
00010 09503 ;
00020 #8502 = 1 ;
00030 #102 = #8501 ;
Al-58
APPENDEX 1 MACRO PROGRAM EXAMPLE
00010 09504 I’
00010 09505 ;
Al-59
APPENDEX 1 MACRO PROGRAM EXAMPLE
00010 09507 ;
00020 x139 = 0 ;
00030 WHILE [#139 LT #142] DO 1 ;
00040 #[$140 + 11391 = #141 ;
00050 #139 = 8139 + 1 ;
00060 END 1 ;
00070 M99 I'
00080 :
00090 ;
OOlbO
00110
00120 r’
Al-60
APPENDEX 1 MACRO PROGRAM EXAMPLE
00120 N20 G243 F#140 Z#l41 ; Format setting for data display
00130 X[#[#l45]+#[#145+2]+#148+#[#14S+6]] Y[#[#l45+1]+#[#145+3]*#139]
D(1103
00140 #147 = 11140 I'
Stack #140. #140= 1 .
00150 #140 = 1 ; >
00160 M98 P9502 ; Cursor display subrutine .
00170 #140 = ((147 ; Return # 140 to this intial state.
00180 N900 M99 ;
00190 I'
00200 ;
00210 ;
00220 ;
00230 ;
Al-61
APPENDEX 1 MACRO PROGRAM EXAMPLE
Al-62
APPENDEX 1 MACRO PROGRAM EXAMPLE
00010 09505 ; One-row display of variable data (Y direction) Difference from 009504 is
00020 G243 F#140 2#141 ; Display format setting that #147 is the deviation in
Y direction
00030 1139 = 0 ;Counter
00040 WHILE [#139 LT #145] DO 1 ;
00050 IF [#[#144 +#139] EQ #146] GOT0 90 r'
00060 X#142 Y[#143 + $147 * #139] D$[#lSS + 11391 ;
00070 #139 = #139 +l ;
00080 END 1 ;
00090 N90 M99 ;
00100 t
1
00110 t
00120 r’
00130 :
00140 t
Al-63 .
APPENDEX 1 MACRO PROGRAM EXAMPLE
Al-64
APPENDEX 1 MACRO PROGRAM EXAMPLE
4. SCREEN LAYOUT
X -axis
fI1 7?Ae;678Qln----
“.W_ .*w- VI .”
----- 30 3 132 33 34 35 36 37 38 39
Y 5
H 6
xi 7
’ 8
10
11
12345
12 NUM
13
15
, * 1 ?
16
Al-65
APPENDIX 2 MACRO COMPLIER OPERATION
A24
APPENDIX 2 MACRO COMPLIER OPERATION
Line No. at the left lower part of the screen is from 00020 on.
(2) Before keying in [NLJ, if a key-in error is found, use BS/CAN keys to correct it.
(4) After one line [NL], if a key operation error is found, press the “CHG” key. (Check that F15
key lights up.)
Skip the cursor at the left upper part of the screen and move it to the place to be corrected,
using the CURSOR key.
0 “CHG” screen edit switching
(F15 key lights up)
0 “INS” insertion: the line is spaced out by a push on this key when the cursor is located in
Line No.
@ “DEL” deletion: the line is deleted by a push on this key when the cursor is located in Line
No.
@ “Rl ” Correction/cancellation: the current data is corrected and canceled on the screen.
The cursor is moved at the left upper part of the screen.
0 “R2” Page shift backward
“R3” Page shift forward
(7) After keying in the last line, this operation ends by a push on [NL] only. “EDIT = ” is
displayed at the left lower part of the screen.
(8) Further, when it is desired to input the next program, press [NL] once again:
“PROGRAM = ” is displayed at the left lower part of the screen.
Operate this with IN [NL] .
(9) Press [NL] several times : the display returns to the initial screen.
A2-2
APPENDIX 2 MACRO COMPLIER OPERATION
( 1) Screen Edit
l Press the “CHG” key. (Check that F15 key lights up)
Skip the cursor at the left upper part of the screen, and move it to the place to be corrected,
using the CURSOR key. After completion of correction, return the “CHG” key to the left lower
part of the screen again.
11
INS
@I
Insertion: the line is spaced out by a push on this key when the cursor is located in Line
No.
” DEL” Deletion: the fine is deleted by a push on this key when the cursor is located in Line No.
(Do this most carefully.)
“RI” Correction/cancellation: the current data is corrected and canceled on that screen.
The cursor is moved at the left upper part of the screen.
Command Edit
l Check that left lower part of the screen is “EDIT = “.
A2-3
APPENDIX 2 MACRO COMPLIER OPERATtON
l Check that the cursor is located at the left lower part of the screen.
l Replacement : Line No..Program one line [NC]
l Insertion : New Line No .-Program one line [NL]
l One-line
deletion : Line No. [NL]
l Plural deletion : Start Line No., End Line No. [ NL]
l Display .. I-Line No. [ NL]
l Line renewal : REN [NL]
.. MOVE (Start Line No., End Line No. &/Frequency [NL]
l COPY
MOVE - Frequency [NL]
l Substitute : A (Start Line No., End Line No.) - /Original character string/New character
string /All [NL] A - /Original character string/, /New character string/, /All [NL]
l Character search : After [NL] only L
F/Character string 1 [NL]
, / Date ,
mt
” is omissible
. 71 files can be registered for INT and 175 files can be registered for I2 for the first time.
Consequently, 695 files can be registered for 17. (incremented by 104)
. In the file with same name, no substituting processing is carried out, so that no output is
possible.
The file name consists of up to 17 character, ‘I,” comma cannot be used.
A longer file name is preferable for easier identification.=
At input, File No. can be used for access.
A2-4
APPENDIX 2 MACRO COMPLIER OPERATION
FDO = OK u @ Fi’eNo.
name w
: File
Upon completion, turn [F2] OFF.
FDO = OK [NL]
In error
FDO = NO [NL]
REQUEST
A24
APPENDIX 2 MACRO COMPLIER OPERATION
“A : automatically”
“M : Ask for each time”
FDl = (for first time)
A2-6
APPENDIX 3 DATA ON MACRO COMPILER
L
+ ME000 + NO. = 0000-0000-0000
1 Block
number
019 The relational operator in the
conditional expression is not found.
013 The program has a program number 042 The ‘1’ of the # [<expression >] is not
other than the head of program. found.
014 The block has a sequence number 043 The ‘1’ of the [<expression >] is not y
other than the head of program. found.
A34
APPENDIX 3 DATA ON MACRO COMPILER
044 The second ‘1’ of the ATAN 059 m of DOm or ENDm consists of more
[<expression >I/[ < expression >] is than 1 digit.
not found.
060 DOm or ENDm is out of the 1 - 3 range.
045 The ‘1’ of the ATAN
061 Other codes than numeric codes follow
[<expression>]/[<expression>] is
DO or END.
not found.
062 Other alphabetical string than
046 The first ‘1’ of the ATAN
control directive or function found.
[ < exptession >I/[ < expression >] is
not found. 063 Alphabetical string of more than 5
characters found.
047 The ‘1’ of the function [<expression >]
is not found. 064 No EOR at the end of the program.
048 The <expression > format contains an 065 Inappropriate code found in the
error. program.
049 The left part of <expression> of 070 Character string exceeds 255
< address > [ < expression >], 072 Inner code is not in hexadecimal
< address > - [<expression >] or format.
GOT0 [<expression >] format
073 Non-displayable system code is
contains an error.
specified.
051 The numeral contains more than 8
074 Not end with ‘*)I for character string
figures.
starting with ‘(*‘.
052 Other codes than numeric codes follow
075 ‘(’ and ‘)’ hold characters that are not
the decimal point.
allowed.
053 The variable address of the macro
081 The transient variable area used by the
variable consists of more than 6 digits.
macro executer is not available. Too
054 No figure or ‘[’ following #. many addresses in the <expression >
055 The program number consists of more of 1 block of a NC statement.
than 4 figures. 082 The branch point for the GOT0
056 The sequence number contains more statement is too large. Add a
than 4 figures. parameter to set the branch point as 4
bytes or reduce the program size.
OS7 The ‘[’ of function [<expression>] is
not found. 083 The number of addresses contained in
1 block of the NC statement exceed<
058 The ‘[’ of IF [<expression>] or WHILE
50.
[<expression >] is not found.
A3-2
APPENDIX 3 DATA ON MACRO COMPILER
084 The variable No. of the macro variable 113 An overflow error occurred while
has more than 6 digits. waiting for answer from the PMC
writer.
085 The variable No. of the macro variable
is negative. 114 Framing error occurred while waiting
for answer from the PMC writer.
086 The variable No. of the macro variable
contains a decimal point. 115 PMC writer is not READY or cable is not
connected.
087 More than 4 digits following the GOT0
statement. 116 Error occurred during transmittion to
the PMC writer.
088 The figures following the GOT0
statement contain a decimal point. 117 Parity error occurred while sending to
the PMC writer. II
091 The number of GOT0 statements in
one block directly pointing to a 118 ROM is not erased.
sequence number, exceeds the limit.
119 ROM write error occurred.
The limit is 100 for versions earlier
than 3.1 and 200 for versions earlier 120 ROM verify error occurred.
092 The sequence number indicated as the 122 Other than order made macro ROM
branch point of the GOT0 statement cassette is installed.
is not found.
123 Wrong PMC writer version number.
093 The number of WHILE statements in
124 Error occurred in ROM writer.
one program exceeds the limit. The
limit is 100 for versions earlier than 3.1 125 The address or length instruction for
and 200 for versions earlier than 3.2. the ROM writer is uneven.
094 There are several sequence numbers 126 The written data exceeds the capacity
for the branch point of the GOT0 of the installed ROM module.
statement.
127 The ROM writer is not set up properly.
100 The macro executor is not read into
128 Address setting error of the ROM
memory.
writer.
101 The ROM cassette has caused a
129 Inverse installment of ROM.
memory overflow.
13 1 Memory write error.
102 256 KByte ROM cassette cannot be
used with this macro executor. 132 Memory read error.
111 A time error occurred while waiting for 140 File open parameter error.
answer from the PMC writer. 141 Floppy disk hard error.
c
112 A parity error occurred while waiting 142 File not found.
for answer from the PMC writer.
143 Wrong file format.
A393
APPENDIX 3 DATA ON MACRO COMPILER
149 File number overflow. 1001 The block delete address includes a
decimal point.
150 File closed error.
1002 The block delete address is not within
the 1 - 9 range.
A3-4
APPENDIX 3 DATA ON MACRO COMPILER
Error Error
Explanation Explanation
code code
1012 The ‘1’ of the WHILE [<conditional 1401 The numeral contains more than 8
expression > is not found. digits.
1013 It is unclear whether the block is a NC 1402 Non-numeric codes follow the
statement or a macro statement. decimal point.
1014 No DO found for END. 1403 The variable address of the macro
variable consists of more than 6
1015 The program number in the directory
digits.
and actual number used in the
program do not correspond. 1404 No figure or ‘[I following #.
1016 No program number in the program 1405 The program number consists of
heading. more than 4 digits.
1201 Nesting of brackets exceeds 5 levels. 1406 The sequence number contains more
than 4 digits.
1202 The ‘1’ of the # [<expression >] is not
found. 1407 The ‘[’ of function [<expression >] is
not found.
1203 The ‘1’ of the [<expression >] is not
found. 1408 The ‘[’ of IF [<expression>] or WHILE
[<expression >] is not found.
1204 The second ‘1’ of the ATAN
[ < expression >I/[ < expression >] is 1409 DOm or ENDm consists of more than
not found. 1 digits.
1205 The ‘1’ of the ATAN 140A DOm or ENDm is out of the 1 - 3
[<expression >I/[ < expression >] is range.
not found.
140B Non-numeric codes follow DO or
1206 The first ‘1’ of the ATAN END.
[<expression >)/[ < expression >] is
140C An alphabetical string that was not
not found.
the control directive or function was
1207 The ‘1’ of the function found.
[<expression >] is not found.
140D Alphabetical string of more than 5
1208 The <expression > format contains characters found.
an error.
140E No EOR at the end of the program.
1209 The left part of <expression > of
140F Inappropriate code found in the
the substitution statement contains
program.
an error.
1410 Character string exceeds 255
120A The <expression> of the
characters.
<address>[<expression>],
<address> - [<expression >] or 1411 Inner code consists of more than 4 ‘-
contains an error.
A3-5
APPENDIX 3 DATA ON MACRO COMPILER
Error
Explanation
code
A3-6
APPENDIX 3 DATA ON MACRO COMPILER
3. COMPILE PARAMETERS
7 6 5 4 3 2 1 0
SEQN = 1 : When data is output to the ROM, sequence numbers are output to the P-CODE
program.
= 0 : When data is output to the ROM, sequence numbers are not output to the P-CODE
program.
(Note) When SEQN is set to 0, the P-CODE program requires a small amount of space and can
be executed at high speed. However, this cannot be specified in the following cases: When
GOT0 is specified by a variable in the P-CODE program and when a program contains M99 and
the number of the sequence (P) to which it is to be returned. (If an attempt is made to set SEQN
to 0 in either of these cases, a compilation error occurs.)
7 6 5 4 3 2 1 0
e 1
TCAL = 0 : Makes invalid the sub-program call with T code
= 1 : Makes effective the sub-program call with T code
ACLl = 0 : Makes invalid call by the specific code
= 1 : Makes effective call by the specific code (09004/#146)
ACL2 = 0 : Makes invalid call by the specific code
= 1 : Makes effective call by the specific code (09005/#147) c
EVF = 0 : Extension P-CODE variable #20000 is the floating decimal point format
= 1 : Extension P-CODE variable #20000 is the fixed decimal format
XDIL = 0 : Axis interlock function invalid
A3-7
APPENDIX 3 DATA ON MACRO COMPILER
(Note) When EXTl = 1, part program memory reduces by 1.22 m (when part program memory
capacity is 80 m or less).
7 6 5 4 3 2 1 0
I
7 6 5 4 3 2 1 0
I
.
CUTLG NOP B HRGC IMG sp
- G- c SP - G -B
SP-G -B. SP G C
’
A3-8
APPENDIX 3 DATA ON MACRO COMPILER
A3-9
APPENDIX 3 DATA ON MACRO COMPILER
,
M code that calls sub-program 09002
f
M code that calls sub-program 09003
f
(90351 I
M code calls sub-program 09001
Parameters 9035 and 9036 specify the bit signal of the internal PMC relay (R area) that determines
the control mode of the interlock function for a single axis direction.
Signal number (0 to 999): Specifies the number of the internal PMC relay (R area).
Signal position (0 to 7): Specifies the bit position of the signal.
Example) When parameters 9035 and 9036 are set to 900 and 7 respectively
The interlock function for a single axial direction is validated when the internal PMC relay
(R900, #7) is set to 1 in the JOG or HNDL mode.
A34 0
APPENDIX 3 DATA ON MACRO COMPILER
Conversational macro execution program number at the time of power on (MENU screen)
Conversational macro execution program number at th8 tin18 of power on (MACRO screen)
l
.
Used number of extension conversational macro variables
.
Number of G codes in G code calls of ,range specification
A34 1
APPENDIX 3 DATA ON MACRO COMPILER
4. EXECUTER PARAMETER
7 6 5 4 3 2 1 0
11 - L2RN
I
SQND = 1 : Displays program number of recorded program and sequence number during
execution of a recorded program.
= 0 : Displays program number and sequence number of called user program during
execution of a recorded program.
NDSP = 1 : Displays variables for P-CODE program.
=o* Does not display variables for P-CODE program.
TSTP = 1 I Stops execution of conversational macro program. ("lg8 is set by break function
automatically)
= 0 : Execute the conversational macro program.
EXSP = 1 : Execute macro statement till the next NC statement has come with feed hold, during
macro statement execution at execution level.
= 0: Stop if feed hold acts, during macro statement execution at execution level.
RSTC = 1 : Common variables #l 00-#149 are cleared to < vacant) if NC is reset.
= 0: Common variables #l 00-#149 do not clear to < vacant) if NC is reset.
MKG : Be sure to set to 0.
L2RN = 1 : Does not display conversational / auxiliary macro and screen during execution macro
operation.
= 0: Display conversational / auxiliary macro and screen during execution macro
operation.
,
Conversational macro break program number
A34 2
APPENDIX 3 DATA ON MACRO COMPILER
The following is an expfanation of the supplementary P/S error codes that may occur at the time of
execution of P/CODE program.
Code Explanation
110 The absolute value of the data of the fixed decimal point display exceeds the
allowable range.
111 The index of the data of the floating decimal point exceeds the allowable
range.
112 The divisor is 0.
115 Pointing to the value of an undefined variable address.
116 The left part of the substitution statement consists of an illegal variable.
The SQRT parameter is a negative value, the BCD parameter is a negative
value or the BIN parameter contains values others than 0 - 9.
A391 3
APPENDIX 3 DATA ON MACRO COMPILER
5. ARGUMENTTRANSFER
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 specification method for the custom macro of the custom
macro B type, the parameter specification 1 and parameter specification 2 can be specified
separately for mixed in one label.
Signs, decimal points, and other symbols not related to the address can be used in the parameters.
Figure 2.5.3 (a) Argument specification 1 for P- Figure 5(6) Argument specification 2 for P-
CODE program call CODE program call
Address of argument Address of argument
Local variable No. Local variable No.
specification 1 specification 2
A I1 A # 1
B #2 6 R2
C #3
C ‘X 3
I #4
I1 t4
J #5
Jr #5
K #6
Kl X 6
D #7
. l
0
l
E #8 l .
. .
F #9
110 # 31
t-l # 11
JlO R 32
M # 13
KlO # 33
Q # 17
R # 18
S # 19
T # 20
u # 21
w # 22
W # 23
X # 24
Y # 25
z # 26
A3-14
APPENDIX 3 DATA ON MACRO COMPILER
A34 5
APPENDIX 3 DATA ON MACRO COMPILER
(2)1Series 0-TB
*: Reserved
IR ES
Code
FH : Feed hold
OR : Overwrite
ES : Exact stop Data output
Sequence number check
l-l I
5 x 0 x
6 0 X X
7 x x x
A3-16
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
When using any of the above-listed systems, the Graphic Conversation and the user’s program
prepared by the machine tool manufacturer are both stored in the macro cassette as shown in the
figure below, thereby allowing both of these functions to be used with the same device.
However, the Graphic Conversation for the FSO-TFffSO-TC is designed for 2-axis lathes, and that
for FSO-MF/FSO-MC is for machining centers.
The display screen and operating processes related to conversational programming cannot be
changed by the user’s program prepared by the machine tool manufacturer.
In order to store the user’s program prepared by the machine tool manufacturer and the Graphic
Conversation in the same macro cassette, the same procedure as making a macro cassette is
performed by compiling the standard format macro-executer program and user’s program.
However, either the P-G Mark-II or P-G Mate is required, and the dedicated macro executer floppy
disk must be used. Specific details are described hereinafter.
A4-1
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
Table 1) Table of Figure Numbers of FAPT MACRO COMPILER (MACRO EXECUTER) with
Graphic Conversation
(Related to Graphic Conversation for 2-axis lathes)
NC P-G Number of
Name of function
model model floppy disK File name
Note) The I** at the end of the file name in the table indicates the version number of that
system’s software. As differences exist depending on the version number, at the time of actual
use, check the file name in the floppy disc and input the appended number.
A4-2
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
Table 2) Table of Figure Numbers of FAPT MACRO COMPILER (MACRO EXECUTER) with
Graphic Conversation
(Related to Graphic Conversation for machining centers)
NC P-G Number of
Name of function
model model floppy disK File name
FAPT MACRO COMPILER (MACRO EXECUTER) A080-0035-J543AOA85
9” High resolution monochrome CRT 0-MF, OA85, EXCl/**
English, Japanese, German, French, Italian, 0-MF, OA85, EXC2/**
Spanish 0-MF, CAP, PROW*
FAPT MACRO COMPILER (MACRO EXECUTER) A08B-Q035-J543AcOA86
9” High resoiution monochrome CRT O-MF, OA86, EXCW+
German, French, (Japanese, English) 0-MF, OA86, EXCZl**
0-MF, CAP, PROGFe*
P-G Mark-II ’ FAPT MACRO COMPILER (MACRO EXECUTER) A08800035-J543ROA87
9” High resolution monochrome CRT O-MF, 0A87, EXCl/**
LI.
Italian, Spanish, German, French, Italian, 0-MF, 0A87, EXCZ/**
Spanish 0-MF, CAP, PROW** ,_
L
FAPT MACRO COMPILER (MACRO EXECUTER) A08800035-J543#OA88
9” High resolution monochrome CRT 0-MF, 0A88, EXCW*
Chinese, Korean, (Japanese, English) 0-MF, 0A88, EXCZ/rt+
FSO-MF
0-MF, CAP, PROGI+*
.
Of
FAPT MACRO COMPILER (MACRO EXECUTER) A08B-O036-J543ROA85
FSO-MC 9” High resolution monochrome CRT 0-MF, OA85, EXCl/**
English, Japanese, German, French, Italian, O-MF, OA85, EXC2I**
Spanish 0-MF, CAP, PROW**
FAPT MACRO COMPILER (MACRO EXECUTER) A08800036-J543#OA86
9” High resolution monochrome CRT 0-MF, 0A86, EXCl/*+
Chinese, Korean, (Japanese, English) 0-MF, 0A86, EXC2/**
0-MF, CAP, PROG/**
P-G Mate ’ FAPT MACRO COMPILER (MACRO EXECUTER)
A088000360J543#OA87
9” High resolution monochrome CRT 0-MF, 0A87, EXCl/**
English, Japanese, German, French, Italian, 0-MF, OA87, EXCZ/**
Spanish 0-MF, CAP, PROG/**
FAPT MACRO COMPILER (MACRO EXECUTER) A08800036-J543#OA88
9” High resolution monochrome CRT 0-MF, OA88, EXCl/**
Chinese, Korean, (Japanese, English) 0-MF, OA88, EXC2/**
0-MF, CAP, PROG/**
Note) The symbol I** appearing at the end of the file name in the table indicates the version
number of the system software. As differences exist depending on the version, when putting
these to actual use, check the file name in the floppy disk, then input the attached number.
In addition to the above, the following development devices or software are required.
A4-3
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
3. COMPILING PROCEDURE
USING SYSTEM P-G
(1) Outline
Graphic Conversation consists of a system section and a dedicated custom macro section.
The user’s program is compiled with this dedicated custom macro section, then stored in the
macro cassette.
r ----------f Data floppy disk
i Conversational :
I programming I Macro cassette
SYSTEM P-G Mark II /Mate
i system i
CN2.3
-
-
SYSTEM P-G
-
I
c
4
- -
PMC Series 0 - ROM
- CASSETTE
WRITER MACRO
- MODELD - ADAPTER -
,
A494
APPENDIX 4 Series.0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
However, as ‘OK @ ***.**+.EXC1/** < NL >’ is different depending on the macro executer used,
refer to the Table of Figure Numbers of FAPT MACRO COMPILER (MACRO EXECU-TER) with
Graphic Conversation in Section 2, then input the file name of the macro executer to be used.
Example)
The file name when using the FSO-TF 9” monochrome high resolution CRT, English,
Japanese version is “0-TF. 0A80. EXCl 107”.
The file name when using the FSO-MF 9” monochrome high resolution CRT, English,
Japanese, German, French, Italian, Spanish version is “0-MF.0A85.EXC1/02”.
Completion of the above-described procedure ends input of macro executer 1 having Graphic
Conversation.
The display returns to the initial screen when < NL) is pressed once.
(6) Input of Graphic Conversation custom macro program and user’s program.
0 Press the R2 key in the initial screen.
@ With the F2 key in ON status, key in ‘3 < NL > ’ from ‘NO. = ‘.
@ After the message “Set FD (DATA) and key in ‘OK’ or ‘NO”’ is displayed, insert the floppy disc
containing macro executer having Graphic Conversation into disk drive 0, then key in ‘OK
@****.CAP.PROG / ** < NL) ‘.
However, as ****.CAP.PROG / ** is different depending on the macro executer used, refer to the
Table of Figure Numbers of FAPT MACRO COMPILER (MACRO EXECUTER) with Graphic
Conversation in Section 2, then input the file name of the macro executer to be used.
Example)
The file name when using the FSO-TF 9” monochrome high resolution CRT, English,
Japanese version is “O-TF.CAP.PROG/ 07”.
The file name when using the FSO-MF 9” monochrome high resolution CRT, English,
Japanese, German, French, Italian, Spanish version is “0-MF.CAP.PROG/02”.
In the case when the program is not completely input to internal memory, external extension is
performed. When a message instructing that the floppy disk be set is displayed, insert a blank
data floppy disk into disk drive 1, then key in ‘OK < NL ) ‘. This allows input to continue. Do not
remove the floppy disk from disk drive 1 during program editing or compiling.
When all the dedicated custom macro program input has ended, ‘NO. = ’ is displayed.
Therefore, if ‘3 < NL )’ is keyed in, the same message as in step 3 will be displayed. After
inserting the floppy disk containing the user’s program into disk drive 0, key in ‘ OK@ file
<NL>‘. Specify the file name stored in the user’s program.
When all the custom macro program input has ended, ‘NO. = ’ is displayed. Pressing < NL> .
twice will return the display to the intial screen.
A4-5
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
8000 00000000
bit 0 = 1: The program of the block containing M99 ends
= 0: The program of the block containing M99 does not end
(se sure to set 0)
bit 1 = 1: The program of the block containing MO2 ends
= 0: The program of the block containing M99 does not end
(Be sure to set 0)
bit 2 = 1: The program of the block containing M30 ends
= 0: The program of the block containing M30 does not end
(Be sure to set 0)
8010 00000001
bit 0 = 1: Corresponds to nacro executer having
Graphic Conversation
= 0: Corresponds to the standard macro executer
(Be sure to set 1)
8011 0-TF, ****. EXC2/**
Specifies the file name of macro executer 2.
However, as ‘O-TF.****.EXC2/+* < NL ) ’ is different depending on the macro executer used,
refer to the Table of Figure Numbers of FAPT MACRO COMPILER (MACRO EXECUTER)
with Graphic Conversation in Section 2, then input the file name of the macro executer to be
used.
Example)
The file name when using the FSO-TF 9” monochrome high resolution CRT, English,
Japanese version is “0-TF.OA80.EXC2/07”.
9000 10001000
bit 3 = 1: Allows use of a macro cassette of 512 Kbyte capacity
= 0: Allows use of a macro cassette of other than 512 Kbyte capacity
(Be sure to set 1)
bit 7 = 1: Compiles a macro program with custom macro B format
= 0: Compiles a macro program with custom macro A format
(Be sure to set 1)
9001 10000001
bit 0 = 1: Outputs sequence number in the P-CODE program at ROM writing
= 0: Does not output sequence number in the P-CODE program at ROM writing
(Be sure to set 1)
bit 7 = 1: Can refer to variables at the #lOOOO level by RAM program
= 0: Cannot refer to variables at the #lOOOO level by RAM program
(Be sure to set 1)
9002 11000000
bit 7 = 1: Macro executer expansion function valid
A4-6
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
8000 00000000
bit 0 = I: The program of the block containing M99 ends
= 0: The program of the block containing M99 does not end
(Be sure to set 0)
bit 1 = I: The program of the block containing MO2 ends
= 0: The program of the block containing MO2 does not end
(Be sure to set 0)
bit 2 = 1: The program of the block containing M30 ends
= 0: The program of the block containing M30 does not end
(Be sure to set 0)
8010 00000001
bit 0 = I: Corresponds to macro executer having Graphic Conversation
= 0: Corresponds to the standard macro executer
(Be sure to set I)
801 I 0-MF, ****, EXC2/+*
Specifies the file name of macro executer 2.
However, as ‘O-MF.-. EXC2/“” is different depending on the macro executer used, refer to
the Table of Figure Numbers of FAPT MACRO COMPILER (MACRO EXECUTER) with
Graphic Conversation in Section 2, then input the file name of the macro executer to be ’
used.
A4-7
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
Example)
The file name when using the FSO-MF 9” monochrome high resolution CRT, English,
Japanese, German,French, Italian, Spanish version is “01MF.OA85.EXW02”.
9000 10001000
bit 3 = 1: Allows use of a macro cassette of 512 Kbyte capacity
= 0: Allows use of a macro cassette of other than 512 Kbyte capacity
(Be sure to set 1)
bit 7 = 1: Compiles a macro program with custom macro B format
= 0: Compiles a macro program with custom macro A format
(Be sure to set 1)
9001 10000001
bit 0 = 1: Outputs sequence number in the P-CODE program at ROM writing
= 0: Does not output sequence number in the P-CODE program at ROM writing
(Be sure to set 1)
bit 7 = 1: Can refer to variables at the #lOOOO level by RAM -program
= 0: Cannot refer to variables at the #lOOOO level by RAM program ’
(Be sure to set 1)
9002 10000000
bit 7 = 1: Macro executer expansion function valid
= 0: Macro executer expansion function not valid
(Be sure to set 1)
bit 6 = 1: Automatic work number search valid
= 0: Automatic work number search not valid
bit 3 = 1: Expanded conversational macro exclusive variables at the #20000 level
havenon-floating decimal point format
= 0: Expanded conversational macro exclusive variables at the #20000 level have
floating decimal point format
9003 10000000
bit 7 = 1: Special function for Graphic Conversation valid
= 0: Special function for Graphic Conversation not valid
(Be sure to set 1)
bit 3 = 1: Corresponds to 14” color CRT
= 0: Corresponds to 9” monochrome high resolution CRT
9013 100
Dedicated data for Graphic Conversation
9014 999
Dedicated data for Graphic Conversation
9015 8100
Dedicated data for Graphic Conversation
9016-9022 0
Be sure to set 0
9033 97
Dedicated data for Graphic Conversation
9037 10
Dedicated data for Graphic Conversation
9044 ?
Determine the setting values with reference to the Note) given below.
A4-8
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
The nth value of the number set by parameter number 9044 is the number of expanded
conversational macro exclusive variables that can be used.
When the setting value of parameter number 9044 is 0, the expanded conversational macro
exclusive variables cannot be used.
When using the floating decimal point format, n = 12, and when using the integer format,
n=30.
Example)
Floating decimal point format
#20000cy#2001 1 can be used when parameter No. 9044 = 1
#20000+20023 can be used when parameter No. 9044 = 2
Integer format
#20000+20029 can be used when parameter No. 9044 = 1
#20000+20059 can be used when parameter No. 9044 = 2
When using the non-floating decimal point format, values in the range - 32768 to 32767 can be set.
In the case that assignment is performed at the left side of the assigned statement, settings are
made by rounding off to the nearest whole number. In the case that the variable appears in an
expression, evaluation is performed after conversion to a floating decimal point format.
Approximately 0.15m of tape recording memory is used per set of expanded conversational macro
exclusive variables (those of parameter no. 9044). Be careful of decrease in the capacity of
available tape memory when using a large number of expanded conversational macro exclusive
variables. The available tape recording memory capacity during use in accordance with the number
of specified variables is displayed on the program library screen.
The maximum number of variables that can be set to parameter no. 9044 varies, as shown below,
in accordance with the tape recording memory capacity.
@ When setting of all necessary parameters is completed, press the RO key, then press the
< NL) key twice to return to the initial screen.
A&9
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
Test Compiling
Press the RO key in the initial screen.
When you want to display the source program during compiling, put the F3 key into ON status,
and when you want to display only the program number, put the F3 key into OFF status.
Key in ‘I< NL>’ from ‘NO. = ‘.
As the dedicated custom macro program for Graphic Conversation and the user’s program are
compiled simultaneously, check for the absence of errors.
(11)ROM writing
Press the RO key in the initial screen.
Put the F7 into OFF and the F9 key into ON status. (PMC writer selection)
When you want to display the source program during compiling, put the F3 key into ON status,
and when you want to display only the program number, put the F3 key into OFF status.
Key in ‘2 < NL )’ from ‘NO = ‘.
If the floppy disk containing macro executer 2 is already inserted in floppy disk drive 0, the data
will be read automatically from the floppy disk and simultaneously written into the ROM
cassette. If the floppy disk has not been inserted in the disk drive, a message will be displayed.
After inserting the macro executer 2 floppy disk into disk drive 0, key In ‘ OK @ ****. ****
EXC2/** < NL ) ‘.
However, as the above-described ****. ****. EXC2/+* is different depending on the macro executer
used, refer to the Table of Figure Numbers of FAPT MACRO COMPILER (MACRO EXECUTER)
with Graphic Conversation in Section 2, then input the file name of the macro executer to be used.
Example)
The file name when using the FSO-TF 9” monochrome high resolution CRT, English,
Japanese version is “0.TF. OA80. EXC2107”.
The file name when using the FSO-MF 9” monochrome high resolution CRT, English,
Japanese, German, French, Italian, Spanish version is “O-MF.OA85.EXC2102”.
@ The PC Cassette Rom Module lamp of the PMC Writer flicker and writing to the ROM begins.
0 After approximately 1 hour, ROM writing will be completed.
A4-10
APPENDlX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
5. ADDITION OF OPTIONS
When the Graphic Conversation and macro executer function exist in combination as described,
procure the options listed below.
A4-11
APPENDIX 4 Series 0 MACRO COMPILER/MACRO EXECUTER
WITH GRAPHIC CONVERSATION
Note 2) Some functions which can be used with the standard macro executer acnnot be used
with macro executer provided with Graphic Conversation.
A4-12
APPENDIX 5 FANUC Series O-TTC MACRO COMPILER/MACRO EXECUTER
1 OVERVIEW
l
The FANUC Series O-TTC also supports the use of a macro compiler and macro executor.
Connect a compiled macro executor ROM cassette for HEADl, or two cassettes for HEAD1 and
HEAD2 (Note 1). P-code macro programs stored in the ROM can be executed.
From the ROM cassette for HEADl, the execution, auxiliary, and conversational macro functions
can be used(Note 2) in the same way as for the macro compiler/executor for the 0-TC.
From the ROM cassette for HEAD2, only the execution macro function can be used. Execution
macros for HEAD2 can, however, reference or write conversational macro variables (#lOOOO and
subsequent) and expanded conversational macro variables (#20000 and subsequent) defined using
HEADl. Common variables and system variables for HEAD2 are independent of those.for HEAD1 .
The user can, for example, create a conversational macro screen using the HEAD1 conversational
macro function, or control HEADVHEAD2 execution macro programs based on the execution
results of an auxiliary macro.
(Operation outline)
HEAD1 HEAD2
(Note 1) A macro executor ROM cassette cannot be used if installed for HEAD2 only. In such a
case, install a ROM cassette containing a dummy compiled program for HEADl.
(Note 2) The functions are partially limited.
A5-1
APPENDIX 5 FANUC Series 0-lTC MACRO COMPILER/MACRO EXECUTER
2. COMPILATION
Macro executor ROM cassettes for the O-TTC cannot be compiled by the O-TTC, neither for
HEAD1 nor HEAD2.
Use FANUC System P-G Mark II or FANUC System P-G Mate for compilation.
(MACRO EXECUTER)
To compile a ROM cassette for HEADl, use the macro library for the 0-TC.
File name: 0-TC.EXEC03
To compile a ROM cassette for HEAD2, use the macro library for the O-TTCSUB.
File name: O-TTC.SUB.EXEC/Ol
3. INSTALLATION .
Attach a macro executor ROM cassette, compiled using P-G Mark II/Mate for HEAD1 or HEAD2, to
the PAS1 or PAS2 connector of the FANUC Series O-C master PCB.
A52
APPENDIX 5 FANUC Series 0-TTC MACRO COMPILER/MACRO EXECUTER
4.1 Variables
Conversational macro variables (#lOOOO and subsequent) and expanded conversational macro
variables (#20000 and subsequent) can be referenced or written by both HEAD1 and HEAD2 P-
code programs. The variables must be specified when performing macro compilation for HEADI.
System variables and P-code common variables (#lo0 to #149, #500 to #53l) for HEAD2 are
independent of those for HEADl.
P-code programs stored in the ROM for HEADI, however, cannot be called from HEAD2, and vice
versa.
1) The NC program access function can be used. Programs for HEAD2, however, cannot
be referenced or written.
2) The compilation parameter (DAUX) for selecting the AUX screen upon power-on cannot
be used.
4) An address function cannot be used to access PMC addresses R300 to R699 or DI for
HEAD2 (X40).
The auxiliary macro function can be used only with the HEAD1 macro executor.
1) The function screen control variable (#8510) cannot be used to switch the function
screen.
AS-3
APPENDIX 5 FANUC Series 0-TTC MACRO COMPILER/MACRO EXECUTER
3) An address function cannot be used to access PMC addresses R300 to R699 or DI for
HEAD2 (X40).
5. PARAMETERS
5.1 HEAD1 Compile Parameters
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
t
9001 LOC4 SEQN
B
7 6 5 4 3 2 1 0
A5-4
APPENDIX 5 FANUC Series O-7°K MACRO COMPILER/MACRO EXECUTER
7 6 5 4 3 2 1 0
ONMSK = 1: The 0 and N numbers are not displayed on the AUX screen.
= 0 : The 0 and N numbers are displayed on the AUX screen.
HRGR = 1 : High-resolution mode graphic display (only for 9” high-resolution CRT)
= 0 : Standard mode graphic display
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0 .
9006 DIOC
DIOC = 1 : Ul:G135/Gl36 and UO:F182/F183 are used for UVUO (#lo00 to #1132) of execution
macros/conversational macros.
= 0 : Standard UI:G130/G131 and UO:F162/F163 are used for U/U0 (#lo00 to #1132) of
execution macfoskonvefsational macros.
M-5
APPENDIX 5 FANUC Series WTTC MACRO COMPILER/MACRO EXECUTER
.
9010 M code that calls subprogram 09001.
b
,
9012 M code that calls subprogram 09003.
\
9013 C code that calls custom macro 09010.
.. ..
.. ..
. 4
9022 G code that calls custom macro 09019.
l
I 9038
I
Number of the conversational macro program to be executed upon power-on
I (AUX screen)
,
9039 Number of the auxiliary macro program to be executed
9040 Number of the conversational macro program to be executed upon power-on (MENU screen)
...
I 9041 INumber of the conversational macro program to be executed upon power-on I (MACR screen)
9042 Lower limit M code for M code call with a range specified
i .
9043 Upper limit M code for M code call with a range specified
.
9045 Starting G code for G code call with a range specified
A5-6
APPENDIX 5 FANUC Series 0-TTC MACRO COMPILER/MACRO EXECUTER
q 7 6 5 4 3 2 1 0
SEQD =l : Displays the program number and sequence number of the recorded program during
the execution of a recorded program.
.
= 0 . Displays the program number and sequence number of the called user program
during the execution of a recorded program.
NDSP =1 : Displays local and common variables for P-code programs.
=o : Does not display local and common variables for P-code programs.
TSTP =l : Stops the execution of the conversational macro program.
=O: Executes the conversational macro program.
EXSP =1 : Executes macro statements until the next NC statement is encountered, if feed hold
is applied during macro statement execution at execution level.
= 0: Stops execution if feed hold is applied during macro statement execution at
execution level.
RSTC =l : Common variables #lOO to #149 are cleared to < null ) if NC is reset.
=o: Common variables #lOO to #149 are not cleared to < null ) if NC is reset.
7 6 5 4 3 2 1 0
A57
APPENDIX 5 FANUC Series 0-l-K MACRO COMPILER/MACRO EXECUTER
7 6 5 4 3 2 1 0
r
9001
7 6 5 4 3 2 1 0
I 9013
IG code that calls custom macro 09010.
I
I 9022
IG code that calls custom macro 09019.
AS-8
APPENDIX 5 FANUC Series 0-l-K MACRO COMPILER/MACRO EXECUTER
7 6 5 4 3 2 1 0
SEQD =I : Displays the program number and sequence number of the recorded program during
the execution of a recorded program.
= 0: Displays the program number and sequence number of the called user program
during the execution of a recorded program.
NDSP =l : Displays local and common variables for P-code programs.
=o: Does not display local and common variables for P-code programs.
EXSP =l : Executes macro statements until the next NC statement is encountered, if feed hold
is applied during macro statement execution at the execution level.
= 0: Stops execution if feed hold is applied during macro statement execution at the
execution level.
RSTC =1 : Common variables #lOO to #149 are cleared to < null ) if NC is reset. ’ .
= 0: Common variables #lOO to #149 are not cleared to < null ) if NC is reset.
AS-9
APPENDIX 6 MACRO VARIABLES USED IN THE MACRO
EXECUTOR FUNCTIONS
#8552 Variable for controlling extended data input for conversational R/W 0 X X
macros
A64
APPENDIX 6 MACRO VARIABLES USED IN THE MACRO
EXECUTOR FUNCTIONS
#87ll
I PMC control command variable (Area A)
#8621
I Overridevalue of the torque limit for the 1st servo axis I O I O
#8622
I Override value of the torque limit for the 2nd servo axs
#8623
IOverride value of the torque limit for the 3rd sewo axis
IRMI O I O I O
#8624 Override value of the torque limit for the 4th servo axis RnrV 0 0 0
R:
.
w: Writable
Readable 0 : Usable Unusable
A6-3
APPENDIX 7 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 (0). The execution macro cannot issue G codes. (GOI,
G02, and GO3 are commands for linear interpolation and cylindrical interpolation of the NC unit.)
(Note 2) A single-shot G code is marked with ‘1 S”. A continuous-state G code is marked with
u A
M Each continuous-state G code is shared by the conversational and auxiliary macros and
belongs to one G-code group.
G M,,S Conversa-
Function Standard command format Auxiliary
tional
A74
APPENDIX 7 G CODES THAT CAN BE USED BY THE CONVERSATIONAL
AND AUXILIARY MACROS
-1
G
Function Standard command format 1 M/IS l’Ly”l Auxiliary
I (Transmission)
G339 1 RS232c: Controls the FANUC cassette. G339 P----
F L S ; 1s 0 0
G34-4
I
1PMC
PMC axis control: Issues a cutting feed
command.
G344 X - ;
;
PI OI O
(1sI-0 IO
G345
I
PMC axis control: Issues a reference position
return command.
G345 ;
PI OI O
G346
I
PMC axis control: Issues a miscellaneous
function command.
G346 M_ ;
VI OI O
G348 PMC axis control: Issues a status signal read
I command.
G348 P- ;
PI OI O
G349 G349 P_;
PI O O I
A7-2
INDEX
<A>
Address code table .................................................. 67
Address functions ................................................... 47
Argument designation ................................................. 21
Auxiliary macro function ............................................... 26
<B>
Block deletion .. .. ... ... ... .. . ... .. .. ... .. .. . . .. . ... .. .. .. . ... .. . .. . 66
Block writing . .. .. .. .... ... . .. .. ... .. .. .. .. .. .. . .. .. .. .. . ... . .. ... . . 64
<c>
Call code and program No. ............................................. I6
Calling a macro using a T code .......................................... I9
Calling a subprogram using specified codes .................................. 17
Calling format ...................................................... 83
.Callingmacros09010-9019byGcode ................................... I8
Calling macros 09020 . 9029 by M code ................................... 19
Calling macros with a G code by specifying the range .......................... I9
Calling subprogram 09000 by T code ..................................... I7
Calling subprograms 09001 . 9003 by M code ............................... I7
Common variables (#IO0 to #149 and #500 to #53I) ........................... 29
Compiling procedure (main flow) .......................................... 6
Compiling procedure by series 0 (details) (preparation of source by system P-G) ........ 9
Compiling procedure using system P-G (details) ............................... 7
Continuous input by cursor and page key ................................... 68
Conversational macro execution control variable #8500, #8550, #8551 .............. 28
Conversational macro function and auxiliary macro function ...................... 24
Conversational macro ................................................. 24
Coordinates system of screen ........................................... 36
Cursor control ...................................................... 72
CD>
Data on macro compiler ............................................. A3-1
Data reading of A/D converter ........................................... 75
Deleting a program .................................................. 63
Detailed description of reference system information ........................... 91
Displaying Variables .................................................. 32
cE>
Endcode(#8529) ................................................... 67
End code (#8539) ................................................... 61 .
Equipment connection ................................................. 5
Equipment needed for compile ........................................... 4
Example .......................................................... 85
Execution control code ................................................ 27
Execution macro .................................................... 15
Extending the function for inputting and outputting a macro variable ................ 55
<F>
FANUC floppy cassette control .......................................... 57
FANUC series O-TTC macro compiler/macro executer ........................ A54
Function details ..................................................... 50
Function for calling a user program by an execution macro ...................... 83
Function for calling macros with an axis address .............................. 20
Function for finding a P-CODE work number ................................ 82
Function for identifying the pressed MDI key using a conversational macro ........... 85
Function for separating Ui from UO of the P-CODE program ..................... 81
Function screen control function ......................................... 46
Function ....................................................... 83,85
Functions for stopping a conversational macro ................................ 108
Functions of the macro executor ......................................... 33
<G>
G codes that can be used by the conversational and auxiliary macros .. .. .. . .. .. . A7-1
Graphic painting function .. ... . .. .. . .. ... ... .. . . . . .. .. .. .. .. .. . .. .. .. . . 45
<I>
Inputting and outputting macro variables .................................... 53
Interlock function for axis direction ........................................ 80
Internal code (hangwr) ............................................... 107
internal code ...................................................... 102
<K>
Key image correspondence . . . . . . . . . . . . . . . . . . . . ., . . . . . . . . . . . . . . . . . . . . . . . 85
Key-input and data-input control . .. .. . . ... ... .. . .. . . .. . ... .. . .. . .. .. .. .. . 70
CL>
Limitation for execution macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Local variables (#l to #33 or for referencing
the P-CODE variables of array type, #l to #99) ... . .. . . . . ... .. . . ... . .. .. .. .. . 29
<M>
Macro compiler and macro executer ....................................... 3
Macro compiler ...................................................... 3
Macro complier operation ............................................ A2-1
Macro executor controls ............................................... 14
Macro program example ............................................. Al-l .
Macro variables used in the macro executor functions ........................ A6-1
Macro variables ..................................................... 29
Masking of 0, N number appearance ...................................... 68
Modal call using G code . ... .. .. .. .. . ... ... ... . . .. .. . ... .. .. .. .. . ... . .. 18
<N>
Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28, 67, 83
co>
Operation functions (logarithm, exponent, arcsine, arccosine) . . .. .. .. ... .. . .. .. .. . 84
Operation .. .. . ... ..... ... . ... .. . ... ... ... . . .. .. . ... .. .. ... . .. .. .. . 84
<P>
P-CODE variables #lOOOO- ............................................. 29
PMC axis control by the G code ......................................... 75
PMC axis control by variables ........................................... 78
PMC axis control .................................................... 75
Presetting relative coordinates .......................................... 69
Processing array type P-CODE variables .................................... 72
<R>
Reader puncher interface control by conversational macro ....................... 49
Reading a specified block .............................................. 63
Reading and presetting cutting distance (#8554) .............................. 68
Reading and presetting cutting time (#8553) ................................. 68
Reading and presetting cutting time and cutting distance by conversational macro ...... 68
Reading and presetting relative coordinates by conversational macro ............... 69
Reading and writing a PMC address ...................................... 48
Reading relative coordinates ............................................ 69
Recording of a new program ............................................ 62
Referenced system information .......................................... 89
Referencing and reading NC program with conversational macro .................. 61
Referencing common variables of custom macros ............................. 82
es>
Screen control ...................................................... 36
Screen display control code ............................................ 39
Series 0 macro compiler/macro executer with graphic conversation .............. A4-1
cv>
Variables of expanded P-CODE (#20000 - . ...) . ... .. .. . . .. . .. .. .. .. .. .. . ... . . 30
<w>
Window function .. .. ....... . .. ... . . .. .... .. .. . . . .. . . .. ... .. .. .. .. . .. 88
· No part of this manual may be
reproduced in any form.