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

<root>
  <func>


    <title>cnc_rdbtofsr</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdbtofsr(unsigned short FlibHndl, short s_number, short type, short e_number, short length, IODBBTO *btofsr);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Reads the tool offset value for B axis specified by "s_number", "e_number", "type". The offset value is stored in "IODBBTO" with signed binary format.</p>

            <p>The unit of offset value is the same as <a href="ncdata/cnc_rdtofs.htm" target="_parent">cnc_rdtofs</a> function. See the description of <a href="ncdata/cnc_rdtofs.htm" target="_parent">cnc_rdtofs</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>s_number</name>
                    <type>in</type>
                    <content>
                        <p>Specify the start tool offset number. The available number is 1,...,9.</p>
                        <p>'This number + aux. function number which can be got by <a href="ncdata/cnc_rdbtofsinfo.htm" target="_parent">cnc_rdbtofsinfo</a> function + 1' means the tool offset number for B axis which is used by NC command or display.</p>
                    </content>
                </item>
                <item>
                    <name>e_number</name>
                    <type>in</type>
                    <content>
                        <p>Specify the end tool offset number. The available number is 1,...,9.</p>
                    </content>
                </item>
                <item>
                    <name>type</name>
                    <type>in</type>
                    <content>
                        <p>Specify the tool offset type.(see the following table)</p>
                    </content>
                </item>
                <item>
                    <name>length</name>
                    <type>in</type>
                    <content>
                        <p>Specify the data block length.</p>

                        <p>The combinations of the value specified in "type", the data block length "length", the kind of offset value to be read and the member where the result is stored are as follows.</p>

                        <ul>
                            <li>Tool offset Memory A</li>
                            <table border="1" valign="top">
                                <colgroup width="10%">
                                <colgroup width="15%">
                                <colgroup width="10%">
                                <colgroup width="30%">
                                <colgroup width="35%">
                                <tr>
                                    <th>type</th>
                                    <th>length</th>
                                    <th>Attribute</th>
                                    <th>Offset type</th>
                                    <th>Member to be stored in</th>
                                </tr>
                                <tr>
                                    <td>0</td>
                                    <td>8+4*N</td>
                                    <td>individual</td>
                                    <td>Tool offset</td>
                                    <td>btofsr.ofs[i]</td>
                                </tr>
                                <tr>
                                    <td>-1</td>
                                    <td>8+4*N</td>
                                    <td>all</td>
                                    <td>Tool offset</td>
                                    <td>btofsr.ofs[i]</td>
                                </tr>
                                </colgroup>
                                </colgroup>
                                </colgroup>
                                </colgroup>
                                </colgroup>
                            </table>
                            <br/>
                            <li>Tool offset Memory B</li>
                            <table border="1" valign="top">
                                <colgroup width="10%">
                                <colgroup width="15%">
                                <colgroup width="10%">
                                <colgroup width="30%">
                                <colgroup width="35%">
                                <tr>
                                    <th>type</th>
                                    <th>length</th>
                                    <th>Attribute</th>
                                    <th>Offset type</th>
                                    <th>Member to be stored in</th>
                                </tr>
                                <tr>
                                    <td>0</td>
                                    <td>8+4*N</td>
                                    <td>individual</td>
                                    <td>Tool geometry offset</td>
                                    <td>btofsr.ofs[i]</td>
                                </tr>
                                <tr>
                                    <td>1</td>
                                    <td>8+4*N</td>
                                    <td>individual</td>
                                    <td>Tool wear offset</td>
                                    <td>btofsr.ofs[i]</td>
                                </tr>
                                <tr>
                                    <td rowspan="2">-2</td>
                                    <td rowspan="2">8+8*N</td>
                                    <td rowspan="2">all</td>
                                    <td>Tool geometry offset</td>
                                    <td>btofsr.ofs[8*i+0]</td>
                                </tr>
                                <tr>
                                    <td>Tool wear offset</td>
                                    <td>btofsr.ofs[8*i+4]</td>
                                </tr>
                                </colgroup>
                                </colgroup>
                                </colgroup>
                                </colgroup>
                                </colgroup>
                            </table>
                            <br/>
                             is number of offset to be read, i = 0,..,(N-1).
                        </ul>

                    </content>
                </item>
                <item>
                    <name>btofsr</name>
                    <type>out</type>
                    <content>
                        <p>Pointer to the IODBBTO structure including the tool offset value. The IODBBTO structure is as follows.</p>

<pre>
typedef struct iodbbto {
    short datano_s;             /* start offset number */
    short type;                 /* offset type */
    short datano_e;             /* end offset number */
    long  ofs[M];               /* offset value */
} IODBBTO ; /* M : M is number of the offset value.(Individual, Memory A all)
                   M is number of the offset value * 2.(Memory B all) */
</pre>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
            <name>EW_FUNC</name>
            <content>Unavailable<br/>This function cannot be used at M series.</content>
        </item>
        <item>
            <name>EW_LENGTH</name>
            <content>Data block length error<br/>Size of IODBBTO 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/>Offset type (type) is wrong.</content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>No option<br/>The B axis control option and the extended driver/library function are necessary.</content>
        </item>
        <add></add>
    </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 MODEL B, 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>

        <need>
            <p>The B axis control function is necessary.</p>
        </need>

        <type>
                <li>Series 160/180, 160i/180i/210i</li><br/>
                Tool geometry/wear compensation
        </type>
        <add></add>
    </option>



    <parameter>
        <type>
            <ul>
                <li>Series 160/180, 160i/180i/210i</li><br/>
                1004#1
            </ul>
        </type>
        <add></add>
    </parameter>



    <mode>
    </mode>



    <support>
        <m>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>X</fs16ia>
            <fs18ia>X</fs18ia>
            <fs21ia>X</fs21ia>
            <fs16ib>X</fs16ib>
            <fs18ib>X</fs18ib>
            <fs21ib>X</fs21ib>
            <fs30i>X</fs30i>
        </m>
        <t>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</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>X</fs30i>
        </t>
        <lc>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>X</fs16ia>
            <fs18ia>X</fs18ia>
            <fs21ia>X</fs21ia>
            <fs16ib>X</fs16ib>
            <fs18ib>X</fs18ib>
            <fs21ib>X</fs21ib>
            <fs30i>X</fs30i>
        </lc>
        <p>
            <fs16i>X</fs16i>
            <fs18i>X</fs18i>
        </p>
        <l>
            <fs16i>X</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>X</fs16i>
            <fs18i>X</fs18i>
        </w>
        <pw>
            <d>X</d>
            <h>X</h>
        </pw>
        <add><b></b></add>
    </support>



    <reference>
        <item>
            <name>cnc_wrbtofsr</name>
            <file>ncdata/cnc_wrbtofsr.htm</file>
        </item>
        <item>
            <name>cnc_rdbtofsinfo</name>
            <file>ncdata/cnc_rdbtofsinfo.htm</file>
        </item>
    </reference>



    <example>
    </example>



  </func>
</root>
