EasyManua.ls Logo

Easy Electronics xLogic Micro PLC - Page 170

Easy Electronics xLogic Micro PLC
293 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
170
Analogramp:AQ
PIcontroller:AQ
Analogmath:AQ
Datalatchingrelay:AQ
Up/Downcounter:Cnt
Parameterp(numberofdecimals)
ParameterpappliesonlytothedisplayoftheAxvalueinamessagetext.
Descriptionofthefunction
ThefunctionreadsthevalueofthesignalattheanaloginputAx.
ThisvalueismultipliedbythevalueofparameterA(gain).ParameterB(offset)isaddedtotheproduct,
asfollows:
(Ax*Gain)+Offset=ActualvalueAx
ThefunctionblockcalculatestheproportionofthevalueAxtotherange.Theblocksetsthedigitaloutput
QhighforthesameproportionofthePT(periodictime)parameter,andsetsQlowfortheremainderof
thetimeperiod.
ExampleswithTimingDiagrams
ThefollowingexamplesshowhowthePWMinstructionmodulatesadigitaloutputsignalfromtheanalog
inputvalue:
Example1
Analoginputvalue:500(range0...1000)
PeriodictimeT:4seconds
ThedigitaloutputofthePWMfunctionis2secondshigh,2secondslow,2secondshigh,2secondslow
andcontinuesinthatpatternaslongasparameter"En"=high.
Example2
Analoginputvalue:300(range0...1000)
PeriodictimeT:10seconds
ThedigitaloutputofthePWMfunctionis3secondshigh,7secondslow,3secondshigh,7secondslow
andcontinuesinthatpatternaslongasparameter"En"=high.

Table of Contents