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

<root>
  <func>


    <title>cnc_svdtrddata</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_svdtrddata(unsigned short FlibHndl,short *stat,long *length,void *data); </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>
                Reads the servo learning data from the I/F buffer for reading/writing the servo learning data.<!--(buffer size = 65536 bytes)-->
            </p>
            <p>
               <span class="xis">In 300i/3109i/320i, </span>because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed.
               So, even if the error occurs, the result might be normal(Return value = EW_OK and stat=3:Reading end).
               Confirm the transfer result of cnc_svdtendrd() after executing this function.
            </p>
        </cmn>
    </doc>



    <argument>
        <hssb>
            <cmn>
                <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>stat</name>
                    <type>in</type>
                    <content>
                        Pointer to the variable for state of reading.
                        The state of reading the servo learning data is stored.
                        <table border="0" class="dd">
                            <tr> <td>1</td><td>:</td><td>During reading</td>  </tr>
                            <tr> <td>3</td><td>:</td><td>Reading end</td>  </tr>
                        </table>
                    </content>
                </item>
                <item>
                    <name>length</name>
                    <type>in</type>
                    <content>
                        <p>
                            Pointer to the variable for data length.<br/>
                            Specify the data length (byte unit) in the variable.
                            After executing this function, the size of data which was read actually is set.
                            The maximum data length which can be read at a time is 65535 bytes.
                        </p>
                    </content>
                </item>
                <item>
                    <name>data</name>
                    <type>out</type>
                    <content>
                        <p>
                            Pointer to the variable for servo learning data.<br/>
                            The pointer of the variable to store the data read from the I/F buffer is specified.
                        </p>
                    </content>
                </item>
            </cmn>
        </hssb>
    </argument>



    <errcode>
        <item>
            <name>EW_FUNC</name>
            <content>
                <a href="Servo/cnc_svdtstartrd.htm" target="_parent">cnc_svdtstartrd</a> 
                function has not been executed.
            </content>
        </item>
        <item>
            <name>EW_LENGTH</name>
            <content>
                data length error<br/>
                Data length(length) is wrong.
            </content>
        </item>
        <item>
            <name>EW_DATA</name>
            <content>
                The error occurred during reading the servo learning data from the servo side.
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>
                no option<br/>
                Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary.
            </content>
        </item>
        <item>
            <name>EW_BUFFER</name>
            <content>
                The buffer is empty<br/>
                Because the processing of the data transfer on the CNC side is late, the data is not read.
            </content>
        </item>
    </errcode>



    <option>
        <hssb>
            The extended driver/library function is necessary.
        </hssb>
        <need>
            <span class="xis">
            <li>Series 160/180, 160i/180i</li>
                "Learning control" and "Memory expension for learning control".
            <li>Series 300i/310i/320i</li>
                "Learning control" and "Memory expension for learning control", or "Learning control for parts cutting".
            </span>
            <span class="ois">
                "Learning control" and "Memory expension for learning control", or "Learning control for parts cutting".
            </span>
        </need>
    </option>



    <parameter>
    </parameter>



    <mode>
    </mode>



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



    <reference>
        <item>
            <name>cnc_svdtstartrd</name>
            <file>Servo/cnc_svdtstartrd.htm</file>
        </item>
        <item>
            <name>cnc_svdtendrd</name>
            <file>Servo/cnc_svdtendrd.htm</file>
        </item>
        <item>
            <name>cnc_svdtstartwr</name>
            <file>Servo/cnc_svdtstartwr.htm</file>
        </item>
        <item>
            <name>cnc_svdtwrdata</name>
            <file>Servo/cnc_svdtwrdata.htm</file>
        </item>
        <item>
            <name>cnc_svdtendwr</name>
            <file>Servo/cnc_svdtendwr.htm</file>
        </item>
        <item>
            <name>cnc_svdtstopexec</name>
            <file>Servo/cnc_svdtstopexec.htm</file>
        </item>
    </reference>



    <example>
    </example>



  </func>
</root>
