RSlogix5000 Floating number range

Thanks for all the replies.

What is the best way for me to handle this number range and being able to display this in the correct format?

That depends. What are you actually trying to represent?
Are there always going to be six trailing zeros?
If you really need to handle 10 digits with accuracy, I'd probably just use two DINTs, and split the number down into the lowest 5 digits in one, and the highest 5 in another.
 
The value I am trying to display is for a Flow meter that is totalizing in gallons. I need to be able to represent the scale value and display it in a HMI.
 
Accumulate enough pulses for 1000 gallons in a counter. When it is done increment a 'thousands of gallons' tag and reset the counter. Display the 'thousands of gallons' tag. If needed also display, next to it, the counter value.

For viewing purposes is the exact unit gallon figure important?
 
I know this is an old thread, but it was one of the top search results for me when I was wanting to read a bit about the REAL data type. For anyone who's on a similar path, I found the following two articles that I thought really shed some light on floating-point data types:

https://community.alteryx.com/t5/Al...t-numbers-are-surprisingly-strange/ta-p/29049

https://www.exploringbinary.com/why-0-point-1-does-not-exist-in-floating-point/

I also found this, but, well, it's a bit beyond the scope of a brief tutorial. :)

https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
 
Yeah, pretty simple. MSW and LSW. Overflow LSW @ 9,999,999 into MSW. If required, take a pulse every tenth of a gallon so your last digit is in tenths.
 

Similar Topics

Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
89
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
423
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,118
Good Morning Everyone, I'm looking to use the GSV instruction to get I/O fault codes for my project so I know if there's a comms issue in my E/IP...
Replies
5
Views
858
The machine is running production. When trying to go online with the laptop the whole machine looses communication and faults out. Drives, HMI...
Replies
13
Views
1,927
Back
Top Bottom