Calculating time from rate.

briana banks

Member
Join Date
Jul 2005
Posts
242
Hi All

novice question.

Using RSLogix 5000.

If rate is (quantity/time) in real format.
I want to calculate the time left (Min:Sec format) to reach quantity SP from rate.
If Rate is constant and equals 1.0 (quantity/sec),how can it display the sec portion left to fill the tank.

Thanks
 
Write your equation with the units as agebraic quantities. Arrange the equation to cancel the units you want to eliminte. It will also help you keep straight whether to multiply or divide.

Example 1:
(10*gal/min) ? (2*min) = ?
Since we need the two min terms to cancel each other and we want our final answer in gal, we know we need to multiply.
(10*gal/min) * (2*min) = 20 gal

Example 2:
(20*gal) ? (10*gal/min) = ?
To get the two gal units to cancel and the min unit to come out on top, we can see that we need to divide
(20*gal) / (10*gal/min) = 2 min.

Writing units as part of the equation is a good habit to use - it will help you keep from making mistakes, and the more complex the conversion is, the more it helps.
 
Hi And thanks for replying.
I think i mislead you a little...
Rate is not constant and vary a little.
However,

I know how to calculate time from rate:

(SP - Actual) / Rate gives me time in real format e.g.

(40.0 - 3.0)ml/1.0 (ml/Min)= 37.0 Min

i want to display a clock showing time remaining in MM:SS format.

the problem is that i use HSC that counts the actual in decimal format.
so the seconds portion of the clock will always show 00...
 
Sounds like this is basically what you are after. I havent tested it but looks good to me. haha
Any way this should give you two separate real registers. one for minutes and one for seconds.
minutesandseconds1.png
 

Similar Topics

Seems like this should be a simple thing but I’m struggling with it. The basis is that I am trying to detect if a linear assembly is stopped or...
Replies
6
Views
3,087
My application includes positive displacement gear type flow meter (500 pulses per liter). PLC is ML1400 I need to totalize the fluid being...
Replies
12
Views
2,892
I have a vibratory conveyor that is being fed from another conveyor. The feeding conveyor does not always deposit a consistant flow of "product"...
Replies
14
Views
5,260
This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,361
I need to keep a running pass/fail yield of the previous 5,000 parts produced. I have used this formula before to calculate average: AvgValue =...
Replies
6
Views
2,151
Back
Top Bottom