Math Question

Clay B.

Lifetime Supporting Member
Join Date
Jun 2005
Location
Concord,NC
Posts
1,304
Actually this is more a formula question.

What I have is a system where I have a major ingredient and 3 sometimes 4 minor ingredients.

What I need to do is when the operator selects the percentages of each ingredient set the drive speed so that amount is discharged from each system.

What I have is the main ingredient setting the pace for the minor in that I run it at X pounds per hour the minor will follow. Well that is the theory anyway.I tested the conveyors today and have a maximum output of each conveyor.

Major Conveyor max output is 5,800 pounds per hour
First minor conveyor can output 427.44 pounds per hour.
Second minor conveyor can output 576.96 pounds per hour
Third conveyor can output 381.12 pounds per hour

So as an example:
Mix 1
90 % major ingredient
2.3% First minor ingredient
6 % Second minor ingredient
1.7 % Third minor ingredient

Rate of combined ingredients: 5000 lbs per hour.

Below is what I think will work. Let me know if I have skipped off the reservation again.

Using the example above:

Total Rate = 5000
Major Rate = Total Rate time major percentage 90% 4,500 lbs per hour divide by full speed of 5,800 (whip out handy dany calulator) and it needs a speed comand of 77.6 percent

First minor = 23% of 500 lbs or 115 lbs ( I came up with 23 from 2.3% because of the 500 lbs of minor ingredients it is really 23%) which I then divide by my max speed of 427.44 and I get 26.9 % drive speed.

Second uses the same math as first minor (500X.60)/576.96 which equals 52% drive speed

Third (500x .17)/381.12= 22.3% drive speed

Now to explain this to my PLC:

PLC is a compact so it is nice in the math area

First I need some tags:
Total_Rate: setpoint for total batch rate unit lbs per hour unit real
Major_Ingredient_Percent: setpoint for major ingredient unit percent as integer
Minor_1_Percent:setpoint for 1st minor ingredient unit percent as real
Minor_2_Percent:setpoint for 2nd minor ingredient unit percent as real
Minor_3_Percent:setpoint for 3rd minor ingredient unit percent as real
Major_Rate: create by multiplying Major_Ingredient_Percent by Total_Rate
Minor_Rate :create by subtracting Major_Rate from Total_Rate
Major_FS_C: constant value of 5,800 unit real
Major_Speed: Speed as a percentage by math unit real
Minor1_Percent_Rate=Minor_Rate 8 (Minor_1_Percent * 10) unit real
Minor1_FS_C: constant value 427.44 unit real

Now my math:

Major_Speed= Major_Rate/ Major_FS_C
Minor1_Speed=Minor1_Percent_Rate/Minor1_FS_C

Minor 2 and 3 work same as 1.

Does this look right or am I off my rocker?
 
Last edited:
Looks like it will work. Might be you could simplify it by having a Minor1, 2, 3_Rate instead of just a Minor_Rate tag. Then you wouldn't need the Minor_Rate_1_Percent tags. Don't bother with any subtraction or multiplying by 10. Just multiply all 4 %'s by the Total_Rate, then divide each of those by their respective maximums.
Seems like that may eliminate a few rungs and tags and make it easier for a tech to understand, at least to my way of thinking.

I like these kinds of projects. Maybe add some logic to check that all %'s add up to 100. Also to compare Rate to Max, and if greater than, reject. Fun stuff.

Cheers,
Dustin
 
Fun it is almost midnight and I am still working on this beast.

Anyway I need the Minor_Rate_Percent tags because the operator will have recipies they load from an HMI and those setpoints get pushed into the Minor_Rate_Percent Setpoints.

I thought about the 123 thing but I did all the math as a Compute so it is pretty obvious what is going on.

Like the compare idea. Will have to incorporate that so they know the recipes will work.

Thanks for checking my math. Will know tomorrow if it will work.
 

Similar Topics

... I followed a link dealing with Permutations and Combinations, and learnt a (to me) startling fact ! 0 * 0 = 0 agreed ? 0 * 0 * 0 = 0 agreed...
Replies
12
Views
3,510
See attached pic Why is R02451 reading 0 before the Real_to_Int conversion? It is reading 23 after, which is what it should read.
Replies
8
Views
1,664
Im using Wonderware Intouch machine edition v8.0. Question: How does the Math Worksheet/Task scripting work? I have the following expression...
Replies
3
Views
2,252
Hi Group, I'm the new owner of an AB MicroLogix 1400 processor and have been trying to decide the best way to de-pressurize a compressed air tank...
Replies
8
Views
1,962
🤷 I have a small cattle herd and am trying to create a feed estimate calculator. Each beast will eat about 3% of its body weight each day...
Replies
4
Views
2,755
Back
Top Bottom