
------------------------------------------------------------------------------
1.28 Read servo delay amount. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_srvdelay
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_srvdelay( short axis, short length, struct iodbaxis *buf ) ;
struct iodbaxis {
short dummy ; /* Not used. */
hort type ; /* Axis number. */
long data[N] ; /* Servo delay amount of */
} ; /* controlled axis. */
/* N is a maximum controlled axis number.*/
[Arguments]
axis Axis number ( =(1,..,amount of controlled axes),or -1 ).
length Data block length ( =4+4*(Number of axes for which data
is to be read) ).
buf Buffer in which the servo delay amounts are stored.
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect data block length "length".
EW_ATTRIB( 4) Incorrect axis number "axis".
Any data other than -1 or (1,..,amount of controlled
axes) has been specified.
EW_BUSY(-1) It was impossible to read the servo delay amount for a
controlled axis because the CNC was updating that servo
delay amount.
[Description]
Reads the difference between the commanded position and the actual
servo position of the CNC's controlled axis, i.e. the servo delay
amount.
Specify one of (1,..,amount of controlled axes) for each axis or -1
for all axes as axis number in "axis".
The servo delay amount is stored in "buf.data" with signed binary
format. (The negative value is represented as 2's complement.)
The servo delay amount of specified axis is stored in "buf.data[0]"
in case of reading one axis's data.
The unit of the servo delay amount is detection unit.