
------------------------------------------------------------------------------
1.38 Read work origin offset. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdzofs
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_rdzofs( short number, short axis, short length,
struct iodbaxis *buf ) ;
struct iodbaxis {
short datano ; /* Offset number. */
short type ; /* Axis number. */
long data[N] ; /* Offset data. */
} ; /* N is the amount of controlled
axes. */
Maximum controlled-axis number 32
[Arguments]
number Offset number ( 0, 1,..,6, 7,..,306 ).
axis Axis number ( =(1,..,amount of controlled axes),or -1 ).
length Data block length ( =4+4*(amount of axes to be read)).
buf Buffer in which the offset amount is stored.
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect data block length "length".
EW_NUMBER( 3) Incorrect of offset number "number". (Any data other
than 0,..,6 or 7,..,306 has been specified.)
EW_ATTRIB( 4) Incorrect axis number "axis".
Any data other than -1 or (1,..,amount of controlled
axes) has been specified.
EW_NOOPT( 6) There are no required options.
The related options;
- Work coordinate system ( G54 to G59 )
- Work coordinate system 48 sets ( G54.1P1-P48 )
- Work coordinate system 300 sets ( G54.1P1-P300 )
- Controlled axis expansion
EW_BUSY(-1) It was impossible to read a work origin offset because
a command from another application program to write the
work origin offset was already being executed.