Learn – Relay logic or PLC?
In a way, it could be said that this is a comparison of the old against the new, but it does not always have to be such a one-sided thinking on the question asked. For example, an alternative way of looking at the issue is that simpler controls do not always have a good enough reason to use a PLC device to justify economic differences in the solution.
As most people know, relay logic is an older way of control the system which is the basis for PLC control. The first PLC devices were invented in the 1960s . While in relay logic counters and timers are elements of equipment in the cabinet, for PLC these are commands in the program.
Black box
A PLC is a Programmable Logic Controller that is an industrial computer designed to operate 24 hours a day, 365 days a year. As there are enough professional explanations on the Internet on this topic, below is an attempt to explain the matter in the simplest possible way. So let’s compare a PLC with a black box, it is in charge of a certain task and has the expected input physical signals (different voltages, currents, frequencies). Physical signals come from actuators and sensors that are read simultaneously at all black box inputs. The the black box (PLC) with its pre-programmed program, which could be understood as the brain of the system, performs certain calculations and algorithms. After going through the entire program sets new physical values to the output of the black box. It repeats the actions in a circle as long as it is powerd on at a certain time (PLC cycle time). The repetition cycle time can be predefined at the phase of PLC programming. Depending on their processing power, certain PLCs can run several cycles at the same time. Once the cycle time is defined, it does not change throughout the operation of the system.The PLC is working in discrete real time, which means that the time cycle in which it must do following task strict defined :
- read all input signals
- perform program-defined calculations and algorithms on the input data from the current cycle
- set new values to the outputs based on the read data in that cycle that were processed using the PLC device program
Parts of the black box
The basic elements of PLC start with a controller unit that performs calculations and goes through algorithms. Cards with different inputs and outputs are modular stacked on to controller unit. Some types of PLC devices already have inputs and outputs on the controller unit itself. Don’t be confused if you come across cards that are not directly connected to the controller unit, as these are distributed cards that are connected to the controller unit via a communication module. Cards can be divided into three groups, which are digital, analog and communication.
PLC programming
In the very beginning, the programming language in which the PLC was programmed was a kind of imitation of relay logic schemes (Ladder diagram). The reason for that is to make it easier for current engineers who worked on relay logic schemes to switch to programming. Today, PLC devices can be programmed with several programming languages that are standardized under IEC 61131. Programming languages according to this standard are supported by all leading manufacturers of PLC devices.
The programming languages from the IEC 61131 standard are:
- Ladder diagram (LD) – graphical programming
- Function block diagram (FBD) – graphical programming
- Structured text (ST) – programing with text
- Instruction list (IL) – programing with text
- Sequential function chart (SFC) – graphical programming
HMI/SCADA
The interaction between system and human (operator) can be exactly the same for relay logic and PLC using buttons, switches, lamps, etc. Which becomes less intuitive and complicated in large systems, so PLC has the ability to interact system and human (HMI) to be using touch screens, screens and keyboards, etc. An HMI system that has a screen as its main display element has minimal wiring, but therefore some time is spent on programming.If it is a system that is produce in series, then a system that has less wiring gives more benefits. Common names for human-system interaction systems are HMI and SCADA. SCADA (Supervisory Control And Data Acquisition), as the acronym itself says, manages and collects data. HMI (Human Machine Interface) is an interface for human-machine communication. Both interfaces can be used to monitor and manage the system, but SCADA is mostly remote from the system while the HMI itself is located next to the system itself.
Application
It is important for the investor that after commisioning of PLC-controlled system requests a PLC program in digital format. Also the electrical diagrams of the system must be in accordance with the last valid program. The signals in the electrical diagrams and in the program itself must have the same names. The program should then be stored in a safe place along with documentation from the system. In this way, the investor ensures that the failure of the PLC, which is not a common event, is reduced to the replacement of a faulty component and placing the program on the PLC device by a professional. A system controlled from relay logic can be reconstructed using wiring diagrams. While a system that includes a PLC device for the possibility of complete reconstruction without writing the program from scratch should have documentation with the PLC program as explained above.
Relejna logika | PLC | |
Advantages | – the possibility of working at a wider temp. area- cheaper with simple systems that do not require complex logic and have no feedback from the process – Existing employees are taught to maintain relay logic | – smaller and simpler wiring- the system takes up less space – the possibility of changing the system logic without adding new components – more opportunities to communicate with other systems |
Examples | – Starting and reversing of electric motor drives | – Automatic product packaging system (eg in the food industry)-CNC machines – Smart sign management in traffic -Loft baggage handling system |
Conclusion
Most controls can be performed using both control modes, but more complex systems are not recommended to be performed with relay logic if this can be avoided. The reason for this is that the PLC brings with it the capabilities of many smart accessories that improve the system, and in some cases do not change the amount of physical equipment in the electrical cabinet. Another big reason is the price that as the system increases it goes more and more in favor of the PLC.
When a service technician who does not have a PLC program comes to service the system, for him the PLC is literally a black box because there is no information on which algorithms and calculations are performed. Ways to prevent this case is to have complete system documentation with a digital PLC program or a contract with the manufacturer to maintain the system.