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

<root>
  <func>


    <title>ds_dwnstart</title>



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



    <doc>
        <cmn>
            Requests CNC to start downloading.<br/>
            (This function must be executed before <a href="Data/ds_download.htm" target="_parent">ds_download</a>)<br/>
            This function is only for "Fast Ethernet board". This function is not supported at "Embedded Ethernet" and "Ethernet board".
        </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>
                <item>
                    <name>dtsv_file</name>
                    <type>in</type>
                    <content>
                        Specify the pointer to the file name in the DATA SERVER.<br/>
                        The specification of the file name of the DATA SERVER is as follows:


                    <ul>
                            <li>Use ASCII code.</li>
                            <li>The last character of the file name must be 'NULL'.</li>
                            <li>It is impossible to specify the path.</li>
                                (The file is made in the directory "\NCDATA" of the DATA SERVER)
                            <li>The wild-card('*','?') can be used.</li>
                            <li>Specify the MS-DOS form.</li>
                                (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)
                            <p class="dd"><![CDATA[<ex.>]]>      "XXXXXXXX.XXX" + NULL</p>
                                However, the "O" number is managed as a file name now.
                            <p class="dd"><![CDATA[<ex.>]]>      "O0001" + NULL</p>
                        </ul>
                    </content>
                </item>
                <item>
                    <name>user</name>
                    <type>in</type>
                    <content>
                        Specify the Task channel of the DATA SERVER.(11-17)<br/>
                        DATA SERVER has 8 Task channels.<br/>
                        The channel that a parsonal computer uses for transferring a file is specified by this "user".<br/>
                        Available number is from 11 to 17.<br/>
                        <br/>

                        DATA SERVER can give 8 services for each user(NC, Personal computer, PMC, C-EXE).<br/>
                        In order to decide which channel each user uses, it is necessary that NC parameters(No.941-948) are set with user's number as follows.<br/>
                        <br/>

                        <li>User's number</li>
                        <table class="dd">
                            <tr><td>0</td><td>:</td><td>Invalid</td></tr>
                            <tr><td>1</td><td>:</td><td>1'st path of CNC</td></tr>
                            <tr><td>2</td><td>:</td><td>2'nd path of CNC</td></tr>
                            <tr><td>3</td><td>:</td><td>3'rd path of CNC</td></tr>
                            <tr><td>4</td><td>:</td><td>4'th path of CNC</td></tr>
                            <tr><td>5</td><td>:</td><td>5'th path of CNC</td></tr>
                            <tr><td>6</td><td>:</td><td>6'th path of CNC</td></tr>
                            <tr><td>7</td><td>:</td><td>7'th path of CNC</td></tr>
                            <tr><td>8</td><td>:</td><td>8'th path of CNC</td></tr>
                        </table>
                        <br/>
                        <table class="dd">
                            <tr><td>11</td><td>:</td><td>Open CNC No.1</td></tr>
                            <tr><td>12</td><td>:</td><td>Open CNC No.2</td></tr>
                            <tr><td>13</td><td>:</td><td>Open CNC No.3</td></tr>
                            <tr><td>14</td><td>:</td><td>Open CNC No.4</td></tr>
                            <tr><td>15</td><td>:</td><td>Open CNC No.5</td></tr>
                            <tr><td>16</td><td>:</td><td>Open CNC No.6</td></tr>
                            <tr><td>17</td><td>:</td><td>Open CNC No.7</td></tr>
                        </table>
                        <br/>
                        <table class="dd">
                            <tr><td>21</td><td>:</td><td>PMC</td></tr>
                            <tr><td>31</td><td>:</td><td>C-EXE</td></tr>
                        </table>
                        <br/>
                        <li>CNC parameters</li>
                        <table class="dd">
                            <tr><td>NO.941</td><td>:</td><td>For channel No.1</td></tr>
                            <tr><td>NO.942</td><td>:</td><td>For channel No.2</td></tr>
                            <tr><td>NO.943</td><td>:</td><td>For channel No.3</td></tr>
                            <tr><td>NO.944</td><td>:</td><td>For channel No.4</td></tr>
                            <tr><td>NO.945</td><td>:</td><td>For channel No.5</td></tr>
                            <tr><td>NO.946</td><td>:</td><td>For channel No.6</td></tr>
                            <tr><td>NO.947</td><td>:</td><td>For channel No.7</td></tr>
                            <tr><td>NO.948</td><td>:</td><td>For channel No.8</td></tr>
                        </table>
                        <br/>
                         NC patameters(No.941-948) must be set before using this function(If these parameters are all invalid, CNC No.1 uses channel No.1).<br/>
                        <br/>
                        When you set this parameter for Open CNC user(11-17), it is necessary to specify the channel of each path which CNC uses.<br/>
                When the user number is not set, the operation between CNC and the DATA SERVER cannot be done.<br/>
                        <li>Example</li>
                        <table class="dd">
                            <tr><td>1'st channel(No.941)</td><td>:</td><td>1 (1st path for CNC))</td></tr>
                            <tr><td>2'nd channel(No.942)</td><td>:</td><td>2 (2nd path for CNC)</td></tr>
                            <tr><td>3'rd channel(No.943)</td><td>:</td><td>11(Open CNC No.1)</td></tr>
                            <tr><td>4'th channel(No.944)</td><td>:</td><td>12(Open CNC No.2)</td></tr>
                        </table>
                    </content>
                </item>
            </cmn>
        </common>
    </argument>



    <errcode>
       <item>
            <name>EW_BUSY</name>
            <content>
                <a href="Data/ds_dwnstart.htm" target="_parent">ds_dwnstart</a> function has been executed.<br/>
                Terminate a downloading by using <a href="Data/ds_dwnend.htm" target="_parent">ds_dwnend</a> function.
            </content>
        </item>
        <item>
            <name>EW_PARAM</name>
            <content>
                Task channel setting error in NC parameter

<table>
<tr> <td valign="top">-</td> <td valign="top">Setting user's number 11-17 for Open CNC to NC parameters(No.941-948) is necessary.</td> </tr>
</table>
            </content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>
                Task channel setting error in this function
                 <table>
                   <tr> <td valign="top">-</td> <td valign="top">Setting user's number 11-17 for Open CNC to argument"chnl" is necessary.</td> </tr>
                 </table>
            </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(10BASE-T) is necessary.</td> </tr>
                  <tr> <td valign="top">-</td> <td valign="top">Hard disk is necessary on the DATA SERVER board.</td> </tr>
                </table>
            </content>
        </item>
        <item>
            <name>EW_REJECT</name>
            <content>CNC execution rejection<br/>
                     The DATA SERVER is doing another processing.
            </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.<br/>
                The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
                <table class="dd">
                    <tr><td>0xf000, 0xfe00-</td><td>:</td><td>Error code from DATA SERVER</td></tr>
                    <tr><td>1</td>              <td>:</td><td>Time out in DATA SERVER's operation</td></tr>
                </table>
            </content>
        </item>
    </errcode>



    <option>
        <ethr>
              <p>The ethernet function and the DATA SERVER function are necessary.</p>
        </ethr>
    </option>



    <parameter>
    </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>E</fs16ia>
            <fs18ia>E</fs18ia>
            <fs21ia>E</fs21ia>
            <fs16ib>E</fs16ib>
            <fs18ib>E</fs18ib>
            <fs21ib>E</fs21ib>
            <fs30i>X</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>E</fs16ia>
            <fs18ia>E</fs18ia>
            <fs21ia>E</fs21ia>
            <fs16ib>E</fs16ib>
            <fs18ib>E</fs18ib>
            <fs21ib>E</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>
    </support>



    <reference>
        <item>
            <name>ds_download</name>
            <file>Data/ds_download.htm</file>
        </item>
        <item>
            <name>ds_dwnend</name>
            <file>Data/ds_dwnend.htm</file>
        </item>
    </reference>



  </func>
</root>
