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

<root>
  <func>


    <title>ds_wrncfile</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>
            FWLIBAPI short WINAPI ds_wrncfile(unsigned short FlibHndl, short type, long prog_no);
        </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            The NC program is outputted from the NC to the hard drive.<br/>
            <br/>
            <li>Storage mode :</li>
                <dd>To hard disk(or ATA) of DATA SERVER from CNC memory.</dd>
            <li>FTP mode :</li>
                <dd>To hard disk of PC from CNC memory.</dd><br/>
                The wild-card("*", "?") cannot be used to specify the name.
        </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>type</name>
                    <type>in</type>
                    <content>
                        <p>Specify the file type.</p>
                        <table border="0">
                            <tr> <td>0</td><td>: </td><td>The specified program number is output.</td> </tr>
                            <tr> <td>1</td><td>: </td><td>All programs in NC are output.         </td> </tr>
                        </table>
                        <p>* When type=1 is specified, program number (prog_no) is disregarded. And, the file name becomes "ALLPRG".</p>
                    </content>
                </item>
                <item>
                    <name>prog_no</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the pointer to the string where the file name which
                            wants to be outputted to the DATA SERVER is stored.
                            The file by which the specified number is assumed to be a file
                            name is made on the DATA SERVER.
                        </p>
                    </content>
                </item>
            </cmn>
        </hssb>
    </argument>



    <errcode>
        <item>
            <name>EW_RESET</name>
            <content>
                Reset request<br/>
                Process is canceled by [RESET].
            </content>
        </item>
        <item>
            <name>EW_BUSY</name>
            <content>
                Busy<br/>
                The CNC state is as follows.                                    
                <div class="dd">
                    <li>Alarm(PS000, PS101) in CNC side</li>
                    <li>I/O channel number(CNC parameter) is wrong.</li>
                    <li>Background edit processing in CNC side.</li>
                    <li>MDI program is editing or running in CNC side.</li>
                </div>
            </content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>Data number error<br/>
                The specified file has already been registered in the DATA SERVER.
            </content>
        </item>
        <item>
            <name>EW_ATTRIB</name>
            <content>
                Data attribute error<br/>
                The file type(type) is wrong.
            </content>
        </item>
        <item>
            <name>EW_DATA</name>
            <content>
                Data error<br/>
                The program is not registered.
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>No option</content>
        </item>
        <item>
            <name>EW_PROT</name>
            <content>
                Protection error<br/>
                The program is protected.
            </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/>
                Error occurred in DATA SERVER.
            </content>
        </item>
      <add></add>
    </errcode>



    <option>
        <hssb>
            The DATA SERVER function and the extended driver/library function are necessary.
        </hssb>
        <add></add>
    </option>



    <parameter>
        <type>
            <ul>
            <li>Series 160i/180i/210i</li>
                Parameter No.0020 = 5
            </ul>
        </type>
        <add></add>
    </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>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>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</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>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>
        <add><b></b></add>
    </support>



    <reference>
        <item>
            <name>ds_rdncfile</name>
            <file>Data/ds_rdncfile.htm</file>
        </item>
        <item>
            <name>ds_rdncfile2</name>
            <file>Data/ds_rdncfile2.htm</file>
        </item>
    </reference>



    <example>
    </example>



  </func>
</root>
