
12. NC COMMAND PROGRAM (PMC-SC)
B–61863E–1/06
PMC LIBRARY
322
SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A
f f
[Name]
pl_nc_progdir2
[Description]
Inputs the program number list of the machining programs registered
in the NC.
Reading for all programs may be performed two or more times
depending on the size of the data area provided by the application
program. Therefore, be sure to call this function continuously until
code ’%’ (25H) is entered.
[Format]
ret = pl_nc_progdir2(P1, P2, P3);
short ret;
unsigned short P1;
char *P2;
unsigned short *P3;
[Input]
P1 Tool post specification
0 : System other than the TT system
1 : Tool post on side 1
2 : Tool post on side 2
*P3 Number of input characters
[Output]
P2 Program number list data (ASCII character string up to 256
characters)
(a) When only program numbers are read
’O’
’1’
’1’
’O’
’1’
’2’
’O’
’1’
’2’
’3’
’4’
’%’
1) Leading ’O’ of the program number is omitted.
2) If values other than 0 are specified for the start and end
program numbers by the program number list data input start
function, all program numbers in the specified range are set.
If 0 is specified for both the start program number and end
program number, the program numbers of all registered
programs are set in ascending order.
3) ’%’ alone is set if there is no program in the range of the
specified program numbers or no program is registered.
12.37
INPUTTING THE
PROGRAM NUMBER
LIST
0
1
2
3
4
5
6
4
5
5
7
8
N–1
N
P2
Program number O0011
Program number O0012
Program number O1234