[Logix 5000] When should I worry about adding a small number to a large number?

defcon.klaxon

Lifetime Supporting Member
Join Date
Feb 2015
Location
Far NorCal
Posts
616
Hi all,

I'm familiar with the idea of an issue where at some point, adding a small number to a large number breaks down. I was wondering with an AB ControlLogix CPU, when should I start to consider that as an issue as far as numbers?
 
once it gets to exponetial point adding small numbers won't do anything. At that point you'll need to use a second one be it another float, an Dint, etc. when you max out the first one, increment the second by 1, zero the first, then you can just multiple the second by the max of the first and add the first for a display number. your HMI may be capable of a longer display number than the PLC's blocks.

A little here, Ken suggests hitting up Wiki http://www.plctalk.net/qanda/showthread.php?t=43932.
 
32-bit IEEE-754 floats* lose significance at one part in 16Mi (2**24 = 16,777,216). e.g. there is no fractional value (e.g. 0.5, 0.9, etc) at or above 8,388,608.0 i.e. the next possible value is 8,388,609.0, so if you add something less than 0.5 to the 8,388,608.0, the result will be the same i.e. 8,388,608.0.


Similarly, around eight billion, you cannot add anything smaller than one thousand.



* See here
 

Similar Topics

I'm going to get my certificate in plc programing , I have the option to focus on studio 5000 and the control/ compact logix familys, or rs logix...
Replies
18
Views
8,804
I recently did a program conversion from logix 500 to studio 5000 and when machine runs it depends on two ton instructions to keep the machine in...
Replies
17
Views
536
Hello, I am trying to read a barcode scanner input using a cognex dataman 280 barcode reader, store it another string, the compare with another...
Replies
1
Views
94
Hello. Why is my RSLogix 5000 start in grace period mode, even though I have a valid license? I also think I have a decently recent FT Activation...
Replies
3
Views
176
Back
Top Bottom