Datalog Floating point in Logix500? numeral prolem

TimD

Lifetime Supporting Member
Join Date
Aug 2007
Location
New Hampshire
Posts
235
Hi,

looks like I can't datalog floating point numbers using a micrologix cpu and logix500. I CAN use Long and Int. My problem, I need to record very low values (0.00123)

If I simply multiply to an int, I lose all the leading zeroes plus the digits 'behind' the floating point.

I was thinking of converting to strings and appending leading zeroes, but I can't assume how many leading zeroes!

There must be an easy way, right? I'm just missing the point (no pun intended!)

Thanks
 
If only integers are available, how can you deal with a float at all?

In any event, if you are writing a value, use integers and fixed point notation.

For the above say, normalize by 100000, and use a long.

I normally comment numeric registers like that to reflect the scaling:

"Moisture Content
0 to 0.xxxxx %
Scaled
######. "
 
I tried re-scaling from 0 - 2500 (original values are 0 - 0.25 but leading zeros are ignored. I am thinking about counting the number of leading zeros, then concatenating them to a string, then convert to int... There MUST be a better way...
 
Um, too late :( I already opened the factory seal!

I can't believe even the 1500 only logs ints, longs, and binaries. I was hoping after I flashed the 1100 CPU to rev B that I would gain float logging. Oh well.

So, any advice out there on word-trickery to get leading zeroes into a long int? Thanks!!!!
 
How is the float getting into your PLC in the first place? Is it from an analog input? Analog inputs are integers to begin with, so if its from an analog input to begin with then your problem can be addressed in scaling.
 

Similar Topics

Hello, I was looking to store some values from our FactoryTalk Application using Datalog to a MariaDB. I see there is quite a bit of documentation...
Replies
1
Views
25
From the Red Lion website, after some customer enquiries in the last week or so... Rev. March 25, 2024 [18:30] Just thought it might help a...
Replies
9
Views
253
Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi, The operator has reported that, from time-to-time, when he presses the "Generate Report" button...
Replies
5
Views
451
I never really noticed this because I rarely do datalogging in a PV+, but it seems you can only start one datalog. Is this really true? My...
Replies
5
Views
786
Hi guys, Is it possible to automatically generate PDF Report of Trend and Datalog in FactoryTalk View SE v12? If YES, Please, how?
Replies
0
Views
670
Back
Top Bottom