BMOV($90, (2@D144), 2)
## X=(R+H)*SINθ+(L-R*θ)COSθ
## Y=R-(R+H)*COSθ+(L-R*θ)SINθ
#初始化运算
IF $58 <= $M56 (Signed DW)
$112 = SIN($58) (Signed DW)
$116 = COS($58) (Signed DW)
$66 = FCNV($58) (Signed DW)
$60 = FCNV($M50) (Signed DW)
$62 = FCNV($M52) (Signed DW)
$64 = FCNV($M54) (Signed DW)
$120 = FDIV($66, 180.0) (Signed DW)
$124 = FMUL($120, 3.14) (Signed DW)
$128 = FMUL($124, $62) (Signed DW)
##R+H
$108 = FADD($62, $64) (Signed DW)
##L-R*θ
$132 = FSUB($60, $128) (Signed DW)
##(R+H)*SINθ
$136 = FMUL($108, $112) (Signed DW)
##(L-R*θ)COSθ
$140 = FMUL($132, $116) (Signed DW)
##(R+H)*COSθ
$144 = FMUL($108, $116) (Signed DW)
##(L-R*θ)SINθ
$148 = FMUL($132, $112) (Signed DW)
##开始计算
## X
$152 = FADD($136, $140) (Signed DW)
## Y
$156 = FSUB($62, $144) (Signed DW)
$160 = FADD($156, $148) (Signed DW)
##角度自加一
$58 = $58 + 1 (Signed DW)
##转成整数并存储
$164 = iCNV($152) (Signed DW)
$168 = iCNV($160) (Signed DW)
$170 = $88 - $164 (Signed DW)
$172 = $90 - $168 (Signed DW)
*$200 = $170 (Signed DW)
*$900 = $172 (Signed DW)
$200 = $200 + 2 (DW)
$900 = $900 + 2 (DW)
ELSEIF $58 < 120 (Signed DW)
$58 = $58 + 1 (Signed DW)
*$200 = 400 (Signed DW)
*$900 = 400 (Signed DW)
$200 = $200 + 2 (DW)
$900 = $900 + 2 (DW)
ELSE
##赋值给PM,并重新初始化
BMOV((2@D3000), $500, 240)
BMOV((2@D3600), $1000, 240)
$58 = 0 (DW)
$200 = 500 (DW)
$900 = 1000 (DW)
SETB $50.0
endif
end
5 结束语
台达PM20运动控制器在执行圆弧插补以及执行连续性的动作流程方面更接近于专业数控系统,有着PLC所不能比拟的优势,尽管在执行程序流程的灵活性方面,和PLC还是有一定的距离。
用管材制造的弯曲零件,无论是平面弯曲件,还是空间弯曲件,除大量应用于气体、液体的输送管路外,在金属结构中的应用也十分广泛。因此管材弯曲成形工艺是备受关注并得到迅速发展的重要领域,开展这方面的研究工作,具有十分重要的意义。