QQ 3504-955-28
网站:http://www.52plczj.com
基于PC的纯软件三轴联动数控系统,用MASTERCAM自动编程数控代码,系统读取后从并口或数据采集卡输出,控制加工各种三维零件(抖音视频:https://v.douyin.com/ij2Jxr5n/ )。
1、数控加工程序
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% ;程序开始
O0001 ;O机能指明程序号
(PROGRAM NAME - ALL) ;程序名称
(DATE=DD-MM-YY - 02-07-06 TIME=HH:MM - 14:22) ;程序编制日期
N100G21 ;斜体为程序正文,控制机床加工等各种动作
N102G0G17G40G49G80G90
( 6. FLAT ENDMILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA. - 6.) ;刀具说明
N104T1M6
N106G1G90X38.355Y0.A0.S1591M3
N108G43H1Z1.
N110G1Z-2.F1.5
N112G3X-38.355R38.355F.3
N114X38.355R38.355
N116G1Z1.
……
N856G1Z1.
N858M5
N860G91G28Z0.
N862G28X0.Y0.A0.
N864M30
% ;程序结束
2、信号输出代码
Public strCurrentButton As String Public intWordOut As Integer Public booleanIsKeyUp As Boolean
'AXISES '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Public Sub Xinc() intWordOut = intWordOut And &HFC: Call AM9102_DO(hPLX9052, intWordOut) intWordOut = intWordOut And &HFC: intWordOut = intWordOut Or &H1 Call AM9102_DO(hPLX9052, intWordOut) microSec longDelaymicroSecond End Sub
Public Sub Xdec() intWordOut = intWordOut And &HFC: Call AM9102_DO(hPLX9052, intWordOut) intWordOut = intWordOut And &HFC: intWordOut = intWordOut Or &H2 Call AM9102_DO(hPLX9052, intWordOut) microSec longDelaymicroSecond End Sub
Public Sub Yinc() intWordOut = intWordOut And &HF3: Call AM9102_DO(hPLX9052, intWordOut) intWordOut = intWordOut And &HF3: intWordOut = intWordOut Or &H4 Call AM9102_DO(hPLX9052, intWordOut) microSec longDelaymicroSecond End Sub
Public Sub Ydec() intWordOut = intWordOut And &HF3: Call AM9102_DO(hPLX9052, intWordOut) intWordOut = intWordOut And &HF3: intWordOut = intWordOut Or &H8 Call AM9102_DO(hPLX9052, intWordOut) microSec longDelaymicroSecond End Sub
Public Sub Zinc() intWordOut = intWordOut And &HCF: Call AM9102_DO(hPLX9052, intWordOut) intWordOut = intWordOut And &HCF: intWordOut = intWordOut Or &H10 Call AM9102_DO(hPLX9052, intWordOut) microSec longDelaymicroSecond End Sub
Public Sub Zdec() intWordOut = intWordOut And &HCF: Call AM9102_DO(hPLX9052, intWordOut) intWordOut = intWordOut And &HCF: intWordOut = intWordOut Or &H20 Call AM9102_DO(hPLX9052, intWordOut) microSec longDelaymicroSecond End Sub