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

<root>
  <func>
    <title>cnc_cdownload</title>


    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_cdownload(unsigned short FlibHndl,char *data, short number);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Outputs NC program to be registered(downloading).</p>
            <p>
                When the data processing on the CNC side is delayed and the next data
                cannot be transferred, error(EW_BUFFER) is returned.<br/>
                If an application will wait the data transferring,
                use the <a href="Program/cnc_download.htm" target="_parent">cnc_download</a> function.
            </p>
            <p>
                Except the above-mentioned difference, function is the same as
                "Download NC program(<a href="Program/cnc_download.htm" target="_parent">cnc_download</a>)",
                so refer to <a href="Program/cnc_download.htm" target="_parent">cnc_download</a>
            </p>
        </cmn>
    </doc>



    <argument>
        <hssb>
            <cmn>
                <item>
                    <name>FlibHndl</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the library handle.<br/>
                            See "<a href="handle.htm" target="_parent">Library handle</a>" for details.
                        </p>
                    </content>
                </item>
                <item>
                    <name>data</name>
                    <type>in</type>
                    <content>
                        <p>Specify the top address of NC program data.</p>
                    </content>
                </item>
                <item>
                    <name>number</name>
                    <type>in</type>
                    <content>
                        <p>Specify the number of characters of NC program data. (1 - 256)</p>
                    </content>
                </item>
            </cmn>
        </hssb>
    </argument>



    <errcode>
        <item>
            <name>EW_RESET</name>
            <content>
                Reset or stop request<br/>
                CNC required to stop downloading.<br/>
                'RESET or STOP' was pushed.(Series 150,150i)<br/>
                Call the <a href="Program/cnc_dwnend.htm" target="_parent">cnc_dwnend</a> function.
            </content>
        </item>
        <item>
            <name>EW_FUNC</name>
            <content>
                <a href="Program/cnc_dwnstart.htm" target="_parent">cnc_dwnstart</a> function has not been executed.
            </content>
        </item>
        <item>
            <name>EW_LENGTH</name>
            <content>
                Data block length error<br/>
                Length of data block(number) exceeds 256 bytes.
            </content>
        </item>
        <item>
            <name>EW_DATA</name>
            <content>
                Data error<br/>
                <li>The same program number has already been registered.</li>
                <li>The same program number is selected on CNC.</li>
                <li>A character which is unavailable for NC program is detected.</li>
                <li>When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.</li>
                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_BUFFER</name>
            <content>
                Buffer full<br/>
                Retry because the buffer is full.<br/>
            </content>
        </item>
    </errcode>



    <option>
        <hssb>
            <p>The extended driver/library function is necessary.</p>
        </hssb>
    </option>



    <parameter>
        <type>
            <li>Series 150,150i</li>
                <ul>
                    0020=16(EDIT mode) (must be set)<br/>
                    0022=16(except EDIT mode) (must be set)<br/>
                    0000#0 (influenced by setting)<br/>
                    2200#1,#3,#4 (influenced by setting)<br/>
                    0011#0,2201#0 (influenced by setting)<br/>
                    2210,2211,2212,2213
                </ul>
            
            <li>Series 160/180/210, 160i/180i/210i, 0i, 300i</li>
                <ul>
                    0000#0 (influenced by setting)<br/>
                    3201#2,#5,#6 (influenced by setting)<br/>
                    3202#0,#4 (influenced by setting)<br/>
                    3210,3211 (influenced by setting)<br/>
                    3290#7 (influenced by setting)
                </ul>
            <li> 160i/180i-W, Power Mate i</li>
                <ul>
                    0000#0 (influenced by setting)<br/>
                    3201#2,#5,#6 (influenced by setting)<br/>
                    3202#0,#4 (influenced by setting)<br/>
                    3290#7 (influenced by setting)
                </ul>
        </type>
    </parameter>



    <mode>
        <cmn>
            <li>Series 150/150i It is possible to use in any CNC mode.</li>
            <span class="dd">(It is necessary to set the parameter according to the mode)</span><br/>
            <br/>
            <li>Series 160i/180i/210i, 160/180/210, 0i, 300i, Power Mate i</li>
            <span class="dd">It is possible to use in other than MDI mode.</span><br/>
        </cmn>
    </mode>



    <support>
        <m>
            <fs0ia>H</fs0ia>
            <fs0ib>H</fs0ib>
            <fs15>H</fs15>
            <fs15i>H</fs15i>
            <fs16>H</fs16>
            <fs18>H</fs18>
            <fs21>H</fs21>
            <fs16ia>H</fs16ia>
            <fs18ia>H</fs18ia>
            <fs21ia>H</fs21ia>
            <fs16ib>H</fs16ib>
            <fs18ib>H</fs18ib>
            <fs21ib>H</fs21ib>
            <fs30i>H</fs30i>
        </m>
        <t>
            <fs0ia>H</fs0ia>
            <fs0ib>H</fs0ib>
            <fs15>H</fs15>
            <fs15i>X</fs15i>
            <fs16>H</fs16>
            <fs18>H</fs18>
            <fs21>H</fs21>
            <fs16ia>H</fs16ia>
            <fs18ia>H</fs18ia>
            <fs21ia>H</fs21ia>
            <fs16ib>H</fs16ib>
            <fs18ib>H</fs18ib>
            <fs21ib>H</fs21ib>
            <fs30i>H</fs30i>
        </t>
        <lc>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>H</fs16>
            <fs18>H</fs18>
            <fs21>H</fs21>
            <fs16ia>H</fs16ia>
            <fs18ia>H</fs18ia>
            <fs21ia>H</fs21ia>
            <fs16ib>H</fs16ib>
            <fs18ib>H</fs18ib>
            <fs21ib>H</fs21ib>
            <fs30i>X</fs30i>
        </lc>
        <p>
            <fs16i>H</fs16i>
            <fs18i>H</fs18i>
        </p>
        <l>
            <fs16i>H</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>H</fs16i>
            <fs18i>H</fs18i>
        </w>
        <pw>
            <d>H</d>
            <h>H</h>
        </pw>
    </support>



    <reference>
        <item>
            <name>cnc_dwnstart</name>
            <file>Program/cnc_dwnstart.htm</file>
        </item>
        <item>
            <name>cnc_download</name>
            <file>Program/cnc_download.htm</file>
        </item>
        <item>
            <name>cnc_dwnend</name>
            <file>Program/cnc_dwnend.htm</file>
        </item>
    </reference>



    <example></example>



  </func>
</root>
