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

<root>
  <func>


    <title>cnc_rdzofsr</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdzofsr(unsigned short FlibHndl, short s_number, short axis, short e_number, short length, IODBZOR *zofsr);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Reads the work zero offset value specified by "s_number", "e_number", "axis". The offset value is stored in "data" array of "IODBZOR" with signed binary format.</p>

            <p>Reads the offset value for all axes once by specifying 'ALL_AXES' in 'axis'.</p>

            <p>The place of decimal point can be got by <a href="misc/cnc_getfigure.htm" target="_parent">cnc_getfigure</a> function.</p>

            <p>The unit of offset value is the same as <a href="ncdata/cnc_rdzofs.htm" target="_parent">cnc_rdzofs</a> function. See the description of <a href="ncdata/cnc_rdzofs.htm" target="_parent">cnc_rdzofs</a> function.</p>

            <div class="xis"> <!-- attention -->
            <p>As for Series 160i/180i-W, the unit of offset value is as follows. </p>

            <ul>
                <li>Series 160i/180i-W</li>
                <p>
                    <table border="1">
                        <tr>
                            <th/>
                            <th>1004#1<br/>(ISC)</th>
                            <th>1004#0<br/>(ISA)</th>
                            <th>Linear axis<br/>mm input<br/>[mm]</th>
                            <th>Linear axis<br/>inch input<br/>[inch]</th>
                            <th>Rotation axis<br/> <br/>[deg]</th>
                        </tr>

                        <tr>
                            <td>IS-A</td>
                            <td>0</td>
                            <td>1</td>
                            <td>0.01</td>
                            <td>0.001</td>
                            <td>0.01</td>
                        </tr>

                        <tr>
                            <td>IS-B</td>
                            <td>0</td>
                            <td>0</td>
                            <td>0.001</td>
                            <td>0.0001</td>
                            <td>0.001</td>
                        </tr>

                        <tr>
                            <td>IS-C</td>
                            <td>1</td>
                            <td>0</td>
                            <td>0.0001</td>
                            <td>0.00001</td>
                            <td>0.0001</td>
                        </tr>
                    </table>
                </p>
            </ul>
            </div> <!-- attention class="xis" -->
        </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>s_number</name>
                    <type>in</type>
                    <content>
                        <p>Specify the start work zero offset number. </p>

                        <ul>
                            <li>Series 150, 150i</li>
                                <table>
                                    <tr>
                                        <td></td>
                                        <td>0</td>
                                        <td>:</td>
                                        <td>External work zero offset value</td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td>1,..,6</td>
                                        <td>:</td>
                                        <td>Work zero offset value of G54 through G59</td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td>7,..,54</td>
                                        <td>:</td>
                                        <td>Work zero offset value of G54.1P1 through G54.1P48</td>
                                    </tr>
                                </table>
                                <br/>
                            <li>Series 160/180/210, 160i/180i/210i, 0i</li>
                                <table>
                                    <tr>
                                        <td>M Series</td>
                                        <td>0</td>
                                        <td>:</td>
                                        <td>External work zero offset value</td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td>1,..,6</td>
                                        <td>:</td>
                                        <td>Work zero offset value of G54 through G59</td>
                                    </tr>

                                    <tr>
                                        <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>1,..,6</td>
                                        <td>:</td>
                                        <td>Work zero offset value of G54 through G59</td>
                                    </tr>
                                </table>
                                <br/>
                            <li>Series 300i</li>
                                <table>
                                    <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,..,306</td>
                                        <td>:</td>
                                        <td>Work zero offset value of G54.1P1 through G54.1P300</td>
                                    </tr>
                                </table>
                                <br/>
                            <li>Series 160i/180i-W</li>
                                <table>
                                    <tr>
                                        <td></td>
                                        <td>0</td>
                                        <td>:</td>
                                        <td>External work zero offset value</td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td>1,..,6</td>
                                        <td>:</td>
                                        <td>Work zero offset value of G54 through G59</td>
                                    </tr>
                                </table>
                                <br/>
                        </ul>
                    </content>
                </item>
                <item>
                    <name>e_number</name>
                    <type>in</type>
                    <content>
                        <p>Specify the end work zero offset number.</p>
                    </content>
                </item>
                <item>
                    <name>axis</name>
                    <type>in</type>
                    <content>
                        <p>Specify the axis number.</p>
                        <ul>
                            <table>
                                <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>
                            </table>
                        </ul>
                    </content>
                </item>
                <item>
                    <name>length</name>
                    <type>in</type>
                    <content>
                        <p>Specify the data block length(size of IODBZOR structure).<br/>
                            (8+4*(number of axes)*(number of offset))</p>
                        <p><b>IODBZOR</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/naxis.gif" /></td>
                                <td valign="top"><img src="ncdata/naxisa.gif" /></td>
                            </tr>
                            </colgroup>
                            </colgroup>
                            </colgroup>
                        </table>
                        
                        <p>n = Maximum controlled axes(The data for current controlled axes are valid.)<br/>
                            K = Number of offset to be read</p>

                    </content>
                </item>
                <item>
                    <name>zofsr</name>
                    <type>out</type>
                    <content>
                        <p>Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.</p>
<pre>
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  */
</pre>
                    </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>s_number</name>
                        <type>in</type>
                        <content>
                            <p>Specify the start work zero offset number. </p>

                            <ul>
                                <table>
                                    <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,..,306</td>
                                        <td>:</td>
                                        <td>Work zero offset value of G54.1P1 through G54.1P300</td>
                                    </tr>
                                </table>
                            </ul>
                        </content>
                    </item>
                    <item>
                        <name>e_number</name>
                        <type>in</type>
                        <content>
                            <p>Specify the end work zero offset number.</p>
                        </content>
                    </item>
                    <item>
                        <name>axis</name>
                        <type>in</type>
                        <content>
                            <p>Specify the axis number.</p>
                            <ul>
                                <table>
                                    <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>
                                </table>
                            </ul>
                        </content>
                    </item>
                    <item>
                        <name>length</name>
                        <type>in</type>
                        <content>
                            <p>Specify the data block length(size of IODBZOR structure).<br/>
                                (8+4*(number of axes)*(number of offset))</p>
                            <p><b>IODBZOR</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/naxis.gif"/></td>
                                    <td><img src="ncdata/naxisa.gif"/></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>
                                        n = Maximum controlled axes(The data for current controlled axes are valid.)<br/>
                                        K = Number of offset to be read
                                    </td>
                                </tr>
                            </table>                        
                        </content>
                    </item>
                    <item>
                        <name>zofsr</name>
                        <type>out</type>
                        <content>
                            <p>Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.</p>
<pre>
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  */
</pre>
                        </content>
                    </item>
                </vc>
            </hssb>
        </is>
    </argument>



    <errcode>
        <item>
            <name>EW_LENGTH</name>
            <content>Data block length error<br/>Size of IODBZOR structure(length) is wrong.</content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>Data number error<br/>Offset number(s_number, e_number) is wrong.</content>
        </item>
        <item>
            <name>EW_ATTRIB</name>
            <content>Data attribute error<br/>Axis number(axis) is wrong.</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">
                    <colgroup valign="top">
                    <tr>
                        <td>Work zero offset 48 sets</td>
                    </tr>
                    </colgroup>
                    </colgroup>
                </table>
                <br/>
                <li>Series 160/180/210, 160i/180i/210i, 0i</li>
                <table>
                    <colgroup valign="top">
                    <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>
                    </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>

        <add></add>
    </parameter>

    <is_parameter>
        <type>
            <ul>
                1013#3,#2,#1,#0
            </ul>
        </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>X</fs30i>
        </lc>
        <p>
            <fs16i>O</fs16i>
            <fs18i>O</fs18i>
        </p>
        <l>
            <fs16i>O</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>O</fs16i>
            <fs18i>O</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_wrzofs</name>
            <file>ncdata/cnc_wrzofs.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>
<pre>
The following program reads the work zero offset values of G54 through G59 for
all axes (number of axes = MAX_AXIS) and displays them.

#include "fwlib32.h"

short example( void )
{
    IODBZOR *zofsr ;
    short ret, idx1, idx2 ;
    zofsr = (IODBZOR *)malloc( 8+4*MAX_AXIS*6 ) ;
    ret = cnc_rdzofsr( h, 1, -1, 6, 8+4*MAX_AXIS*6, zofsr ) ;
    if ( !ret ) {
        for ( idx1 = 0 ; idx1 &#60; 6 ; idx1++ ) {
            printf( "G%d", idx1+54 ) ;
            for ( idx2 = 0 ; idx2 &#60; MAX_AXIS ; idx2++ )
                printf( "  %8ld", zofsr-&#62;data[idx1*MAX_AXIS+idx2] ) ;
            putchar( '\n' ) ;
        }
    }
    free( zofsr ) ;
    return ( ret ) ;
}
</pre>
        </vc>
    </example>



  </func>
</root>
