Scaling in Proficy Machine 8.6; seriously, no scaling to a REAL?

defcon.klaxon

Lifetime Supporting Member
Join Date
Feb 2015
Location
Far NorCal
Posts
616
Hey guys,

I've already searched the forums and think I've figured this out, just wanted to make sure since the threads I found were all slightly different than what I was after.

Project in question is converting existing 90/30 code to RX3i, and making modifications. Former programmer is doing things that just baffle me but I'm trying to work through it. His scaling methods were odd at first, but after reading about how the ALG221 can be set to 0 at 4mA it's making more sense.

Because the 90/30 code didn't have Scale blocks, his scaling was done manually which is fine, but I was thinking of modifying the code to Scale blocks so it's easier to read and keep track of. But I noticed that all the Scale blocks have integer value outputs, so anything with a decimal would apparently need to be scaled to 10x the engineered high value, converted to REAL, then divided by 10 (or insert 100x and divide by 100 for more decimal places, 1000x and divide by 1000, etc).

I simply cannot understand why what appears to be a modern, higher grade PLC wouldn't have a Scale block built in that could do decimals natively. These things certainly aren't cheap, but even a damn Scadapack can deal with decimals in their SCAL block. I would expect this sort of nonsense from Automation Direct, so what am I missing? Is there a reason in the foundation of the GE processor/Proficy program that can't handle this? Am I more frustrated than I should be?
 
You are being more frustrated than youneed be. The RX3i has a scaling function block.
Read the instructions and look through online help. What is wrong with scaling an INT analog input into a DINT?
 
Last edited:
I'd just roll my own to be honest into whatever the GE equivalent of a user defined function block is.

Convert to real, multiply by (eng max - eng min) / (raw max - raw min) then add eng min to the result.

Add bounds clamping if you require, and loop fault detection if your input module gives you the ability to read <4mA.
 
The RX3i has a scaling function block.
Read the instructions and look through online help. What is wrong with scaling an INT analog input into a DINT?

Hi Russ, sorry if I wasn't clear in my original post; I am aware of the Scale function block. According to the help in InfoViewer, there are the following types:

1. SCALE_INT
2. SCALE_UINT
3. SCALE_DINT

Checking the Scale function in InfoViewer, it says the output can be, "DINT, INT, UINT, or WORD variable or constant".

Maybe I'm missing something, but INT, UINT and DINT sounds like various integers to me; i.e., no decimal. Let's say I want to measure CL2 residual from 0.000 mg/L to 5.000 mg/L. It doesn't sound like any of the Scale blocks would be able to provide a decimal output. Rather, it sounds like I would have to say my OHI (output high) would be 5,000, I'd have to convert that to REAL, and then divide by 1,000. Doable, but very clunky in my opinion and it eats up additional registers as intermediate steps. But if there's a way to natively have a decimal REAL as the output of the Scale block, then obviously I'm missing something.
 
Hi
If no real is available, i would simply add 0's in the maths

So if a temperature is scaled 0 to 100, scale it 0-10000 and use the last 00 to be the decimal places
 
I'm pretty sure the computer for the lunar lander didn't have a real scaling block either!

That does seem rather limiting, I agree.

Rip it out and put in a SCADAPack ;)
 

Similar Topics

How do i scale analog values in "int" form to give a scaled "real" value on GE proficy machine edition. N.B: I couldn't find the SCALE_REAL block...
Replies
4
Views
6,548
Hey guys, I've come across some code that is scaling an analog value in a GE 90/30 (now porting to RX3i). There's some oddity going on that I'm...
Replies
5
Views
2,587
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
12
Views
419
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
2
Views
77
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
215
Back
Top Bottom