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

<root>
  <func>


    <title>cnc_rdpitchr</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdpitchr(unsigned short FlibHndl, short s_number, short e_number, short length, IODBPI *pitch);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Reads the pitch error compensation data specified by "s_number", "e_number". The data is stored in "data" array of "IODBPI" with signed binary format.</p>

            <ul>
                <li>Series 150, 160/180/210, 160i/180i/210i, 0i, Power Mate i</li>
                <table>
                    <tr>
                        <td>Available range of data </td>
                        <td>:</td>
                        <td>-7,..,7</td>
                    </tr>
                </table>
                <br/>
                <li>Series 150i, 300i</li>
                <table>
                    <tr>
                        <td>Available range of data </td>
                        <td>:</td>
                        <td>-128,..,127</td>
                    </tr>
                </table>
                <br/>
            </ul>
        </cmn>

        <is>
            <p>Reads the pitch error compensation data specified by "s_number", "e_number". The data is stored in "data" array of "IODBPI" with signed binary format.</p>

            <table>
                <tr>
                    <td>Available range of data </td>
                    <td>:</td>
                    <td>-128,..,127</td>
                </tr>
            </table>
        </is>
    </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>s_number</name>
                    <type>in</type>
                    <content>
                        <p>Specify the start number of the pitch error compensation data.</p>
                    </content>
                </item>
                <item>
                    <name>e_number</name>
                    <type>in</type>
                    <content>
                        <p>Specify the end number of the pitch error compensation data.</p>
                    </content>
                </item>
                <item>
                    <name>length</name>
                    <type>in</type>
                    <content>
                        <p>Specify the data block length (size of IODBPI structure).</p>

                        <blockquote>
                            6+(number of pitch error compensation data)
                        </blockquote>

                        <p><b>IODBPI</b></p>

                        <p><img src="ncdata/pitch.gif"/></p>

                        <p>N : Number of pitch error compensation data </p>

                    </content>
                </item>
                <item>
                    <name>pitch</name>
                    <type>out</type>
                    <content>
                        <p>Pointer to the IODBPI structure including the pitch error compensation data. The IODBPI structure is as follows.</p>

<pre>
typedef struct  iodbpi {
    short datano_s; /* start number of pitch error data */
    short dummy;    /* (not used) */
    short datano_e; /* end number of pitch error data */
    char  data[N];  /* pitch error compensation data */
} IODBPI ;          /* N : number of pitch error data */
</pre>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
            <name>EW_LENGTH</name>
            <content>
                Data block length error<br/>
                Size of IODBPI structure(length) is wrong.
            </content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>Data number error<br/>Pitch error compensation data number(s_number, e_number) is wrong.</content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>No option<br/>This function needs the pitch error compensation option.</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/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>
        <need>The pitch error compensation option.</need>
        <type>
            <p>Bi-directional pitch error compensation<br/>
               Extended bi-directional pitch error compensation</p>
        </type>

        <is>
            <hssb>
                The pitch error compensation option and the extended driver/library function are necessary.
            </hssb>
            <type>
                <p>Bi-directional pitch error compensation<br/>
                   Extended bi-directional pitch error compensation</p>
            </type>
        </is>
    </option>



    <parameter>
        <type>
            <add>
                When you use the Bi-directional pitch error compensation : No.3605#0
            </add>
        </type>
    </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>O</fs16i>
            <fs18i>O</fs18i>
        </w>
        <pw>
            <d>O</d>
            <h>X</h>
        </pw>
        <add><b></b></add>

        <is>
            <m>
                <fs30is>O</fs30is>
            </m>
            <t>
                <fs30is>O</fs30is>
            </t>
        </is>
    </support>



    <reference>
        <item>
            <name>cnc_wrpitchr</name>
            <file>ncdata/cnc_wrpitchr.htm</file>
        </item>
        <item>
            <name>cnc_rdpitchinfo</name>
            <file>ncdata/cnc_rdpitchinfo.htm</file>
        </item>
    </reference>



    <example>
        <vc>
<pre>
The following program reads the pitch error compensation data within
the specified number range and displays them.

#include "fwlib32.h"
/* start/end are start/end number to be read. */
short example( short start, short end )
{
    IODBPI *pitch ;
    short ret, idx ;
    pitch = (IODBPI *)malloc( 1024 ) ;
    ret = cnc_rdpitchr( h, start, end, 6+(end-start+1), pitch ) ;
    if ( !ret )
        for ( idx = 0 ; idx &#60; end-start+1 ; idx++ )
            printf( "#%04d %+d\n", idx+start, pitch-&#62;data[idx] ) ;
    free( pitch ) ;
    return ( ret ) ;
}
</pre>
        </vc>
    </example>



  </func>
</root>
