Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 392 -
------------------------------------------------------------------------------
1.34 Read skipped position. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_skip
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_skip( int axis, int length, struct iodbaxis *buf ) ;
struct iodbaxis {
int dummy ; /* Not used. */
int type ; /* Axis number. */
long data[N] ; /* Skipped position data of */
} ; /* controlled axis. N is the amount */
/* of controlled axes. */
[Arguments]
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 skipped position data are stored.
[Return]
0 Successful.
2 Incorrect data block length "length".
4 Incorrect axis number "axis".
Any data other than -1 or (1,..,amount of controlled axes) has
been specified.
-1 It has been failed to read skipped position data because
the CNC software was updating the skipped position data of the
controlled axis.
[Description]
Reads the absolute position data of the controlled axis at the
position where the machine has stopped by "ON" of the skip signal
during the CNC was executing the skip command (G31) block.
It is possible to make the application program which tool length
measurement by the application program. The application program can
take a tool length measurement and so on by reading the skipped
position of the controlled axis of CNC.
Specify one of (1,..,amount of controlled axes) for each axis or -1
for all axes as axis number in "axis".
The skipped position data is stored in "buf.data" with signed binary
format. (The negative value is represented as 2's complement.)
The skipped position data of specified axis is stored in "buf.data[0]"
in case of reading one axis's data.
The skipped position of the axis which has not been completed skip
operation is undefined.
The unit of the skipped position data is as follows.
IS-B IS-C
-----------------------+---------------+---------------
Linear axis(mm input) 0.001 [mm] 0.0001 [mm]
Linear axis(inch input) 0.0001 [inch] 0.00001 [inch]
Rotation axis 0.001 [deg] 0.0001 [deg]