Description
Reads the pitch error compensation data specified by "s_number", "e_number". The data is stored in "data" array of "IODBPI" with signed binary format.
- Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C/D, Power Mate i
- Series 15i, 0i-F, 30i, PMi-A
Available range of data | : | -7,..,7 |
Available range of data | : | -128,..,127 |
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specify the start number of the pitch error compensation data.
Specify the end number of the pitch error compensation data.
Specify the data block length (size of IODBPI structure).
6+(number of pitch error compensation data)
IODBPI
N : Number of pitch error compensation data
Pointer to the IODBPI structure including the pitch error compensation data. The IODBPI structure is as follows.
typedef struct iodbpi {
short datano_s; /* start number of pitch error data */
short dummy; /* (not used) */
short datano_e; /* end number of pitch error data */
char data[N]; /* pitch error compensation data */
} IODBPI ; /* N : number of pitch error data */
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 IODBPI structure(length) is wrong. |
(3) |
Pitch error compensation data number(s_number, e_number) is wrong. |
(6) |
This function needs the pitch error compensation 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.
Bi-directional pitch error compensation
Extended bi-directional pitch error compensation
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/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 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.
See Also
Example(C Language)
The following program reads the pitch error compensation data within
the specified number range and displays them.
#include "fwlib32.h"
/* start/end are start/end number to be read. */
short example( short start, short end )
{
IODBPI *pitch ;
short ret, idx ;
pitch = (IODBPI *)malloc( 1024 ) ;
ret = cnc_rdpitchr( h, start, end, 6+(end-start+1), pitch ) ;
if ( !ret )
for ( idx = 0 ; idx < end-start+1 ; idx++ )
printf( "#%04d %+d\n", idx+start, pitch->data[idx] ) ;
free( pitch ) ;
return ( ret ) ;
}
Example(C#)
The following program reads the pitch error compensation data within
the specified number range and displays them.
class example
{
/* start/end are start/end number to be read. */
public short sample(short start, short end)
{
short ret, idx;
byte[] bytes = new byte[1024];
ret = Focas1.cnc_rdpitchr(h, start, end, (short)(6 + (end - start + 1)), bytes);
if (ret == Focas1.EW_OK)
{
for (idx = 0; idx < end - start + 1; idx++)
{
sbyte data = (sbyte)bytes[6 + idx];
Console.WriteLine((data < 0) ? "#{0:d4} {1}" : "#{0:d4} +{1}", idx + start, data);
}
}
return (ret);
}
}