Description
Reads the operation history data.
Please use cnc_rdophistry2 function instead of this function for Series 15i.
Also please use cnc_rdophistry4 function for Series 30i.
It is necessary to execute cnc_stopophis function before this function is used.
And it is necessary to execute cnc_startophis function after reading data as short as possible.
The structure of the operation history data is different according to the kind of the record(rec_type). When the operation history data is accessed, it is necessary to use a structure corresponding to the kind.
The start/end record number means the relative number uesd at reading the operation history data. These record numbers are valid only at the period from the execution of cnc_stopophis function until the execution of cnc_startophis function.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specify the start record number.(more than 1)
Specify the end record number.(more than 1)
Specify the data block length(size of ODBHIS structure).
Pointer to the ODBHIS structure in which the operation history data is stored. The ODBHIS structure is as follows.
typedef struct odbhis {
unsigned s_no; /* Start record number */
short type; /* Not used */
unsigned e_no; /* Most recently entered */
/* record number */
union {
struct {
short rec_type; /* Record type */
short alm_grp; /* Alarm type */
short alm_no; /* Alarm number */
char axis_no; /* Axis number */
char dummy; /* Not used */
} rec_alm; /* Structure of alarm */
/* record */
struct {
short rec_type; /* Record type */
char key_code; /* Key code */
char pw_flag; /* Power-on flag */
char dummy[4]; /* Not used */
} rec_mdi; /* Structure of */
/* MDI key record */
struct {
short rec_type; /* Record type */
char sig_name; /* Signal name */
char sig_old; /* Bit pattern before a */
/* transition */
char sig_new; /* Bit pattern after a */
/* transition */
char dummy; /* Not used */
short sig_no; /* Signal number */
} rec_sgn; /* Structure of signal */
/* record */
struct {
short rec_type; /* Record type */
char year; /* Year */
char month; /* Month */
char day; /* Day */
char pw_flag; /* Power-on flag */
char dummy[2]; /* Not used */
} rec_date; /* Structure of date */
/* record */
struct {
short rec_type; /* record type */
char hour; /* Hour */
char minute; /* Minute */
char second; /* Second */
char pw_flag; /* Power-on flag */
char dummy[2]; /* Not used */
} rec_time; /* Structure of Time */
/* record */
} data[N]; /* N : Number of record */
} ODBHIS ;
- rec_type
- Record type
- alm_grp
- Alarm type
- Series 15 (HSSB only)
- Series 16/18/21, 16i/18i/21i, 0i, Power Mate i
- Series 16i/18i-W
- alm_no
- Alarm number
- Only P/S alarm, System alarm and External alarm are effective.(expect Series 15)
- axis_no
- Axis number(only Series 15)
0 is stored for an unrelated alarm to the axis. - key_code
- Key code
- pw_flag
- Power-on flag
- 1 : For power on
0 : Usually, 0 is stored
- sig_name
- Signal name
- 1 : X
2 : G
3 : Y
4 : F
- sig_old
- Bit pattern before transition
- sig_new
- Bit pattern after transition
- sig_no
- Signal number
- X : 0~127 or 1000~1063
G : 0~255 or 1000~1255 or 2000~2255
Y : 0~127 or 1000~1063
F : 0~255 or 1000~1255 or 2000~2255
- X : 0~127 or 200~327 or 1000~1063
G : 0~511 or 1000~1511 or 2000~2511
Y : 0~127 or 200~327 or 1000~1063
F : 0~511 or 1000~1511 or 2000~2511
- year
- Year (0~99)
- month
- Month (1~12)
- day
- Date (1~31)
- hour
- Hour (0~23)
- minute
- Minute (0~59)
- second
- Second (0~59)
0 | : | MDI key history |
1 | : | Signal history |
2 | : | Alarm history |
3 | : | Date history |
4 | : | Time history |
5 | : | MDI key history for SUB (only Series 16/18/21, Power Mate i) |
6 | : | Signal history for SUB (only Series 16/18/21, Power Mate i) |
7 | : | Alarm history for SUB (only Series 16/18/21, Power Mate i) |
10 | : | MDI key history for 3rd Path (only Series 16i) |
11 | : | Signal history for 3rd Path (only Series 16i) |
12 | : | Alarm history for 3rd Path (only Series 16i) |
bit 0 | : | Background P/S | (BG) |
bit 1 | : | Foreground P/S | (PS) |
bit 2 | : | Over heat alarm | (OH) |
bit 3 | : | Sub-CPU error | (SB) |
bit 4 | : | Syncronized error | (SN) |
bit 5 | : | Parameter switch on | (SW) |
bit 6 | : | Over travel, external data | (OT) |
bit 7 | : | PMC error | (PC) |
bit 8 | : | External alarm message | (EX) |
bit 9 | : | (Not used) | |
bit 10 | : | Serious P/S | (SR) |
bit 11 | : | (Not used) | |
bit 12 | : | Servo alarm | (SV) |
bit 13 | : | I/O error | (IO) |
bit 14 | : | Power off parameter set | (PW) |
bit 15 | : | (Not used) |
bit 0 | : | P/S 100 | |
bit 1 | : | P/S 000 | |
bit 2 | : | P/S 101 | |
bit 3 | : | P/S others | |
bit 4 | : | Over travel | |
bit 5 | : | Over heat | |
bit 6 | : | Servo alarm | |
bit 7 | : | System alarm | |
bit 8 | : | APC alarm | |
bit 9 | : | Spindle alarm | |
bit 10 | : | P/S 5000,.., Punch press alarm | |
bit 11 | : | Laser alarm | |
bit 12 | : | (Not used) | |
bit 13 | : | Rigid tap alarm | |
bit 14 | : | (Not used) | |
bit 15 | : | External alarm message |
bit 0 | : | P/S alarm | |
bit 1 | : | Overtravel alarm | |
bit 2 | : | Servo alarm | |
bit 3 | : | (Not used) | |
bit 4 | : | Overheat alarm | |
bit 5 | : | Stroke limit - 1 | |
bit 6 | : | Stroke limit - 2 | |
bit 7 | : | Edit alarm | |
bit 8 | : | APC alarm | |
bit 9 | : | System alarm | |
bit 10 | : | P/S 5000 ... alarm | |
bit 11 | : | (Not used) | |
bit 12 | : | (Not used) | |
bit 13 | : | (Not used) | |
bit 14 | : | External alarm | |
bit 15 | : | Reverse control alarm |
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 |
---|---|
(1) |
|
(2) |
Size of ODBHIS structure(length) is wrong. (e_no-s_no+1) * sizeof(data[0]) + 6 < length |
(3) |
The specification of the record number (s_no, e_no) is wrong. |
(6) |
The extended driver/library function is necessary. |
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, 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.
In case of Series 16i/18i/21i MODEL B, the extended operation history function is concerned.
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 | X |
"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_stopophis cnc_startophis cnc_rdophisno cnc_rdophistry2 cnc_rdophistry4 cnc_clearophis