powermillductpost后置处理修改.docx
《powermillductpost后置处理修改.docx》由会员分享,可在线阅读,更多相关《powermillductpost后置处理修改.docx(29页珍藏版)》请在冰豆网上搜索。
powermillductpost后置处理修改
DuctPost1430后置处理的修改说明
指导思想:
1.确定机床认同的标准代码文件;
2.可使用DUCTPOST–WHEID.OPT>C:
\HEID.OPT利用PM已有的3轴后置来获取数控系统的基本后置
3.使用DUCTPOST标准后置产生机床的加工代码文件;
4.对比两者的差异,增加自定义用户化信息,由于增加信息无条件优先,它会替代系统默认的原始信息,不断修改直到DUCTPOST产生的加工代码文件和所需标准代码文件一致;
5.修改中注意备份和重命名(建议增加机床具体型号以示区别),删除用户化信息后,后置将自动还原成系统初始默认的标准后置;
具体参数:
1.程序行号
a)如果系统不需要行号,那么重新定义批号键“N”
defineformat(N)
notpermanent
enddefine
b)如果系统需要行号起始行号“10”,增量行号“5”,可如下定义批号键“N”
blockstart=10
blockincrement=5
c)如果机床能认同的最大行号有所限制,那么可以插入下面的选项
maximumblocknumber=5999(orwhatevervaluerequired)
d)需要特殊的行号的地方多半定义一些特殊技能
N1000BEGINPGMSPECIALMM
N1000TOOLCALL0ZS3000
N1000M55
N1000M3
N1000CYCLDEF19.0BEARBEITUNGSEBENE
N1000CYCLDEF19.1A0B0C0
N10LX0.0Y0.0Z150.0B0C0FMAX
N12LX254.345Y146.780B90.0C35.250FMAX
N14LZ-55.70FMAX
N16L...........................
建议采用下面的格式
definewordNF
addressletter ="N1000"
addresswidth=5
fieldwidth =0
enddefine
wordorder=(+NF)
defineblocktapestart
NF0 ; "BEGINPGM" ; IDPartID ; metricdata
enddefine
defineblocktoolchangefirst
NF 0 ; T2 0 ; " Z" ; S3000
NF 0 ; M155
NF 0 ; M13
NF 0 ; G4190 ; "BEARBEITUNGSEBENE"
NF 0 ; G4191 ; A 0 ; B 0 ; C 0
N ; G1 ; XFromX ; Y FromY ; Z FromZ ; B=C ; C=C ; FMAX
enddefine
2.线形移动
通常线形输出的标准格式为G01X...Y...Z...F...
G01(G1)是直线命令,XYZ是绝对或增量坐标,F是进给速度
3.快速移动
典型的快速移动输出格式可能象这样G00 G43X...Y...Z...S...H....M3
4.圆弧运动
通常线形输出的标准格式为
G02(G03)X...Y...I...J...F...xyPlane(G17)
G02(G03)X...Z...I...K...F...zxPlane(G18)
G02(G03)Y...Z...J...K...F...yzPlane(G19)
G2/G3代表顺圆/逆圆,X,Y,Z代表圆弧终点坐标,I,J,K代表圆心,设置如下:
definecodes
circlecw =G12
circleccw =G13
xyplane =G317
xzplane =G318
zyplane =G319
enddefine
I,J,K表现为绝对坐标时设置为:
incrementalcentre=false
I,J,K表现为相对坐标时设置为:
incrementalcentre=true
假如圆心坐标I,J,K符号不对(如果更改过圆心类型,一定要主义检查),可以这样改正
defineformat(IJK)
scalefactor=-1 or 1
enddefine
有的机床不能输出整圆,需要将整个圆弧分为四个象限输出,此时需要作如下设定
singlequadrant=true
圆弧可以被强制输出为直线段,可作如下设定
integer26 = 0 更常用或者circleoutput=( 0111 )
在ductpost1430中圆弧可以分平面强制输出为直线段,可作如下设定
suppressxyarc=truedefault= false
suppresszxarc=truedefault= false
suppressyzarc=truedefault= false
5.信息输出
信息输出设置是个二进位选项,默认值是有信息输出,如果不需要,直接添加
messageoutput = false
6.行程极限
轴向移动行程限制由下面的命令行控制(缺省值):
linearaxislimits=(-99999. 99999. -99999. 99999. -99999. 99999.)
第一对数据控制X的正负极限行程,第二对控制Y,第三对控制Z。
如果这些行程限制被超越,警告信息将被打印出来,后置过程中将出现“X太小(太大)超越了负极限行程(正极限行程)在某某区”,然后继续输出真实值。
轴向转动行程限制由下面的命令行控制(缺省值):
rotaryaxislimits=( -99999 999999 -99999 999999 999 1)
第一对数据控制方位角的正负极限行程,第二对数据控制俯仰角的正负极限行程,最后一对数据反应了执行角度变化允许移动的次数和角度公差。
以4轴加工为例:
rotaryaxislimits=( 0.0 0.0 -360.0 360.0 0.1 4 )
如果旋转极限被超越,刀具将缩回到预先远离工作曲面的高度,然后转轴复位,增量执行旋转角度,直到在限定次数内完成所需的角度旋转。
如果是5轴的案例:
rotaryaxislimits=( -20.0 110.0 -3600.0 3600.0 0.1 4 )
在某些环境中行程限制被超越是可能的,但只是从方位角和俯仰角中选一个进行调配却是不可能的,警告信息提示后后置过程将被终止。
7.字符定义
在DUCT后置的内嵌式加工源代码中,有一个初始化的字符定义清单,如下例:
machinetiger
defineword/
addressletter="/"
enddefine
definewordN
addressletter="N"
enddefine
definewordG1
addressletter="G"
enddefine
definewordG2
addressletter="G"
enddefine
etc.........................
上面每一个定义都确定了一个字符值。
/ =word[1];N= word[2];G1= word[3] ; 以及清单下面的其他定义。
在某些场合我们不得不定义一些变量名来实现一定的功能,这种手段还是非常有用的。
8.十进制输出
加入integer51=n到opt文件
integer51 =(n) 小数输出格式
=1小于1的数字被输出为.xxxx (例如:
.871)
大于1的数字被输出为xxxx. (例如:
34.)
=2小于1的数字被输出为0.xxxx (例如:
0.871)
大于1的数字被输出为xxxx. (例如:
34.)
=3小于1的数字被输出为.xxxx (例如:
.871)
大于1的数字被输出为xxxx.0 (例如:
34.0)
=4小于1的数字被输出为0.xxxx (例如:
0.871)
大于1的数字被输出为xxxx.0 (例如:
34.0)
=5与3相同
=6小于1的数字被输出为.xxxx (例如:
.871)
大于1的数字被输出为xxxx (例如:
34)
注意:
此设置会影响所有十进制输出格式
9.掠过速度
10.进给速率精度
11.程序快速分割
12.持续轮廓速度
13.刀具径向补偿
14.钻孔循环
15.刀具轴向补偿
16.简单四轴设定
多轴机床需作以下设定(在下例中三个主旋转轴被定义为A、B、C,但只用到一个旋转轴)
defineformat(ABC) ##内置源文件可能已经设置好
metricformats
leadingzeros =false
trailingzeros =true
decimalpoint =true
decimalplaces = 3
imperialformats
leadingzeros =false
trailingzeros =true
decimalpoint =true
decimalplaces = 4
enddefine
wordorder = (+ABC) ##仅内置词序列表不存在时需要
blockorder=true ##取代词序列表,使用"defineblockxxx"定义顺序
definekeys
azimuthaxis notused ## 只有一个旋转轴不需要
elevationaxis = A ## 第四旋转轴通常为仰角(例如绕X轴旋转)
enddefine
## "elevationaxis", 包括A或者B,或者C,需要插入Rapid和Linear定义块
defineblockmoverapid
N;rapid;G2;G3;G6;xcoord;ycoord;zcoord;elevationaxis;spindle;toollength;M1;M2
enddefine
defineblockmovelinear
N;linear;G2;xcoord;ycoord;zcoord;elevationaxis;feedrate;M1;M2
enddefine
旋转轴参数设定
当包括任何旋转轴时,下列参数必须设定
azimuthaxisparameters =(0. 0. 0. 1. 0. 0.)
elevationaxisparameters =(0. 0. 0. 0. 1. 0.)
前三个数字给出了旋转中心(0. 0. 0. 通常用来设定单旋转工作台)
后三个数字定义了绕X,Y或者Z轴其中哪个轴旋转
第四旋转轴是刀头旋转时
必须作以下设定
spindleelevationrotation = true ##true时为主轴旋转,false时是工作台旋转(默认)
elevationcentre = ( 0. 0. 180.5 ) ##仅用于主轴方向偏离旋转中心,通常沿Z轴。
(注意这些数值必须有小数点(0. 而不是0 )
输入的距离是刀夹面到旋转中心(在上面的例子中这个距离是Z轴方向180.5)
刀夹顶端到刀具端头的距离则可以在duct或者PowerMill的刀具长度中设定。
注意:
有些机床自身有刀具中心点管理功能,此时中心偏置必须设置为0.。
附加参数:
elevationaxisunits = degrees
elevationaxisdirection = positive ##标准旋转方向
pcsorigin = (0 0 0 0 0 0) ##(缺省值,很少使用,主要由于5轴)
##AzimuthMin Max Elev'nMin Max Tol. Moves
rotaryaxislimits =(-99999 99999 -99999 99999 0.1 1 ) ##缺省值,可
以无限旋转
公差值(Tol.)是由Ductpost移动设置值保持的角度位移公差。
保持最高公差和最小移动可以提高机床性能。
(从DP1331起,移动功能(最后一个数字)是多余的,被“linearisemultiaxismoves =true”代替,它会自动调整移动数值使加工达到设定的公差)。
四轴示例:
1.第四旋转轴在工作台(A:
绕X轴旋转)
defineformat(A)
decimalpoint =true
decimalplaces=3
enddefine
wordorder=(+A)
definekeys
azimuthaxis notused
elevationaxis =A
enddefine
spindleelevationrotation =false ##Default
elevationunits =degrees
elevationaxisdirection =positive
azimuthaxisparameters =(0.0.0. 0.0.0.)
elevationaxisparameters=(0.0.0. 1.0.0.)
defineblockmoverapid
N;rapid;G2;G3;G6;xcoord;ycoord;zcoord;elevationaxis;toollength;M1;M2
enddefine
defineblockmovelinear
N;linear;G2;xcoord;ycoord;zcoord;elevationaxis;toolradius;feedrate;M1;M2
enddefine
2.第四旋转轴在工作台(B:
绕Y轴旋转)
defineformat(B)
decimalpoint =true
decimalplaces=3
enddefine
wordorder=(+B)
definekeys
azimuthaxis notused
elevationaxis =B
enddefine
spindleelevationrotation=false ##Default
elevationunits =degrees
elevationaxisdirection =positive
azimuthaxisparameters =(0.0.0. 0.0.0.)
elevationaxisparameters=(0.0.0. 0.1.0.)
defineblockmoverapid
N;rapid;G2;G3;G6;xcoord;ycoord;zcoord;elevationaxis;toollength;M1;M2
enddefine
defineblockmovelinear
N;linear;G2;xcoord;ycoord;zcoord;elevationaxis;toolradius;feedrate;M1;M2
enddefine
3.第四旋转轴在主轴(A:
绕X轴旋转)
defineformat(A)
decimalpoint =true
decimalplaces=3
enddefine
wordorder=(+A)
definekeys
azimuthaxis notused
elevationaxis =A
enddefine
spindleelevationrotation=true ##Defaultfalse
elevationunits =degrees
elevationaxisdirection =positive
elevationcentre = ( 0. 0. 180.5 ) ## Edistance
azimuthaxisparameters = (0 0 0 0 0 0 )
elevationaxisparameters= (0 0 0 1 0 0 )
defineblockmoverapid
N;rapid;G2;G3;G6;xcoord;ycoord;zcoord;elevationaxis;toollength;M1;M2
enddefine
defineblockmovelinear
N;linear;G2;xcoord;ycoord;zcoord;elevationaxis;toolradius;feedrate;M1;M2
enddefine
说明4对于第四旋转轴A轴在刀头上的后置,应该设置方位角参数,而不是仰角参数
出NC程序时把刀具长度设置为零(对没有RTCP功能而言),或者按实际长度补偿。
3.第四旋转轴在主轴(B:
绕Y轴旋转)
defineformat(B)
decimalpoint =true
decimalplaces=3
enddefine
wordorder=(+B)
definekeys
azimuthaxis notused
elevationaxis =B
enddefine
spindleelevationrotation=true ##Defaultfalse
elevationunits =degrees
elevationaxisdirection =positive
elevationcentre = ( 0. 0. 180.5 )
azimuthaxisparameters =(0 0 0 0 0 0 )
elevationaxisparameters=(0 0 0 0 1 0 )
defineblockmoverapid
N;rapid;G2;G3;G6;xcoord;ycoord;zcoord;elevationaxis;toollength;M1;M2
enddefine
defineblockmovelinear
N;linear;G2;xcoord;ycoord;zcoord;elevationaxis;toolradius;feedrate;M1;M2
enddefine
17.工作台旋转5轴设定
多轴工作时需要设定以下内容(例子中三个主旋转轴被定义为A,B和C,但是实际上只用到了两个旋转轴):