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

<root>
  <func>
    <title>cnc_rdexecpt</title>


    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdexecpt(unsigned short FlibHndl, PRGPNT *pact, PRGPNT *pnext);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            When the CNC is MDI and MEM mode(In case of CNC is running), the program number and block number of the executed program is acquired.
            When the CNC is EDIT, TJOG and THND mode(In case of CNC is editing), the program number and block number of the preread data is acquired.<p/>

            In case of the following, EW_REJECT error occurs.<p/>
                <dd>1) CNC is in DNC/M198 operation. </dd>
                <dd>2) CNC is in RISC operation. </dd>
                <dd>3) OP signal is OFF in MDi, MEM mode.</dd>
                <dd>4) The program number which is acquired by cnc_rdprgnum and  this function  is not same number.</dd>
        </cmn>
    </doc>



    <argument>
        <hssb>
            <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>pact</name>
                    <type>out</type>
                    <content>
                        <p>
                            Specify the pointer to the PRGPNT structure to store the execution pointer.
                        </p>
The PRGPNT structure is as follows.
<pre>
typedef struct _prgpnt {
    long    prog_no;
    long    blk_no;
} PRGPNT;
</pre>
                    <dt>prog_no</dt>
                    <dd>Program number</dd>
                    <dd>When the MDI program is executed, -1 is set.</dd><br/>

                    <dt>blk_no</dt>
                    <dd>Block number</dd>
                    <dd>The block number by which the head of program is 0 is set.</dd>

                    </content>
                </item>
                <item>
                    <name>pnext</name>
                    <type>out</type>
                    <content>
                        Specify the pointer to PRGPNT structure to store the preread block pointer.  The PRGPNT structure is as shown in the above.
                    </content>
                </item>
            </vc>
        </hssb>
    </argument>



    <errcode>
        <item>
            <name>EW_NOOPT</name>
            <content>No option<br/>The extended driver/library function is necessary.</content>
        </item>
        <item>
            <name>EW_MODE</name>
            <content>CNC mode error<br/>CNC mode is except MDI, MEM, EDIT, TJOG and THND one.</content>
        </item>
        <item>
            <name>EW_REJECT</name>
            <content>CNC execution denied<br/>
                         <li>No program is executed.</li>
                         <li>OP signal is OFF in MDi, MEM mode.</li>
                         <li>CNC is in DNC/M198 operation.</li>
                         <li>CNC is in RISC operation.</li>
            </content>
        </item>
        <add></add>
    </errcode>



    <option>
        <hssb>The extended driver/library function is necessary.</hssb>
        <add></add>
    </option>



    <parameter></parameter>



    <mode>
        <cmn>It is possible to use in MDI, MEM, EDIT, TJOG, THND mode.</cmn>
    </mode>



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



    <example></example>



  </func>
</root>
