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

<root>
  <func>


    <title>cnc_rdlife</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdlife(unsigned short FlibHndl, short number,ODBTLIFE3 *life); </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Reads the tool life value of the specified tool group.</p>
            <p>
                The unit of the tool life value is either [minute] or [count].
                The parameter LTM(Series 150/150i:7400#3, Series 160/180/210, 160i/180i/210i, 0i, 300i:6800#2)
                determines which unit is used.
                For M Series, it is possible to specify the tool life counter type
                (time or count) by G10 command to every tool group.
                Reads the tool life value of the specified tool group. 
            </p>
        </cmn>

        <is>
        <cmn>
            <p>Reads the tool life value of the specified tool group.</p>
            <p>
                The unit of the tool life value is either [minute] or [count].
                The parameter LTM(6800#2) determines which unit is used.
                For M Series, it is possible to specify the tool life counter type
                (time or count) by G10 command to every tool group.
                Reads the tool life value of the specified tool group. 
            </p>
        </cmn>
        </is>
    </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>number</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the tool group number.
                        </p>
                    </content>
                </item>
                <item>
                    <name>life</name>
                    <type>out</type>
                    <content>
                        <p>
                            Pointer to the ODBTLIFE3 structure including the tool life value.   
                            The ODBTLIFE3 structure is as follows.
<pre>
typedef struct odbtlife3 {
    short  datano ;            /* Tool group number. */
    short  dummy ;             /* Not used. */
    long  data ;               /* Tool life value. */
} ODBTLIFE3 ;
</pre>
                            The tool life value of the specified tool group is stored in
                            "life.data" with binary format.
                            The tool life value of the currently used tool group number is stored
                            by specifying <b>0</b> in "number". However, in case that any tool group
                            number has never be specified since power-on, <b>0</b> is stored.
                        </p>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
           <name>EW_NUMBER</name>
            <content>
                data number error<br/>
                The specification of tool group number(number) is wrong.
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>
                no option<br/>
                The tool life management function and the extended driver/library function are necessary.
            </content>
        </item>
    </errcode>



    <option>
        <hssb>
            <p>The extended driver/library function is necessary.</p>
        </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>
        <need>
            <p>
                The tool life management function is necessary.
            </p>
        </need>
        <type>
            <li>Series 150,150i<br/>
                <p>This function is influenced by 1024/512 pairs of the tool life management.</p>
            </li>
            <li>Series 160/180/210, 160i/180i/210i, 0i<br/>
                <p>This function is influenced by 512(M Series)/128(T Series) pairs of the tool life management.</p>
            </li>
            <li>Series 300i<br/>
                <p>This function is influenced by additional pairs number of the tool life management.</p>
                <table>
                    <tr> <td>the tool life management</td>        <td>:</td><td>256 pairs of the tool life management on whole system, both of M and T Series</td></tr>
                    <tr> <td>additional pairs number of the tool life management</td><td>:</td><td>1024 pairs of the tool life management on whole system, both of M and T Series</td></tr>
                </table>
            </li>
        </type>

        <is>
        <hssb>
              <p>The tool life management function and the extended driver/library function are necessary.</p>
              <p>And this function is influenced by additional pairs number of the tool life management.</p>
              <table>
                  <tr> <td>the tool life management</td><td>:</td>
                       <td>256 pairs of the tool life management on whole system, both of M and T Series</td></tr>
                  <tr> <td>additional pairs number of the tool life management</td><td>:</td>
                       <td>1024 pairs of the tool life management on whole system, both of M and T Series</td></tr>
              </table>
        </hssb>
      </is>
    </option>



    <parameter>
        <type>
            <ul type="disc">
                <li>Series 150, 150i<br/>
                    7400#0,#1,#3 (influenced by setting)<br/>
                </li>
                <li>Series 160/180/210, 160i/180i/210i, 0i<br/>
                    6800#0,#1,#2 (influenced by setting)<br/>
                </li>
                <li>Series 300i<br/>
                    6800#0,#1,#2 (influenced by setting)<br/>
                    6805#4 (Tool life management B)<br/>
                </li>
            </ul>
        </type>
    </parameter>
    <!-- 300is -->
    <is_parameter>
        <type>
            <table>
                <tr><td> </td><td>6800#0,#1,#2</td><td> </td><td>(influenced by setting)</td></tr>
                <tr><td> </td><td>6805#4</td><td> </td><td>(Tool life management B)</td></tr>
            </table>
        </type>
    </is_parameter>



    <mode></mode>
    <!-- 300is -->
    <is_mode></is_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>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>
        <!-- 300is -->
        <is>
            <m>
                <fs30is>O</fs30is>
            </m>
            <t>
                <fs30is>O</fs30is>
            </t>
        </is>
    </support>



    <reference>
    </reference>



    <example>
    </example>



  </func>
</root>
