Description
Reads the custom macro variables specified by the starting number, "s_no", and number of variables, "*num". The data is stored in "data" with double format. It is not influenced by setting of cnc_setmactype function.
The kinds of custom macro variable are as follows.
(1) | Local variable (#1,..,#33) The local variables which belong to the macro program just being executed when the application program calls this function are read. |
(2) | Common variable (#100,..,#999) See the description of cnc_rdmacroinfo function about the available range of common variables. |
(3) | System variable (#1000~) In case of system variable, the variable can be read one by one at a time. |
(4) | Common variable (#98000~#98499) See the description of cnc_rdmacroinfo function about the available range of common variables. |
The value of an undefined variable is called "vacant", and it is expressed as follows.
0xFFFFFFFFFFFFFFFF
See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specify the start custom macro variable number.
Specify pointer to the number of custom macro variable.
The number which was read actually is returned.
Pointer to the data of custom macro variable.
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) |
The number of custom macro variables(*num) is 0 or less. |
(3) |
Custom macro variable number(s_no) is wrong. |
(6) |
This function needs the custom macro 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.
And this function is related to the following CNC option.
Embedded macro
Addition of custom macro common variables 1000
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, 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_rdmacro cnc_wrmacro cnc_rdmacror cnc_wrmacror cnc_wrmacror2 cnc_rdmacroinfo cnc_getmactype cnc_setmactype