Description
Reads the contents of the operator's message in CNC. The operator's message is stored in "data" of "opmsg".
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
0 | : | 1st message |
1 | : | 2nd message |
2 | : | 3rd message |
3 | : | 4th message |
4 | : | macro message |
5~16 | : | 5th - 16th message(30i, 0i-D/F, PMi-A olny) |
-1 | : | all message |
In case of four operator's messages with the Series 30i, 0i-D/F and PMi-A, if the values 5-16 are set, the error occurs.
And, if four is specified for NC in which the macro message reading function is not provided, the error occurs.
This function returns the number of message, which was read actually.
Please specify "1" for type=0-4(type=0-16 30i, 0i-D/F, PMi-A).
And when the type is "-1", specify "5" in case of 4 operator's messages and specify "17" in case of 16 operator's messages (30i, 0i-D/F, PMi-A only).
Pointer to the OPMSG3 structure including the operator's message. The OPMSG3 structure is as follows.
typedef struct opmsg3 {
short datano ; /* Number of operator's message */
short type ; /* Kind of operator's message */
short char_num ; /* Message length */
char data[MSG_SIZE] ; /* Operator's message strings */
} OPMSG3; /* MSG_SIZE : Message length */
- datano
- The number of operator's message is stored.
- Judge the existence of the operator's message by message number of datano. (When the datano is -1, the operator's message does not exist).
- message exists
- Series 15/15i
- 0~999
- Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
- number exist : 2000 to 2099
- number does not exist : 2100 to 2999
- Series 30i, 0i-D/F, PMi-A
- * In case of Parameter No.6301#1=0
- number exist : 2000 to 2099
- number does not exist : 2100 to 2999
- * In case of Parameter No.6301#1=1
- number exist : 0 - 99
- number does not exist : 100 - 4095
- message does not exist
- -1
- type
- Kind of operator's message is stored.
- char_num
- The operator's message length is stored. The '\0' at the end of strings is included in the length.
- data
- The operator's message strings are stored. The '\0' is set at the end of strings.
- The message is acquired in the following character-codes.
- Note1) In CNC except Series 30i, 0i-D/F and PMi-A, messages except English and Japanese cannot be correctly acquired.
- Note2) Korean cannot be correctly acquired with FOCAS2/Ethernet.(Except 30i-B, 0i-D/F and PMi-A)
0 to 3 | : | 1st to 4th message |
4 | : | macro message |
5 to 16 | : | 5th to 16th message(30i, 0i-D/F, PMi-A only) |
English | : | ASCII |
Japanese | : | Shift-JIS |
Simplified Chinese | : | Shift-JIS |
Traditional Chinese | : | GB2312 |
Korean | : | Code Page 949 |
Cyrillic | : | Code Page 1251 |
Turkish | : | Code Page 1254 |
Others European | : | Western Europe |
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 |
---|---|
(2) |
|
(4) |
The specification of the kind of operator's message(type) is wrong. |
(6) |
Set necessary CNC option. |
As for the other return codes or the details, see "Return status of Data window function"
CNC option
This function need the following CNC option.
- Series 15/15i The External data I/O function
- Series 16i/18i/21i, 0i-A/B/C External message
- Series 30i, 0i-D/F, PMi-A External message
External data input
Custom macro B
External data input
Custom macro
For HSSB connection,
For Ethernet connection,
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, The two optional functions are not required. When Ethernet board is used, Only an Ethernet function is required.
CNC parameter
This function is related to the following CNC parameter.
See the manual of CNC parameter for details.
3207#0 (set in case of four operator's messages)
11931#1
=0(4 operator's messages) --- influenced by setting
=1(16 operator's messages)
6301#1
=0(A message number from 0 to 999 can be sent.) --- influenced by setting
=1(A message number from 0 to 4095 can be sent.)
6310
(Setting for number addition to external operator messages) --- influenced by setting
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.