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

<root>
  <func>


    <title>cnc_wr1tlifedata</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_wr1tlifedata(unsigned short FlibHndl,IODBTD *tld1); </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>
                Writes the various tool information of the specified tool group and tool number.
                The following information can be modified.
            </p>
            <p>
            <ul type="disc">
                 <li>Tool number.</li>
                 <li>Tool length compensation number.</li>
                 <li>Cutter radius compensation number.</li>
                 <li>Tool information<br/></li>
                 <table border="0" class="dd">
                     <tr><td>1</td><td>:</td><td>This tool is registered(available).</td></tr>
                     <tr><td>2</td><td>:</td><td>This tool has expired.</td></tr>
                     <tr><td>3</td><td>:</td><td>This tool was skipped.</td></tr>
                 </table>
            </ul>
            </p>
            <p>This function is not available for T/TT system.</p>
             <span class="xis">
            <p>
                This function cannot be used with Series 150i or the "Tool life management B" function of Series 160i/180i and 300i,
                so use <a href="Toollife/cnc_wr1tlifedat2.htm" target="_parent">cnc_wr1tlifedat2</a> 
                function instead of cnc_wr1tlifedata function.
            </p>
             </span>
             <span class="ois">
            <p>
                This function cannot be used with the "Tool life management B" function,
                so use <a href="Toollife/cnc_wr1tlifedat2.htm" target="_parent">cnc_wr1tlifedat2</a> 
                function instead of cnc_wr1tlifedata function.
            </p>
             </span>
<!--
            <p>
                <br/>
                In case of calling this function with Series 300i, display calling and usual calling exist.<br/>
                It is usual calling that cnc_wr1tlifedata function calls direct, however display calling has to proceed as follows.<br/>
                <table border="0" class="dd">
                    <tr><td>1</td><td>.</td><td>First, it calls <a href="Handle/cnc_setlibopt.htm" target="_parent">cnc_setlibopt</a> function which sets the option kind to TLIFE_OPTION and sets the value to 1.</td></tr>
                    <tr><td>2</td><td>.</td><td>Next, it calls cnc_wr1tlifedata function.</td></tr>
                    <tr><td>3</td><td>.</td><td>Last, it calls <a href="Handle/cnc_setlibopt.htm" target="_parent">cnc_setlibopt</a> function which sets the option kind to TLIFE_OPTION and sets the value to 0.</td></tr>
                </table>
                <br/>
                In usual calling, if entire terms is as follows, return value becomes EW_REJECT(13).
                <ul type="disc">
                    <li>Automatic operation (OP=1)</li>
                    <li>Target tool group number is currently used or next using group.</li>
                    <li>TCO(6802#1)=0</li>
                </ul>
                <br/>
                In usual calling, if entire terms is as follows, tool status cannot clear.
                <ul type="disc">
                    <li>Automatic operation (OP=1)</li>
                    <li>Target tool group number is currently used or next using group.</li>
                    <li>Target tool number is currently used.</li>
                    <li>TCO(6802#1)=1</li>
                    <li>E17(6802#2)=2</li>
                </ul>
                <br/>
                In display calling, if terms is as follows, return value becomes EW_DATA(5).
                <ul type="disc">
                    <li>Automatic operation (OP=1) and TCI(6804#1)=0 for editing operation.</li>
                    <li>Automatic operation (OP=1) and TCI(6804#1)=1 for editing operation and tool group number is currently used or next using group.</li>
                </ul>
            </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>tld1</name>
                    <type>in</type>
                    <content>
                        <p>
                            Pointer to the IODBTD structure to set the various tool information.
                            The IODBTD structure is as follows.
<pre>
typedef struct iodbtd {
    short   datano;   /* Tool group number. */
    short   type;     /* Tool number(present). */
    long    tool_num; /* Tool number(update). */
    long    h_code;   /* Tool length compensation number. */
    long    d_code;   /* Cutter radius compensation number. */
    long    tool_inf; /* Tool information. */
} IODBTD ;
</pre>
                            <dl>
                                <dt>datano</dt>
                                <dd>Specify the tool group number.</dd>
                                <dt>type</dt>
                                <dd>Specify the present tool number to be updated.</dd>
                                <dt>tool_num</dt>
                                <dd>Specify the new tool number.</dd>
                                <dt>h_code</dt>
                                <dd>Specify the tool length compensation number.</dd>
                                <dt>d_code</dt>
                                <dd>Specify the cutter radius compensation number.</dd>
                                <dt>tool_inf</dt>
                                <dd>Specify the tool information.</dd>
                                <dd><table boder="0" class="dd">
                                    <tr><td>1</td><td>:</td><td>This tool is registered(available).</td></tr>
                                    <tr><td>2</td><td>:</td><td>This tool has expired.</td></tr>
                                    <tr><td>3</td><td>:</td><td>This tool was skipped.</td></tr>
                                </table></dd>
                            </dl>
                        </p>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item class="xis">
            <name>EW_FUNC</name>
            <content>
                Unavailable(only Series 160i/180i)<br/>
                The tool life management B option is used.<br/>
            </content>
        </item>
        <item>
           <name>EW_NUMBER</name>
            <content>
                data number error<br/>
                The specification of tool group number(datano) is wrong.
            </content>
        </item>
        <item>
           <name>EW_ATTRIB</name>
            <content>
                data attribute error<br/>
                The specification of the present tool number (type) is wrong.
            </content>
        </item>
        <item>
           <name>EW_DATA</name>
            <content>
                data error<br/>
                In order to get more information for this err_no return value,
                execute <a href="Misc/cnc_getdtailerr.htm" target="_parent">cnc_getdtailerr</a> function.
                The following detail status will be set onto the member, err_no of ODBERR structure.
                <table border="0">
                    <tr><td>0</td><td>:</td><td>Completion status other than EW_DATA</td></tr>
                    <tr><td>1</td><td>:</td><td>The new tool number(tool_num) error</td></tr>
                    <tr><td>2</td><td>:</td><td>Tool length compensation number(h_code)</td></tr>
                    <tr><td>3</td><td>:</td><td>Cutter compensation number(d_code) error</td></tr>
                    <tr><td>4</td><td>:</td><td>Tool information(tool_inf) error</td></tr>
                </table>
            </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>
        <item>
            <name>EW_REJECT</name>
            <content>
                CNC execution rejected<br/>
                Cannot write as the executing, selecting or buffering group.<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>
            The tool life management function.<br/>
        </need>
        <type>
            <li>Series 150<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) 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 with M 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 with M 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 with M 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 with M Series</td></tr>
        </table>
        </hssb>
        </is>
    </option>



    <parameter>
        <type>
            <ul type="disc">
                <li>Series 150<br/>
                    7400#0,#1 (influenced by setting)<br/>
                </li>
                <li>Series 160/180/210, 160i/180i/210i, 0i, 300i<br/>
                    6800#0,#1 (influenced by setting)<br/>
                </li>
            </ul>
        </type>
    </parameter>
    <!-- 300is -->
    <is_parameter>
        <type>
            <table>
                <tr><td> </td><td>6800#0,#1</td><td> </td><td>(influenced by setting)</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>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>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>X</fs16ia>
            <fs18ia>X</fs18ia>
            <fs21ia>X</fs21ia>
            <fs16ib>X</fs16ib>
            <fs18ib>X</fs18ib>
            <fs21ib>X</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>
        <!-- 300is -->
        <is>
            <m>
                <fs30is>O</fs30is>
            </m>
            <t>
                <fs30is>X</fs30is>
            </t>
        </is>
    </support>



    <reference>
        <item>
            <name>cnc_wr1tlifedat2</name>
            <file>Toollife/cnc_wr1tlifedat2.htm</file>
        </item>
    </reference>



    <example>
    </example>



  </func>
</root>
