Description
Writes the work coordinate shift value specified by "type". The work coordinate shift value must be stored in "data" array of "IODBWCSF" with signed binary format. The value for all axes can be written at a time by specifying ALL_AXES for "type".
The unit of work coordinate shift value is the same as "Read work coordinate shift value( cnc_rdwkcdshft )". See the description of cnc_rdwkcdshft function.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specify the data block length(size of IODBWCSF structure).
IODBWCSF
1 axis | all axes |
---|---|
n = Maximum controlled axes (The data for current controlled axes are valid.) |
- Series 30i, 0i-D/F
- Series 16/18/21, 16i/18i/21i, 0i-A/B/C
n = Maximum controlled axes (The data for current controlled axes are valid.)
n = Current controlled axes
Pointer to the IODBWCSF structure for the work coordinate shift value. The IODBWCSF structure is as follows.
typedef struct iodbwcsf {
short dummy; /* (not used) */
short type; /* axis number */
long data[MAX_AXIS];/* work coordinate shift value*/
} IODBWCSF ; /* MAX_AXIS : max. controlled axes */
- type
- Specify the axis number.
ALL_AXES : assigns all axes(ALL_AXES=-1) 1,..,m : assigns 1 axis(m=current controlled axes) - data
- Specify the work coordinate shift value to be written.
data[0],..,data[m-1] : assigns all axes data[0] : assigns 1 axis
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 |
---|---|
(1) |
This function cannot be used at M series. |
(2) |
Size of IODBWCSF structure(length) is wrong. |
(4) |
Axis number(type) is wrong. |
(5) |
Work coordinate shift value(data) is out of range. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure. |
(6) |
The extended driver/library function is necessary. |
(7) |
CNC parameter '3290#3' must be 0. |
(9) |
CNC parameter '1201#6' must be 0. |
(13) |
STL(DO) is on. |
As for the other return codes or the details, see "Return status of Data window function"
CNC option
And this function is related to the following CNC option.
- Series 30i
IS-C,IS-D,IS-E
For HSSB connection,
For Ethernet connection,
The Ethernet function and the extended driver/library function are necessary. However, in case of Series 16i/18i/21i-B, 0i-B/C/D/F, Series 30i and PMi-A, the required CNC option is as follows. When Embedded Ethernet is used,above two optional functions are not required.
When Ethernet board is used,
- only Ethernet function is required.
CNC parameter
This function is related to the following CNC parameter.
See the manual of CNC parameter for details.
1201#6=0 (must be set)
1013#3,#2,#1,#0
1013#1,#0
3290#3=0 (must be set)
1201#6=0 (must be set)
3290#3=0 (must be set)
1201#6=0 (must be set)
3290#3=0 (must be set)
CNC mode
This function can be used in any CNC mode.
Available CNC
0i-A | 0i-B/C(Note) | 0i-D | 0i-F | 15 | 15i | 16 | 18 | 21 | 16i-A | 18i-A | 21i-A | 16i-B | 18i-B | 21i-B | 30i-A | 30i-B | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
M (Machining) | |||||||||||||||||
T (Turning) | - | ||||||||||||||||
LC (Loader) | - | - | - | - | - | - | - | - |
0i-D | 0i-F | 16i | 18i | 30i-A | 30i-B | |
---|---|---|---|---|---|---|
P (Punch press) | - | |||||
L (Laser) | - | - | - | - | ||
W (Wire) | - | - |
Power Mate i-D | |
Power Mate i-H | |
Power Motion i-A | X |
"O" | : | Both Ethernet and HSSB | |
"E" | : | Ethernet | |
"H" | : | HSSB | |
"X" | : | Cannot be used | |
"-" | : | None |
Note) 0i-C does not support the HSSB function.
See Also
cnc_rdwkcdshft cnc_rdwkcdsfms cnc_wrwkcdsfms