Scaling

Code:
                 (CalVal – CalLowVal)
 MeasuredVal  =  -------------------- x (MeasuredDN – CalLowDN) + CalLowVal
                  (CalDN – CalLowDN)
It may not be obvious, but dcam's SCL (Scale) function block inputs and outputs map to my equation (above) as follows:


Code:
      In => MeasuredDN
InRawMax => CalDN
InRawMin => CalLowDn
 InEUMax => CalVal
 InEUMin => CalLowVal
     Out => MeasuredVal
And just to be clear: even if my concept of "scaling is multiplying by one" does not resonate, understanding proportions is a fundamental necessity for solving this problem correctly; so the OP needs to intimately and completely understand the equation above, and where it comes from, or else they should pass the task on to someone who does.
 
Last edited:
I might be wrong - but I've got a hunch that some of our members might misunderstand what is being shown in Post #18 ...

the picture shown there is not a "flow chart" type of drawing - that would be followed while writing "the code" ... that picture IS the code ... if you're not familiar with it, you might want to look up Function Block Diagrams ...

here's a handy link for anyone who's interested ...

https://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm009_-en-p.pdf
 
I might be wrong - but I've got a hunch that some of our members might misunderstand what is being shown in Post #18 ...


I for one got it.


Shoot, to my mind every instruction on a rung, every function block, and every line in ST, is, in a metaphorical sense at a minimum, some form of "multiplying by one."
 
Hi Ken, if you may have thought by my previous post that l thought that was a flow chart drawing, that is used to assist in writing the code, that's not the case. I am well aware of function blocks and how they are wired. I just like things to be precise and unambiguous.
Unfortunately dcam's FBD page could lead to some confusion to the less experienced, thanks dcam for rectifying the FBD wires/gaps.
 

Similar Topics

I have everything set up for vibration monitoring with the code in Controllogix 5000. The thing is that I am not able to read values SCADA in mm/s...
Replies
0
Views
27
Hi, having some issues with scalings (SCP commands) with some Vegapuls 65 guided wave radar level transmitters. I've set the min/max in the...
Replies
5
Views
193
I want to measure the tank level and get the sensor output to the PLC. Below are the details : Tank Height =0 - 3m, the sensor is stalled 0,2m...
Replies
15
Views
653
Hi, I have a ControlLogix system with 1756-IF16 analogue inputs. I can't scale the inputs at the card as there is a requirement to facilitate...
Replies
14
Views
383
I know nothing about simaticnet OPC server. I do know Kepware. I would only ever scale raw to engineering in the PLC, but it is possible to scale...
Replies
5
Views
226
Back
Top Bottom