
12. NC COMMAND PROGRAM (PMC-SC)
B–61863E–1/06
PMC LIBRARY
312
SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A
f f
[Name]
pl_nc_dnc2
[Description]
Outputs the NC command data to be used for operation.
[Format]
ret = pl_nc_dnc2(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 to be used for operation(ASCII character
string of up to 256 characters)
P3 Number of characters in the NC command data to be used for
operation
[Output]
______
[Returns]
ret Complete code: –11, –2, 0, 1, 2, or 5
–11: Preparation to output the NC command data to be used for
operation in the NC is not completed or has not been executed.
–2 : The NC has entered the reset status.
Stop outputting the NC command data to be used for operation
and perform stop processing.
0 : Output of the NC command data to be used for operation has
terminated normally.
1 : A value other than 1 or 2 was set to specify the tool post.
2 : The data length is not specified correctly.
5 : NC command data is incorrect.
[Remarks]
One character is set in ASCII code in bytes. Set the NC command
EOB code to LF(0AH). Be sure to output ’%’ (25H) at the end of the
NC command data to be used for operation.
12.27
OUTPUTTING NC
COMMAND DATA TO
BE USED FOR
OPERATION