Logix Analog Input Scaling to DINT or Float?

skyfox

Lifetime Supporting Member
Join Date
Nov 2006
Location
CA
Posts
279
ControlLogix 5550 PLC (Or any other)

Just wondering in general, what is the better method for handling Scaled inputs?

Move the scaled value to a DINT or to a float.

I have to work with large number of inputs (32 anlog inputs) and need resolution of 4 decimal places (ie. 9999.1234) for calculations.

My inputs have a range of 0-1000 (Raw in = 0 - 10000, Scaled value out = 0 - 1000) from analog inputs)

Is it better to send this to a FLOAT directly or do I use a DINT? If I use a DINT how do I do to get the 4 decimal places of resolution for my calculations?

For example, If I use a DINT,

4.0001
4.0002
4.0003
4.0004

Has the same scaled count. Any ideas how I can do this with DINT' or do I have to use floats?

Thanks Again.
 
Float is natural way to do. But how much accuracy do you really need after and during calculation.
 
Last edited:
Keep in mind if you leave the raw data at 0-10000 and it represents 0-1000
then each count equals 0.1. I don't think you are going to get the resolution you want.

What is the catalog number of your analog card? Can you change the raw data resolution?
 
Keep in mind if you leave the raw data at 0-10000 and it represents 0-1000
then each count equals 0.1. I don't think you are going to get the resolution you want.

What is the catalog number of your analog card? Can you change the raw data resolution?


Thanks Mickey,

My Mistake. Scaled output is 10 (not 1000) which gives me the milli (3 digit decimal) resolution. I can't edit the post any longer otherwise I would correct it.
 
When using integers of any kind to represent engineering units, it is typical to use an implied decimal point.
As an example, a value of 3.456 would be multiplied by 1000 and stored in an integer as 3456. I typically comment the integer in a program as:
"Tank level in inches #.###" to indicate there is an implied decimal.

I generally stick to reals when dealing with analog signals, as the accuracy is never perfect. When I am dealing with a signal I know is solid (like a pure digital measurement read over a communications channel) I will work in either reals or implied decimals depending on just how much range I need on the value.

Reals themselves are not 'more accurate' then integers, contrary to many peoples belief, although they are generally sufficient for most applications, and much easier to deal with.

A good read... http://download.oracle.com/docs/cd/E19957-01/806-3568/ncg_goldberg.html
 
Why all this hassle ?

ControlLogix analog cards give you (as the default option) scaling to engineering units in floating point (REAL) data format without any code needed in the controller.

You will not better it by scaling the cards to give RAW data, and then scaling again in the code.

If you leave the card configuration as REAL data format (default), and configure each channel for the range you need, then you will get the optimum data input, which is an IEEE 32-bit floating point value, which gives (i think) 7 digits of precision. You will not beat that by inputting an integer value and converting it to float.
 
If you leave the card configuration as REAL data format (default), and configure each channel for the range you need, then you will get the optimum data input, which is an IEEE 32-bit floating point value, which gives (i think) 7 digits of precision. You will not beat that by inputting an integer value and converting it to float.
A 16 bit A to D converter can only provide a little over 4 and a half digits of precision. If the raw data is scaled to REAL the precision is still only 4.5 digits and that is ONLY IF the A to D converter is 16 bits.
 
Floating point, as Peter indicates, won't actually improve resolution or accuracy. However, I almost always fo right to floating point values because it makes subsequent calculations simpler. For example, if you are averaging ten flow readings with a very high value eacn you can run out of digits using integers, but you won't do that with floating point.
 
Why all this hassle ?

ControlLogix analog cards give you (as the default option) scaling to engineering units in floating point (REAL) data format without any code needed in the controller.

You will not better it by scaling the cards to give RAW data, and then scaling again in the code.

For many reasons, I usually scale the analog input (and output) cards in Logix systems to represent the electrical signal value... 4000-20000 for ma I/O, -10000 to +10000 for voltage, etc.

Since I usually display the 'Actual Value' directly from the card on an HMI somewhere (usually on a calibration screen), it gives an easy way to check with a meter that the card is actually seeing exactly what is present, without requiring the techs or electricians to do any calculations.

Also, by doing my real "To EU" scaling in the PLC code, I don't have to mess with card reconfiguration messages, nor deal with interruptions on the other channels of the card when re-scaling anything. It also makes life much easier for the HMI based two-point calibration I generally use.
 
You have an analog input that has a range of 0 to 1000 units. Your resolution is .031. That means that the smallest value you can get is .031, then 062, .093, .124, etc. It seems to me that four digits is pretty meaningless.

That said, I would configure the analog cards to return scaled floating point data.
 
You have an analog input that has a range of 0 to 1000 units. Your resolution is .031. That means that the smallest value you can get is .031, then 062, .093, .124, etc. It seems to me that four digits is pretty meaningless.

That said, I would configure the analog cards to return scaled floating point data.

He said raw is 0-10000. Scaled 0-10. That would give 0,001 fo resolutin (atleast i understood he needed this for scaled value), at that point four digits for calculations is reasonable maybe even five depending on task. Ofc this is when not considering resolution of AD.
 

Similar Topics

I had some recent issues with the analog inputs on an L23E. At first, I did not wire the analog com back to 24 neg and that was a lot of it...
Replies
34
Views
3,865
Hey guys, running into issues trying to get some analog input and output cards for customers needing a few points here and there. with that in...
Replies
15
Views
4,900
Hello everyone.Am new in allen bradley configuration,i have a mini project to execute, i have wired my Micrologix 1400 for analog input signal of...
Replies
0
Views
1,499
Hello everyone.Am new in allen bradley configuration,i have a mini project to execute, i have wired my Micrologix 1400 for analog input signal of...
Replies
3
Views
2,593
We have L72 controller of Rockwell make with 4 nos. analog inputs from pressure transmitters. Due to break in cable connection OR transmitter...
Replies
7
Views
2,056
Back
Top Bottom