Description
Writes the work zero offset value specified by "datano_s", "datano_e", "type". The offset value must be stored in "data" array of "IODBZOR" with signed binary format.
Writes the offset value for all axes once by specifying 'ALL_AXES' in 'type'.
The unit of offset value is the same as "Read work zero offset value(cnc_rdzofs)". See the description of cnc_rdzofs function.
As for Series 16i/18i-W, the unit of offset value is as follows.
- Series 16i/18i-W
1004#1 (ISC) |
1004#0 (ISA) |
Linear axis mm input [mm] |
Linear axis inch input [inch] |
Rotation axis [deg] |
|
---|---|---|---|---|---|
IS-A | 0 | 1 | 0.01 | 0.001 | 0.01 |
IS-B | 0 | 0 | 0.001 | 0.0001 | 0.001 |
IS-C | 1 | 0 | 0.0001 | 0.00001 | 0.0001 |
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 IODBZOR structure).
(8+4*(number of axes)*(number of offset))
IODBZOR
1 axis | all axes |
---|---|
![]() |
![]() |
n = Maximum controlled axes (* The data for current controlled axes are valid.)
K = Number of offset to be written
Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.
typedef struct iodbzor {
short datano_s; /* start offset number */
short type; /* axis number */
short datano_e; /* end offset number */
long data[MAX_AXIS*K];/* offset data value */
} IODBZOR ; /* MAX_AXIS : max. controlled axes */
/* K : number of offset */
- datano_s
- Specify the start work zero offset number.
- Series 15/15i, 0i-D
- Series 16/18/21, 16i/18i/21i, 0i-A/B/C
- Series 0i-F, 30i
- Series 16i/18i-W
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
0 : External work zero offset value 1,..,6 : Work zero offset value of G54 through G59
- datano_e
- Specify the end work zero offset number.
- 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 IODBZOR structure(length) is wrong. |
(3) |
Offset number(datano_s, datano_e) 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.
- Series 15 1004#0,#1,#5, 1009#1
- Series 15i 1012#0,#1,#2,#3
- Series 16/18/21, 16i/18i/21i, 0i-A/B/C 1004#0,#1
- Series 30i 1013#3,#2,#1,#0
- Series 0i-D/F 1013#1,#0
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_wrzofs cnc_rdzofsr cnc_rdzofsinfo
Example(C Language)
The following program writes the work zero offset values of G54 through G59
for the specified axis.
#include "fwlib32.h"
/* axis is axis index to be altered. */
/* offset is array of new offset value. */
short example( short axis, long *offset )
{
IODBZOR zofsr ;
short ret ;
zofsr.datano_s = 1 ;
zofsr.datano_e = 6 ;
zofsr.type = axis ;
memcpy( &zofsr.data[0], offset, 4*6 ) ;
ret = cnc_wrzofsr( h, 8+4*1*6, &zofsr ) ;
return ( ret ) ;
}
Example(C#)
The following program writes the work zero offset values of G54 through G59
for the specified axis.
class example
{
/* axis is axis index to be altered. */
/* offset is array of new offset value. */
public short sample(short axis, int[] offset)
{
Focas1.IODBZOR zofsr = new Focas1.IODBZOR();
short ret;
zofsr.datano_s = 1;
zofsr.datano_e = 6;
zofsr.type = axis;
offset.CopyTo(zofsr.data, 0);
ret = Focas1.cnc_wrzofsr(h, 8 + 4 * 1 * 6, zofsr);
return (ret);
}
}