
------------------------------------------------------------------------------
1.61 Read diagnostics data. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_diagnoss
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_diagnoss( short number, short axis, short length,
struct iodbpsd *buf ) ;
struct iodbpsd {
short datano; /* diagnosis number */
short type; /* axis number */
union {
char cdata; /* bit/byte diagnosis */
short idata; /* word diagnosis */
long ldata; /* 2-word diagnosis */
char cdatas[N];
/*bit/byte diagnosis with axis*/
short idatas[N];
/* word diagnosis with axis */
long ldatas[N];
/* 2-word diagnosis with axis */
} u ;
} ;
/* N : max. controlled axes */
[Arguments]
number Diagnostic number.
axis Axis number ( =(1,..,amount of controlled axes), or
-1, 0 ).
length Data block length
( =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 "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.