Description
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Pointer to the ODBALM structure including the alarm status information.
The ODBALM structure is as follows.
typedef struct odbalm {
short dummy[2] ; /* Not used. */
short data ; /* Alarm status */
} ODBALM ;
- Series 15/15i
- Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
- Series 16i/18i-W
- Series 30i, 0i-D/F, PMi-A
#00 | : | Background P/S | (BG) |
#01 | : | Foreground P/S | (PS) |
#02 | : | Overheat alarm(only Series 15) | (OH) |
#03 | : | Sub-CPU error(only Series 15) | (SB) |
#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(only Series 15i) | (SY) |
#00 | : | P/S100 |
#01 | : | P/S000 |
#02 | : | P/S101 |
#03 | : | P/S alarm 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 |
#00 | : | P/S alarm |
#01 | : | Overtravel alarm |
#02 | : | Servo alarm |
#03 | : | (Not used) |
#04 | : | Overtravel alarm |
#05 | : | Stroke limit - 1 |
#06 | : | Stroke limit - 2 |
#07 | : | Edit alarm |
#08 | : | APC alarm |
#09 | : | (Not used) |
#10 | : | P/S 5000 ... alarm |
#11 | : | (Not used) |
#12 | : | (Not used) |
#13 | : | (Not used) |
#14 | : | External alarm message |
#15 | : | Reverse control alarm |
#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) |
Return
EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.
The major error codes are as follows.
Return code | Meaning/Error handling |
---|---|
(Only Series 15) |
As for the other return codes or 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 related to the following CNC parameter.
See the manual of CNC parameter for details.
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_alarm2 cnc_rdalminfo cnc_rdalmmsg
Example(C Language)
The following program displays the kinds of the current alarms .
(For Series 16/18/21, 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-)"
} ;
ODBALM buf ;
unsigned short idx ;
cnc_alarm( h, &buf ) ;
if ( buf.data == 0 )
printf( "NO ALARM\n" ) ;
else
for ( idx = 0 ; idx < 11 ; idx++ ) {
if ( buf.data & 0x0001 )
printf( "%s\n", almmsg[idx] ) ;
buf.data >>= 1 ;
}
}
Example(C#)
The following program displays the kinds of the current alarms .
(For Series 16/18/21, 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-)"
};
Focas1.ODBALM buf = new Focas1.ODBALM();
ushort idx;
Focas1.cnc_alarm(h, buf);
if (buf.data == 0)
{
Console.WriteLine("NO ALARM");
}
else
{
for (idx = 0; idx < 11; idx++)
{
if ((buf.data & 0x0001) > 0)
{
Console.WriteLine("{0}", almmsg[idx]);
}
buf.data >>= 1;
}
}
}
}