Sunteți pe pagina 1din 4

8/28/2016

38286ManuallyScalingAnalogSignals

(/app/answers/detail/a_id/38286/related/1#)

Manually Scaling Analog Signals


38286 | Date Created: 02/13/2007 | Last Updated: 02/02/2016
Support
Center (/app/home)
Access
Level: TechConnect

Emailthispage

SubscribetoUpdates

Menu

Question
IfIamusinganI/Omodulewithoutintegratedscaling(suchasFlexI/O)andIdonothaveaccesstoascaling
instruction,howdoImanuallyscalerawvaluesfromthemoduleincode?

Answer
Thefullformulaforanalogscalinghasthreeparts.Thethreepartsmustbeexecutedinthefollowingorder:
1.RATE=(ScaledMaxScaledMin)/(InputMaxInputMin)
2.OFFSET=ScaledMin(InputMinxRate)
3.SCALEDVALUE=(ActualTagValuexRate)+Offset
Belowaresomeexamples.

Example1
Instrument1isatemperaturetransducer.Itsspecsindicateitsrangeis0100(at0degreesCitoutputs4ma,
at100degreesitoutputs20ma).Theanaloginputmodule'smanualindicatesthattheinputchannel,when
configuredfor420ma,outputshexadecimalvaluesof00007878(030840decimal).
Solet'scalculateourscalingvalues.

Rate=(1000)/(308400)=0.0032425
Offset=(0(0x0.0032425)=0
ScaledValuewillbe=(ActualTagValuex0.0032425)+0,whichcanbesimplifiedtoActualTagValuex
0.0032425.
YoucansubstitutetheactualinputtagforActualTagValue.
https://rockwellautomation.custhelp.com/app/answers/detail/a_id/38286/related/1

1/4

8/28/2016

38286ManuallyScalingAnalogSignals

Example2
Instrument2isapressuretransducer.Itsspecsindicateitsrangeis150800psi(at150psiitoutputs4ma,at
800psiitoutputs20ma).
Asbefore,theanaloginputmodule'smanualindicatesthattheinputchannel,whenconfiguredfor420ma,
outputshexadecimalvaluesof00007878(030840decimal).
Solet'scalculateourscalingvalues.

Rate=(800150)/(308400)=0.021077
Offset=(150(0x0.021077)=150
SoourScaledValuewillbe=(ActualTagValuex0.021077)+150.

Example3
Wearecalculatinganinternalvaluethatismeanttocontrolavalvefromaminimumof0%to100%open.The
analogoutputmodule'smanualindicatesthattheoutputchannel,whenconfiguredfor420ma,outputs4maat
ahexadecimaltagvaluesof0000,anditoutputs20maatahexadecimaltagvalueof7878(030840decimal).
Inthisexample,ourscalingcalculationisthesame,butsincewearescalingtoanoutput,wewillswapourinput
andtagvalues,sincetheoutput(scaledvalue)isnowintendedfortheoutputmodule.
Solet'scalculateourscalingvalues.

Rate=(308400)/(1000)=308.4
Offset=(0(0x308.4)=0
SoourScaledValuewillbe=(ActualTagValuex308.4)+0,whichcanbesimplifiedto
ActualTagValuex308.4.
Writingtheresultofthiscalculationtotheoutputtagwillproducethedesired420mavalue.

DISCLAIMER

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/38286/related/1

2/4

8/28/2016

38286ManuallyScalingAnalogSignals

Thisknowledgebasewebsiteisintendedtoprovidegeneraltechnicalinformationonaparticularsubjector
subjectsandisnotanexhaustivetreatmentofsuchsubjects.Accordingly,theinformationinthiswebsiteisnot
intendedtoconstituteapplication,design,softwareorotherprofessionalengineeringadviceorservices.Before
makinganydecisionortakinganyaction,whichmightaffectyourequipment,youshouldconsultaqualified
professionaladvisor.
ROCKWELLAUTOMATIONDOESNOTWARRANTTHECOMPLETENESS,TIMELINESSORACCURACYOF
ANYOFTHEDATACONTAINEDINTHISWEBSITEANDMAYMAKECHANGESTHERETOATANYTIMEIN
ITSSOLEDISCRETIONWITHOUTNOTICE.FURTHER,ALLINFORMATIONCONVEYEDHEREBYIS
PROVIDEDTOUSERS"ASIS."INNOEVENTSHALLROCKWELLBELIABLEFORANYDAMAGESOFANY
KINDINCLUDINGDIRECT,INDIRECT,INCIDENTAL,CONSEQUENTIAL,LOSSPROFITORDAMAGE,EVEN
IFROCKWELLAUTOMATIONHAVEBEENADVISEDONTHEPOSSIBILITYOFSUCHDAMAGES.
ROCKWELLAUTOMATIONDISCLAIMSALLWARRANTIESWHETHEREXPRESSEDORIMPLIEDIN
RESPECTOFTHEINFORMATION(INCLUDINGSOFTWARE)PROVIDEDHEREBY,INCLUDINGTHEIMPLIED
WARRANTIESOFFITNESSFORAPARTICULARPURPOSE,MERCHANTABILITY,ANDNON
INFRINGEMENT.Notethatcertainjurisdictionsdonotcountenancetheexclusionofimpliedwarrantiesthus,
thisdisclaimermaynotapplytoyou.
ThispageisbestviewedinInternetExplorer10,Firefox31,Chrome37,Safari6ornewer.

New Site Feedback


GiveFeedback

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/38286/related/1

3/4

8/28/2016

38286ManuallyScalingAnalogSignals

(http://www.rockwellautomation.com/global/blog/overview.page)
(https://www.facebook.com/ROKAutomation)
(https://plus.google.com/+RockwellautomationInc)
(https://www.linkedin.com/company/rockwell
(http://www.slideshare.net/RockwellAutomation)
(http://twitter.com/ROKAutomation)
(http://www.youtube.com/rokautomation)
automation)

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/38286/related/1

4/4

S-ar putea să vă placă și