ML1100 Floating point

Jezz

Member
Join Date
Dec 2002
Location
Kendal
Posts
399
Hi does anyone know what the maximum value is that a float will hold as I'm trying to get average weight values for the full shift meaning if we are running at full speed the max value is 41,040,000.00 will the float hold this ?

Thanks
 
Jezz said:
... the max value is 41,040,000.00 will the float hold this ?


Peter Nachtwey said:
A 24 bit mantissa can represent numbers to (2^16)-1 or about 16000000. That is 7 full digits and a little more.

There is an important question that must be asked. Since this topic has been covered a few times before I will let someone else figure it out.

How many parts does a weight of 41 million of what ever unit you are using (grams, oz., etc) represent? IOW, what will you be dividing 41 million by to get the average? What kind of resolution do you need for the average weight?

You can count to 16,777,216 by ones using a floating point number. After that you loose resolution in the lowest significant digit, (the 1's column). This loss of resolution soon spreads into the 10's column as your number gets larger. This can have a significant impact on the accuracy of your average.

BTW, The ML1100 can support 32 bit long integers. The 32 bit long will accurately count to over 2 billion (2,147,483,647).
 
Last edited:
I hope Jezz is not as confused as I am

I am not sure how to express this. IEEE is a format but not all computers have the capability to use it to its highest level.

Single precision using 32 bit then you will actually have a 32 bit word that uses 1 signed bit, 8 exponent bits, and 23 mantissa bits. In general this means 7 digits of precicion in general if using IEEE format. The exponent range is -126 to 127.

An issue is that some numbers have problems when being represented in binary, the conversion and rounding process can greatly affect the end result.

I would normally look at the ML manual and examples to see what it states but some of y'all do this enough you should be able to provide good detailed answers. I am expressedly interested to understand how it can provide 10 digit precision.
 
Ron, here is an interesting site that actually lets you enter a floaging point number and you can see how it will get represented in IEEE 754 single precision format (32 bit) in the PLC. There is a really good article on it in the AB KB which I haven't yet figured out how to link to now that its changed as well, and even wikipedia has a pretty decent article on IEEE 754.

http://babbage.cs.qc.edu/IEEE-754/Decimal.html
 
I already have those links. I misread what you stated, I was trying to state the same thing. What threw me was your last comment:
BTW, The ML1100 can support 32 bit long integers. The 32 bit long will accurately count to over 2 billion (2,147,483,647).
I thought this was stating it could use 10 digits for floating point but that was not what you were saying. You were giving the information that using LONG integers he could use 40,040,000 value if the decimal aspect was not a critical factor.
 
rsdoran said:
You were giving the information that using LONG integers he could use 40,040,000 value if the decimal aspect was not a critical factor.

That is correct. Sorry about the confusion. A long integer is an option that the OP may want to consider if it will meet his needs.
 
I was not attempting to debate with you or Peter in any fashion. It was stated and/or implied earlier that 10 digit precision could be obtained. In some cases the implication was that it could actually obtain double precision or full IEEE floating point values.

Just a few years ago I could not have gotten into this type of conversation.
 

Similar Topics

I'm looking to implement a low-cost, efficient method of communicating some integer values to an R30iB robot from a Rockwell 1100 PLC. I am not...
Replies
8
Views
1,733
Hello all, I am trying to setup my MicroLogix 1100 as a modbus RTU master for a modbus network containing multiple modbus RTU slaves. I currently...
Replies
7
Views
3,946
We have a machine that keeps losing its program at random intervals; sometimes 2x-3x in a shift, sometimes will go over 1wk without issue. I had a...
Replies
9
Views
2,950
Just asking for clarification here, but from my research all I need is a 500 ohm resistor across the AI and the common? Heres my schematic. I...
Replies
5
Views
2,596
I have a CLX L61 and I'm trying to read from and write to a Micrologix 1100. I'm attempting to read 200 REAL elements but I'm receiving an error...
Replies
2
Views
1,466
Back
Top Bottom