
------------------------------------------------------------------------------
1.37 Write tool offset amount (range specified). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrtofsr
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_wrtofsr( short length, struct iodbto *buf ) ;
struct iodbto {
short datano_s ; /* Start offset number. */
short type ; /* Offset type. */
short datano_e ; /* End offset number. */
union {
long m_ofs[N] ; /* M Series individual. */
long m_ofs_a[N] ; /* M Series Memory A all. */
long m_ofs_b[2*N] ; /* M Series Memory B all. */
long m_ofs_c[4*N] ; /* M Series Memory C all. */
short t_tip[N] ; /* T Series individual, */
/* direction of imaginary */
/* tool nose. */
long t_ofs[N] ; /* T Series individual. */
struct {
short tip ;
long data[4] ;
} t_ofs_a[N] ; /* T Series Memory A all. */
struct {
short tip ;
long data[8] ;
} t_ofs_b[N] ; /* T Series Memory B all. */
} u ;
} ;
/* N is number of the offset amounts to be read. */
[Arguments]
length Data block length.
buf Buffer in which the offset amounts are stored.
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect data block length "length".
EW_NUMBER( 3) Incorrect offset number "buf.datano_s" or
"buf.datano_e". (This return code is returned in case
that any value except 1,..,(maximum number of offset)
was specified in offset number "s_number" or
"e_number".
EW_ATTRIB( 4) Incorrect offset type "buf.type".
EW_NOOPT( 6) There are no additional tool offset options required
for the specified offset number to be written. (See
"Read tool offset amount(cnc_rdtofs)" for details.)
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.