Pointer to the IDBMGRP structure which specifies the M code group data to be written. The IDBMGRP structure is as follows.

typedef struct idbmgrp {
short s_no;
short dummy;
short num;
short group[N];
} IDBMGRP;
/* N stands for the number of M code group data being written.(Maximum 500) */

s_no

Specify starting number.
Valid range is from 0 to 499.

num

Specify the number of the data to be written.
Valid range is from 1 to 500.

group

Specify M code group number to be written.
Valid range is from 0 to 127.

Return

EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.

The major error codes are as follows.

Return code

Meaning/Error handling

EW_LENGTH(2)

Data block length error
The number indication(num) is wrong.

EW_NUMBER(3)

Data number error
The start number(s_no) is wrong.

EW_DATA(5)

Data error
The number of M code group is wrong.
In order to get more information for this err_no return value, execute cnc_getdtailerr function.
The following detail status will be set onto the member, err_no of ODBERR structure.

0

:

error except EW_DATA

1

:

error of M code group number

And the wrong array number will be set onto the member, err_dtno of ODBERR.

EW_NOOPT(6)

No optionThe M code group option and the extended
driver/library function are necessary.