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

<root>
  <func>
    <title>cnc_dwnend4</title>


    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_dwnend4(unsigned short FlibHndl);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>
                Notifies the end of downloading NC data to CNC.<br/>
                (This function must be executed after <a href="Program/cnc_download4.htm" target="_parent">cnc_download4</a>.)
            </p>
            <p>
                There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution of downloading NC 
                program are returned by this function.
            </p>
            <p>
                Further, this function does not return until the registration of the
                output data by <a href="Program/cnc_download4.htm" target="_parent">cnc_download4</a> is completed.
            </p>
        </cmn>
    </doc>



    <argument>
        <common>
            <cmn>
                <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>
            </cmn>
        </common>
    </argument>



    <errcode>
        <item>
            <name>EW_FUNC</name>
            <content>
                <a href="Program/cnc_dwnstart4.htm" target="_parent">cnc_dwnstart4</a> function has not been executed.
            </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.<br/>
                The following detail status will be set onto the member, err_no of ODBERR structure.
                <table>
                    <colgroup align="center" valign="top">
                    <colgroup align="center" valign="top">
                    <colgroup valign="top">
                    <tr>
                        <td>1</td><td>:</td><td>A character which is unavailable for NC program is detected.</td>
                    </tr>
                    <tr>
                        <td>2</td><td>:</td><td>When TV check is effective, a block which includes odd number of
                                                characters(including 'LF' at the end of the block) is detected.</td>
                    </tr>
                    <tr>
                        <td>3</td><td>:</td><td>The registered program count is full.</td>
                    </tr>
                    <tr>
                        <td>4</td><td>:</td><td>The same program number has already been registered.</td>
                    </tr>
                    <tr>
                        <td>5</td><td>:</td><td>The same program number is selected on CNC.</td>
                    </tr>
                    </colgroup>
                    </colgroup>
                    </colgroup>
                </table>
                See <a href="#disc">Description</a> about the timing of error.
            </content>
        </item>
        <item>
            <name>EW_PROT</name>
            <content>
                Write protected on CNC side<br/>
                Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).<br/>
                See <a href="#disc">Description</a> about the timing of error.
            </content>
        </item>
        <item>
            <name>EW_OVRFLOW</name>
            <content>
                Memory overflow<br/>
                CNC tape memory shorts for the registration.<br/>
                Make enough free area in CNC memory.<br/>
                See <a href="#disc">Description</a> about the timing of error.
            </content>
        </item>
        <item>
            <name>EW_REJECT</name>
            <content>
                CNC execution denied<br/>
                Downloading is disable in the current CNC status.<br/>
                (Machining, resetting, mode changing)<br/>
                See <a href="#disc">Description</a> about the timing of error.
            </content>
        </item>
        <item>
            <name>EW_ALARM</name>
            <content>
                Alarm state<br/>
                Alarm has occurred while downloading.<br/>
                See <a href="#disc">Description</a> about the timing of error.
            </content>
        </item>
    </errcode>



    <option>
        <hssb>The extended driver/library function is necessary.</hssb>
        <type>
            Pitch error compensation<br/>
            Custom macro<br/>
            Work zero offset
        </type>
    </option>



    <parameter>
        <type>
            <ul>
                0000#0<br/>
                3201#2,#5,#6<br/>
                3202#0,#4<br/>
                3204#3,#4<br/>
                3210,3211
                8900#0
            </ul>
        </type>
    </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>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>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>
        <is>
            <!-- M -->
            <m>
                <fs30is>O</fs30is>
            </m>
            <!-- T -->
            <t>
                <fs30is>O</fs30is>
            </t>
        </is>
    </support>



    <reference>
        <item>
            <name>cnc_dwnstart4</name>
            <file>Program/cnc_dwnstart4.htm</file>
        </item>
        <item>
            <name>cnc_download4</name>
            <file>Program/cnc_download4.htm</file>
        </item>
    </reference>



    <example>
        <common>
            See the example of <a href="Program/cnc_download4.htm#sample" target="_parent">cnc_download4</a>.
        </common>
    </example>



  </func>
</root>
