Description
Writes the work zero offset value specified by "datano", "type". The offset value must be stored in "data[0]" of "IODBZOFS" with signed binary format.
Writes the offset value for all axes once by specifying 'ALL_AXES' in 'type'. The offset value for each axis must be stored in "data" array of "IODBZOFS".
The unit of offset value is the same as "Read work zero offset value(cnc_rdzofs)". See the description of cnc_rdzofs 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 IODBZOFS structure).
IODBZOFS
1 axis | all axes |
---|---|
- Series 15/15i, 30i, 0i-D/F
n = Maximum controlled axes (The data for current controlled axes are valid.)
- Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
n = Current controlled axes
Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.
typedef struct iodbzofs {
short datano; /* offset number */
short type; /* axis number */
long data[MAX_AXIS]; /* offset data value */
} IODBZOFS ; /* MAX_AXIS : max. controlled axes */
- datano
- Specify the work zero offset number.
- Series 15/15i, 0i-D
- Series 16/18/21, 16i/18i/21i, 0i-A/B/C
- Series 0i-F, 30i
0 : External work zero offset value 1,..,6 : Work zero offset value of G54 through G59 7,..,54 : Work zero offset value of G54.1P1 through G54.1P48 M Series 0 : External work zero offset value 1,..,6 : Work zero offset value of G54 through G59 7,..,306 : Work zero offset value of G54.1P1 through G54.1P300 T Series 0 : External work zero offset value 1,..,6 : Work zero offset value of G54 through G59 0 : External work zero offset value 1,..,6 : Work zero offset value of G54 through G59 7,..,306 : Work zero offset value of G54.1P1 through G54.1P300 - type
- Specify the axis number.
ALL_AXES : assigns all axes(ALL_AXES=-1) 1,..,m : assigns 1 axis(m=current controlled axes)
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 |
---|---|
(2) |
Size of IODBZOFS structure(length) is wrong. |
(3) |
Offset number(datano) is wrong. |
(4) |
Axis number(type) is wrong. |
(5) |
Offset data(data) is out of range. |
(6) |
This function needs the work zero offset option. |
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 15/15i
- Series 16/18/21, 16i/18i/21i, 0i
- Series 0i-F
- Series 30i
Work zero offset 48 sets
M Series
Work zero offset
Work zero offset 48 sets
Work zero offset 300 sets
T Series
Work zero offset
Work zero offset 300 sets
Work zero offset
Work zero offset 48 sets
Work zero offset 300 sets
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 and 30i, 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.
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_rdzofs cnc_rdzofsr cnc_wrzofsr cnc_rdzofsinfo
Example(C Language)
The following program writes the work zero offset value of the specified offset
number and axis number.
#include "fwlib32.h"
/* ofs is offset number to be altered. */
/* axis is the axis number, offset is new offset value. */
short example( short ofs, short axis, long offset )
{
IODBZOFS zofs ;
short ret ;
zofs.datano = ofs ;
zofs.type = axis ;
zofs.data[0] = offset ;
ret = cnc_wrzofs( h, 4+4*1, &zofs ) ;
return ( ret ) ;
}
Example(C#)
The following program writes the work zero offset value of the specified offset
number and axis number.
class example
{
/* ofs is offset number to be altered. */
/* axis is the axis number, offset is new offset value. */
public short sample(short ofs, short axis, int offset)
{
Focas1.IODBZOFS zofs = new Focas1.IODBZOFS();
short ret;
zofs.datano = ofs;
zofs.type = axis;
zofs.data[0] = offset;
ret = Focas1.cnc_wrzofs(h, 4 + 4 * 1, zofs);
return (ret);
}
}