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

<root>
  <func>


    <title>cnc_rdmgrpdata</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdmgrpdata(unsigned short FlibHndl, short s_no, short *num, ODBMGRP *buf);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Reads specified number of M code group data starting from the specified number.</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_no</name>
                    <type>in</type>
                    <content>
                        <p>Specify starting number from which the data is read. Valid range is from 0 to 499.</p>
                    </content>
                </item>
                <item>
                    <name>num</name>
                    <type>in / out</type>
                    <content>
                        <p>Pointer to the number of data to be read. Specify the number of data to be read before function call and actual number of data being read is stored after the function call. Valid range is from 1 to 500.</p>
                    </content>
                </item>
                <item>
                    <name>buf</name>
                    <type>out</type>
                    <content>
                        <p>Pointer to the ODBMGRP structure where returned data are stored. The ODBMGRP structure is as follows.</p>

<pre>
typedef struct odbmgrp {
    long    m_code;
    short   grp_no;
    char    m_name[21];
    char    dummy;
} ODBMGRP;
</pre>
                        <dl>
                            <dt>m_code</dt>
                            <dd>
                                M code <br/>
                                M code is returned.<br/>
                                * In case of Series 160/180 and 160i/180i, -1 is returned when no M code is assigned to the number.
                            </dd>
                            <br/>
                            <dt>grp_no</dt>
                            <dd>
                                M code group number <br/>
                                M code group number is returned.
                            </dd>
                            <br/>
                            <dt>m_name</dt>
                            <dd>
                                M code name <br/>
                                M code name is returned.<br/>
                                ASCII character string (maximum 20 characters) with trailing NULL code is stored.<br/>
                                * Not used in case of Series 160/180 and 160i/180i.
                            </dd>
                        </dl>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
            <name>EW_LENGTH</name>
            <content>Data block length error<br/>The number indication(num) is wrong.</content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>Data number error<br/>The start number(s_no) is wrong.</content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>No option<br/>The M code group option and the extended
                                    driver/library function are necessary.</content>
        </item>
        <add></add>
    </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 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>
            <p>This function needs the M code group option.</p>
        </need>
    </option>



    <parameter>
    </parameter>



    <mode>
    </mode>



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



    <reference>
        <item>
            <name>cnc_wrmgrpdata</name>
            <file>ncdata/cnc_wrmgrpdata.htm</file>
        </item>
    </reference>



    <example>
    </example>



  </func>
</root>
