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

<root>
  <func>


    <title>cnc_getfrominfo</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>
            FWLIBAPI short WINAPI cnc_getfrominfo(unsigned short FlibHndl, short slotno, short *num, ODBFINFORM *finfo);
        </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Reads the various information of F-ROM on CNC. The various information is stored in each member of "ODBFINFORM".</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>slotno</name>
                    <type>in</type>
                    <content>
Physical slot number (0,1,2,...,15 or -1)<br/>
Specify the physical slot number of control P.C.B. where F-ROM is mounted. <br/>
Especially, if you set the '-1', all F-ROM information in the CNC can be read.<br/>
When this function is executed as 'slotno=-1', the effective F-ROM information is packed from a head of the address shown by this argument. <br/>
                    </content>
                </item>
                <item>
                    <name>num</name>
                    <type>in</type>
                    <content>
Pointer to the variable by which the number of FROM information (ODBFINFORM structure) actually read is stored.<br/>
When a physical slot number of the P.C.B which does not exist in slotno is specified, the '0' is set in *num. 
                    </content>
                </item>
                <item>
                    <name>finfo</name>
                    <type>out</type>
                    <content>
                        <p>Specify the address of the array of ODBFINFORM structure storing the F-ROM information.<br/>Please prepare 1 or 16 arrays according to slotno. 
                        </p>
ODBFINFORM structure is as follows.
<pre>
typedef struct odbfinform {
    long  slotno;            /* Slot Number */
    char  slotname[12];      /* Slot Name */
    long  fromnum;           /* Number of F-ROM SYSTEM data */
    struct {
        char  sysname[12];   /* F-ROM SYSTEM data Name */
        long  fromsize;      /* F-ROM Size */
        long  fromattrib;    /* F-ROM Data attribute */
    } info[32];
} ODBFINFORM;
</pre>
                    <dl>
                        <dt>slotno</dt>
                            <dd>Slot number which belongs to the read F-ROM information.</dd>
                        <dt>slotname</dt>
                            <dd>Slot Name</dd>
                            <dd>This data is terminated with 'NULL'.</dd>
                        <dt>fromnum</dt>
                            <dd>The number of SYSTEM data(SYSTEM Control software, Ladder program etc.) which has been stored in F-ROM.</dd>
                        <dt>sysname</dt>
                            <dd>The name of SYSTEM data which was stored in F-ROM </dd>
                            <dd>When the F-ROM data is read, this name must be specified. </dd>
                            <dd>This data is terminated with 'NULL'. </dd>
                        <dt>fromsize</dt>
                            <dd>F-ROM size for storing SYSTEM data. (Unit:Byte)</dd>
                            <dd>This data can be used for checking the reading size or the writing size.</dd>
                        <dt>fromattrib</dt>
                            <dd>File attribute of F-ROM data.</dd>
                                <dd><table class="dd">
                                    <tr><td>1</td><td>:</td><td>System file</td></tr>
                                    <tr><td>2</td><td>:</td><td>User file </td></tr>
                                </table></dd>
                    </dl>
                    </content>
                </item>
            </vc>
         </common>
    </argument>



    <errcode>
        <item>
            <name>EW_FUNC</name>
            <content>Unavailable</content>
        </item>
        <item>
            <name>EW_DATA</name>
            <content>Error when function was executed<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 following details status will be set onto the member, err_no of ODBERR structure. 
And the slot number where an error occurred will be set in err_dtno of ODBERR structure. 
        <table>
            <colgroup align="center" valign="top">
            <colgroup align="center" valign="top">
            <colgroup valign="top">
            <tr>
                <td>9</td>
                <td>:</td>
                <td>F-ROM(MODULE) cannot be recognized. (defective device) </td>
            </tr>
            </colgroup>
            </colgroup>
            </colgroup>
        </table>
            </content>
        </item>
        <item>
            <name>EW_REJECT</name>
            <content>Similar processing (information reading/data reading/data writing) is being executed on the CNC side. Please retry.</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/210i/0i MODEL B, 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>
        <add></add>
    </option>



    <parameter></parameter>



    <mode></mode>



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



    <reference>
        <item>
            <name>cnc_fromgetstart</name>
            <file>Misc/cnc_fromgetstart.htm</file>
        </item>
        <item>
            <name>cnc_fromget</name>
            <file>Misc/cnc_fromget.htm</file>
        </item>
        <item>
            <name>cnc_fromgetend</name>
            <file>Misc/cnc_fromgetend.htm</file>
        </item>
        <item>
            <name>cnc_fromputstart</name>
            <file>Misc/cnc_fromputstart.htm</file>
        </item>
        <item>
            <name>cnc_fromput</name>
            <file>Misc/cnc_fromput.htm</file>
        </item>
        <item>
            <name>cnc_fromputend</name>
            <file>Misc/cnc_fromputend.htm</file>
        </item>
        <item>
            <name>cnc_fromremove</name>
            <file>Misc/cnc_fromremove.htm</file>
        </item>
    </reference>



    <example></example>



  </func>
</root>
