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

<root>
  <func>


    <title>pmc_rdcntldata</title>



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



    <doc>
        <cmn>
            <p>Reads the control data to manage PMC data table (address D).</p>
            <p class="xis">This function is not available at PMC-NA.</p>
            <p>Refer to the programming manual of PMC(ladder language) concerning the details of output arguments.</p>
        </cmn>
    </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>
                        Specify the start group number.
                    </content>
                </item>
                <item>
                    <name>e_number</name>
                    <type>in</type>
                    <content>
                        Specify the end group number.
                    </content>
                </item>
                <item>
                    <name>length</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the length of data block.<br/>
                            (size of IODBPMCCNTL structure)
                        </p>
                        <p><b>IODBPMCCNTL</b></p>
                        <img src="Pmc/datatbl.gif"/><br/>
                        N is the number of group to be read.
                    </content>
                </item>
                <item>
                    <name>pmccntl</name>
                    <type>out</type>
                    <content>
                        Pointer to the IODBPMCCNTL structure including the control data of PMC data table.<br/>
                        The IODBPMCCNTL structure is as follows.<br/>
<pre>
typedef struct iodbpmccntl {
    short   datano_s ;      /* start group number */
    short   dummy ;         /* (not used) */
    short   datano_e ;      /* end group number */
    struct {
        char    tbl_prm ; /* table parameter */
        char    data_type ;     /* data type */
        unsigned short  data_size ;
                            /* size of data in group */
        unsigned short  data_dsp ;
                        /* address of data in group */
        short   dummy ; /* (not used) */
    } info[N] ;     /* N : number of messages to be read */
} IODBPMCCNTL ;
</pre>
                        <dl>
                            <dt>datano_s</dt>
                                <dd>Start group number</dd>
                            <dt>datano_e</dt>
                                <dd>End group number</dd>
                            <dt>tbl_prm</dt>
                                <dd>Table parameter
                                <table class="dd">
                                    <colgroup valign="top">
                                    <colgroup valign="top">
                                    <colgroup valign="top">
                                    <tr>
                                        <td>bit 0</td>
                                        <td>:</td>
                                        <td>Format of data table
                                            <table>
                                                <tr>
                                                    <td>0</td>
                                                    <td>:</td>
                                                    <td>binary</td>
                                                </tr>
                                                <tr>
                                                    <td>1</td>
                                                    <td>:</td>
                                                    <td>BCD</td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>bit 1</td>
                                        <td>:</td>
                                        <td>Protection of data table
                                            <table>
                                                <tr>
                                                    <td>0</td>
                                                    <td>:</td>
                                                    <td>not protected</td>
                                                </tr>
                                                <tr>
                                                    <td>1</td>
                                                    <td>:</td>
                                                    <td>protected</td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>bit 2</td>
                                        <td>:</td>
                                        <td>Format of data table
                                            <table>
                                                <tr>
                                                    <td>0</td>
                                                    <td>:</td>
                                                    <td>binary or BCD</td>
                                                </tr>
                                                <tr>
                                                    <td>1</td>
                                                    <td>:</td>
                                                    <td>hexadecimal</td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>bit 3,..,7</td>
                                        <td>:</td>
                                        <td>(not used)</td>
                                    </tr>
                                    </colgroup>
                                    </colgroup>
                                    </colgroup>
                                </table>
                                </dd>
                            <dt>data_type</dt>
                                <dd>Data type(0:BYTE,1:WORD,2:LONG)</dd>
                            <dt>data_size</dt>
                                <dd>Size of data in group(number of byte)</dd>
                            <dt>data_dsp</dt>
                                <dd>Address of data in group(address D inside)</dd>
                        </dl>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
            <name>EW_LENGTH</name>
            <content>
                data block length error<br/>
                Size of IODBPMCCNTL structure(length) is wrong.
            </content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>
                data number error<br/>
                Group number(s_number,e_number) is wrong.
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>
                no option<br/>
                The extended driver/library function is necessary.
            </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>
    </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>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>pmc_wrcntldata</name>
            <file>Pmc/pmc_wrcntldata.htm</file>
        </item>
        <item>
            <name>pmc_rdcntlgrp</name>
            <file>Pmc/pmc_rdcntlgrp.htm</file>
        </item>
        <item>
            <name>pmc_wrcntlgrp</name>
            <file>Pmc/pmc_wrcntlgrp.htm</file>
        </item>
    </reference>



  </func>
</root>
