求高手帮忙改后处理
本帖最后由 hntjlgx 于 2011-12-13 20:14 编辑各位老大,本人有一事在此求高手去来帮帮我,具体如下:
我改一个西门子840D的双摆头B C轴的PM后处理,因为具体的机床参数有些尚不明了,我假设C轴是无限制旋转的,Z轴上偏置为零,但后处理去来的程序总是会把刀具标长加在Z轴,我不知道是哪里出了问题,,求若枫版主及各位高手帮帮忙,谢谢!!!修改后部分程序如下并附上附件:
machine siem850
#################################################
# Company - #
# Machine - GENERIC #
# Control - SIEMENS840D #
# Axis Configuration Code : 3000 #
# --------------- #
# | HEAD| HEAD | #
#---------------|-------|-------| #
# | A axis | - | - | #
# |---------------|-------|-------| #
# | B axis | - | Y | #
# |---------------|-------|-------| #
# | C axis | - | Z | #
#------------------------------- #
# #
# Metric output #
# Absolute output #
# Cutter Compensation #
# Drilling cycles #
# Drilling cycles 200 series #
# Parameterised feedrates #
# Inverse time feedrates #
# RTCP #
# Active Working Plane #
# Connection moves enabled #
# Spline machining #
# #
#################################################
# Above part Modified by - HNTJLGX(CHINA)
#Siemens 840D control.
#Code : 3000
#Created by LGX-13.12.2011
#
#
#
#10
define word %D
address letter = "MSG(\\"DATE - "
address width= 13
field width = 2
end define
#16
define word %M
address letter = "."
address width= 1
field width = 2
end define
#22
define word %Y
address letter = "."
address width= 1
field width = 2
end define
#28
define word %h
address letter = "- "
address width= 2
field width = 2
end define
#34
define word %m
address letter = ":"
address width= 1
field width = 2
decimal places = 0
decimal point= false
end define
#42
define word %s
address letter = ":"
address width= 1
field width = 2
end define
#48
define word TPN
address letter = "MSG(\\"TOOLPATH- "
address width= 17
field width = 20
end define
#54
define word TNO
address letter = "MSG(\\"TOOL NO."
address width= 16
field width = 3
decimal places = 0
decimal point= false
leading zeros= false
trailing zeros = false
end define
#64
define word TN
address letter = "MSG(\\"TOOL ID "
address width= 16
field width = 20
end define
#70
define word TT
address letter = "MSG(\\"TOOL TYPE "
address width= 16
field width = 32
decimal places = 0
decimal point= false
leading zeros= false
trailing zeros = false
end define
#80
define word TD
address letter = "MSG(\\"TOOL DIA. "
address width= 16
field width = 8
scale factor = 2
decimal places = 3
decimal point= true
leading zeros= false
trailing zeros = false
end define
#91
define word TR
address letter = " TIP RAD "
address width= 9
scale factor = 1
field width = 8
decimal places = 3
decimal point= true
leading zeros= false
trailing zeros = false
end define
#102
define word TLH
address letter = " LENGTH "
address width= 8
scale factor = 1
field width = 8
decimal places = 3
decimal point= true
leading zeros= false
trailing zeros = false
end define
#113
define word TOL
address letter = "MSG(\\"Tolerance = "
address width= 18
field width = 5
decimal places = 3
decimal point= true
leading zeros= false
trailing zeros = false
end define
#123
define word THK
address letter = "MSG(\\"Allowance = "
address width= 18
field width = 7
decimal places = 3
scale factor = 1
decimal point= true
leading zeros= false
trailing zeros = true
sign = always
end define
#135
define word VER
address letter = "MSG(\\"DP Version "
address width= 17
field width = 4
tape position= 0
end define
#142
define word OFN
address letter = "Option File : "
address width= 16
field width = 32
tape position= 0
end define
#149
define word RFP
address letter = ","
address width= 1
field width = 8
sign = if negative
metric formats
decimal point= true
decimal places = 3
leading zeros= false
trailing zeros = false
end define
#161
define word DP
address letter = ","
address width= 1
sign = if negative
end define
#167
define word Q1
address letter = ","
address width= 1
end define
#172
define word PT
address letter = " , "
address width= 3
field width = 5
sign = none
metric formats
decimal point= true
decimal places = 3
leading zeros= false
trailing zeros = false
end define
#184
define word ST
address letter = ", "
address width= 2
field width = 5
sign = none
metric formats
decimal point= false
decimal places = 0
leading zeros= false
trailing zeros = true
end define
#196
define word ST1
address letter = ", "
address width= 2
scale factor = 3
scale divisor= 2
sign = none
end define
#204
#vvvvvvvvvv WORKPLANE words vvvvvvvvvvvvv
#
define word RTC
address letter = "TRAORI("
address width= 7
field width = 1
end define
#212
define word AWK
address letter = "A2="
address width= 3
end define
#217
define word BWK
address letter = "B2="
address width= 3
end define
#222
define word CWK
address letter = "C2="
address width= 3
end define
#227
define word XWK
address letter = "ATRANS X"
address width= 8
end define
#232
define word YWK
address letter = "ATRANS Y"
address width= 8
end define
#237
define word ZWK
address letter = "ATRANS Z"
address width= 8
end define
#242
define format ( AWK BWK CWK XWK YWK ZWK)
field width = 5
tape position= 1
sign = if negative
metric formats
decimal point= true
decimal places = 3
trailing zeros = false
end define
#252
define format ( ID )
address letter= ";%MPF"
address width = 5
field width = 12
leading zeros = false
end define
#259
define format ( %D %M %Y )
field width = 2
modal
end define
#264
define format ( G4 )
address letter= "MCALL CYCLE"
address width = 11
end define
#269
define format ( DP ST1 )
field width = 5
metric formats
decimal point= false
decimal places = 0
leading zeros= false
trailing zeros = true
end define
#278
define format ( R11 )
address letter = "("
address width= 1
sign = if negative
end define
#284
define format ( Z2 R2 Q P )
address letter = ", "
address width= 1
end define
#289
define format ( R11 P Q Q1 TD )
field width= 5
metric formats
decimal point= true
decimal places = 3
trailing zeros = false
imperial formats = metric formats
end define
#298
word order = ( + RTC AWK BWK CWK XWK YWK ZWK )
word order = ( + RFP DP Q1 PT ST ST1 )
word order = ( + %D %M %Y %h %m %s )
word order = ( + TPN TNO TN TT TD TR TLH TOL THK VER OFN )
#303
define format all
tape position= 1
end define
#307
define format ( %D %M %Y %m %s )
tape position = 0
end define
#311
define keys
cycle dwell = P
end define
#315
message output = false
block order = true
block start = 1
block increment = 1
integer 12 = 0
integer 51 = 6
use hole top in cycles = true
integer 69 = 2
max feedrate = 10000.0
rapid feedrate = 16000.0
rapid feed code = 1
tool reset coordinates = 2
本帖最后由 hntjlgx 于 2011-12-13 20:43 编辑
期盼!非常期盼!!!有什么不对的欢迎指正!!!
附上五轴文档及截图
附上NC程序
没人帮我,自己琢磨,也许是这儿出了问题
#338
define block tool change first
TT ToolType ; " \")"
TN ToolName ; " \")"
if ( ToolType = "BALLNOSED" or ToolType = "ENDMILL" or ToolType = "DRILL" )
TD ToolRadius ; TLH ToolLength ; " \")"
else
TD ToolRadius ; TR TipRadius ; TLH ToolLength ; " \")"
end if
N ; tool number ToolNum
N ; " L9006"
N ; G3 64 ; M1 74
N ; spindle ToolSpeed ; spindle on cw ; tool radius 1
end define
#352
define block tool change
TT ToolType ; " \")"
TN ToolName ; " \")"
if ( ToolType = "BALLNOSED" or ToolType = "ENDMILL" or ToolType = "DRILL" )
TD ToolRadius ; TLH ToolLength ; " \")"
else
TD ToolRadius ; TR TipRadius ; TLH ToolLength ; " \")"
end if 回复 3# hntjlgx
我不会pm。对pm后处理没有研究。
但看你用色标记的地方。我想应该是的。 谢谢地主的答复,不管怎样,总算有人理我了!谢谢!!! 呵呵,看大家评论如何 楼主你太好了......... :victory::victory::victory:学习学习 初来乍到,请多多关照。 学习了。。谢谢