A PLC (Programmable Logic Controller) is an industrial computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are expected to work flawlessly for years in industrial environments that are hazardous to the very microelectronic components that give modern PLCs their excellent flexibility and precision.
Prior to PLCs, many of these control tasks were solved with contactor or relay controls. This is often referred to as hardwired control. Circuit diagrams had to be designed, electrical components specified and installed, and wiring lists created. Electricians would then wire the components necessary to perform a specific task. If an error was made the wires had to be reconnected correctly. A change in function or system expansion required extensive component changes and rewiring.
Objectives
This article aims to:
1- Learn the basics of ladder logic programming.
2- Familiarize the students with SIMATIC S7 software to program Siemens S7-400 PLC.
3- Implement different logic functions using PLC.
4- Understand the function of each Siemens S7-400 PLC modules.
Theory
Before you start using PLC, it is convenient to know and understand its architecture. See figure 1.
As shown in figure 1, PLC consists of the following parts:
1) POWER SUPPLY: Provides the voltage needed to run the primary PLC components.
2) I/O MODULES: Provides signal conversion and isolation between the internal logic-level signals inside the PLC and the field’s high level signal.
3) PROCESSOR SYSTEM: Provides intelligence to command and govern the activities of the entire PLC systems.
4) PROGRAMMING DEVICE: Used to enter the desired program that will determine the sequence of operation.
Figure 1: PLC architecture
The following are some advantages of PLC over other microcontrollers:
1) Cost effective for controlling complex systems.
2) Flexible and can be reapplied to control other systems.
3) Computational abilities allow more sophisticated control.
4) Trouble shooting aids making programming easier and reduce downtime.
5) Small physical size, so shorter project time.
In this experiment Siemens S7-400 PLC will be used, table 1 presents the main components of this model.
The last figure shows a switch connected to the input I0.0 in the digital input module,and an LED connected to the output Q0.0 in the output module.
Ladder Logic Programming
Figure 3 shows electrical continuity, when SW1 is closed, the current will flow from L-1 to L-2 and energize the load.
Even though PLC ladder logic was modeled after the conventional relay ladder, there is no electrical continuity in PLC ladder logic. PLC ladder rungs should have logical continuity in order for the output to be energized. PLC ladder program uses familiar terms like “rungs”, “normally open” and “normally closed” contacts, as illustrated in table 2.