Programmable logic controllers (PLCs) are industrial-grade computers that can be programmed to monitor and control machinery and processes in real-time. They have advanced networking capabilities and communication protocols and can be integrated with other automation components. The programming flexibility of PLCs allows them to be customized to suit the specific needs of different applications, ranging from simple manufacturing processes to complex production lines. PLCs are easy to program and install, have swift response times, offer compatibility with various networks, and are convenient to test and troubleshoot, rendering them highly dependable. A Distributed Control System (DCS) is an example of one type of PLC. This comprehensive guide will explore their fundamental principles, types, programming standards, selection criteria for different applications, and their role in propelling Industry 4.0 and beyond.

figure
Figure 1: A programmable logic controller(Source: OMRON )

Types of PLCs available across the industries

PLCs are available in different subcategories, with each subcategory designed to meet the unique requirements of a particular process and industry. The following types of PLCs are available based on their capabilities and other features:

  • Compact PLC: A compact PLC is a space-efficient and cost-effective solution for small-scale users. It has a small form factor with fixed I/O capability determined by the manufacturer. Compact PLCs have an integrated power supply, CPU, I/O interfaces, and other components housed in a condensed chassis. They are cheaper and are suitable for basic control requirements. However, they can be a challenge to repair and troubleshoot.
  • Modular PLC: A modular PLC has a separate module for each hardware component. These PLCs have different modules, like a power supply module, I/O modules, and a CPU module, plugged together on the same bus. Modular PLCs are of different sizes and have varying power supply rates and computing capabilities. This type of PLC is suitable for large-scale projects and easy to troubleshoot and repair.
  • Soft PLC: A Soft PLC, or Software-based Programmable Logic Controller, is a virtualized control system that runs on general-purpose computer hardware. Unlike traditional hardware-based PLCs, soft PLCs use software programs to emulate the functionality of a PLC. These PLCs combine the functions of conventional PLCs with those of data loggers, communications gateways, and other elements such as HMIs and web servers. Soft PLCs offer flexibility and scalability, allowing users to deploy control logic on standard industrial computers or embedded systems. They are often used in applications with limited hardware space, or the control system must run on existing computing infrastructure. Soft PLCs are easy to program, can be accessed remotely, and can be integrated with third-party software applications in industrial automation settings.
  • Safety PLC: A Safety PLC is a particular type of PLC designed to ensure the safety of industrial processes and machinery. A safety PLC supports all the applications that a standard PLC does. It has advanced safety features and meets IEC 61508 and IEC 61511 standards. Safety PLCs have redundancy, self-monitoring capabilities, and fail-safe mechanisms to detect and respond to potentially hazardous situations. They are critical in implementing safety functions, such as emergency shutdowns, machine guarding, and process integrity.
  • OpenPLC: An OpenPLC is an open-source PLC based on easy-to-use software. It is the first fully functional standardized open-source PLC in software and hardware. The OpenPLC runs on Raspberry Pi, Arduino, UniPi, and as a soft-PLC on Windows or Linux. It uses OpenPLC Editor, software on a computer, to create your PLC programs. It is simple to use and supports all five languages defined in the IEC 61131-3 standard.

PLC programming Languages

You can use the following programming languages to program PLCs. These languages are defined in the IEC 61131-3 standard:

  • Ladder Logic, or ladder diagram (LD), is the most traditional and widely used programming language for PLCs. It is a symbolic depiction of instructions arranged in rungs like ladder-formatted schematic diagrams. Ladder logic is easy to understand, and its graphical nature makes it easy to understand and debug code.
  • Function Block Diagram (FBD) uses simple and complex interconnecting blocks to represent process flows graphically. It is like Ladder Logic but can be more modular and is often used for complex control applications. Predefined function blocks are used primarily for repetitive tasks and control systems to reduce development time and improve maintainability.
  • Sequential Function Chart (SFC) graphically depicts interconnecting steps, actions, and transitions. It helps describe complex processes with multiple steps and stages. The SFC programming language can simplify a complicated process by dividing it into more manageable tasks. It makes the programming easier to test, understand, and troubleshoot issues.
  • Structured Text (ST): is a high-level programming language like C or C++. It allows for more complex programming structures like loops and conditional statements.ST is best suited for more complex control algorithms and mathematical operations. It also helps create reusable code modules that save time and reduce errors.
  • Instruction List (IL): It is a low-level, text-based programming language that resembles assembly language. It uses mnemonic instructions to represent specific operations. This programming language is less common than Ladder Logic or Structured Text but can be helpful in certain situations.

Criteria for selecting the right PLC for application

It would help if you considered the following factors for PLC selection for a particular operation:

  • Process Requirements: It covers the specific needs of your automation application. This includes factors like the complexity of the control system, the number of loops to be controlled, the number of time-critical events, the operation speed of the process or machine, and the communication interfaces needed. The selected PLC should be able to handle the current and future demands of the process.
  • Input/output (I/O) Capability: I/O capacity denotes the quantity of input and output signals a processor can manage. Determining the necessary I/O signals depends on the number of devices within the process that require control or monitoring. PLCS should incorporate sufficient margins for I/O points. Typically, by augmenting the calculated I/O point statistics with an additional 10 percent to 20 percent for expandable margins, an estimated count of input/output points can be derived. However, when proceeding with actual orders, adjustments to the input/output point count must be made, considering the specific characteristics of the manufacturer's PLC product.
  • Memory and Processing Speed: The processing power of a processor dictates the speed at which the control tasks are executed and the response to I/O signals. The performance of PLC depends on the processing power. Memory is another essential factor when selecting a processor for your PLC hardware. Memory stores the data and programs, and the processor executes them. The amount of memory required depends on the complexity of control functions and the size of the programs.
  • Power Supply: The specifications outlined in the product manual must match the PLC's power supply selection and design. Industrial PLCs commonly function on either 120-volt or 240-volt AC. The PLC's power supply steps down this AC and transforms it into a 24-volt DC. While some power supplies are integrated into the processor, others are accommodated in a distinct module outside the PLC casing or connected through hardwiring.
  • Communication Protocol: Connectivity plays a crucial role in PLC operation. The reliability and speed of the communication network are essential for PLC system operation. When designing, the designer must evaluate the communication options of the PLC and seek a product that supports a diverse array of communication protocols and interfaces, including Ethernet/IP, Modbus, DeviceNet, Profibus, or OPC-UA. Furthermore, compatibility with the current or anticipated network infrastructure is essential for smooth integration with devices like HMIs, SCADA systems, or third-party systems.
  • Programming: You should select a PLC depending on the programming languages it supports and the accompanying programming software. Ensure that, in the implementation phase, the programming language chosen is comfortable to programmers or commonly used in your organization. This will increase efficiency. The programming characteristics of the chosen PLC should be such that they can be quickly developed, troubleshot, and maintained.
  • Scalability: As the needs of automation may change or expand over time, it is necessary to upgrade the PLC device to satisfy those new demands. The designer should look for scalability to ensure the automation system can adapt to future requirements without requiring a complete overhaul. Choosing a PLC that supports additional I/O modules or memory expansion ensures the system can effectively manage increasing processes and equipment.
  • Compatibility: The selected PLC must be compatible with the existing systems and equipment in the facility, including communication protocols, I/O modules, and other components. Incompatible components can cause the system to malfunction, potentially leading to safety hazards and increased downtime.
  • Safety and Security: When designing a PLC, the top priorities should be safety and security. The PLC must incorporate integrated safety functions to prevent failure; if failure is inevitable, it should ensure a safe failure. In terms of security, any bugs or vulnerabilities must be promptly identified and resolved. The PLC must be secure and reliable to mitigate the risks of cyber-attacks or data breaches. Additionally, the system should incorporate multiple layers of security to guarantee secure communication.
  • Support and Service: The ability of the manufacturer to offer after-sales technical support and service is an essential consideration during PLC selection. Choose a PLC from a manufacturer offering comprehensive technical support, training, and maintenance programs for smooth operation and troubleshooting. It prevents any potential operational challenges during the PLC's deployment.

Correct I/O module selection for PLC

The technical specifications and the overall economic considerations of the intended solution should influence the I/O module type selection. A few common types of I/O modules, along with the necessary specifications, are:

  • Digital I/O module: It connects field input devices with ON/OFF characteristics, such as selector switches, pushbuttons, and limit switches. Output control is limited to devices such as lights, relays, solenoids, and motor starters that require simple On /Off type switching. The classification of discrete I/O covers bit-oriented inputs and outputs. In this type of input or output, each bit represents a complete information element and provides the status of some external contact or the presence or absence of power in a processing circuit. A field-supplied voltage source powers each discrete I/O module. Since these voltages can be of different magnitudes or types, I/O modules are available at various AC and DC voltage ratings. The modules themselves receive their voltage and current for proper operation from the backplane of the rack enclosure into which they are inserted. The PLC module power supply provides backplane power. It is used to power the electronics on the I/O module circuit board—the relatively higher currents required by the output loads.
  • Analog I/O module: Analog input modules can be divided into current input type, voltage input type, thermocouple input type, etc., according to the type of analog input signals. Compared to discrete I/Os that have only two states, on and off, analog devices represent physical quantities that can have an infinite number of values. Typical analog inputs and outputs vary from 0 to 20 mA, 4 to 20 mA, or 0 to 10 V. The analog input interface module contains the circuitry necessary to accept an analog voltage or current signal from the level transmitter field device. This input is converted from an analog to a digital value for use by the processor. The analog output module's circuitry accepts the processor's digital value and converts it back to an analog signal that drives the field device. Analog input modules typically have multiple input channels that allow 4, 8, or 16 devices to be interfaced to the PLC. The two basic types of analog input modules are voltage sensing and current sensing. Analog sensors measure a varying physical quantity over a specific range and generate a corresponding voltage or current signal. A PLC analog module's standard physical quantities measure temperature, speed, level, flow, weight, pressure, and position. For example, a sensor may measure temperature from 0 to 500°C and output a corresponding voltage signal between 0 and 10 V.
  • Special I/O modules: Specific applications, such as motion control, safety, and communication, use these specialty modules. For example, applications that involve motion and position control modules need accurate high-speed machining and packaging. Process control applications use the proportional-integral-derivative (PID) module with PID algorithms. The user can harness the communication modules to connect the PLC to high-speed local networks. Such a connection may differ from the PLC-provided network communication.

PLC installation practices and wiring process

The controller can operate trouble-free in any environment if the best PLC installation practices and wiring processes are followed. Best practices help save time and effort for the systems designer or installer. Some of the best PLC installation and wiring processes are:

  • Enclosures: An enclosure protects the electronics from moisture, oil, dust particles, and unwanted tampering. Most manufacturers recommend a NEMA 12 enclosure for the standard industrial environment or a NEMA 4X for outdoor or corrosive environments. Metal enclosures provide shielding that helps minimize the effects of electromagnetic radiation generated by surrounding equipment.
  • Safety considerations: Emergency stop circuits must be in place for each machine directly under PLC control within the system. A hardwired electromechanical master control relay (MCR), shown in Figure 2, is usually included as part of the wiring for a PLC system. This MCR offers a mechanism to de-energize the entire circuit independently of software. In an emergency, the hardwired MCR is linked to interrupting power to the I/O rack while maintaining control of the processor.
figure
Figure 2: Grounded AC power-distribution system with master-control relay(Source: Instrument Engineers' Handbook )
  • Components placement: Generally, equipment inside the enclosure should be located away from the controller components to minimize the effects of noise and heat generated by these devices. Panels should always have plenty of expansion room left over because I/O is invariably added as the job progresses. The designer should refer to the layout considerations provided by the manufacturer. Extra space should be left to give access to the boards and the PLC connectors. The diagnostic and status indicators should be visible. The designer should leave room between I/O racks for wire ways and large hands.
  • Temperature considerations: Effective heat dissipation in a PLC installation is essential, encompassing power supplies, local I/O racks, and the processor. The accumulated heat within the enclosure needs proper dispersion into the surrounding air to prevent issues such as erratic operation or failure of the PLC. Convection cooling is generally employed in most applications to maintain the controller components within the specified temperature operating range. Adequate spacing of components within the enclosure typically suffices for effective heat dissipation. It is crucial to ensure that the temperature inside the enclosure remains within the maximum operating temperature of the controller, typically capped at 60°C. Additional cooling measures, such as fans or blowers, may be necessary in high internal or ambient temperatures. PLCs are permanently mounted horizontally with the manufacturer's name facing out and right-side up. Vertical mounting is discouraged due to thermal considerations.
  • Electrical noise: Noise or unwanted electrical signals can generate problems for all solid-state circuits. I/O systems are isolated from the field, but voltage spikes can recur within the low-voltage environment of the PLC if proper grounding practices are not followed. A well-grounded enclosure offers a barrier to noise bombardment from outside. It is essential to have metal-to-metal contact between the PLC and the panel and a robust connection from the panel to the ground. During the panel design phase, potential noise sources within the panel must be identified, and the PLC should be positioned safely from these devices. Wiring within the panel should be strategically routed around noise producers to minimize the risk of picking up stray signals. Separating AC and DC wiring bundles is often necessary, especially when high-voltage AC coincides with low-level analog signals.
  • Leaky inputs and outputs: Certain field devices equipped with transistors or TRIAC outputs may exhibit a minor leakage current even in the OFF state. In many cases, the leakage may only cause a flicker in the module's input indicator. However, if the leakage current reaches a certain level, it has the potential to activate the input circuit, generating a false signal. Devices prone to this type of leakage include photoelectric sensors, proximity switches, and similar equipment. This issue may also arise when an output module propels an input module with no additional load. Figure 3 represents two scenarios of leakage and their respective corrective measures. The solution for a leaky input involves the inclusion of a bleeding (or loading) resistor across the input. This resistor introduces resistance into the circuit, leading to a voltage drop along the line between the leaky field device and the input circuit. As a result, a shunt is created at the input's terminals, directing the leakage current through the bleeding resistor. This effectively minimizes the current reaching the input module, preventing unintended activation of the input or output when it should be in the OFF state.
figure
Figure 3(a): Bleeder resistor connection for input sensors and 3(b): Bleeder resistor connection for a high-impedance output (Source)
  • Grounding: It is vital to ensure proper grounding as a crucial safety measure in all electrical installations. A well-executed grounding system establishes a low-impedance path to the earth's ground. The National Electrical Code (NEC) outlines guidelines, including conductor types, color codes, and connections, to establish a secure grounding framework for electrical components. In a comprehensive PLC installation, encompassing enclosures, CPU, I/O chassis, and power supplies, all components are interconnected to a unified low-impedance ground. These interconnections should demonstrate minimal DC resistance and low high-frequency impedance. A central ground bus bar within the enclosure is a reference point for linking all chassis and power supply equipment grounding conductors. This ground bus is then further connected to the building's earth ground. To ensure the longevity and reliability of the grounding path, it must be permanent (without solder), uninterrupted, and capable of safely conducting ground-fault currents in the system with minimal impedance. The contact points between a chassis and the enclosure should be free from paint or other nonconductive materials. For PLC equipment grounds, a minimum wire size of No. 12 AWG stranded copper is recommended, while No. 8 AWG is advised for enclosure backplane grounds. When establishing ground connections, it is advisable to use a star washer between the grounding wire and lug, ensuring secure contact with the metal enclosure surface, as depicted in Figure 4.
figure
Figure 4: Ground connection using star washer (Source)
  • Voltage variations and surges: Suppression is vital as the absence of surge suppression on inductive loads may contribute to processor faults and erratic operation. The RAM can be corrupted, and the I/O modules may appear to be faulty or reset themselves. While many output modules come equipped with built-in surge suppression to mitigate the impact of high-voltage transients, an additional suppression device is necessary when using an output module to control inductive devices like motors, motor starters, relays, and solenoids. This further suppression is particularly critical if the inductive device is in series with or parallel to hard contact, such as push buttons or selector switches. By adding a suppression device directly across the coil of an inductive device, you can reduce the effects of voltage transients caused by interrupting the current to that inductive device, which you can reduce and thus prolong the life of the switch contacts. Surge suppression may be required when selecting contact protection for inductive load devices like motor starters and solenoids to prevent electrical noise from radiating into system wiring. Switching inductive loads without surge suppression can significantly reduce the lifespan of relay contacts. Surge suppression circuits are directly connected across the load device, minimizing the arcing of output contacts, especially when switching off an inductive device with high transients that can induce arcing.
figure
Figure 5: Contact protection methods for inductive AC and DC output devices(Source: Rockwell Automation )
  • Wiring and labeling: Proper wiring ensures the proper functioning of the I/O module. The design of each I/O terminal can accommodate one or more conductors of a specific wire size. Users must verify that the wire has the correct gauge and size to effectively handle the maximum potential current. A robust labeling method should also be employed for each field wire and its termination point. Labeling of field wire and its termination points are equally crucial for maintenance and troubleshooting processes. Wires can be labeled using shrink-tubing or tape, and tape or stick-on labels can be used for identifying each terminal block. In addition to labeling, you can implement color coding based on similar signal characteristics. Standard labeling nomenclature includes wire numbers, device names or numbers, and the input or output address assignment. Use a tie wrap to bundle the wires adequately. Rout these bundled wires through the duct alongside other wire bundles with similar signal characteristics. Keep the input, power, and output bundles carrying the same type of signals in separate ducts to minimize interference-related risks.

Troubleshooting the PLC system

A functional and reliable PLC system is essential for productivity, efficiency, and avoiding downtime. In case of a PLC fault, the operators require a careful and systematic approach to troubleshoot the system to resolve the issues. The following approach will help in troubleshooting common PLC failures:

  • Digital inputs (DIs): DIs are usually at high impedance, so the input voltages should be checked with a high-impedance multimeter. Using a low-impedance solenoid voltage checker on digital inputs can sometimes cause confusing results. For a digital input, an indicator on the module shows the state of the input. This should match what is observed on the HMI screen or PLC programmer monitor. The commons for the DI card may be grouped or individual. The voltage between the common for that point on the I/O card terminal block and the point in question must be checked. The field device should be actuated, and it should be verified whether the PLC logic status and voltage change together. If the module shows the correct I/O status, but the PLC monitor or HMI does not, the I/O module or its configuration is suspect and may need replacing.
  • Discrete outputs (DOs): The TRIAC output type may show a voltage on a multimeter if not connected to a load due to a small amount of leakage current. For DOs, an indicator on the module shows the state of the output. This should match what is observed on the HMI screen or PLC programmer monitor. The power to the DO card may be grouped or individual. The voltage for that point on the I/O card terminal block and the voltage for the point in question must be checked. The output should be actuated and verified with the PLC logic status and output voltage change. If the module shows the correct I/O status but the measured output voltage does not, the I/O module or its configuration is suspect and may need replacing.
  • Analog inputs(4-20mA): The field wiring should be removed temporarily to troubleshoot an analog input card. A 4–20 mA calibrator is placed directly on the point, selecting either passive or sourced as appropriate for the input configuration. It should be verified that the value received by the analog input card is four mA at the minimum value, 20 mA at the maximum value, and 12 mA strictly between the minimum and the maximum values at the HMI or the PLC. If this works, then the problem is outside the PLC hardware.
  • Analog outputs(4-20mA): If necessary, the module has an external loop power supply to troubleshoot the analog output. Then, a multimeter is put in current mode in series with the point in question. The reading should be four mA, 20 mA, and 12 mA, respectively, for 0%, 100%, and 50% of the process value set by the operator. If this works, then the problem is outside of the PLC hardware.
  • Other issues: To troubleshoot additional PLC operation issues that impact more than one I/O module, the PLC grounding, PLC power supply, and batteries should be checked. Electromagnetic interference (EMI) or radio frequency interference (RFI) generated by large motors starting, arc welding, lightning strikes, handheld radios, or transmitters can produce erratic operation. Power conditioning, grounding, and shielding improvements can resolve these issues. If the program has been affected, it may need to be reloaded.

PLCs and associated modules from Newark

Newark offers an extensive range of PLCs, I/O modules, and associated accessories from industry-leading suppliers. Some of the essential products are as follows:

ProductsKey suppliersBuy link
Processor moduleSiemensBuy now
Process controllerMitsubishiBuy now
Arduino PLCIndustrial shieldsBuy now
RevPi compact controllerKunbusBuy now
Safety PLCABBBuy now
Digital input cardOmron Industrial AutomationBuy now
Digital output cardSchneider ElectricBuy now
Analogue input cardSiemensBuy now
Analogue output cardSiemensBuy now
Special Input Module, Ethernet to RTD/ThermocoupleBrainboxesBuy now
PLC starter KitPanasonicBuy now
CPU backplane Omron Industrial AutomationBuy now
AC / DC Power SuppliesPhoenix ContactBuy now

Conclusion

PLCs offer robust real-time control in a rugged and dependable package. They can be installed on factory floors and outdoors, enduring extreme environmental conditions. PLCs are easy to program and troubleshoot, ensuring smooth operations. Newark offers a variety of PLC modules, associated I/O cards, and accessories suitable for automation applications.

SharePostPost

Stay informed


Keep up to date on the latest information and exclusive offers!

Subscribe now

Data Protection & Privacy Policy

Thanks for subscribing

Well done! You are now part of an elite group who receive the latest info on products, technologies and applications straight to your inbox.

Technical Resources

Articles, Solution Guides, Webinars, and more.
Keeping you on top of innovations.