
------------------------------------------------------------------------------
1.51 Write pitch error compensation data (range specified). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrpitchr
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_wrpitchr( short length, struct iodbpi *buf ) ;
struct iodbpi {
short datano_s ; /* Start pitch error compensation */
/* number. */
short dummy ; /* Not used. */
short datano_e ; /* End pitch error compensation */
/* number. */
char data[N] ; /* Pitch error compensation data. */
} ; /* N is number of compensation data */
/* to be written. */
[Arguments]
length Data block length ( =6+(number of compensation data to
be written) )
buf Buffer in which the pitch error compensation data are
stored.
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect data block length "length".
EW_NUMBER( 3) Incorrect pitch error compensation number
"buf.datano_s" or "buf.datano_e".
EW_BUSY(-1) An attempt was made to execute this command when other
window processing of a low-speed type was in progress.
Execute the command after the window processing has
ended.
[Description]
Alters the pitch error compensation data stored in the CNC within the
specified range.
Specify the start pitch error compensation data number in
"buf.datano_s" and the end one in "buf.datano_e" with binary format.
Store the pitch error compensation data "buf.data" with signed binary
format. (The negative value is represented as 2's complement.)