
[Description]
Reads the list of program numbers (program directory) of all NC
programs registered in CNC.
Program numbers, comments and character numbers of programs included
in specified program number range are read with ASCII string format.
Specify the start program number to be read in "datano_s" and the end
one in "datano_e". Store "datano_s=1" and "datano_e"=9999 to read all
programs. Specify the format of program list in "type".
type Format of list
-------+---------------------------------------------
0 Only program number.
1 Program number and comment.
2 Program number, comment and character number
If the size of the buffer in which the program list is stored is
insufficient, only informations whose total size is same or less than
the buffer size is stored.
Format of input data
The program directory list which is read from CNC is a string composed
of ASCII characters as following format.
type=0 Oxxxx Oxxxx ... %
type=1 % LF Oxxxx (COMMENT) LF Oxxxx (COMMENT) LF ... LF %
type=2 Oxxxx (COMMENT) CHAR_NUMBER Oxxxx (COMMENT) CHAR_NUMBER ... %
LF 0x0A ('¥n')
Oxxxx Program number. This is a ASCII string
without the leading '0' of numeric
part sorted in numeric order. ("O1" -
"O9999")
CHAR_NUMBER Character number of the program.
This is a ASCII string without the
leading '0'.
The number is raised to 80-character
unit.
COMMENT The comment which is written just
after the program number is stored.
The maximum character number of the
comment body is 48. (50 for the body
and the before and the behind
parentheses.)
Only beginning 48 characters are
stored for the comment which is longer
than 48 characters.
If the program has no comment, only
parentheses ("()") are stored.
For all cases, when no program is registered or there is no program
in the specified range, only '%' is stored.
A null character ('¥x00') is not added at the end of each strings
stored in the buffer.