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

<root>
  <func>


    <title>cnc_rdalmmsg2</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdalmmsg2(unsigned short FlibHndl, short type, short *num, ODBALMMSG2 *almmsg);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
Reads the currently arising CNC alarm messages. All alarm messages can be read at once.<p/>

Differing from <a href="misc/cnc_rdalminfo.htm" target="_parent">cnc_rdalminfo</a> fucntion, the axis name is inserted in the axis-type alarm message.<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>type</name>
                    <type>in</type>
                    <content>
                       Specify the type of alarm.
                       <dd><br/>
                            <ul>
                                <table class="dd">
                                    <tr><td>0</td>  <td>:</td> <td>Parameter switch on</td>            <td>(SW)</td> </tr>
                                    <tr><td>1</td>  <td>:</td> <td>Power off parameter set</td>        <td>(PW)</td> </tr>
                                    <tr><td>2</td>  <td>:</td> <td>I/O error</td>                      <td>(IO)</td> </tr>
                                    <tr><td>3</td>  <td>:</td> <td>Foreground P/S</td>                 <td>(PS)</td> </tr>
                                    <tr><td>4</td>  <td>:</td> <td>Overtravel,External data</td>       <td>(OT)</td> </tr>
                                    <tr><td>5</td>  <td>:</td> <td>Overheat alarm</td>                 <td>(OH)</td> </tr>
                                    <tr><td>6</td>  <td>:</td> <td>Servo alarm</td>                    <td>(SV)</td> </tr>
                                    <tr><td>7</td>  <td>:</td> <td>Data I/O error</td>                 <td>(SR)</td> </tr>
                                    <tr><td>8</td>  <td>:</td> <td>Macro alarm</td>                    <td>(MC)</td> </tr>
                                    <tr><td>9</td>  <td>:</td> <td>Spindle alarm</td>                  <td>(SP)</td> </tr>
                                    <tr><td>10</td> <td>:</td> <td>Other alarm(DS)</td> <td>(DS)</td> </tr>
                                    <tr><td>11</td> <td>:</td> <td>Alarm concerning Malfunction prevent functions</td> <td>(IE)</td> </tr>
                                    <tr><td>12</td> <td>:</td> <td>Background P/S</td>                 <td>(BG)</td> </tr>
                                    <tr><td>13</td> <td>:</td> <td>Syncronized error</td>              <td>(SN)</td> </tr>
                                    <tr><td>14</td> <td>:</td> <td>(reserved)</td>                     <td></td>     </tr>
                                    <tr><td>15</td> <td>:</td> <td>External alarm message</td>         <td>(EX)</td> </tr>
                                    <tr><td>16</td> <td>:</td> <td>(reserved)</td>                     <td></td>     </tr>
                                    <tr><td>17</td> <td>:</td> <td>(reserved)</td>                     <td></td>     </tr>
                                    <tr><td>18</td> <td>:</td> <td>(reserved)</td>                     <td></td>     </tr>
                                    <tr><td>19</td> <td>:</td> <td>PMC error</td>                      <td>(PC)</td> </tr>
                                    <tr><td>20-31</td> <td>:</td> <td>(not used)</td>                  <td></td>     </tr>
                                </table>
                            </ul>
                        </dd>
                    </content>
                </item>
                <item>
                    <name>num</name>
                    <type>in/out</type>
                    <content>
                            Pointer to the number of alarm messages to be read. Specify the number of alarm messages to be read before function call and actual number of data being read is stored after the function call.
                    </content>
                </item>
                <item>
                    <name>almmsg</name>
                    <type>out</type>
                    <content>
Specify the pointer to the array of ODBALMMSG2 structure to store the alarm messages. The number of array must be equal to "*num".<p/>
The ODBALMMSG2 structure is as follows.

<pre>
typedef struct odbalmmsg2 {
        long alm_no ;           /* alarm number */
        short type ;            /* alarm type */
        short axis ;            /* axis number */
        short dummy ;           /* reserved */
        short msg_len ;         /* message length */
        char alm_msg[64];       /* alarm message */
} ODBALMMSG2;
</pre>

                    <dt>alm_no</dt>
                        <dd>Alarm number is stored.</dd>
                    <dt>type</dt>
                        <dd>Alarm type is stored. The value is same as one which is specified as the parameter <b>type</b>.</dd>
                    <dt>axis</dt>
                        <dd>Axis number is stored. (1 to maximum controlled axes number)</dd>
                        <dd>As for the none axis-type alarm, it is 0. </dd>
                    <dt>msg_len</dt>
                        <dd>Message length(binary) is stored. (1 to 64)</dd>
                    <dt>alm_msg</dt>
                        <dd>Alarm message character string (ASCII) is stored.</dd>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
        <item>
            <name>EW_LENGTH</name>
            <content>
                Data block length error<br/>
                The alarm message number (*num) is 0 or less.
            </content>
        </item>
        <item>
            <name>EW_ATTRIB</name>
            <content>
                Data attribute error<br/>
                The specification of alarm type (type) is wrong.
           </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 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>
    </option>



    <parameter></parameter>



    <mode></mode>



    <support>
        <m>
            <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>O</fs30i>
        </m>
        <t>
            <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>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>
    </support>



    <reference>
        <item>
            <name>cnc_alarm</name>
            <file>misc/cnc_alarm.htm</file>
        </item>
        <item>
            <name>cnc_alarm2</name>
            <file>misc/cnc_alarm2.htm</file>
        </item>
        <item>
            <name>cnc_rdalminfo</name>
            <file>misc/cnc_rdalminfo.htm</file>
        </item>
        <item>
            <name>cnc_rdalmmsg</name>
            <file>misc/cnc_rdalmmsg.htm</file>
        </item>
    </reference>



    <example></example>



  </func>
</root>
