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 "ODBPMINF" with signed binary format.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Pointer to the ODBPMINF structure including the P code macro variable information. The ODBPMINF 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.
Please specify "PCD_UWORD" for "-D" option when compiling, if the number of variables whose number is 40,000 or greater for Series 15, or 20,000 or greater for Series 16/18/21, 16i/18i/21i, 0i, Power Mate i exceeds 32767.
- Series 15
typedef struct odbpminf {
short use_no1; /* number of variables(30000,...) */
#ifdef PCD_UWORD /* When the number of variables whose number is 40,000
or greater exceeds 32767 */
unsigned short use_no2;
/* number of variables(40000,...) */
#else
short use_no2; /* number of variables(40000,...) */
#endif
short v2_type1;/* type of variables(30000,...) */
short v2_type2;/* type of variables(40000,...) */
} ODBPMINF;
- use_no1
- Number of usable P code macro variables(30000,...)
- use_no2
- Number of usable P code macro variables(40000,...)
- v2_type1
- Type of P code macro variables(30000,...)
This is always the integer type.
In case of 'use_no1=0', this is invalid.
0 : Type A(floating-point type) 1 : Type B(integer type) - v2_type2
- Type of P code macro variables(40000,...)
In case of 'use_no2=0', this is invalid.
0 : Type A(floating-point type) 1 : Type B(integer type)
typedef struct odbpminf {
short use_no1; /* number of variables(10000,...) */
#ifdef PCD_UWORD /* When the number of variables whose number is 20,000
or greater exceeds 32767 */
unsigned short use_no2;
/* number of variables(20000,...) */
#else
short use_no2; /* number of variables(20000,...) */
#endif
short v2_type; /* type of variables(20000,...) */
} ODBPMINF;
- use_no1
- Number of usable P code macro variables(10000,...)
(parameter No.9037 * 100)
'6000' is returned in case of some series/version of CNC control software, but the usable number is acquired as an above value.
- use_no2
- Number of usable P code macro variables(20000,...)
However, use_no2 becomes the following meanings for Type C/D(use_no2(=1,2,4,...) * 65536)
- v2_type
- Type of P code macro variables(20000,...)
In case of 'use_no2=0', this is invalid.
0 : Type A(floating-point type) 1 : Type B(integer type) 2 : Type C (integer type)/high-speed cycle cutting 1
(except Series 21, 21i, 0i, Power Mate i)3 : Type D (integer type)/high-speed cycle cutting 2
(except Series 21, 21i, 0i, Power Mate i)Type of P code macro variables(10000,...) is always the floating-point type.
typedef struct odbpminf {
short use_no1; /* number of variables(10000,...) */
#ifdef PCD_UWORD /* When the number of variables whose number is 20,000
or greater exceeds 32767 */
unsigned short use_no2;
/* number of variables(20000,...) */
#else
short use_no2; /* number of variables(20000,...) */
#endif
short v2_type; /* type of variables(20000,...) */
} ODBPMINF;
- use_no1
- Number of usable P code macro variables(10000,...)
(parameter No.9037 * 100)
'6000' is returned in case of some series/version of CNC control software, but the usable number is acquired as an above value.
- use_no2
- Number of usable P code macro variables(20000,...)
However, use_no2 becomes the following meanings for Type C/D(use_no2(=1,2,4,...) * 65536)
- v2_type
- Type of P code macro variables(20000,...)
In case of 'use_no2=0', this is invalid.
0 : Type A(floating-point type) 1 : Type B(integer type) Type of P code macro variables(10000,...) is always the floating-point type.
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 16/18, 16i/18i This function is related to the high-speed cycle cutting 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.
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 | 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_rdpmacro cnc_wrpmacro cnc_rdpmacror cnc_wrpmacror cnc_rdpmacror2 cnc_wrpmacror2 cnc_getpmactype cnc_setpmactype