<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="../Fmethod_xsl/fmethod_he_c.xsl"?>

<root>
  <func>
    <title>cnc_wrzofs</title>


    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_wrzofs(unsigned short FlibHndl, short length, IODBZOFS *zofs);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>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.</p>
            <p>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".</p>
            <p>
                The unit of offset value is the same as "Read work zero offset value(<a href="ncdata/cnc_rdzofs.htm" target="_parent">cnc_rdzofs</a>)".
                See the description of <a href="ncdata/cnc_rdzofs.htm" target="_parent">cnc_rdzofs</a> function.
            </p>
        </cmn>
    </doc>



    <argument>
        <common>
            <vc>
                <item>
                    <name>FlibHndl</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the library handle. See "<a href="handle.htm" target="_parent">Library handle</a>" for details.
                        </p>
                    </content>
                </item>
                <item>
                    <name>length</name>
                    <type>in</type>
                    <content>
                        <p>Specify the data block length(size of IODBZOFS structure).</p>
                        <p><b>IODBZOFS</b></p>
                        <table>
                            <colgroup align="left" valign="top">
                            <colgroup align="left" valign="top">
                            <colgroup align="left" valign="top">
                            <tr>
                                <th>1 axis</th>
                                <th>all axes</th>
                            </tr>
                            <tr>
                                <td valign="top"><img src="ncdata/axis.gif"/></td>
                                <td valign="top"><img src="ncdata/axisa.gif"/></td>
                            </tr>
                            </colgroup>
                            </colgroup>
                            </colgroup>
                        </table>
                        <ul>
                            <li>Series 150, 150i, 300i</li><p/>
                            <p>n = Maximum controlled axes (The data for current controlled axes are valid.)</p>
                        </ul>
                        <ul>
                            <li>Series 160/180/210, 160i/180i/210i, 0i, Power Mate i</li><p/>
                            <p>
                                n = Current controlled axes 
                            </p>
                        </ul>
                    </content>
                </item>
                <item>
                    <name>zofs</name>
                    <type>in</type>
                    <content>
                        <p>Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.</p>
<pre>
typedef struct iodbzofs {
    short   datano;         /* offset number */
    short   type;           /* axis number */
    long    data[MAX_AXIS]; /* offset data value */
} IODBZOFS ;       /* MAX_AXIS : max. controlled axes */
</pre>
                        <dl>
                            <dt>datano</dt>
                            <dd>Specify the work zero offset number.<p/>
                                <ul>
                                    <li>Series 150, 150i</li>
                                    <table class="dd">
                                        <colgroup align="left" valign="top">
                                        <tr>
                                            <td></td>
                                            <td>0</td>
                                            <td>:</td>
                                            <td>External work zero offset value</td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>1,..,6</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54 through G59</td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>7,..,54</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54.1P1 through G54.1P48</td>
                                        </tr>
                                        </colgroup>
                                    </table>
                                    <li>Series 160/180/210, 160i/180i/210i, 0i</li>
                                    <table class="dd">
                                        <colgroup align="left" valign="top">
                                        <tr>
                                            <td>M Series</td>
                                            <td>0</td>
                                            <td>:</td>
                                            <td>External work zero offset value</td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>1,..,6</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54 through G59</td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>7,..,306</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54.1P1 through G54.1P300</td>
                                        </tr>
                                        <tr>
                                            <td>T Series</td>
                                            <td>0</td>
                                            <td>:</td>
                                            <td>External work zero offset value</td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>1,..,6</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54 through G59</td>
                                        </tr>
                                        </colgroup>
                                    </table>
                                    <li>Series 300i</li>
                                    <table class="dd">
                                        <colgroup align="left" valign="top">
                                        <tr>
                                            <td>0</td>
                                            <td>:</td>
                                            <td>External work zero offset value</td>
                                        </tr>
                                        <tr>
                                            <td>1,..,6</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54 through G59</td>
                                        </tr>
                                        <tr>
                                            <td>7,..,306</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54.1P1 through G54.1P300</td>
                                        </tr>
                                        </colgroup>
                                    </table>
                                </ul>
                            </dd>

                            <dt>type</dt>
                            <dd>Specify the axis number.
                                <table class="dd">
                                    <colgroup align="left" valign="top">
                                    <colgroup align="left" valign="top">
                                    <colgroup align="left" valign="top">
                                    <tr>
                                        <td>ALL_AXES</td>
                                        <td>:</td>
                                        <td>assigns all axes(ALL_AXES=-1)</td>
                                    </tr>
                                    <tr>
                                        <td>1,..,m</td>
                                        <td>:</td>
                                        <td>assigns 1 axis(m=current controlled axes)</td>
                                    </tr>
                                    </colgroup>
                                    </colgroup>
                                    </colgroup>
                                </table>
                            </dd>

                        </dl>
                    </content>
                </item>
            </vc>
        </common>

        <is>
            <hssb>
                <vc>
                    <item>
                        <name>FlibHndl</name>
                        <type>in</type>
                        <content>
                            <p>
                                Specify the library handle. See "<a href="handle.htm" target="_parent">Library handle</a>" for details.
                            </p>
                        </content>
                    </item>
                    <item>
                        <name>length</name>
                        <type>in</type>
                        <content>
                            <p>Specify the data block length(size of IODBZOFS structure).</p>
                            <p><b>IODBZOFS</b></p>
                            <table>
                                <colgroup align="left" valign="top"/>
                                <colgroup align="left" valign="top"/>
                                <tr>
                                    <th>1 axis</th>
                                    <th>all axes</th>
                                </tr>
                                <tr>
                                    <td><img src="ncdata/axis.gif"/></td>
                                    <td><img src="ncdata/axisa.gif"/></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>
                                        n = Maximum controlled axes (The data for current controlled axes are valid.)
                                    </td>
                                </tr>                               
                            </table>
                        </content>
                    </item>
                    <item>
                        <name>zofs</name>
                        <type>in</type>
                        <content>
                            <p>Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.</p>
<pre>
typedef struct iodbzofs {
    short   datano;         /* offset number */
    short   type;           /* axis number */
    long    data[MAX_AXIS]; /* offset data value */
} IODBZOFS ;       /* MAX_AXIS : max. controlled axes */
</pre>
                            <dl>
                                <dt>datano</dt>
                                <dd>Specify the work zero offset number.<p/>
                                    <table class="dd">
                                        <colgroup align="left" valign="top">
                                        <tr>
                                            <td>0</td>
                                            <td>:</td>
                                            <td>External work zero offset value</td>
                                        </tr>
                                        <tr>
                                            <td>1,..,6</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54 through G59</td>
                                        </tr>
                                        <tr>
                                            <td>7,..,306</td>
                                            <td>:</td>
                                            <td>Work zero offset value of G54.1P1 through G54.1P300</td>
                                        </tr>
                                        </colgroup>
                                    </table>
                                </dd>

                                <dt>type</dt>
                                <dd>Specify the axis number.
                                    <table class="dd">
                                        <colgroup align="left" valign="top">
                                        <colgroup align="left" valign="top">
                                        <colgroup align="left" valign="top">
                                        <tr>
                                            <td>ALL_AXES</td>
                                            <td>:</td>
                                            <td>assigns all axes(ALL_AXES=-1)</td>
                                        </tr>
                                        <tr>
                                            <td>1,..,m</td>
                                            <td>:</td>
                                            <td>assigns 1 axis(m=current controlled axes)</td>
                                        </tr>
                                        </colgroup>
                                        </colgroup>
                                        </colgroup>
                                    </table>
                                </dd>

                            </dl>
                        </content>
                    </item>
                </vc>
            </hssb>
        </is>
    </argument>



    <errcode>
        <item>
            <name>EW_LENGTH</name>
            <content>Data block length error<br/>Size of IODBZOFS structure(length) is wrong.</content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>Data number error<br/>Offset number(datano) is wrong.</content>
        </item>
        <item>
            <name>EW_ATTRIB</name>
            <content>Data attribute error<br/>Axis number(type) is wrong.</content>
        </item>
        <item>
            <name>EW_DATA</name>
            <content>Data error <span class="xis">(Series 150, 300i)</span><br/>Offset data(data) is out of range.</content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>No option <span class="xis">(Series 160/180/210, 160i/180i/210i, 0i, 300i)</span><br/>This function needs the work zero offset option.</content>
        </item>
    </errcode>



    <option>
        <hssb>The extended driver/library function is necessary.</hssb>
        <ethr><p>The Ethernet function and the extended driver/library function are necessary.</p>
              <p>However, in case of Series 160i/180i/210i/0i MODEL B and 300i, the required CNC option is as follows.</p>
              <p>When Embedded Ethernet is used,</p>
              <p><ul>above two optional functions are not required.</ul></p>
              <p>When Ethernet board is used,</p>
              <p><ul>only Ethernet function is required.</ul></p>
        </ethr>
        <type>
            <li>Series 150, 150i</li>
                <table>
                    <colgroup valign="top">
                    <tr>
                        <td></td>
                        <td>Work zero offset 48 sets</td>
                    </tr>
                    </colgroup>
                </table>
                <br/>
            <li>Series 160/180/210, 160i/180i/210i, 0i</li>
                <table>
                    <colgroup valign="top">
                    <tr>
                        <td>M Series</td>
                        <td>Work zero offset</td>
                    </tr>
                    <tr>
                        <td/>
                        <td>Work zero offset 48 sets</td>
                    </tr>
                    <tr>
                        <td/>
                        <td>Work zero offset 300 sets</td>
                    </tr>
                    <tr>
                        <td>T Series</td>
                        <td>Work zero offset</td>
                    </tr>
                    </colgroup>
                </table>
                <br/>
            <li>Series 300i</li>
                <table>
                    <colgroup valign="top">
                    <tr>
                        <td>Work zero offset</td>
                    </tr>
                    <tr>
                        <td>Work zero offset 48 sets</td>
                    </tr>
                    <tr>
                        <td>Work zero offset 300 sets</td>
                    </tr>
                    <tr>
                        <td>IS-C,IS-D,IS-E</td>
                    </tr>
                    </colgroup>
                </table>
        </type>

        <is>
            <hssb>The extended driver/library function is necessary.</hssb>
            <need>Work zero offset</need>
            <type>
                <table>
                    <colgroup valign="top"/>
                    <tr>
                        <td>Work zero offset 48 sets</td>
                    </tr>
                    <tr>
                        <td>Work zero offset 300 sets</td>
                    </tr>
                    <tr>
                        <td>IS-C,IS-D,IS-E</td>
                    </tr>
                </table>
            </type>
        </is>
    </option>



    <parameter>
        <type>
            <ul>
                <li>Series 150</li>
                1004#0,#1,#5, 1009#1
            </ul>
            <ul>
                <li>Series 150i</li>
                1012#0,#1,#2,#3
            </ul>
            <ul>
                <li>Series 160/180/210, 160i/180i/210i, 0i</li>
                1004#0,#1
            </ul>
            <ul>
                <li>Series 300i</li>
                1013#3,#2,#1,#0
            </ul>
        </type>
    </parameter>



    <is_parameter>
        <type>
            <div class="dd">1013#3,#2,#1,#0</div>
        </type>
    </is_parameter>



    <mode>
    </mode>



    <support>
        <m>
              <fs0ia>H</fs0ia>
            <fs0ib>O</fs0ib>
            <fs15>H</fs15>
            <fs15i>O</fs15i>
            <fs16>H</fs16>
            <fs18>H</fs18>
            <fs21>H</fs21>
            <fs16ia>O</fs16ia>
            <fs18ia>O</fs18ia>
            <fs21ia>O</fs21ia>
            <fs16ib>O</fs16ib>
            <fs18ib>O</fs18ib>
            <fs21ib>O</fs21ib>
            <fs30i>O</fs30i>
        </m>
        <t>
              <fs0ia>H</fs0ia>
            <fs0ib>O</fs0ib>
            <fs15>H</fs15>
            <fs15i>X</fs15i>
            <fs16>H</fs16>
            <fs18>H</fs18>
            <fs21>X</fs21>
            <fs16ia>O</fs16ia>
            <fs18ia>O</fs18ia>
            <fs21ia>O</fs21ia>
            <fs16ib>O</fs16ib>
            <fs18ib>O</fs18ib>
            <fs21ib>O</fs21ib>
            <fs30i>O</fs30i>
        </t>
        <lc>
              <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>H</fs16>
            <fs18>H</fs18>
            <fs21>H</fs21>
            <fs16ia>H</fs16ia>
            <fs18ia>H</fs18ia>
            <fs21ia>H</fs21ia>
            <fs16ib>H</fs16ib>
            <fs18ib>H</fs18ib>
            <fs21ib>H</fs21ib>
            <fs30i>H</fs30i>
        </lc>
        <p>
            <fs16i>O</fs16i>
            <fs18i>O</fs18i>
        </p>
        <l>
            <fs16i>O</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>E</fs16i>
            <fs18i>E</fs18i>
        </w>
        <pw>
            <d>X</d>
            <h>X</h>
        </pw>
        <add><b></b></add>

        <is>
            <m>
                <fs30is>O</fs30is>
            </m>
            <t>
                <fs30is>O</fs30is>
            </t>
        </is>
    </support>



    <reference>
        <item>
            <name>cnc_rdzofs</name>
            <file>ncdata/cnc_rdzofs.htm</file>
        </item>
        <item>
            <name>cnc_rdzofsr</name>
            <file>ncdata/cnc_rdzofsr.htm</file>
        </item>
        <item>
            <name>cnc_wrzofsr</name>
            <file>ncdata/cnc_wrzofsr.htm</file>
        </item>
        <item>
            <name>cnc_rdzofsinfo</name>
            <file>ncdata/cnc_rdzofsinfo.htm</file>
        </item>
    </reference>



    <example>
<vc>
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, &#38;zofs ) ;
        return ( ret ) ;
}
</vc>
    </example>



  </func>
</root>
    