We will apply the five steps to PLC Program development to our next programming example of a process mixer.
1 – Define the task:
A normally open start and normally closed stop pushbuttons are used to start and stop the process. When the start button is pressed, solenoid A engergizes to start filling the tank. As the tank fills, the empty level sensor switch closes. When the tank is full, the full level sensor switch closes. Solenoid A is de-energized. Mixer motor starts and runs for 3 minutes to mix the liquid. When the agitate motor stops, solenoid B is engergized to empty the tank. When the tank is completely empty, the empty sensor switch opens to de-engergize solenoid B. The start button is pressed to repeat the sequence.
2 – Define the Inputs and Outputs:
3 – Develop a logical sequence of operation:
A flow chart or sequence table is used to fully understand the process. It will also prompt questions like the following.
What happens when electrical power and/or pneumatic air is lost? What happens when the input / output devices fail? Do we need redundancy?
This is the step where you can save yourself allot of work by understanding everything about the operation. It will help prevent you from continuously re-writing the PLC logic. Knowing all of these answers upfront is vital in the development of the PLC program.
4 – Develop the PLC program
Since we need to continue the sequence when the power goes off then memory retentive locations in the PLC must be used. In our example we will use the ‘V Memory’ locations.
The first thing in our program is to control the start and stop functions. This is done through a latching circuit. From the sequence table we know that to reset the sequence we need to have the timer done and the empty sensor off.
The filling of the tank is done through Solenoid A. It is turned on by the start signal and off by the full sensor switch. (Sequence Table) You will notice that we have a memory retentive output and the actual output to active the solenoid.
The memory retentive timer will start timing when we have the start sequence signal and when the empty and fill sensors are on. The timer will reset when the empty and fill sensors are off. Mixing motor will be on when the timer is timing and when the timer is not done.
5- Test the program
Test the program under many conditions. Check to see what happens when power is removed.
Using this five step to program development technique will shorten your programming time. The result will be a better defined logic and easier to understand program, because it has within the documentation the logic flow chart or sequence table.
Watch on YouTube : PLC Programming Example – Process Mixer
Factory IO provides a 3D simulation of the process. Testing of the program is important and should be done in a variety of ways. Factory IO provides a straight forward method of seeing your program in action before you wire your application.
We will be using the BRX PLC Modbus TCP Server (Slave). Factory IO will be the Modbus TCP Client (Master). When the tank fills up we will start a dwell time instead of the mixer time for the simulation.
Here is the mapping of the inputs and outputs using Factory IO.
You can download the PLC program and Factory IO scene here.
Watch the following video to see this simulation in action.
Watch on YouTube : Process Mixer Test Simulation
If you have any questions or need further information please contact me.
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.
To get this free article, subscribe to my free email newsletter.
Use the information to inform other people how numbering systems work. Sign up now.
The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.