How many digits can a low end PLC calculate?

Tofo

Member
Join Date
May 2013
Location
CA
Posts
57
For example, I want a PLC (US$1000) to calculate 1 divided by 9. Can I expect the PLC able to handle a 4 decimal points of calculation?
Thanks
 
Not unless it has at least 32 bit floating point maths. Small Omron PLCs (shoebox CP1L) have both 32 and 64 bit floating point maths and they are not expensive. Do not know about others.
I guess you could fiddle about with multiplying to increase numbers etc so that you could get a result without floating point but the result would be whole numbers.
 
The reason I ask this question because I am trying to fix a machine. The machine has compactLogic PLC. The PLC program need to calculate flow rate. The volume is fixed. The data that some people recorded show the flow rate is 180,240,300, 270, 280. I am not sure the recording guy rounded up the number or other reasons. I just don't feel the PLC program is right

Note: I have not found the PLC code yet. I just saw the machine and saw some data. I start to think about where to begin.
 
For example, I want a PLC (US$1000) to calculate 1 divided by 9. Can I expect the PLC able to handle a 4 decimal points of calculation?
Thanks

IF you are using the REAL data type in the CompactLogix, yes, 7 digits of precision are possible ( log(10)2^24 = 7.224).

The 24 is 23 + 1 bits of the significand for a normalized 32 bit floating point format.
 
Note: I have not found the PLC code yet. I just saw the machine and saw some data. I start to think about where to begin.
Start with the sensor that picks up the flow rate signal. Is it analog ? Or is it an impulse transmitter ?
Find where the signal is connected and trace it in the PLC program.
 
If you talk about a compactlogic, can it really cost just 1000$ ?

And this could be considered some kind of mid-sized plc and for sure the lack of precision in your case is not from the plc technology!
I would also be surprised if a programmer just decided to give less resolution because usually we (PLC programmer) like to be as precise as we can.

It is more into the sensor reading IMO...

If you read a liquid flow with a pulsed volume count, you probably need a smaller device to count smaller volume...
 
Are you calculating 1/9 or was that just an example? Don't calculate constants. Enter .11111111 and be done with it.

Now to the more fundamental problem of floating point precision. With a forum search you can find lots of threads here about the IEEE-754 floating point number format used by your PLC and by most computers to do floating point math and the shortcomings of it - I'm not going to rehash it here.

What I do suggest you do is put some thought into the units of measurement. You have said that the volume is fixed. If that is the case then I suggest you count in units of whatever that volume is and that you use a DINT to do the counting. So if for example your flow meter has a fixed volume of 5 cubic inches then you count a 1 for each 5 cubic inches. Then scale the end result, that way you are not accumulating an ever increasing error with every single sample and floating point resolution problems are minimized.

If you'll tell us what the flow meter is and what you are doing we can help you solve the problem.
 

Similar Topics

Good Evening , We have a number of Powerflex 525 Drives . I took notice for years elsewhere and our plant , that our Powerflex 525 drive...
Replies
0
Views
640
Good Afternoon, Just wondering , are many of you using SAP in your plants ? If so , is it difficult to learn ? Are there many training...
Replies
10
Views
1,420
It better to have too many instead of not enough right?
Replies
26
Views
2,895
Hi all- I have an application where: - I have a fixed system with a pre-determined, static, network (say, 192.168.2.0/24). - That system...
Replies
13
Views
4,239
I have an application that needs 20 inputs and 20 outputs with only 10 XNOR and 10 NAND blocks. I could do it with relays, but this could end up...
Replies
16
Views
5,172
Back
Top Bottom