
------------------------------------------------------------------------------
1.41 Write work origin offset (range specified). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_wrzofsr
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_wrzofsr( short length, struct iodbzo *buf ) ;
struct iodbzo {
short datano_s ; /* Start offset number. */
short type ; /* Axis number. */
short datano_e ; /* End offset number. */
long data[32*M] ; /* Offset data. */
} ; /* M is number of work origin */
/* offset amounts to be written. */
[Arguments]
length Data block length ( =6+4*(amount of axes to be read)*
(number of offset to be written) ).
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 of offset number "datano_s" or "datano_e".
(Any data other than 0,..,6 or 7,..,306 has been
specified.)
EW_ATTRIB( 4) Incorrect axis number "type".
Any data other than -1 or (1,..,amount of controlled
axes) has been specified.
EW_NOOPT( 6) There are no required options.
(See "Read work origin offset(cnc_rdzofs)" 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.
[Description]
Alters the work origin offset amount stored in the CNC within the
specified range.
The work origin offset amounts are provided for all controlled axes
(the 1st axis,..,the 32nd axis) of the CNC. It is possible to alter
one offset amount for each axis or the whole for all axes at the same
time. However, in case of no controlled axes expansion option, the
work origin offset amounts for the additional axes can't be altered.
Specify one of (1,..,amount of controlled axes) for each axis or -1
for all axes as axis number in "buf.type".