基于臺達20PM運動控制器的漸開線數(shù)控彎管
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)
##轉(zhuǎn)成整數(shù)并存儲
$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 結(jié)束語
臺達PM20運動控制器在執(zhí)行圓弧插補以及執(zhí)行連續(xù)性的動作流程方面更接近于專業(yè)數(shù)控系統(tǒng),有著PLC所不能比擬的優(yōu)勢,盡管在執(zhí)行程序流程的靈活性方面,和PLC還是有一定的距離。
用管材制造的彎曲零件,無論是平面彎曲件,還是空間彎曲件,除大量應用于氣體、液體的輸送管路外,在金屬結(jié)構(gòu)中的應用也十分廣泛。因此管材彎曲成形工藝是備受關(guān)注并得到迅速發(fā)展的重要領域,開展這方面的研究工作,具有十分重要的意義。
評論