
12. NC COMMAND PROGRAM (PMC-SC)
B–61863E–1/06
PMC LIBRARY
306
SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A
f f
[Name]
pl_nc_download2
[Description]
Outputs (downloads) NC command data to be registered. The NC
command data is output using ASCII character string.
[Format]
ret = pl_nc_download2(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
*P2 NC command data(ASCII character string of up to 256
characters)
P3 Number of characters in the NC command data
[Output]
______
[Returns]
ret Complete code: –11, –2, 0, 1, 2, 5, or 8
–11: Preparation to output NC command data to be registered in the
NC is not completed or has not been executed.
–2: The NC has entered the reset status.
0: Output of the NC command data to be registered in the NC has
terminated normally.
1: A value other than 1 or 2 was set for the tool post specification.
2: The data length is not specified correctly.
5: NC command data is incorrect.
This completion code is returned when the same program
number has already been registered or NC command data is
incorrect.
8: The tape storage area on the NC has overflowed, so no more NC
command data can be registered.
[Remarks]
Enter the program number at the beginning of the program to be
registered, using address 0. If the same program as the one to be
newly registered has already been registered, P/S alarm 73 is set by
specifying NC parameter NO.3201#2(REP) or the program already
registered is replaced with the new one.
Set one character in ASCII code in byte. Set NC command EOB code
as LF(0AH). Be sure to output ’%’ (25H) at the end of the NC
command data to be registered.
12.21
OUTPUTTING
(DOWNLOADING) NC
COMMAND DATA TO
BE REGISTERED