
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
169/226
DRAW.NO.
3.12.5
Run the CNC Program (DNC running)
[Name]
pl_nc_dnc2
[Syntax]
#include <pmclib.h>
short pl_nc_dnc2(unsigned short path, char * buf, unsigned short size);
[Arguments]
Input
path: The CNC path number(from 1)
Set the CNC path number. When you set zero, first path CNC is
selected.
*but: CNC program
Set the CNC program that you want to run 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 run above CNC program, you should set following
string.
"O1234\nG1F0.3W10.\nM30\n%"
You can run 256 characters of CNC program in the maximum in
one time calling. If you want to run 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.
-1: Rejected
When the CNC is following status, this function cannot be
executed.