
B–61803E–1/10
E. FANUC Super CAP T/CAP II T MACRO
COMPILER/EXECUTOR (Series 16/18)
and Super Capi T Macro Compiler/
EXECUTOR (Series 16i/18i/21iT)
APPENDIX
277
A user program can use P-CODE variables #10000 to #10699 as
desired. With the standard macro compiler/executor (having no
conversational functions), the value set in compile parameter 9037
determines the number of P-CODE variables from #10000. In a
system that supports the conversational function, however, the
parameter is always set to 7.
NOTE
The P-CODE variables can be extended to #10000 to #13999 by
adding the optional 4000 P-CODE variables.
Extended P-CODE variables from #20000 are used by the system.
The user program cannot access these variables.
(2) Examples of command format
(a) When the data of a tool is to be referenced based on its tool ID
number
#9999 = (tool ID number) ; – 1.
IF [#9998 EQ 99] GOTO 100 ; – 2.
#????? = #99?? ; – 3.
1. Sets the tool ID number of a tool whose data is to be
referenced in #9999.
2. Checks #9998 to see if the tool is registered in the tool file.
3. Reads the variables corresponding to data to be referenced if
the tool currently selected is registered in the file.
! If the specified tool ID number cannot be found, 99 is set in
#9998.
(b) When the tool ID number and data of the next or previous tool in
the tool data list are to be referenced based on the currently
selected tool (whose tool ID number is set in #9998)
IF [#9998 EQ 99] GOTO 100 ; – 1.
#????? = #9998 ; – 2.
#9999 = 1 or 2 ; – 3.
#????? = #99?? ; – 4.
1. Checks #9998 to see if the currently selected tool is
registered.
2. Checks the tool ID number of the currently selected tool.
3. Finds the tool ID number of the next or previous tool by
setting 1 or 2 in #9999.
4. Reads the variables corresponding to data to be referenced.
! If the currently selected tool cannot be found (as in the case
of power-up), 99 is set in #9998.
(c) When the tool ID number and data of the first tool in the tool data
list are to be referenced
#9999 = 3 ; – 1.
IF [#9998 EQ 99] GOTO 100 ; – 2.
#????? = #99?? ; – 3.
1. Finds the first tool in the tool data list.
2. Checks if the tool is registered.