
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
194/226
DRAW.NO.
3.12.22
Register the CNC Program
[Name]
pl_nc_download
[Syntax]
#include <pmclib.h>
short pl_nc_download(char * buf, unsigned short size);
[Arguments]
Input
*but: CNC program
Set the CNC program that you want to register with following
format.
"Oxxxx\n(Block 1)\n(Block 2)\n...\nMxx\n%"
The "Oxxxx" is a program number, the "Mxx" is a M code. The
beginning of CNC program should be program number, "Oxxxx".
The end of CNC program should be the "%" character.
Example)
O1234 ;
G1 F0.3 W10. ;
M30 :
%
If you want to register above CNC program, you should set
following string.
"O1234\nG1F0.3W10.\nM30\n%"
You can register 256 characters of CNC program in the
maximum in one time calling. If you want to register more than
256 characters of CNC program, you should call this function
repeatedly.
size: Byte count of the CNC program
Set the byte count of the CNC program.
Output
---
[Return]
0: Normal completion.
-11: The function pl_nc_dwnstart() is not called.
2: The "size" is invalid.
5: The CNC program is invalid. This error happens when following
cases.
- The duplicate number program has been registered.