Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 474 -
[Description]
Reads the macro executor variable (P-code macro variable) data of
specified number.
This function is used for controlling flow of the machining program of
CNC or interactive macro function by the application program
exchanging data between the macro executor program in CNC and the
application program, etc.
Specify the P-code macro variable number to be read in "number" with
binary format.
The variable data is stored in both "buf.u.p6.mcr_val" and
"buf.u.p6.dec_val".
mcr_val 4-byte singed binary format data.
(The negative value is represented as 2's
complement.)
Variable value converted into integer.
dec_val 2-byte signed binary format data.
(The negative value is represented as 2's
complement.)
Digit number after decimal point.
The following values are read concretely.
Variable data
displayed in
CNC screen mcr_val dec_val
---------------+---------------+---------------
Blank(void) 0 Undefined. (*)
0.000 0 3
0.0000001 1 7
0000.0001 1 4
00000.100 100 3
00001.000 1000 3
00010.000 10000 3
100000.00 10000000 2
99999999. 999999999 0
00123.000 123000 3
-00123.000 -123000 3
(*) "Blank" and "0" can not be distinguished. (FS16/18-B)
By setting the CNC parameter No.8701#4 MVR=1, "Blank" and "0"
can be distinguished. (FS16/18-C or later)
"-1" is set in "dec_val" for "Blank".
The standard value of "dec_val" is as follows.
CNC system setting dec_val
-----------------------+--------
IS-B and mm input 3
IS-C or inch input 4
Also expanded P-code macro variables (after #20000) which are used
as fixed integer are read as floating point variables.
This function can read only P-code macro variables whose number are
equal to or more than 10000.