
Series 30i/ 31i/ 32i-A
C executor library for conversion
Programming manual
01 04.05.06
S. Hasegawa
New registration
B-64183EN/01
EDIT
DATE
DESIG.
DESCRIPTION
190/226
DRAW.NO.
3.12.19
Read the CNC Program List
[Name]
pl_nc_progdir2
[Syntax]
#include <pmclib.h>
short pl_nc_progdir2(unsigned short path, char * buf, unsigned short * size);
[Arguments]
Input
path: The CNC path number(from 1)
Set the CNC path number. When you set zero, first path CNC is
selected.
buf: The pointer to the array to store the read data
Set the pointer to the array, which the read data is stored.
*size: Size of array
Set the size of array. You can set 256 bytes in the maximum.
Output
*buf: Read CNC program list
- When you set zero to the "type", the data will be read with
following format.
"OxxxxOxxxx ... %"
- When you set 1 to the "type", the data will be read with
following format.
- "%\nOxxxx(Comment)yyyy\nOxxxx(Comment)yyyy\n...%
"
The "Oxxxx" is the CNC program number, which sorted by its
character code. The "yyyy" is the number of characters of the
CNC program and this size is rounded off to 80 characters unit.
The "(Comment)" is a comment string, which is described after
the program number "Oxxxx". The comment that you can read is
50 characters, included "()", in the maximum. The characters over
50 cannot be read. When no comment is described, the "()" will
be returned.
Note that this read comment is not terminated with NULL ('\0').
[Return]
0: Normal completion.
-1: Rejected
When the CNC is following status, this function cannot be
executed.