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

<root>
  <func>


    <title>cnc_rdalmmsg</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_rdalmmsg(unsigned short FlibHndl, short type, short *num, ODBALMMSG *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/>
    The number of characters which can be acquired in this function is up to 32 characters. So, Plese use <a href="misc/cnc_rdalmmsg2.htm" target="_parent">cnc_rdalmmsg2</a> fucntion for Series 300i/310i/320i.<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>
                                <li>Series 150i (only Ethernet)</li>
                                    <table class="dd">
                                            <tr><td>0</td>  <td>:</td> <td>Background P/S</td>               <td>(BG)</td> </tr>
                                            <tr><td>1</td>  <td>:</td> <td>Foreground P/S</td>               <td>(PS)</td> </tr>
                                            <tr><td>2</td>  <td>:</td> <td>Overheat alarm</td>               <td>(OH)</td> </tr>
                                            <tr><td>3</td>  <td>:</td> <td>Sub-CPU error</td>                <td>(SB)</td> </tr>
                                            <tr><td>4</td>  <td>:</td> <td>Syncronized error</td>            <td>(SN)</td> </tr>
                                            <tr><td>5</td>  <td>:</td> <td>Parameter switch on</td>          <td>(SW)</td> </tr>
                                            <tr><td>6</td>  <td>:</td> <td>Overtravel,External data</td>     <td>(OT)</td> </tr>
                                            <tr><td>7</td>  <td>:</td> <td>PMC error</td>                    <td>(PC)</td> </tr>
                                            <tr><td>8</td>  <td>:</td> <td>External alarm message (1)</td>   <td>(EX)</td> </tr>
                                            <tr><td>9</td>  <td>:</td> <td>(Not used) </td>                  <td></td>     </tr>
                                            <tr><td>10</td> <td>:</td> <td>Serious P/S</td>                  <td>(SR)</td> </tr>
                                            <tr><td>11</td> <td>:</td> <td>(Not used)</td>                   <td></td>     </tr>
                                            <tr><td>12</td> <td>:</td> <td>Servo alarm</td>                  <td>(SV)</td> </tr>
                                            <tr><td>13</td> <td>:</td> <td>I/O error</td>                    <td>(IO)</td> </tr>
                                            <tr><td>14</td> <td>:</td> <td>Power off parameter set</td>      <td>(PW)</td> </tr>
                                            <tr><td>15</td> <td>:</td> <td>System alarm</td>                 <td>(SY)</td> </tr>
                                            <tr><td>16</td> <td>:</td> <td>External alarm message (2)</td>   <td>(EX)</td> </tr>
                                            <tr><td>17</td> <td>:</td> <td>External alarm message (3)</td>   <td>(EX)</td> </tr>
                                            <tr><td>18</td> <td>:</td> <td>External alarm message (4)</td>   <td>(EX)</td> </tr>
                                            <tr><td>19</td> <td>:</td> <td>Macro alarm</td>                  <td>(MC)</td> </tr>
                                            <tr><td>20</td> <td>:</td> <td>Spindle alarm</td>                <td>(SP)</td> </tr>
                                            <tr><td>-1</td> <td>:</td> <td>all type</td>                     <td></td>     </tr>
                                    </table>
                                <li>Series 160i/180i/210i, 0i, Power Mate i (only Ethernet)</li>
                                    <table class="dd">
                                            <tr><td>0</td>  <td>:</td> <td>P/S100</td>                                  </tr>
                                            <tr><td>1</td>  <td>:</td> <td>P/S000</td>                                  </tr>
                                            <tr><td>2</td>  <td>:</td> <td>P/S101</td>                                  </tr>
                                            <tr><td>3</td>  <td>:</td> <td>P/S alarm except above</td>                  </tr>
                                            <tr><td>4</td>  <td>:</td> <td>Overtravel alarm</td>                        </tr>
                                            <tr><td>5</td>  <td>:</td> <td>Overheat alarm</td>                          </tr>
                                            <tr><td>6</td>  <td>:</td> <td>Servo alarm</td>                             </tr>
                                            <tr><td>7</td>  <td>:</td> <td>System alarm</td>                            </tr>
                                            <tr><td>8</td>  <td>:</td> <td>APC alarm</td>                               </tr>
                                            <tr><td>9</td>  <td>:</td> <td>Spindle alarm</td>                           </tr>
                                            <tr><td>10</td> <td>:</td> <td>P/S alarm(No.5000,..), Punchpress alarm</td> </tr>
                                            <tr><td>11</td> <td>:</td> <td>Laser alarm</td>                             </tr>
                                            <tr><td>12</td> <td>:</td> <td>(Not used) </td>                             </tr>
                                            <tr><td>13</td> <td>:</td> <td>Rigid tap alarm</td>                         </tr>
                                            <tr><td>14</td> <td>:</td> <td>(Not used)</td>                              </tr>
                                            <tr><td>15</td> <td>:</td> <td>External alarm message</td>                  </tr>
                                            <tr><td>-1</td> <td>:</td> <td>all type</td>                                </tr>
                                    </table>
                                <li>Series 300i</li>
                                    <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>-1</td> <td>:</td> <td>all type</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 ODBALMMSG structure to store the alarm messages. The number of array must be equal to "*num".<p/>
The ODBALMMSG structure is as follows.

<pre>
typedef struct odbalmmsg {
        long alm_no ;           /* alarm number */
        short type ;            /* alarm type */
        short axis ;            /* axis number */
        short dummy ;           /* reserved */
        short msg_len ;         /* message length */
        char alm_msg[32];       /* alarm message */
} ODBALMMSG;
</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 32)</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 160i/180i/210i/0i MODEL B and 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>E</fs0ib>
            <fs15>X</fs15>
            <fs15i>E</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>O</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>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>E</fs16i>
            <fs18i>E</fs18i>
        </p>
        <l>
            <fs16i>E</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>X</fs16i>
            <fs18i>X</fs18i>
        </w>
        <pw>
            <d>E</d>
            <h>E</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_rdalmmsg2</name>
            <file>misc/cnc_rdalmmsg2.htm</file>
        </item>
    </reference>



    <example></example>



  </func>
</root>
