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 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
209
Hi all. I'm working on a rehab and I'm trying to figure stuff out. See screenshot at the bottom. Local:5:I.Data[6] in BTD instruction is a...
Replies
6
Views
695
Hello all, First post here. Hitting a wall with finding info on this topic online, and none of my coworkers have a clue. I have a PanelView...
Replies
10
Views
1,334
Hello, We monitor the temperature of a pipe via a 4-20mA temperature transducer. This goes into DB135(Read Analog Inputs). The issue I have is the...
Replies
0
Views
622
5069 IF8 with a 4-20ma 0-100psi, sealed fixed, no calibration, transducer attached. IF8 is scaled 4ma= 0 psi, 20ma=100psi. If over time the...
Replies
12
Views
2,576
Back
Top Bottom