Rslogeix500

profilehak92
ECT38101--2019TankFarmProblemV2.pdf

ECT 381: Advanced Robotics & Automation

Programmable Logic Controller Lab #2

Program Control Commands: Program Control

Name: _______________________________________ Date: ________________

Name: _______________________________________

SIGNOFF: NOTES: Circuit Operates as expected ________________________

Properly Commented ________________________ ================================================================================ =

Objective: Understanding the operation of integrating interactive program sequential operation

control commands with retentive & non-retentive bit operations in a Ladder Logic program using

an Allen-Bradley Micrologix 1200C microcontroller with RSLogix500 programming software.

Programming Assignment: The Tank Farm

A process facility has a liquid chemical feed station where a pump supplies two holding tanks

with a liquid chemical from a central supply tank. Each of the two tanks have Infeed solenoids

that allow fluid to flow into the tank from the pump, and Outflow solenoids which release the

chemical to two processing areas. Each tank has a High level (Tank Full) and a Low level (Tank

Empty) liquid proximity sensor mounted in the tank which maintains the level in each tank

between them. The sensors are TRUE (“1”) when the liquid chemical is touching them. For the

purposes of the lab we will assume that the Theory of Gravity is correct and the Low sensor

cannot be False (“0”) and the High level Sensor still be True (“1”). i.e. -- you can’t have liquid

present in the top of the tank and not already present in the bottom of the tank.

Turning the system on and off:

System operation is controlled by two ON/OFF normally-open pushbuttons (the GREEN PBs on

the trainer). Each pushbutton operates independently, and is a “double-action” input. That is

each button can cycle the system on or off depending upon its current state of operation. (So, if

the system is currently off then pushing either PB once will cycle the system on, if the system is

on then pushing either PB will turn it off. The system ‘remembers’ what operational state it is

currently in and toggles to the other if either PB is pushed). Nothing will operate unless the

system is turned on. The status of the system is determined by two indicators which are LEDs

on the PLC. When Output 0 is lit indicates the system is turned ON, when Output 1 is lit it

indicates the system is operational but is currently turned OFF. In shutdown BOTH are unlit.

Safety shutdown (E-Stops):

There are two normally-closed pushbuttons (the RED PBs on the trainer) which as independent

emergency stops (E-Stops). When either E-stop is pressed the system is locked out in shutdown.

If the system is running then at shutdown all the outputs (pump & solenoids) stop, pushing either

of the two start/stop buttons will have no effect until the system is reset using the reset switch

(The 3-position selector switch turned on then back to off). Once the system has been in E-stop

and been reset the system must be restarted using one of the start/stop pushbuttons. If the system

was running when the E-stop was pressed it doesn’t automatically turn back on when the reset is

made (that would be really unsafe to have it suddenly start up again), you have to push a GREEN

PB again to restart it. When the system is in shutdown mode a RED light (O:5) is on and the

system ON & system OFF outputs (O:0 & O:1) are turned off.

System Operation: Run Mode

When the system is activated (turned ON) by the operator, and there are no E-stops active (not in

shutdown), then all the tank related outputs (Pump motor, infeed and outflow solenoids) are

controlled by the status of the High level and Low level proximity sensors in the tanks. During

normal operation (system is ON & the liquid level in both tanks is between the two proximity

sensors): (a) the pump motor is Off, (b) the Infeed Solenoid for each tank is closed, and (c) the

Outflow Solenoid for each tank is open so that the chemical can be drawn out by the process as

needed. This continues until one or both tanks is nearly empty and needs a refill (this is

indicated by the LOW level sensor going false).

How is this indicated on the trainer? The Pump is the first RED light (O:4). Both tanks have

infeed solenoids (the YELLOW lights, O:6 & O7) and outflow solenoids (the GREEN lights O:8

& O:9). The High & Low level sensors are represented by selector switches. The 2 2-position

maintain selectors (I:4 & I:5) are the two LOW sensors; and the three position momentary

selector switch (I:8 & I:9) are the HIGH sensors.

System Operation: Refill Mode

If the Low level sensor in either tank goes false (the switch is turned OFF) then the tank is nearly

empty as the fluid level is below the low level sensor. In that case the tank goes to Refill Mode:

(a) the Outflow solenoid for that tank closes (Off), (b) the Infeed solenoid for that tank opens

(ON), and (c) the pump motor turns ON to refill the tank until full (the tank is full when the

HIGH level sensor goes true). When full the tank automatically goes back into run mode

operation again as described above (motor off, infeed closed, outflow open).

Of course YOU will act as the level sensors for the program simulation, manually setting the

inputs to make the pump turn on and off as desired to keep the tanks filled. So the Low level

sensor calls for a refill from the pump, and the High level sensor indicates the refill is done.

Note that since during the refill the liquid will flow first to the bottom of the tank (our old friend

Mr. Gravity), so when you go into refill mode you will have to return the LOW sensor to TRUE

(turn switch back ON) before the HIGH level sensor goes to TRUE (you flip the High level

switch on and then off). The tank has to remain in Refill mode even after you turn Low switch

back on, until you turn on the High level switch. Then the tank toggles back to Run mode.

One final complication, what if both tanks start to go empty & call for a refill at the same time?

The pump can only maintain proper pressure to one at a time (management was trying to save

money again & undersized the pump!). So once either tank calls for refilling it stops its twin

from also calling for a refill until the first tank has completed its refill cycle. Once filled, the

tank in control releases its hold and the second tank, which has waited patiently, can then be

refilled. When both tanks are in normal run mode the pump motor is off waiting for another

refill call. If the system is stopped, OR either E-Stop is activated, at any time the operation

immediately ceases, the pump motor cannot be activated by the sensors and ALL solenoids are

closed.

Solving the problem:

As always in these labs there are several methods to create a program to solve the problem. The

solution to the problem requires a number of independent tasks be worked out. Break the

problem into separate tasks: (1) How do I create the 2 ‘double-action” NO Green PB inputs?

(2) How do I design the Shutdown override circuit using the two NC Red PB inputs? (3) How

do I make the two tanks toggle between Run & Refill mode? (4) How do I make the two tanks

share the pump during times when both are calling for a refill?

Solving this does not necessarily require complex program control structures but the ability to

apply logical design to have components interact with each other to perform a function.

System Diagram and I/O table:

Design a PLC control circuit to operate the tank farm as specified using the I/O shown below.

Input Description Address Output Description Address

System Start/stop #1 I:0 System ON (LED on PLC) O:0

System Start/stop #2 I:1 System OFF (LED on PLC) O:1

E-Stop #1 (Shutdown) I:2 Pump Motor O:4

E-Stop #2 (Shutdown) I:3 E-Stop active O:5

Low Level Tank #1 I:4 Infeed Solenoid #1 O:6

Low Level Tank #2 I:5 Infeed Solenoid #2 O:7

High Level Tank #1 I:8 Outflow Solenoid #1 O:8

High Level Tank #2 I:9 Outflow Solenoid #2 O:9

Reset E-Stops I:6

Not used I:7

As always, include a title strip at the top of your program (first rung); include comment for each

rung explaining the operation of the circuit (not just ‘turn on red light’ but explain what the

components on the rung are doing); and label each instruction.

When done you can demonstrate the lab to me and I will try to make your circuit fail. If I can’t

then print out your program code, staple it to the lab form where I signed off on the

demonstration, and put it in my hand.