
------------------------------------------------------------------------------
1.20 Read sequence number in executing. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdseqnum
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_rdseqnum( struct odbact *buf ) ;
struct odbact {
short dummy[2] ; /* Not used. */
long data ; /* Sequence number in executing. */
} ;
[Arguments]
buf Buffer in which sequence number is stored.
[Return]
EW_OK( 0) Successful.
EW_BUSY(-1) It was impossible to read the sequence number of an NC
program being executed because the CNC was updating that
sequence number.
[Description]
Reads the sequence number of the NC program which is being currently
executed in CNC.
If the NC program has no sequence numbers in its all blocks, the
sequence number of the last executed block is read.
This function is used for watch the block being executed or the
current process by the application program, or only displaying the
current sequence number.
The sequence number is stored in "buf.data" with unsigned binary
format.