PDA

View Full Version : Calculating time left ....


briana banks
April 17th, 2007, 12:48 PM
Hi All

Sorry for this novice question.
Using RSlogix 5000.

If I have 5 stations .In each station operator enters SP amount
of fuel.

all stations are connected via single line to a tank.
there is a totalyzer on that line.

hence,each station line up in a queue to consume oil.

I calculate time by using formula (SP - Actual)/rate = time (in sec) for each station

How should i calculate the time left for each station,
until it reaches its turn.?

Thanks

Tharon
April 17th, 2007, 12:54 PM
The sum of all the times remaining for each station ahead of the one. Then add in what ever time it takes to switch between filling one station to filling another (Should be a constant?)

So if Station 4 is the 4th station in the Queue, then it will have to wait for the whole cycle of the 3 stations ahead of it, plus the time to switch between each station.

briana banks
April 17th, 2007, 03:24 PM
Hi

I need to display a clock counting backwards of each
station's time left.


the time to switch from one station to a nother is neglectable.

Lancie1
April 17th, 2007, 03:36 PM
Use a Count-Down Counter for each Station, with Preset value set to the Sum of the Station Times that are ahead of this one. Countdown Accumulator is then decremented by using a 1-second timer or 1-second internal clock bit.

Tharon
April 17th, 2007, 04:04 PM
Are all the stations controlled by one controller? Or does each station have its own controller?