Description
Reads the available number of the P code macro variables (variable for the macro-executor) and the type of it. Those are stored in "ODBPMINF2" with signed binary format.
When the variable for a conversation macro and a high-speed cycle is coexistent, the information for variable of 20,000 or later cannot be acquired with cnc_rdpmacroinfo. So, please use this function.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Pointer to the ODBPMINF2 structure including the P code macro variable information. The ODBPMINF2 structure is as follows.
The following parameters are not the CNC parameter, but the compile parameter of the macro-compiler.
See the "PROGRAMING MANUAL" of the macro-executor for details of the compile parameter.
typedef struct odbpminf2 {
long use_no1; /* number of variables(10000,...) */
long use_no2; /* number of variables(20000,...) */
long use_no20; /* number of high-speed cycle variables */
short v1_type; /* type of variables(10000,...) */
short v2_type; /* type of variables(20000,...) */
short v20_type; /* type of high-speed cycle variables */
} ODBPMINF2;
- use_no1
- Number of usable P code macro variables(10000,...)
'6000' is returned in case of some series/version of CNC control software, but the usable number is acquired as an above value.
(parameter No.9037 * 100)
- use_no2
- Number of usable P code macro variables(20000,...)
- use_no20
- Number of variables for high-speed cycle. The variable for high-speed cycle indicates the following P code macro variable.
- Series 16i/18i
- Series 30i/31i/32i, 0i-D, PMi-A
- v1_type
- Type of P code macro variables(10000,...)
- In case of 'use_no1 = 0', this is invalid.
- v2_type
- Type of P code macro variables(20000,...)
- In case of 'use_no2 = 0', this is invalid.
- v20_type
- Type of P code macro variables for high-speed cycle.
- In case of 'use_no20 = 0', this is invalid.
#20000 | - | #85535 |
#200000 | - | #986432 |
#20000 | - | #85535 |
#200000 | - | #986432 |
#2000000 | - | #3999999 |
0 | : | Type A(floating-point type) |
1 | : | Type B(integer type) |
0 | : | Type A(floating-point type) |
1 | : | Type B(integer type) |
2 | : | Type C (integer type)/high-speed cycle cutting 1 |
3 | : | Type D (integer type)/high-speed cycle cutting 2 |
2 | : | Type C (integer type)/high-speed cycle cutting 1 |
3 | : | Type D (integer type)/high-speed cycle cutting 2 |
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 |
---|---|
(6) |
This function needs the macro-executor 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.
- Series 16i/18i, 30i/31i/32i This function is related to the high-speed cycle cutting option.
For HSSB connection,
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_rdpmacro cnc_wrpmacro cnc_rdpmacror cnc_wrpmacror cnc_rdpmacror2 cnc_wrpmacror2 cnc_getpmactype cnc_setpmactype