Production Rate through PLC without floating point

Tim

Member
Join Date
May 2002
Location
Indiana
Posts
291
Im trying to show the production rate of a machine on a touchscreen. The problem I am having is the Mitsubishi PLC I am currently using does not do floating point math. What I am trying to do is get a sample every 5 minutes on how many parts the machine has produced. Then I take that value and divide it by the amount of parts that it should have produce and then multiply that number by 100 to get my percentage.

My problem is that the PLC I am using does the division, but will not show anything but a whole number. Example... Rate is 3 parts every 5 minutes. If 2 parts are produced, I am taking that value "2" and dividing by 3 which should give .666666 and multiply by 100 to get 66 percent.

It might just be impossible, but I just had to ask if there were any work around solutions.
Thanks
Tim
 
The most obvious answer is to multiply by 100 first, and then do the division for the sort of numbers you are talking. You may need to do some comparisons to decide which order to the arithmetic in to keep the results as accurate as possible. Is your integer arithmetic limited to 16 bits or is 32 bit available ?
 
Simon,
Hey thanks for the reply. That will work just fine, Monday mornings I need a kick in the butt to get going.
 

Similar Topics

Hello PLCTALK members, I am looking for the most effective way to calculate and store production rate per hour. Case study: I have an analogue...
Replies
8
Views
3,386
This the problem guys I am installing flow meters at different sections of the plant to measure %loss in production. Since the flow meters are...
Replies
9
Views
5,900
Hi! I'm wondering if PLCs are used for small-scale production. I've got four machines doing different things with textiles, and I'm exploring the...
Replies
16
Views
1,344
Hi, Wanted some opinion about storing production code for projects. What is a proper strategy for it? For example if you use Studio 5000, a...
Replies
15
Views
4,319
Does anybody out there have access to a marshmallow production facility? A science education YouTube channel that I follow is interested in doing...
Replies
4
Views
2,041
Back
Top Bottom