
------------------------------------------------------------------------------
1.32 Read alarm status. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_alarm
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_alarm( struct odbapb *buf ) ;
struct odbapb {
short dummy[2] ; /* Not used. */
short data ; /* Alarm status. */
} ;
[Arguments]
buf Buffer in which the alarm status is stored.
[Return]
EW_OK( 0) Successful.
[Description]
Reads the alarm status of CNC.
This function is used for watching CNC's alarm status, displaying
the maintenance information or guidance of how to reset the alarm,
etc.
The alarm status is stored in each bits of "buf.data" as follows.
buf.data
bit0 The parameter write switch is on. (SW)
bit1 A parameter that requires turning off the
power was input. (PW)
bit2 I/O error (IO)
bit3 Foreground P/S (PS)
bit4 Overtravel/external data input error (OT)
bit5 Overheat (OH)
bit6 Servo alarm (SV)
bit7 Data input/output error (SR)
bit8 Macro alarm (MC)
bit9 Spindle alarm (SP)
bit10 OT alarm that will not lead to a PS alarm (DS)
bit11 Alarm related to malfunction prevention (IE)
bit12 Background P/S (BG)
bit13 Synchronization error too high (SN)
bit14 Reserved
bit15 External alarm message (EX)
When any alarm is arising, the correspondent bit of "buf.data" is set
as "1". If no alarm, each bit is "0".