Description
Reads the contents of the operator's message in CNC.
The operator's message is stored in "data" of "OPMSG2".
This function can be used in case of four external operator messages on Series 16/18/21, 16i/18i/21i, 0i, 30i and PMi-A.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specify the kind of operator's message.
0 | : | 1st message |
1 | : | 2nd message |
2 | : | 3rd message |
3 | : | 4th message |
-1 | : | all messages |
Specify the length of the data block(size of OPMSG2 structure)
single message(1st - 4th message)
all messages
Pointer to the OPMSG2 structure including the operator's message.
The OPMSG2 structure is as follows.
typedef struct opmsg2 {
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 */
} OPMSG2 ; /* MSG_SIZE : Message length */
- datano
- The number of operator's message is stored. message exists
- message exists
- 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)
number does not exist | : | 0 |
number exist | : | 2000 to 2099 |
0 to 3 | : | 1st to 4th message |
1 to 64 | : | operator's message |
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) |
Size of OPMSG2 structure(length) is wrong. |
(4) |
The specification of the kind of operator's message(type) is wrong. |
(6) |
Set necessary CNC option. |
(9) |
|
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.
external data input
For HSSB connection,
For Ethernet connection,
The Ethernet function and the extended driver/library function are necessary. However, in case of Series 0i-D/F, 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.