- Logic & LAD
- Result Images
Using this system as an example, let's look at programming a Siemens PLC
A schematic diagram of the 2 component mixing system is given There are two liquid level sensors, mixer, a light signal indicating that the facility is off and two pumps, discharge valve
Open the TIA Portal and first we need to choose our PLC, so select the "1215C DC/DC/Rly" controller, this PLC is enough for our task
After your PLC is loaded, you can change settings in "General", but now we need only "Pulse Generators(PTO/PWM) ==> StartUp", and choose "Warm restart - RUN". Theat means after we turnON it will automaticly run our PLC
Now we need the PUMP_1 and PUMP_2 pumps to turn on when the tank mix level reaches the "minimum" level, up to the L_LEVEL sensor, working until the liquid level reaches the "maximum" level of the upstream H_LEVEL sensor MIXER mix for a short time, then the VALVE valve is opened and the mixture is drained, the level of mixture is lowered to the L_LEVEL sensor, VALVE closed and the cycle is repeated It is important that at any time it was possible to activate an immediate stop of the equipment, in our case it would be a STOP lamp, it would light up red in case of immediate stop and all the equipment would stop working
Lets assign names, addresses and data types to our components
As Input ==> devices in this setup we will have L_LEVEL, H_LEVEL, STOP light Outputs ==> PUMP_1, PUMP_2, MIXER
First we add the SR logical operator Set/Reset, here SR will perform the basic logic, namely when the "S" input receives a logical 1 on the output we get also a 1, if the "S" and "R1" inputs receive 1, then the output is 0, if it receives 0 and 1, then the output is also 0
Then let's set and normally open contacts, sign them according to the logic When the liquid level reaches L_LEVEL the two pumps PUMP_1 and PUMP_2 will start, when the liquid level reaches H_LEVEL the pumps will stop
Below we describe what happens after the pumps are switched off. When the pumps are switched off, the mixing phase starts and lasts for 15 seconds in this case. In case of an emergency stop, add a Normal open contact "STOP" between the timer and the mixer, if this is done before the timer, in case of a stop the unit will run until the end of the timer.
When you will drag/drop timer TIA Portal will ask you to create DataBase for timer, click yes we want theat.
In the next phase we need to discharge the mixture and when the liquid level of the mixture reaches the lower sensor L_LEVEL the valve will shut off the discharge of the mixture
We also need to prescribe the logic of the "STOP" button in Network_1 and Network_3
After this we need to compile the project, so go to
- "Compile ==> Hardware (rebuild all)"
- "Compile ==> Software (rebuild all)"
As you can see the logic works, when you press the STOP button (it goes into false state) and the installation stops completely.
As you can see the logic works, when you press the STOP button (it goes into false state) and the installation stops completely.