EasyManua.ls Logo

WEIHONG ELECTRONIC Ncstudio - 6 Customize and Extend Command M

Default Icon
74 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
上海维宏电子科技股份有限公司
Weihong Electronic Technology Co., Ltd.
68 Specialized, Concentrated, Focused
6 Customize and Extend Command M
The user can customize command M and G code by writing subprograms in public.dat.
Subprogram no. 200~999 is used by internal interpreter engine. The code range of command M
is 200~599, while that of G code is 600~999.
As a result, command M 0~99 plus 200 is regarded as the corresponding subprogram, while G
code 0~99 plus 600 is regarded as the corresponding subprogram.
Program Example for Custom and Extended M Command:
Conditional statement ―if‖ can be used to set the actions (like gear shift) during spindle rotating
O202
M17
spindle CW (only one direction supported)
O203
M901 H2 P1
G04 P5
M17
spindle CCW (only one direction supported)
O204
M901 H2 P1
G04 P5
M17
spindle stop
O205
M901 H2 P0
G04 P5
M17
coolant on
O208
M901 H24 P1
G04 P5
M17
coolant off
O209
M901 H24 P0
G04 P5
M17

Table of Contents

Related product manuals