
------------------------------------------------------------------------------
1.69 Read executing program. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdexecprog
[Syntax]
#include <fwindow.h>
short cnc_rdexecprog( unsigned short *length, short *blknum
, char *data ) ;
[Arguments]
length Size of the buffer for storing executing program,
character number of read executing program.
blknum Number of buffered blocks.
data Buffer in which executing program text is stored
(ASCII string).
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect buffer size "length".
[Description]
Reads the contents of the NC program followig the currently executing
block.
This function is used for building the original screen like "Program
Check Screen" of CNC, etc.
Specify the byte-size of the buffer "data" for the storing executing
program in "length".
The contents of the currently executing NC program are stored in
"data". The character length of read program is stored in "length".
The number of buffered block including the current block is stored in
"blknum". The typical bufferd block number is as follows.
Operation mode Bufferd block number
----------------------------+---------------------
Normal continuous mode. 2
Normal continuous mode with 3
Tool radius compensation C
or Nose-R compensation.
Single block mode. 1
The format of the read NC program is the following ASCII string.
(Current block) LF (Next block) LF ...
... (Last block) LF %
For example, while the following NC program is being executed, the
next string is got by this function.