Merging 2 data systems. Need to know the highest value constant
I can use in a PLC5/80 and what is the largest value you can have
in a Floating point. Thanks in advance.
It's been a while since I worked on a PLC5, but it's hard to imagine that there are things you can do in a Micrologix 1500 that you can't in a PLC5. 16-bit integers are N files and 32-bit integers are L files in the Micrologix.
Merging 2 data systems. Need to know the highest value constant
I can use in a PLC5/80 and what is the largest value you can have
in a Floating point. Thanks in advance.
The PLC/5 uses the IEEE 758 floating point standard. This standard is how most computers represent and use floats. With floating point numbers the largest values are subject to resolution. For a resolution of one count, the largest floating point number you can have in a 32 bit float is 16,777,215 (224-1, the largest value that can be represented in a 23 bit mantissa plus one implied bit). Although you can have bigger numbers, values larger than 224 can no longer increment by 1, you start loosing resolution in the 1's column. As a general rule of thumb, you have 7 to 8 significant digits in a float when written as a base 10 number.
When I store a counter value and I reset on both ends to 0 at 999,999
everything is fine but if I try to go out 1 more to 9,999,999
everything just doesn't work right. this is in the PLC5. data is coming from
a ControlLogix messaged over.
Is your "counter" a REAL or a DINT ? Are you "storing" the value with an ADD instruction ?
You're probably encountering a basic feature of IEEE single-precision floating point while trying to add a large number to a small number. TConnolly referred to this, and it's a classic problem when folks are writing accumulators in PLC-5 controllers.
The only sensible approach to large integer accumulation in the PLC-5 is to use cascading accumulators.
Yes, I was the tech support guy in charge of the PLC-5 back in the late 1980's and early 1990's. I was asked by engineering if we could live without the DINT data in the NP5 (New Platform 5) because memory space was really low etc. I said that we can use floating point for large numbers. Hindsight says that I should have fought that one.