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

<root>
  <func>


    <title>cnc_setpath</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_setpath(unsigned short FlibHndl, short path_no);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
Selects the path number which is the target path in the multi-path system or system with loader control. <p/>

All Data window library functions input from/output to the CNC's path selected by this function. <p/>
        </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>path_no</name>
                    <type>in</type>
                    <content>
<p>
Specify the path number.
</p>
<table class="dd">
    <tr>
        <td align="right">0</td>
        <td>:</td>
        <td>(The 1st path)</td>
    </tr>
    <tr>
        <td align="right">1</td>
        <td>:</td>
        <td>The 1st path</td>
    </tr>
    <tr>
        <td align="right">2</td>
        <td>:</td>
        <td>The 2nd path</td>
    </tr>
    <tr>
        <td align="right">3</td>
        <td>:</td>
        <td>The 3rd path</td>
    </tr>
    <tr>
        <td align="right">4</td>
        <td>:</td>
        <td>The 4th path (Only Series 300i)</td>
    </tr>
    <tr>
        <td align="right">5</td>
        <td>:</td>
        <td>The 5th path (Only Series 300i)/for loader (except Series 300i)</td>
    </tr>
    <tr>
        <td align="right">6</td>
        <td>:</td>
        <td>The 6th path (Only Series 300i)</td>
    </tr>
    <tr>
        <td align="right">7</td>
        <td>:</td>
        <td>The 7th path (Only Series 300i)</td>
    </tr>
    <tr>
        <td align="right">8</td>
        <td>:</td>
        <td>The 8th path (Only Series 300i)</td>
    </tr>
    <tr>
        <td align="right">9</td>
        <td>:</td>
        <td>The 9th path (Only Series 300i)</td>
    </tr>
    <tr>
        <td align="right">10</td>
        <td>:</td>
        <td>The 10th path (Only Series 300i)</td>
    </tr>
</table>

                    </content>
                </item>
            </cmn>
        </common>

        <!-- is Argument Start -->
        <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>path_no</name>
                        <type>in</type>
                        <content>
                            <p>Specify the path number. (0,..,10)</p>
                            <p>0 means 1st path. (=1)</p>
                        </content>
                    </item>

                </vc>
            </hssb>
        </is>
        <!-- is Argument End -->
    </argument>



    <errcode>
        <item>
            <name>EW_PATH</name>
            <content>Path number error<br/>The path number (path_no) is wrong.</content>
        </item>
    </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 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>
    </option>



    <parameter></parameter>



    <mode></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>X</fs16i>
            <fs18i>X</fs18i>
        </w>
        <pw>
            <d>X</d>
            <h>X</h>
        </pw>
        <add><b></b></add>
        <is>
            <!-- M -->
            <m>
                <fs30is>O</fs30is>
            </m>
            <!-- T -->
            <t>
                <fs30is>O</fs30is>
            </t>
        </is>
    </support>



    <reference>
        <item>
            <name>cnc_getpath</name>
            <file>misc/cnc_getpath.htm</file>
        </item>
    </reference>



    <example>
        <vc><![CDATA[
The following program selects the specified path as the target path.

#include "fwlib32.h"

/* path is new path number to be set. */
short example( short path )
{
        short ret ;
        ret = cnc_setpath( h, path ) ;
        if ( !ret )
                printf( "PATH #%d has been set as new target path.\n",
                        path ) ;
        else
                printf( "ERROR!(%d)\n", ret ) ;
        return ( ret ) ;
}]]></vc>
    </example>



  </func>
</root>
