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

<root>
  <func>
    <title>cnc_wrmdiprog</title>


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



    <doc>
        <cmn>
            <p>Outputs NC program for MDI operation to CNC.</p>
            <p>
                <li>HSSB</li>
                    <dd>Refer description of <a href="Program/cnc_dnc.htm" target="_parent">cnc_dnc</a> function for the format of output data.</dd>
                <br/>
                <li>Ethernet</li>
                    <dd>Refer description of <a href="Program/cnc_download3.htm" target="_parent">cnc_download3</a> function for the format of output data.</dd>
            </p>
        </cmn>
        <is>
            <p>Outputs NC program for MDI operation to CNC.</p>
            <p>
                Refer description of <a href="Program/cnc_download3.htm" target="_parent">cnc_download3</a>
                function for the format of output data.
            </p>
        </is>
    </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>length</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the number of characters of NC program to be written.<br/>
                            <table class="dd">
                                <colgroup valign="top" width="75%">
                                <colgroup valign="top" width="25%">
                                <tr>
                                    <td>Series 150</td>
                                    <td>1 ,.., 199</td>
                                </tr>
                                <tr>
                                    <td>Series 150i</td>
                                    <td>1 ,.., 255</td>
                                </tr>
                                <tr>
                                    <td>Series 160/180/210, 160i/180i/210i, 0i</td>
                                    <td>1 ,.., 470</td>
                                </tr>
                                <tr>
                                    <td>Series 300i</td>
                                    <td>1 ,.., 512</td>
                                </tr>
                                <tr>
                                    <td>Power Mate i</td>
                                    <td>1 ,.., 500</td>
                                </tr>
                                <tr>
                                    <td>Series 160i/180i-W</td>
                                    <td>1 ,.., 472</td>
                                </tr>
                                </colgroup>
                                </colgroup>
                            </table>
                        </p>
                    </content>
                </item>
                <item>
                    <name>data</name>
                    <type>out</type>
                    <content>
                        <p>Specify the top address of NC program data.</p>
                    </content>
                </item>
            </cmn>
        </common>

        <is>
            <hssb>
                <vc>
                    <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>length</name>
                        <type>in</type>
                        <content>
                            <p>
                                Specify the number of characters of NC program to be written.<br/>
                                <span class="dd">1 ,.., 512</span>
                            </p>
                        </content>
                    </item>
                    <item>
                        <name>data</name>
                        <type>out</type>
                        <content>
                            <p>Specify the top address of NC program data.</p>
                        </content>
                    </item>
                </vc>
            </hssb>
        </is>
    </argument>



    <errcode>
        <item>
            <name>EW_BUSY</name>
            <content>
                Busy<br/>
                Series 160/180/210, 160i/180i/210i, 0i, Power Mate i
                <ul>
                    <li>Background edit processing in CNC side</li>
                        Terminate background edit processing in CNC side.<br/>
                    <br/>
                    <li>Alarm (PS000, PS101) on CNC side</li>
                        Reset the alarm on CNC.
                </ul>
            </content>
        </item>
        <item>
            <name>EW_LENGTH</name>
            <content>
                Data block length error<br/>
                Length of the block (length) is illegal.
            </content>
        </item>
        <item>
            <name>EW_DATA</name>
            <content>
                Data error<br/>
                    A character which is unavailable for CNC program is detected.
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>
                No option<br/>
                The extended driver/library function is necessary.
            </content>
        </item>
        <item>
            <name>EW_MODE</name>
            <content>
                CNC mode error<br/>
                Set CNC mode to MDI.
            </content>
        </item>
        <item>
            <name>EW_REJECT</name>
            <content>
                CNC execution denied<br/>
                MDI operation in progress
                <ul style="margin-top:0;margin-bottom:0">
                    <li>300i/310i/320i</li>
                    CNC is in the emergency stop.
                </ul>
                </content>
        </item>

        <is>
            <item>
                <name>EW_LENGTH</name>
                <content>
                    Data block length error<br/>
                    Length of the block (length) is illegal.
                </content>
            </item>
            <item>
                <name>EW_DATA</name>
                <content>
                    Data error<br/>
                        A character which is unavailable for CNC program is detected.
                </content>
            </item>
            <item>
                <name>EW_NOOPT</name>
                <content>
                    No option<br/>
                    The extended driver/library function is necessary.
                </content>
            </item>
            <item>
                <name>EW_MODE</name>
                <content>
                    CNC mode error<br/>
                    Set CNC mode to MDI.
                </content>
            </item>
            <item>
                <name>EW_REJECT</name>
                <content>
                    CNC execution denied(MDI operation in progress)
                </content>
            </item>
        </is>
    </errcode>



    <option>
        <hssb>The extended driver/library function is necessary.</hssb>
        <ethr><p>The Ethernet function and the extended driver/library function are necessary.</p>
              <p>However, in case of Series 160i/180i/210i/0i MODEL B and 300i, the required CNC option is as follows.</p>
              <p>When Embedded Ethernet is used,</p>
              <p><ul>above two optional functions are not required.</ul></p>
              <p>When Ethernet board is used,</p>
              <p><ul>only Ethernet function is required.</ul></p>
        </ethr>
        
        <is>
            <hssb>The extended driver/library function is necessary.</hssb>
        </is>
    </option>



    <parameter>
        <type>
            <li>Series 150,150i, 160/180/210, 160i/180i/210i, 0i, 300i, Power Mate i</li><br/>
            <span class="dd">none</span>
            <li>Series 160i/180i-W</li><br/>
            <span class="dd">3203# = 1  (must be set)</span>
            
        </type>
    </parameter>

    <is_parameter>
    </is_parameter>



    <mode>
        <cmn>
            This function must be used in MDI mode.
        </cmn>
    </mode>



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



    <reference>
        <item>
            <name>cnc_rdmdipntr</name>
            <file>Program/cnc_rdmdipntr.htm</file>
        </item>
        <item>
            <name>cnc_wrmdipntr</name>
            <file>Program/cnc_wrmdipntr.htm</file>
        </item>

        <is>
            <item>
                <name>cnc_rdmdipntr</name>
                <file>Program/cnc_rdmdipntr.htm</file>
            </item>
            <item>
                <name>cnc_wrmdipntr</name>
                <file>Program/cnc_wrmdipntr.htm</file>
            </item>
        </is>
    </reference>



  </func>
</root>
