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

<root>
  <func>
    <title>cnc_wrrelpos</title>


    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_wrrelpos(unsigned short FlibHndl, short length, IDBWRR *wrrelpos);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
                <p>Sets again relative position against the axis specified with "type".
                   Preset data is specified by "data[0]" in "IDBWRR".</p>
                <p>If 0 is specified as preset data, it means origin(0 clear of relative
                   position).</p>
                <p>It is possible to make preset to all axes at a time by specifying
                   ALL_AXES for "type".
                   In that case, an preset data of each axis is specified by the data
                   array in IDBWRR.</p>
        </cmn>

        <!-- is DOC Start -->
        <is>
            <cmn>
                <p>
                    Sets again relative position against the axis specified with "type".
                    Preset data is specified by "data[0]" in "IDBWRR".
                </p>
                <p>
                    If 0 is specified as preset data, it means origin(0 clear of relativeposition).
                </p>
                <p>
                    It is possible to make preset to all axes at a time by specifying ALL_AXES for "type".
                    In that case, an preset data of each axis is specified by the data array in IDBWRR.
                </p>
            </cmn>

        </is>
        <!-- is DOC End -->
    </doc>



    <argument>
        <common>
            <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 length of the data block(size of IDBWRR structure)</p>
                        <p><b>IDBWRR</b></p>
                        <table>
                            <colgroup align="left" valign="top">
                            <colgroup align="left" valign="top">
                            <colgroup align="left" valign="top">
                            <tr>
                                <th>for each axis</th>
                                <th>for all axes</th>
                            </tr>
                            <tr>
                                <td valign="top"><img src="position/rpos.gif"/></td>
                                <td valign="top"><img src="position/rposa.gif"/></td>
                            </tr>
                            </colgroup>
                            </colgroup>
                            </colgroup>
                        </table>
                        <ul>
                            <li>Series 150, 150i, 300i</li><p/>
                            <p>
                                n = Maximum controlled axes<br/>
                                (The data for current controlled axes are valid.)
                            </p>
                        </ul>
                        <ul>
                            <li>Series 160/180/210, 160i/180i/210i, 0i, Power Mate i</li><p/>
                            <p>
                                n = Current controlled axes
                            </p>
                        </ul>
                    </content>
                </item>
                <item>
                    <name>wrrelpos</name>
                    <type>out</type>
                    <content>
                        <p>Pointer to the IDBWRR structure to be preset the relative position data of the controlled axes. The IDBWRR structure is as follows.</p>
<pre>
typedef struct idbwrr {
        short   datano;                 /* Not used. */
        short   type;                   /* Axis number. */
        long    data[MAX_AXIS];         /* Preset data. */
} IDBWRR ;    /* MAX_AXIS is the maximum controlled axes. */
</pre>
                        <dl>
                            <dt>type</dt>
                            <dd>Specify axis number to make preset.
                                <table class="dd">
                                    <colgroup align="left" valign="top">
                                    <colgroup align="left" valign="top">
                                    <colgroup align="left" valign="top">
                                    <tr>
                                        <td>ALL_AXES</td>
                                        <td>:</td>
                                        <td>for all axes(ALL_AXES : -1)</td>
                                    </tr>
                                    <tr>
                                        <td>1,..,m</td>
                                        <td>:</td>
                                        <td>for each axis(m : number of controlled axis)</td>
                                    </tr>
                                    </colgroup>
                                    </colgroup>
                                    </colgroup>
                                </table>
                            </dd>

                            <dt>data</dt>
                            <dd>Specify value to make preset.
                                <table class="dd">
                                    <tr>
                                        <td>data[0],..,data[m-1]</td>
                                        <td>:</td>
                                        <td>for all axes</td>
                                    </tr>
                                    <tr>
                                        <td>data[0]</td>
                                        <td>:</td>
                                        <td>for each axis</td>
                                    </tr>
                                </table>
                            </dd>

                        </dl>
                    </content>
                </item>
            </vc>
        </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>length</name>
                        <type>in</type>
                        <content>
                            <p>Specify the length of the data block(size of IDBWRR structure)</p>
                            <p><b>IDBWRR</b></p>
                            <table>
                                <colgroup align="left" valign="top">
                                <colgroup align="left" valign="top">
                                <colgroup align="left" valign="top">
                                <tr>
                                    <th>for each axis</th>
                                    <th>for all axes</th>
                                </tr>
                                <tr>
                                    <td valign="top"><img src="position/rpos.gif"/></td>
                                    <td valign="top"><img src="position/rposa.gif"/></td>
                                </tr>
                                </colgroup>
                                </colgroup>
                                </colgroup>
                            </table>
                            <p>n = Maximum controlled axes (The data for current controlled axes are valid.)</p>
                        </content>
                    </item>
                    <item>
                        <name>wrrelpos</name>
                        <type>out</type>
                        <content>
                            <p>Pointer to the IDBWRR structure to be preset the relative position data of the controlled axes. The IDBWRR structure is as follows.</p>
<pre>
typedef struct idbwrr {
    short   datano;                 /* Not used. */
    short   type;                   /* Axis number. */
    long    data[MAX_AXIS];         /* Preset data. */
} IDBWRR ;    /* MAX_AXIS is the maximum controlled axes. */
</pre>
                            <dl>
                                <dt>type</dt>
                                <dd>Specify axis number to make preset.
                                    <table class="dd">
                                        <colgroup align="left" valign="top">
                                        <colgroup align="left" valign="top">
                                        <colgroup align="left" valign="top">
                                        <tr>
                                            <td>ALL_AXES</td>
                                            <td>:</td>
                                            <td>for all axes(ALL_AXES : -1)</td>
                                        </tr>
                                        <tr>
                                            <td>1,..,m</td>
                                            <td>:</td>
                                            <td>for each axis(m : number of controlled axis)</td>
                                        </tr>
                                        </colgroup>
                                        </colgroup>
                                        </colgroup>
                                    </table>
                                </dd>

                                <dt>data</dt>
                                <dd>Specify value to make preset.
                                    <table class="dd">
                                        <tr>
                                            <td>data[0],..,data[m-1]</td>
                                            <td>:</td>
                                            <td>for all axes</td>
                                        </tr>
                                        <tr>
                                            <td>data[0]</td>
                                            <td>:</td>
                                            <td>for each axis</td>
                                        </tr>
                                    </table>
                                </dd>

                            </dl>
                        </content>
                    </item>

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



    <errcode>
        <item>
            <name>EW_LENGTH</name>
            <content>
                data block length error<br/>
                Size of ODBWRR structure(length) is illegal.
            </content>
        </item>
        <item>
            <name>EW_ATTRIB</name>
            <content>
                data attribute error<br/>
                The specification of axis number (type) is improper.
            </content>
        </item>
        <item>
            <name>EW_DATA</name>
            <content>
                data error<br/>
                The content of "data" is out of range which can be specified.<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 axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure.
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>
                No option<br/>The extended driver/library function is necessary.
            </content>
        </item>
        <item>
            <name>EW_REJECT</name>
            <content>
                CNC execution denied(Series 160i/180i-W)
            </content>
        </item>
        <add></add>

        <!-- is ERRORCODE Start -->
        <is>
            <item>
                <name>EW_LENGTH</name>
                <content>
                    data block length error<br/>
                    Size of ODBWRR structure(length) is illegal.
                </content>
            </item>
            <item>
                <name>EW_ATTRIB</name>
                <content>
                    data attribute error<br/>
                    The specification of axis number (type) is improper.
                </content>
            </item>
            <item>
                <name>EW_DATA</name>
                <content>
                    data error<br/>
                    The content of "data" is out of range which can be specified.<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 axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure.
                </content>
            </item>
            <item>
                <name>EW_NOOPT</name>
                <content>
                    No option<br/>The extended driver/library function is necessary.
                </content>
            </item>
            <add></add>

        </is>
        <!-- is ERRORCODE End -->
    </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>
    </parameter>
    <is_parameter></is_parameter>



    <mode>
    </mode>
    <is_mode></is_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>
        <add><b></b></add>
        <is>
            <!-- M -->
            <m>
                <fs30is>O</fs30is>
            </m>
            <!-- T -->
            <t>
                <fs30is>O</fs30is>
            </t>
        </is>       
    </support>



    <reference>
    </reference>



    <example>
<vc>
The following program preset the relative position of first axis.

#include "fwlib32.h"
#define FIRST_AXIS      1
#define ONE_AXIS_LEN    8

IDBWRR  wrrelpos ;
short   ret ;

wrrelpos.type = FIRST_AXIS ;
wrrelpos.data[0] = 0 ;
ret = cnc_wrrelpos(h, ONE_AXIS_LEN, &#38;wrrelpos);
</vc>
    </example>



  </func>
</root>
