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

<root>
  <func>


    <title>cnc_rdtlgrp</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdtlgrp(unsigned short FlibHndl, long grp_no, short* num, IODBTLGRP *tlgrp); </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>
                Reads the tool group information. The following information can be acquired.
            </p>
            <ul>
                 <li>Number of tool</li>
                 <li>Number of free tool</li>
                 <li>Tool life value</li>
                 <li>Tool life counter</li>
                 <li>Selected tool use-order number</li>
                 <li>Optional tool group number</li>
                 <li>Rest counter</li>
                 <li>Status of rest signal</li>
                 <li>Type of tool life counter (0 : count, 1 : minute)</li>
            </ul>
            <p>
                The unit of the tool life value is either [minute] or [count]. 
                <span class="xis">The parameter LTM (Series150i:7400#3, Series160i/180i/210i, 0i, 300i:6800#2) determines which unit is used.</span>
                <span class="ois">The parameter LTM (300i:6800#2) determines which unit is used.</span>
            </p>
            <p>
                For M Series, it is possible to specify the tool life counter type (time or count) by G10 command to every tool group.
            </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>grp_no</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the starting group number.
                        </p>
                    </content>
                </item>
                <item>
                    <name>num</name>
                    <type>in/out</type>
                    <content>
                        <p>
                            Pointer to the number of groups to be read. Actual number of groups being read is stored after this function call.
                        </p>
                    </content>
                </item>
                <item>
                    <name>tlgrp</name>
                    <type>out</type>
                    <content>
                        <p>
                            Pointer to the array of the ODBTLGRP structure including the tool group information. 
                            The ODBTLGRP structure is as follows.
<pre>
typedef struct iodbtlgrp {
     long   ntool;       /* number of tool */
     long   nfree;       /* number of free tool */
     long   life;        /* tool life */
     long   count;       /* tool life counter */
     long   use_tool;    /* selected tool use-order number */
     long   opt_grpno;   /* optional tool group number */
     long   life_rest;   /* rest counter */
     short  rest_sig;    /* status of rest signal */
     short  count_type;  /* type of tool life counter */
} ODBTLGRP ;
</pre>
                            The following information are stored in "tlgrp" with binary format. 
                        <dl>
                            <dt>ntool</dt>
                            <dd>Number of tool</dd>
                            <dt>nfree</dt>
                            <dd>Number of free tool</dd>
                            <dt>life</dt>
                            <dd>Tool life value</dd>
                            <dt>count</dt>
                            <dd>Tool life counter</dd>
                            <dt>use_tool</dt>
                            <dd>Selected tool use-order number</dd>
                            <dt>opt_grpno</dt>
                            <dd>Optional tool group number     *Note1)</dd>
                            <dt>life_rest</dt>
                            <dd>Rest counter     *Note1)</dd>
                            <dt>rest_sig</dt>
                            <dd>Status of rest signal     *Note2)</dd>
                            <dd><table border="0" class="dd">
                                <tr><td>0</td><td>:</td><td>rest signal OFF</td></tr>
                                <tr><td>1</td><td>:</td><td>rest signal ON</td></tr>
                            </table></dd>
                            <dt>count_type</dt>
                            <dd>Tool life counter type</dd>
                            <dd><table border="0" class="dd">
                                <tr><td>0</td><td>:</td><td>count</td></tr>
                                <tr><td>1</td><td>:</td><td>minute</td></tr>
                            </table></dd>
                        </dl>
                        <span class="xis">
                        <table  border="2" bordercolorlight="Black" bordercolordark="Black">
                            <tr><td>
                                Note1)   It is <b>-1</b> when Series 150i and without the tool life management B function in Series 160i/180i and 300i.<br/>
                                Note2)   It is <b>0</b> when Series 150i and without the tool life management B function in Series 160i/180i and 300i. 
                            </td></tr>
                        </table>
                        </span>
                        <span class="ois">
                        <table  border="2" bordercolorlight="Black" bordercolordark="Black">
                            <tr><td>
                                Note1)   It is <b>-1</b> when without the tool life management B function.<br/>
                                Note2)   It is <b>0</b> when without the tool life management B function.
                            </td></tr>
                        </table>
                        </span>
                        </p>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
            <name>EW_LENGTH</name>
            <content>
                Data block length error<br/>
                The number of tool groups (*num) is 0 or less.<br/>
            </content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>
                Data number error<br/>
                The specification of tool group number (grp_no) is wrong.<br/>
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>
                No option<br/>
                The tool life management function and the extended driver/library function are necessary.<br/>
            </content>
        </item>
    </errcode>



    <option>
        <hssb>
            <p>The extended driver/library function are 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>
            <li>Series 150i, 160/180/210/210i, 0i, 300i</li>
                The tool life management function.<br/>
            <li>Series 160i/180i</li>
                The tool life management function or the tool life management B function.
        </need>
        <type>
            <li>Series 150i<br/>
                <p>This function is influenced by 1024/512 pairs of the tool life management.</p>
            </li>
            <li>Series 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 150i</li>
                    7400#0,#1,#3
                <li>Series 160i/180i/210i, 0i</li>
                    6800#0,#1,#2<br/>
                    6802#5 (Optional group number)<br/>
                <li>Series 300i<br/>
                    6800#0,#1,#2<br/>
                    6805#4 (Tool life management B)<br/>
                    6802#5 (Optional group number)<br/>
                </li>
            </ul>
        </type>
    </parameter>
    <!-- 300is -->
    <is_parameter>
        <type>
            <table>
                <tr><td> </td><td>6800#0,#1,#2</td><td> </td><td></td></tr>
                <tr><td> </td><td>6805#4</td><td> </td><td>(Tool life management B)</td></tr>
                <tr><td> </td><td>6802#5</td><td> </td><td>(Optional group number)</td></tr>
            </table>
        </type>
    </is_parameter>



    <mode></mode>
    <!-- 300is -->
    <is_mode></is_mode>



    <support>
        <m>
            <fs0ia>X</fs0ia>
            <fs0ib>E</fs0ib>
            <fs15>X</fs15>
            <fs15i>E</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>E</fs16ia>
            <fs18ia>E</fs18ia>
            <fs21ia>E</fs21ia>
            <fs16ib>E</fs16ib>
            <fs18ib>E</fs18ib>
            <fs21ib>E</fs21ib>
            <fs30i>O</fs30i>
        </m>
        <t>
            <fs0ia>X</fs0ia>
            <fs0ib>E</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>E</fs16ia>
            <fs18ia>E</fs18ia>
            <fs21ia>E</fs21ia>
            <fs16ib>E</fs16ib>
            <fs18ib>E</fs18ib>
            <fs21ib>E</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>
