
------------------------------------------------------------------------------
1.55 Write custom macro variables (range specified). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrmacror
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_wrmacror( short length, struct iodbmr *buf ) ;
struct iodbmr {
short datano_s ; /* Start custom macro variable number. */
short dummy ; /* Not used. */
short datano_e ; /* End custom macro variable number. */
struct {
long mcr_val ; /* Custom macro variable value. */
short dec_val ; /* Digit number after decimal */
/* point. */
} data[N] ; /* N is number of variables to be written. */
} ;
[Arguments]
length Data block length ( =6+6*(number of variables to be
written) )
buf Buffer in which the custom macro variable data are
stored.
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect data block length "length".
EW_NUMBER( 3) Incorrect custom macro variable number "datano_s"
or "datano_e".
EW_DATA( 5) Value of the custom macro variable is out of the limit.
EW_NOOPT( 6) There are no required options.
The related options;
- Custom macro.
- Custom macro common variable addition (#100 to #199
and #500 to #999)
EW_BUSY(-1) An attempt was made to execute this command when other
window processing of a low-speed type was in progress.
Execute the command after the window processing has
ended.