The Mystery of the Batch Simulator

The logic for the pumps is incomplete. It fills while the high level sensor is not on, but as soon as you pump out enough for the sensor to toggle it turns back on.

You need to find a way to make the pumps stay off until a low level sensor is made. I would use a "seal in" or latch with soft bits for this.

Since your full light keeps turning off and right back on due to this flaw, your pump 3 is also appearing to stay on because your always filling and not waiting until the tank is empty before filling again.

basically you told the program to fill while high level sensor is off. when you try to pump it out the water level gets below the sensor, the high level sensor goes off but the tank is at 99% capacity and you turn the fill pump back on... Fix that line of code

Good luck
 
Last edited:
The basic concept you are missing is this: Your process consists of discrete steps.

Your program should use steps too.

Step 0 is "Idle"

Step 1 is "Fill the tank"

Step 2 is "Cook the batch"

Step 3 is "Empty the tank"

The code for each of these steps should only be active when you are in that step. Your code is active all the time, so you have actions happening when they shouldn't.

There are several methods for controlling steps, the one I like is to use an Integer as "Step". Each rung that is part of a step begins with "Step = x", this only allows the code to run if that is the current step.

When you press the "start" button and the Step is 0, move a 1 into Step.
In Step 1,
Run pump 1 & 2.
When you reach high level, move a 2 into Step. (This will stop the pumps)

In Step 2,
Turn on the heater. Let the High temp switch cycle it off and on as needed.
Turn on the mixer.
Start the timer.
When the timer times out, move a 3 into Step. (this will shut of the heater and the mixer)

In Step 3,
Run pump 3.
When the low level switch indicates tank empty, move a 0 into Step.

This will complete one batch.

In a real batch program, there are a lot more steps. For instance, you are running two addition pumps at the same time. That is a bit unusual. It's more common to do one addition, and then do the second. This is especially true if you are using weight of the tank (or level) to control the amount added. If you need to add two ingredients at the same time, you will probably control the amounts with flow meters instead. I would usually put "too long in step" alarms in for the addition and empty steps. Since the "cook" step is controlled by time, it doesn't need one.
 
Last edited:

Similar Topics

Hi all, Working on a system with a CompactLogix 43 processor, Kinetix 6000 servo drives, and a sercos interface between them. The 6000 is using...
Replies
1
Views
1,018
I recently installed 4 PoE security cameras at my church. Since part of the cable run was outdoors, I searched for outdoor cat5e cable. I found...
Replies
5
Views
2,439
Factory Talk ME station V10.01 Studio is v32 Below is a pallet with password visibility. I have rendered this before in other applications but it...
Replies
3
Views
2,075
I get pack of these in every Micro expansion module... I still haven't found a use for them..?
Replies
9
Views
1,929
Hello, I've taken on yet another basket case old machine running an 7 slot SLC 5/03 PLC.... I have run into a situation where I see the same 4...
Replies
3
Views
5,622
Back
Top Bottom