Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 480 -
------------------------------------------------------------------------------
1.66 Write P-code macro variables (range specified). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrpmacror
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_wrpmacror( int length, struct iodbpr *buf ) ;
struct iodbpr {
long datano_s ; /* Start P-code macro variable number. */
int dummy ; /* Not used. */
long datano_e ; /* End P-code macro variable number. */
union {
struct {
long mcr_val ; /* P-code macro variable value. */
int dec_val ; /* Digit number after decimal */
/* point. */
} p6_r ;
struct {
int mcr_val ; /* P-code macro variable value. */
int dec_val ; /* Digit number after decimal */
/* point. */
} p2_r ;
} pm_r[N] ; /* N is number of variables to be read. */
} ;
[Arguments]
length Data block length ( =10+6*(number of variables to be
written) )
datano_s Start P-code macro variable number. ( >= 10000 )
datano_e End P-code macro variable number.
mcr_val P-code macro variable value.
dec_val Digit number after decimal point.
[Return]
0 Successful.
2 Incorrect data block length "length".
3 Incorrect P-code macro variable number "s_number" or
"e_number".
6 Macro executor option isn't added, or macro module isn't
loaded.
-1 Attempted to execute this function while the other low-speed
window function is being executed.
Retry after completing currently executed window's process.