Description
Reads the alarm status of CNC. This function is the improved version of the cnc_alarm function.
This function is used for watching CNC's alarm status, displaying the maintenance information or guidance of how to reset the alarm, etc.
When CNC falls into the system alarm, it is completely impossible to communicate data with CNC, and the alarm status cannot be acquired.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specify the address of the variable which is set the alarm status.
The meaning of each bit is as follows.
- Series 15i
- Series 16i/18i/21i, 0i-A/B/C, Power Mate i (only Ethernet)
- Series 30i, 0i-D/F, PMi-A
#00 | : | Background P/S | (BG) |
#01 | : | Foreground P/S | (PS) |
#02 | : | (Not used) | |
#03 | : | (Not used) | |
#04 | : | Syncronized error | (SN) |
#05 | : | Parameter switch on | (SW) |
#06 | : | Overtravel,External data | (OT) |
#07 | : | PMC error | (PC) |
#08 | : | External alarm message (1) | (EX) |
#09 | : | (Not used) | |
#10 | : | Serious P/S | (SR) |
#11 | : | (Not used) | |
#12 | : | Servo alarm | (SV) |
#13 | : | I/O error | (IO) |
#14 | : | Power off parameter set | (PW) |
#15 | : | System alarm | (SY) |
#16 | : | External alarm message (2) | (EX) |
#17 | : | External alarm message (3) | (EX) |
#18 | : | External alarm message (4) | (EX) |
#19 | : | Macro alarm | (MC) |
#20 | : | Spindle alarm | (SP) |
#21 to 31 | : | (Not used) |
#00 | : | P/S100 |
#01 | : | P/S000 |
#02 | : | P/S101 |
#03 | : | P/Salarm except above |
#04 | : | Overtravel alarm |
#05 | : | Overheat alarm |
#06 | : | Servo alarm |
#07 | : | System alarm |
#08 | : | APC alarm |
#09 | : | Spindle alarm |
#10 | : | P/S alarm(No.5000,..), Punchpress alarm |
#11 | : | Laser alarm |
#12 | : | (Not used) |
#13 | : | Rigid tap alarm |
#14 | : | (Not used) |
#15 | : | External alarm message |
#16 to 31 | : | (Not used) |
#00 | : | Parameter switch on | (SW) |
#01 | : | Power off parameter set | (PW) |
#02 | : | I/O error | (IO) |
#03 | : | Foreground P/S | (PS) |
#04 | : | Overtravel,External data | (OT) |
#05 | : | Overheat alarm | (OH) |
#06 | : | Servo alarm | (SV) |
#07 | : | Data I/O error | (SR) |
#08 | : | Macro alarm | (MC) |
#09 | : | Spindle alarm | (SP) |
#10 | : | Other alarm(DS) | (DS) |
#11 | : | Alarm concerning Malfunction prevent functions | (IE) |
#12 | : | Background P/S | (BG) |
#13 | : | Syncronized error | (SN) |
#14 | : | (reserved) | |
#15 | : | External alarm message | (EX) |
#16 | : | (reserved) | |
#17 | : | (reserved) | |
#18 | : | (reserved) | |
#19 | : | PMC error | (PC) |
#20 to 31 | : | (Not used) |
Return
EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.
As for the details, see "Return status of Data window function"
CNC option
For HSSB connection,
For Ethernet connection,
The Ethernet function and the extended driver/library function are necessary. However, in case of Series 16i/18i/21i-B, 0i-B/C/D/F, Series 30i and PMi-A, the required CNC option is as follows. When Embedded Ethernet is used,above two optional functions are not required.
When Ethernet board is used,
- only Ethernet function is required.
CNC parameter
This function is not related to CNC parameter.
CNC mode
This function can be used in any CNC mode.
Available CNC
0i-A | 0i-B/C(Note) | 0i-D | 0i-F | 15 | 15i | 16 | 18 | 21 | 16i-A | 18i-A | 21i-A | 16i-B | 18i-B | 21i-B | 30i-A | 30i-B | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
M (Machining) | |||||||||||||||||
T (Turning) | - | ||||||||||||||||
LC (Loader) | - | - | - | - | - | - | - | - |
0i-D | 0i-F | 16i | 18i | 30i-A | 30i-B | |
---|---|---|---|---|---|---|
P (Punch press) | - | |||||
L (Laser) | - | - | - | - | ||
W (Wire) | - | - |
Power Mate i-D | |
Power Mate i-H | |
Power Motion i-A | O |
"O" | : | Both Ethernet and HSSB | |
"E" | : | Ethernet | |
"H" | : | HSSB | |
"X" | : | Cannot be used | |
"-" | : | None |
Note) 0i-C does not support the HSSB function.
See Also
cnc_alarm cnc_rdalminfo cnc_rdalmmsg
Example(C Language)
The following program displays the kinds of the current alarms.
(For Series 16i/18i/21i, 0i, Power Mate i)
#include "fwlib32.h"
void example( void )
{
char *almmsg[] = {
"P/S 100 ALARM","P/S 000 ALARM",
"P/S 101 ALARM","P/S ALARM (1-255)",
"OT ALARM", "OH ALARM",
"SERVO ALARM", "SYSTEM ALARM",
"APC ALARM", "SPINDLE ALARM",
"P/S ALARM (5000-)"
} ;
long alm ;
unsigned short idx ;
cnc_alarm2( h, &alm ) ;
if ( alm == 0 )
printf( "NO ALARM\n" ) ;
else
for ( idx = 0 ; idx < 11 ; idx++ ) {
if ( alm & 0x0001 )
printf( "%s\n", almmsg[idx] ) ;
alm >>= 1 ;
}
}
Example(C#)
The following program displays the kinds of the current alarms.
(For Series 16i/18i/21i, 0i, Power Mate i)
class example
{
public void sample()
{
string[] almmsg = {
"P/S 100 ALARM","P/S 000 ALARM",
"P/S 101 ALARM","P/S ALARM (1-255)",
"OT ALARM", "OH ALARM",
"SERVO ALARM", "SYSTEM ALARM",
"APC ALARM", "SPINDLE ALARM",
"P/S ALARM (5000-)"
};
int alm;
ushort idx;
Focas1.cnc_alarm2(h, out alm);
if (alm == 0)
{
Console.WriteLine("NO ALARM");
}
else
{
for (idx = 0; idx < 11; idx++)
{
if ((alm & 0x0001) > 0)
{
Console.WriteLine("{0}", almmsg[idx]);
}
alm >>= 1;
}
}
}
}