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

<root>
  <func>


    <title>cnc_getlockstat</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>
            FWLIBAPI short WINAPI cnc_getlockstat(unsigned short FlibHndl, short user_id, unsigned char *pattern);
        </prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Gets the present state of various NC data protection.</p>
        </cmn>
    </doc>



    <argument>
        <ethr>
            <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>user_id</name>
                    <type>in</type>
                    <content>
                    <p>
                    <p>The user (MTB and the end user) who protects the NC data is specified.</p>
                    <table class="dd">
                        <tr>
                            <td>1</td>
                            <td>:</td>
                            <td>MTB</td>
                        </tr>
                        <tr>
                            <td>2</td>
                            <td>:</td>
                            <td>End user</td>
                        </tr>
                    </table>
                    </p>
                    </content>
                </item>
                <item>
                    <name>pattern</name>
                    <type>out</type>
                    <content>
                        <p>
It is a pointer to data which stores the bit pattern by which the NC data to be protected is shown.<br/>
Please secure the consecutive area in four bytes to store data. It is shown that the data is protected (Access inhibited) when the bit is set to one.<br/>
The meaning of each bit is as follows. 
                        </p>
                        <ul>
                            <table border="1">
                                <tr>
                                    <td>pattern[0]</td>
                                    <td>
                                    <table>
                                        <colgroup valign="top" width="56">
                                        <colgroup align="center" valign="top">
                                        <colgroup valign="top">
                                        <tr>
                                            <td>bit 0</td>
                                            <td>:</td>
                                            <td>F-ROM user file(PMC ladder)</td>
                                        </tr>
                                        <tr>
                                            <td>bit 1</td>
                                            <td>:</td>
                                            <td>F-ROM user file(C language executor)</td>
                                        </tr>
                                        <tr>
                                            <td>bit 2</td>
                                            <td>:</td>
                                            <td>F-ROM user file(Macro executor/Order-made macro)</td>
                                        </tr>
                                        <tr>
                                            <td>bit 3</td>
                                            <td>:</td>
                                            <td>F-ROM user file(PMC C language)</td>
                                        </tr>
                                        <tr>
                                            <td>bit 4</td>
                                            <td>:</td>
                                            <td>F-ROM user file(Maintenance information)</td>
                                        </tr>
                                        <tr>
                                            <td>bit 5</td>
                                            <td>:</td>
                                            <td>F-ROM user file(Embedded macro function)</td>
                                        </tr>
                                        <tr>
                                            <td>bit 6</td>
                                            <td>:</td>
                                            <td>(Reserved)</td>
                                        </tr>
                                        <tr>
                                            <td>bit 7</td>
                                            <td>:</td>
                                            <td>Image of the entire S-RAM</td>
                                        </tr>
                                    </colgroup> 
                                    </colgroup> 
                                    </colgroup> 
                                    </table></td>
                                </tr>
                                <tr>
                                    <td>pattern[1]</td>
                                    <td>
                                    <table>
                                        <colgroup valign="top" width="56">
                                        <colgroup align="center" valign="top">
                                        <colgroup valign="top">
                                        <tr>
                                            <td>bit 0</td>
                                            <td>:</td>
                                            <td>NC programs</td>
                                        </tr>
                                        <tr>
                                            <td>bit 1</td>
                                            <td>:</td>
                                            <td>P code macro variables</td>
                                        </tr>
                                        <tr>
                                            <td>bit 2</td>
                                            <td>:</td>
                                            <td>NC parameters</td>
                                        </tr>
                                        <tr>
                                            <td>bit 3</td>
                                            <td>:</td>
                                            <td>PMC parameters(R [Internal relay],T [Changeable timer],K [Keep relay],C [Counter],D [Data table])</td>
                                        </tr>
                                        <tr>
                                            <td>bit 4 to 7</td>
                                            <td>:</td>
                                            <td>(Reserved)</td>
                                        </tr>
                                    </colgroup> 
                                    </colgroup> 
                                    </colgroup> 
                                    </table></td>
                                </tr>
                                <tr>
                                    <td>pattern[2]</td>
                                    <td>
                                    <table>
                                        <colgroup valign="top" width="56">
                                        <colgroup align="center" valign="top">
                                        <colgroup valign="top">
                                        <tr>
                                            <td>bit 0 to 7</td>
                                            <td>:</td>
                                            <td>(Reserved)</td>
                                        </tr>
                                        </colgroup> 
                                        </colgroup> 
                                        </colgroup> 
                                    </table></td>
                                </tr>
                                <tr>
                                    <td>pattern[3]</td>
                                    <td>
                                    <table>
                                        <colgroup valign="top" width="56">
                                        <colgroup align="center" valign="top">
                                        <colgroup valign="top">
                                        <tr>
                                            <td>bit 0 to 7</td>
                                            <td>:</td>
                                            <td>(Reserved)</td>
                                        </tr>
                                        </colgroup> 
                                        </colgroup> 
                                        </colgroup> 
                                    </table></td>
                                   </tr>
                            </table>
                            </ul>
                            <p>Moreover, when each bit is set to one, the functions that return EW_PASSWD are as follows.</p>
                            <ul>
                            <table border="1">
                                <thead>
                                <tr>
                                    <th>Byte position</th>
                                    <th>Bit position</th>
                                    <th>Function name</th>
                                    <th>Note</th>
                                </tr>
                                </thead>

                                <tbody>
                                <tr>
                                    <td rowspan="7">pattern[0]</td>
                                    <td>bit 0</td>
                                    <td><a href="Misc/cnc_fromgetstart.htm" target="_parent">cnc_fromgetstart</a><br/>
                                    <a href="Misc/cnc_fromput.htm" target="_parent">cnc_fromput</a><br/>
                                    <a href="Misc/cnc_fromremove.htm" target="_parent">cnc_fromremove</a>
                                    </td>
                                    <td>To the file of the PMC ladder</td>
                                </tr>
                                <tr>
                                    <td>bit 1</td>
                                    <td><a href="Misc/cnc_fromgetstart.htm" target="_parent">cnc_fromgetstart</a><br/>
                                    <a href="Misc/cnc_fromput.htm" target="_parent">cnc_fromput</a><br/>
                                    <a href="Misc/cnc_fromremove.htm" target="_parent">cnc_fromremove</a>
                                    </td>
                                    <td>To the file of the C language executor</td>
                                </tr>
                                <tr>
                                    <td>bit 2</td>
                                    <td><a href="Misc/cnc_fromgetstart.htm" target="_parent">cnc_fromgetstart</a><br/>
                                    <a href="Misc/cnc_fromput.htm" target="_parent">cnc_fromput</a><br/>
                                    <a href="Misc/cnc_fromremove.htm" target="_parent">cnc_fromremove</a>
                                    </td>
                                    <td>To the file of the macro executor/Order-made macro</td>
                                </tr>
                                <tr>
                                    <td>bit 3</td>
                                    <td><a href="Misc/cnc_fromgetstart.htm" target="_parent">cnc_fromgetstart</a><br/>
                                    <a href="Misc/cnc_fromput.htm" target="_parent">cnc_fromput</a><br/>
                                    <a href="Misc/cnc_fromremove.htm" target="_parent">cnc_fromremove</a>
                                    </td>
                                    <td>To the file of the PMC C language</td>
                                </tr>
                                <tr>
                                    <td>bit 4</td>
                                    <td><a href="Misc/cnc_fromgetstart.htm" target="_parent">cnc_fromgetstart</a><br/>
                                    <a href="Misc/cnc_fromput.htm" target="_parent">cnc_fromput</a><br/>
                                    <a href="Misc/cnc_fromremove.htm" target="_parent">cnc_fromremove</a>
                                    </td>
                                    <td>To the file of the maintenance information</td>
                                </tr>
                                <tr>
                                    <td>bit 5</td>
                                    <td><a href="Misc/cnc_fromgetstart.htm" target="_parent">cnc_fromgetstart</a><br/>
                                    <a href="Misc/cnc_fromput.htm" target="_parent">cnc_fromput</a><br/>
                                    <a href="Misc/cnc_fromremove.htm" target="_parent">cnc_fromremove</a>
                                    </td>
                                    <td>To the file of the embedded macro function</td>
                                </tr>
                                <tr>
                                    <td>bit 7</td>
                                    <td><a href="Misc/cnc_sramgetstart.htm" target="_parent">cnc_sramgetstart</a><br/>
                                    </td>
                                    <td>&#160;</td>
                                </tr>

                                <tr>
                                    <td rowspan="4">pattern[1]</td>
                                    <td>bit 0</td>
                                    <td><a href="Program/cnc_dwnstart3.htm" target="_parent">cnc_dwnstart3</a><br/>
                                    <a href="Program/cnc_upstart3.htm" target="_parent">cnc_upstart3</a><br/>
                                    <a href="Program/cnc_delall.htm" target="_parent">cnc_delall</a><br/>
                                    <a href="Program/cnc_delete.htm" target="_parent">cnc_delete</a>
                                    </td>
                                    <td>As for cnc_dwnstart3 and the cnc_upstart3 functions, only NC programs and parameters are protected.</td>
                                </tr>
                                <tr>
                                    <td>bit 1</td>
                                    <td><a href="Ncdata/cnc_rdpmacro.htm" target="_parent">cnc_rdpmacro</a><br/>
                                    <a href="Ncdata/cnc_wrpmacro.htm" target="_parent">cnc_wrpmacro</a><br/>
                                    <a href="Ncdata/cnc_rdpmacror.htm" target="_parent">cnc_rdpmacror</a><br/>
                                    <a href="Ncdata/cnc_wrpmacror.htm" target="_parent">cnc_wrpmacror</a>
                                    </td>
                                    <td>&#160;</td>
                                </tr>
                                <tr>
                                    <td>bit 2</td>
                                    <td><a href="Ncdata/cnc_rdparam.htm" target="_parent">cnc_rdparam</a><br/>
                                    <a href="Ncdata/cnc_wrparam.htm" target="_parent">cnc_wrparam</a><br/>
                                    <a href="Ncdata/cnc_rdparar.htm" target="_parent">cnc_rdparar</a><br/>
                                    <a href="Ncdata/cnc_wrparas.htm" target="_parent">cnc_wrparas</a><br/>
                                    <a href="Ncdata/cnc_rdparam_ext.htm" target="_parent">cnc_rdparam_ext</a></td>
                                    <td>&#160;</td>
                                </tr>
                                <tr>
                                    <td>bit 3</td>
                                    <td><a href="Pmc/pmc_rdpmcrng.htm" target="_parent">pmc_rdpmcrng</a><br/>
                                    <a href="Pmc/pmc_wrpmcrng.htm" target="_parent">pmc_wrpmcrng</a></td>
                                    <td>&#160;</td>
                                </tr>

                                </tbody>
                            </table>
                            </ul>

                    </content>
                </item>
            </cmn>
        </ethr>
    </argument>



    <errcode>
        <item>
            <name>EW_FUNC</name>
            <content>Unavailable<br/>
            The NC control software or the Ethernet firmware does not support this function.</content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>Data number error<br/>The specification of user_id is wrong.</content>
        </item>
        <add></add>
    </errcode>



    <option>
        <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>
        <type>
        <ul>
            <li>Series 160i/180i/210i, 0i<br/></li>
                <table>
                    <colgroup valign="top">
                    <colgroup valign="top">
                    <colgroup valign="top">
                    <tr>
                        <td>No.250-253</td><td>:</td><td>Data corresponding to each bit when you access the NC data in Ethernet
                        <table class="dd">
                            <tr><td>0</td><td>:</td><td>Data access is permitted.</td></tr>
                            <tr><td>1</td><td>:</td><td>Data access is inhibited.</td></tr>
                        </table>
                        Please refer to the table below for the meaning of each bit.</td>
                    </tr>

                    <tr>
                        <td>No.254</td><td>:</td><td>Password for Ethernet(For MTB)</td></tr>

                    <tr>
                        <td>No.255</td><td>:</td><td>Key word for Ethernet(For MTB)
                        <table class="dd">
                            <colgroup valign="top">
                            <colgroup valign="top">
                            <tr><td></td><td>Password and key word to permit change in parameter No.250-253,254.</td></tr>
                            <tr><td>*</td><td>MTB sets this parameter.</td></tr>
                        </colgroup>
                        </colgroup>
                        </table></td>
                    </tr>

                    <tr>
                        <td>No.260-263</td><td>:</td><td>Data corresponding to each bit when you access the NC data in Ethernet
                        <table class="dd">
                            <tr><td>0</td><td>:</td><td>Data access is permitted.</td></tr>
                            <tr><td>1</td><td>:</td><td>Data access is inhibited.</td></tr>
                        </table>
                        Please refer to the table below for the meaning of each bit.</td>
                    </tr>

                    <tr>
                        <td>No.264</td><td>:</td><td>Password for Ethernet(For end user)</td>
                    </tr>

                    <tr>
                        <td>No.265</td><td>:</td><td>Key word for Ethernet(For end user)
                        <table class="dd">
                            <colgroup valign="top">
                            <colgroup valign="top">
                            <tr><td></td><td>Password and key word to permit change in parameter No.260-263,264.</td></tr>
                            <tr><td>*</td><td>The end user sets this parameter.</td></tr>
                        </colgroup>
                        </colgroup>
                        </table></td>
                    </tr>
                </colgroup>
                </colgroup>
                </colgroup>
                </table>
        </ul>

        <ul>
        <table border="1">
            <tr>
                <td>No.250<br/>
                No.260</td>
                <td>
                <table>
                    <colgroup valign="top" width="56">
                    <colgroup align="center" valign="top">
                    <colgroup valign="top">
                    <tr>
                        <td>bit 0</td>
                        <td>:</td>
                        <td>F-ROM user file(PMC ladder)</td>
                    </tr>
                    <tr>
                        <td>bit 1</td>
                        <td>:</td>
                        <td>F-ROM user file(C language executor)</td>
                    </tr>
                    <tr>
                        <td>bit 2</td>
                        <td>:</td>
                        <td>F-ROM user file(Macro executor/Order-made macro)</td>
                    </tr>
                    <tr>
                        <td>bit 3</td>
                        <td>:</td>
                        <td>F-ROM user file(PMC C language)</td>
                    </tr>
                    <tr>
                        <td>bit 4</td>
                        <td>:</td>
                        <td>F-ROM user file(Maintenance information)</td>
                    </tr>
                    <tr>
                        <td>bit 5</td>
                        <td>:</td>
                        <td>F-ROM user file(Embedded macro function)</td>
                    </tr>
                    <tr>
                        <td>bit 6</td>
                        <td>:</td>
                        <td>(Reserved)</td>
                    </tr>
                    <tr>
                        <td>bit 7</td>
                        <td>:</td>
                        <td>Image of the entire S-RAM</td>
                    </tr>
                    </colgroup>
                    </colgroup>
                    </colgroup>
                </table></td>
            </tr>
            <tr>
                <td>No.251<br/>
                No.261</td>
                <td>
                <table>
                    <colgroup valign="top" width="56">
                    <colgroup align="center" valign="top">
                    <colgroup valign="top">
                    <tr>
                        <td>bit 0</td>
                        <td>:</td>
                        <td>NC programs</td>
                    </tr>
                    <tr>
                        <td>bit 1</td>
                        <td>:</td>
                        <td>P code macro variables</td>
                    </tr>
                    <tr>
                        <td>bit 2</td>
                        <td>:</td>
                        <td>NC parameters</td>
                    </tr>
                    <tr>
                        <td>bit 3</td>
                        <td>:</td>
                        <td>PMC parameters(R [Internal relay],T [Changeable timer],K [Keep relay],C [Counter],D [Data table])</td>
                    </tr>
                    <tr>
                        <td>bit 4 to 7</td>
                        <td>:</td>
                        <td>(Reserved)</td>
                    </tr>
                    </colgroup>
                    </colgroup>
                    </colgroup>
                </table></td>
            </tr>
            <tr>
                <td>No.252<br/>
                No.262</td>
                <td>
                <table>
                    <colgroup valign="top" width="56">
                    <colgroup align="center" valign="top">
                    <colgroup valign="top">
                    <tr>
                        <td>bit 0 to 7</td>
                        <td>:</td>
                        <td>(Reserved)</td>
                    </tr>
                    </colgroup>
                    </colgroup>
                    </colgroup>
                </table></td>
            </tr>
            <tr>
                <td>No.253<br/>
                No.263</td>
                <td>
                <table>
                    <colgroup valign="top" width="56">
                    <colgroup align="center" valign="top">
                    <colgroup valign="top">
                    <tr>
                        <td>bit 0 to 7</td>
                        <td>:</td>
                        <td>(Reserved)</td>
                    </tr>
                    </colgroup>
                    </colgroup>
                    </colgroup>
                </table></td>
            </tr>
        </table>
        <table>
            <colgroup align="top" valign="top">
            <colgroup valign="top">
            <tr><td>Note)</td><td>At i Series MODEL A, there is no No.252,253,262,263. in the NC parameters.</td></tr>
        </colgroup>
        </colgroup>
        </table>
        </ul>
        </type>
        <add></add>
    </parameter>



    <mode></mode>



    <support>
        <m>
            <fs0ia>X</fs0ia>
            <fs0ib>E</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>E</fs16ia>
            <fs18ia>E</fs18ia>
            <fs21ia>E</fs21ia>
            <fs16ib>E</fs16ib>
            <fs18ib>E</fs18ib>
            <fs21ib>E</fs21ib>
            <fs30i>X</fs30i>
        </m>
        <t>
            <fs0ia>X</fs0ia>
            <fs0ib>E</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>E</fs16ia>
            <fs18ia>E</fs18ia>
            <fs21ia>E</fs21ia>
            <fs16ib>E</fs16ib>
            <fs18ib>E</fs18ib>
            <fs21ib>E</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>E</fs16i>
            <fs18i>E</fs18i>
        </p>
        <l>
            <fs16i>E</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>E</fs16i>
            <fs18i>E</fs18i>
        </w>
        <pw>
            <d>E</d>
            <h>E</h>
        </pw>
        <add><b></b></add>
    </support>



    <reference>
        <item>
            <name>cnc_chgprotbit</name>
            <file>Misc/cnc_chgprotbit.htm</file>
        </item>
    </reference>



    <example></example>



  </func>
</root>
