
B–61863E–1/06
12. NC COMMAND PROGRAM (PMC-SC)PMC LIBRARY
285
SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A
f f
[Name]
pl_nc_download
[Description]
Outputs (downloads) the data of the NC command to be registered.
Character strings represented in ASCII code are used as the NC
command data.
[Format]
ret= pl_nc_download(P1, P2) ;
short ret ;
char *P1 ;
unsigned short P2 ;
[Input]
*P1 Data of NC command (string of 256 or less characters
represented in ASCII code)
P2 Number of characters contained in the NC command data
[Output]
______
[Returns]
ret Complete code (–11, –2, 0, 2, 5, 8)
–11: The NC has not yet terminated or executed the processing to
start outputting the data of the NC command to be registered.
–2: The NC has entered the reset state.
0: The NC has normally terminated registering the data of the NC
command.
2: The specified data length is incorrect.
5: The NC command data is incorrect. This completion code is
returned when the identical program number has already been
registered or when the NC command data is incorrect.
8: An overflow occurred in the memory area on the NC tape. No
more NC command data can be registered.
[Remarks]
A program number starting with address O must be entered at the
beginning of the program to be registered. When a program identical
to the program to be registered has already been registered in the NC,
P/S alarm 73 may be issued according to NC parameter 3201#2 (REP)
or the registered program may be replaced with the new one.
Characters are represented in ASCII code and stored in bytes. The
EOB code of the NC command must be set to LF (0AH). The code
’%’ (25H) must be output at the end of the data of the NC command
to be registered.
12.2
OUTPUTTING
(DOWNLOADING)
THE DATA OF THE
NC COMMAND TO BE
REGISTERED