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


    <title>cnc_dtsvdownload</title>



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



    <doc>
        <cmn>
Orders the CNC to download the file from the DATA SERVER.<br/>
Therefore, normal termination of this function shows that downloading the file from the DATA SERVER has been started.<br/>
The result of downloading file must be got by <a href="Data/cnc_dtsvupdnstat.htm" target="_parent">cnc_dtsvupdnstat</a>.<br/>
<p/>
Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by <a href="Data/cnc_dtsvupdnstat.htm" target="_parent">cnc_dtsvupdnstat</a> after this function was finished.
            <p class="dd"><img src="Data/dtsv_dwn_dis.gif"/></p>
<ul>
            <p> * "Req." shows start request for download by this function.<br/>
                * "ret=" is the completion status when <a href="Data/cnc_dtsvupdnstat.htm" target="_parent">cnc_dtsvupdnstat</a> is done. </p>


</ul>
            <p class="dd">
                Throughout the prohibition term, the completion status of the following function is EW_BUSY.<br/>
                    <span class="dd"><a href="Program/cnc_dwnstart.htm" target="_parent">cnc_dwnstart</a></span><br/>
                    <span class="dd"><a href="Program/cnc_vrfstart.htm" target="_parent">cnc_vrfstart</a></span><br/>
                    <span class="dd"><a href="Program/cnc_dncstart.htm" target="_parent">cnc_dncstart</a></span><br/>
                    <span class="dd"><a href="Program/cnc_delete.htm" target="_parent">cnc_delete</a></span><br/>
                    <span class="dd"><a href="Program/cnc_delall.htm" target="_parent">cnc_delall</a></span><br/>
                    <span class="dd"><a href="Program/cnc_search.htm" target="_parent">cnc_search</a></span><br/>
                    <span class="dd">cnc_dtsvdownload</span><br/>
                    <span class="dd"><a href="Data/cnc_dtsvupload.htm" target="_parent">cnc_dtsvupload</a></span><br/>
                <br/>
                Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by <a href="Data/cnc_dtsvupdnstat.htm" target="_parent">cnc_dtsvupdnstat</a> when this function was executed successfully.
            </p>
        </cmn>
    </doc>



    <argument>
        <hssb>
            <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>
                <item>
                    <name>nc_file</name>
                    <type>in</type>
                    <content>
                        Specify the pointer to the file name in the DATA SERVER for download.<br/>
                        Specify as follows using ASCII code.
<p/>
                        <span class="dd"><![CDATA["O" + <4 figures> + "NULL"]]></span><br/>
                    </content>
                </item>
            </cmn>
        </hssb>
    </argument>



    <errcode>
        <item>
            <name>EW_BUSY</name>
            <content>
                Busy<br/>
                    <dt>- download/upload function has been executed on CNC side.  Try again.</dt>
                        <dd>(The unexecution of <a href="Data/cnc_dtsvupdnstat.htm" targeT="_parent">cnc_dtsvupdnstat</a> is included.)</dd>
                    <dt>- alarm(PS000, PS101) in CNC side (only Series 160/180, 160i/180i/210i, 0i)</dt>
                        <dd>Reset the alarm on CNC.</dd>
                    <dt>- I/O channel number of CNC doesn't indicate the DATA SERVER.</dt>
                        <dd>Set I/O channel number as the DATA SERVER.<br/>
                            <dd>* Series 150 </dd>
                            <span class="dd">Param.No.0020=14, 0022=14</span><br/>
                            <dd>* Series 160/180, 160i/180i/210i, 0i</dd>
                            <span class="dd">Param.No.0020=5</span></dd>
                    <dt>- background edit processing(Series 150/160/180, 160i/180i/210i, 0i) or MDI mode(Series 160/180, 160i/180i/210i, 0i) in CNC side</dt>
                        <dd>Terminate background edit processing or change mode to any mode except MDI in CNC side.</dd>
                        <dd>* In case of Series 150 and Param.No.2217#5 =0, EW_BUSY isn't returned and execution is delayed until B.G. edit is terminated.</dd>
            </content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>
                  File name(nc_file[]) is wrong.
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>

No option
<table>
<tr> <td valign="top">-</td> <td valign="top">The extended driver/library function is necessary.</td> </tr>
<tr> <td valign="top">-</td> <td valign="top">The DATA SERVER board(hardware) is necessary.</td> </tr>
</table>

<p/>
                CNC parameter error (only Series 160/180, 160i/180i/210i, 0i)
<table>
<tr> <td valign="top">-</td> <td valign="top"> Set param.No.0900#0 to 0.</td> </tr>
</table>
            </content>
        </item>

        <item>
            <name>EW_DTSRVR</name>
            <content>
                 DATA SERVER 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 details status will be set onto the member, err_no of ODBERR structure.
                <table class="dd">
                    <tr><td>1 <![CDATA[<-->]]>  498</td><td>:</td><td>DATA SERVER error</td></tr>
                    <tr><td>499</td><td>:</td> <td>DATA SERVER system error</td></tr>
                </table>
            </content>
        </item>
    </errcode>



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



    <parameter>
        <dtsv>
            <ul>
            <li>Series 150</li><br/>
                0020 = 14 (must be set)<br/>
                0022 = 14 (must be set)<br/>
                2217#5 (influenced by setting)
            </ul>
            <ul>
            <li>Series 160/180, 160i/180i/210i, 0i</li><br/>
                0020=5 (must be set)<br/>
                0900#0=0 (must be set)<br/>
            </ul>
        </dtsv>
    </parameter>



    <mode>
        <cmn>
            It is possible to use in other than MDI mode.
        </cmn>
    </mode>



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



    <reference>
        <item>
            <name>cnc_dtsvcnclupdn</name>
            <file>Data/cnc_dtsvcnclupdn.htm</file>
        </item>
        <item>
            <name>cnc_dtsvupdnstat</name>
            <file>Data/cnc_dtsvupdnstat.htm</file>
        </item>
    </reference>



  </func>
</root>
