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

<root>
  <func>


    <title>cnc_rdgrpinfo4</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdgrpinfo4(unsigned short FlibHndl,short grp_no, short direction, short num_to_read,short *num_read, IODBTGI4 *grpinfo4); </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>
                Reads the tool group information 4. The following information can be acquired.
            </p>
             <ul type="disc">
                 <li>Numbers of tool</li>
                 <li>Tool life value</li>
                 <li>Tool life counter</li>
                 <li>Tool life counter type</li>
                    <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>
                 <li>Optional group number</li>
                 <li>Rest counter</li>
             </ul>
             <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.
             </p>
             <p>
                In case of M system, if tool life management B option(In case of 300i/310i/320i:Parameter No.6805#4) is used, the
                optional group number and the rest counter is also acquired.
                When the tool life management B is not used or the system is T, the 0
                is set for the optional group number and the rest counter.
             </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 read start tool group number.
                            When the value of outside of the range to the tool group number
                            is specified, EW_NUMBER error occurs.
                            In case of range of the tool group number, the read is started
                            from a group which is the nearest from the specified group number.
                        </p>
                    </content>
                </item>
                <item>
                    <name>direction</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the search direction.
                            The direction of the search specifies whether to read in the
                            ascending order or the descending order based on the number specified by  grp_no.
                            <table border="0" class="dd">
                                <tr><td>0</td><td>:</td><td>Ascending order (direction where tool group number increases)</td></tr>
                                <tr><td>1</td><td>:</td><td>Descending order (direction where tool group number decreases)</td></tr>
                            </table>
                        </p>
                    </content>
                </item>
                <item>
                    <name>num_to_read</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the number which wants to read.
                            When the value of 0 or less was specified, EW_LENGTH error occurs.
                        </p>
                    </content>
                </item>
                <item>
                    <name>num_read</name>
                    <type>out</type>
                    <content>
                        <p>
                            Specify the pointer to the variable to store the number
                            actually read.
                            If the group which registered is not found when the tool group
                            was searched according to the specified direction, the 0 is set
                            as the result.
                        </p>
                    </content>
                </item>
                <item>
                    <name>grpinfo4</name>
                    <type>out</type>
                    <content>
                        <p>
                            the pointer to the array of IODBTGI4 structure which returns the tool group information.
                            The IODBTGI4 structure is as follows.
<pre>
typedef struct iodbtgi4 {
    short   grp_no;
    long    n_tool;
    long    count_value;
    long    counter;
    long    count_type;
    long    opt_grpno;
    long    life_rest;
} IODBTGI4; 
</pre>
                            The following information can be acquired.
                        <dl>
                            <dt>grp_no</dt>
                            <dd>Tool group number</dd>
                            <dt>n_tool</dt>
                            <dd>Numbers of tool</dd>
                            <dt>count_value</dt>
                            <dd>Tool life value</dd>
                            <dt>counter</dt>
                            <dd>Tool life counter</dd>
                            <dt>count_type</dt>
                            <dd>Tool life counter type</dd>
                            <dt>opt_grpno</dt>
                            <dd>Optional group number</dd>
                            <dt>life_rest</dt>
                            <dd>Rest counter</dd>
                        </dl>
                        <p>&lt;Note&gt;<br/>
                            Prepare the arrays of the number or more specified by num_to_read.
                            When the array number is less than the specified number,
                            the operation of this function is not guaranteed.
                        </p>
                        </p>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
           <name>EW_LENGTH</name>
            <content>
                Data block length error<br/>
                The value of 0 or less was specified for read number(num_to_read).
            </content>
        </item>
        <item>
           <name>EW_NUMBER</name>
            <content>
                Data number error<br/>
                Tool group number(grp_no) is wrong.
            </content>
        </item>
        <item>
           <name>EW_ATTRIB</name>
            <content>
                Data attribute error<br/>
                Search direction(direction) 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.<br/>
            </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>
            <li>Series 160i/180i/210i<br/>
                <p>The tool life management function or the tool life management B function.</p>
            </li>
            <li>Series 300i/310i/320i<br/>
                <p>The tool life management function.</p>
            </li>
        </need>
        <type>
            <li>Series 160i/180i/210i<br/>
                <p>This function is influenced by 512(M Series)/128(T Series) pairs of the tool life management.</p>
            </li>
            <li>Series 300i/310i/320i<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 160i/180i/210i</li>
                    6800#0,#1,#2 (influenced by setting)<br/>
                    6802#5 (Optional group number)<br/>
                    6802#3 (Rest counter)<br/>
                <li>Series 300i<br/>
                    6800#0,#1,#2 (influenced by setting)<br/>
                    6805#4 (Tool life management B)<br/>
                    6802#5 (Optional group number)<br/>
                    6802#3 (Rest counter)<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>
                <tr><td> </td><td>6802#5</td><td> </td><td>(Optional group number)</td></tr>
                <tr><td> </td><td>6802#3</td><td> </td><td>(Rest counter)</td></tr>
            </table>
        </type>
    </is_parameter>



    <mode></mode>
    <!-- 300is -->
    <is_mode></is_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>H</fs16ia>
            <fs18ia>H</fs18ia>
            <fs21ia>H</fs21ia>
            <fs16ib>H</fs16ib>
            <fs18ib>H</fs18ib>
            <fs21ib>H</fs21ib>
            <fs30i>O</fs30i>
        </m>
        <t>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>H</fs16ia>
            <fs18ia>H</fs18ia>
            <fs21ia>X</fs21ia>
            <fs16ib>H</fs16ib>
            <fs18ib>H</fs18ib>
            <fs21ib>H</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>
