
------------------------------------------------------------------------------
1.62 Read diagnostics data (range specified). <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_diagnosr
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_diagnosr( short s_number, short axis, short e_number,
short length, struct iodbpsdr *buf ) ;
struct iodbpsdr {
short datano; /* diagnosis number */
short type; /* upper byte:type */
/* lower byte:axis */
union {
char cdata; /* bit/byte diagnosis */
short idata; /* word diagnosis */
long ldata; /* 2-word diagnosis */
char cdatas[32];
/*bit/byte diagnosis with axis*/
short idatas[32];
/* word diagnosis with axis */
long ldatas[32;
/* 2-word diagnosis with axis */
} u ;
} ;
[Arguments]
s_number Start diagnostic number.
axis Axis number ( =(1,..,amount of controlled axes), or
-1, 0 ).
e_number End diagnostic number.
length Data block length
( = Sum of [4+(byte size of the diagnostics data)*(
amount of axes to be read)] )
buf Buffer in which the diagnostics data are stored.
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect data block length "length".
EW_NUMBER( 3) Incorrect diagnostic number "s_number" or "e_number".
EW_ATTRIB( 4) Incorrect axis number "axis".
Any data other than -1, 0 or (1,..,amount of
controlled axes) has been specified.
EW_NOOPT( 6) An option (such as a remote buffer) required to use data
having a specified diagnose data number has not been
added.
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.