變頻器在流量控制中的使用
DimAAsInteger DimP0AsString DimP1AsString DimDAsLong DimD3AsString DimD2AsString DimD1AsString DimD0AsString DimSumAsLong DimSAsString A=Hex(Inverter)
D=Hex(Data)
P0=Mid(P,3,2)
P1=Mid(P,0,2)
D3=Mid(Str(D),0,2)
D2=Mid(Str(D),3,2)
D1=Mid(Str(D),5,2)
D0=Mid(Str(D),7,2)
Sum=A+Val(Fun)+Val(P0)+Val(P1)+Val(D3)+Val(D2)+Val(D1)+Val(D0)
S=Right(Str(Hex(Sum)),2)
IfMSComm1PortOpen=FalseThenMSComm1. PortOpen=True MSComm1Output=“3ah” MSComm1Output=ASCII(Asc(Left(Str(A),1)))
MSComm1Output=ASCII(Asc(Right(Str(A),1)))
MSComm1Output=ASCII(Asc(Left(Str(Fun),1)))
MSComm1Output=ASCII(Asc(Right(Str(Fun),1)))
MSComm1Output=ASCII(Asc(Left(Str(P0),1)))
MSComm1Output=ASCII(Asc(Right(Str(P0),1)))
MSComm1Output=ASCII(Asc(Left(Str(P1),1)))
MSComm1Output=ASCII(Asc(Right(Str(P1),1)))
MSComm1Output=ASCII(Asc(Left(Str(D3),1)))
MSComm1Output=ASCII(Asc(Right(Str(D3),1)))
MSComm1Output=ASCII(Asc(Left(Str(D2),1)))
MSComm1Output=ASCII(Asc(Right(Str(D2),1)))
MSComm1Output=ASCII(Asc(Left(Str(D1),1)))
MSComm1Output=ASCII(Asc(Right(Str(D1),1)))
MSComm1Output=ASCII(Asc(Left(Str(D0),1)))
27 HydraulicsPneumaticsSeals/No42010 MSComm1Output=ASCII(Asc(Right(Str(D0),1)))
MSComm1Output=ASCII(Asc(Left(Str(S),1)))
MSComm1Output=ASCII(Asc(Right(Str(S),1)))
MSComm1Output=“0dh” MSComm1Output=“0ah” EndSub計算機(jī)控制系統(tǒng)根據(jù)設(shè)定的流量值,給變頻器發(fā)送一個初始的頻率值。液壓系統(tǒng)啟動后,計算機(jī)不斷的查詢系統(tǒng)的流量值,根據(jù)實(shí)際測量到的流量和設(shè)定流量之間的偏差來調(diào)整變頻器的輸出頻率,使系統(tǒng)流量符合要求。
4總結(jié)
變頻器通過調(diào)節(jié)電動機(jī)的轉(zhuǎn)速可以控制液壓系統(tǒng)的流量,并且能夠獲得較好的調(diào)節(jié)效果。RS-485協(xié)議是一種基于RS-485總線的通信協(xié)議,它使用方便,功能完善,抗干擾能力強(qiáng)。應(yīng)用RS-485通信協(xié)議開發(fā)出的變頻調(diào)速系統(tǒng)能夠滿足系統(tǒng)的開發(fā)要求。
評論