Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 464 -
------------------------------------------------------------------------------
1.59 Read custom macro variable. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdmacro
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_rdmacro( int number, int length, struct odbm *buf ) ;
struct odbm {
int dummy ; /* Not used. */
int datano ; /* Custom macro variable number. */
long mcr_val ; /* Custom macro variable value. */
int dec_val ; /* Digit number after decimal point.*/
} ;
[Arguments]
number Custom macro variable number.
length Data block length ( =10 ).
buf Buffer in which the custom macro variable data is
stored.
[Return]
0 Successful.
2 Incorrect data block length "length".
3 Incorrect custom macro variable number "number".
5 Value of the custom macro variable is out of the limit.
6 There are no required options.
The related options;
- Custom macro.
- Custom macro common variable addition (#100,..,#199,
#500,..,#999).
-1 It has been failed to read custom macro variable because
the other application program has already started writing
custom macro variable. Or attempted to execute this function
while the other low-speed window function is being executed.
Retry after completing currently executed window's process.