Thursday, March 9, 2023

Elements of PLC

A PLC unit simulates the harmonious functioning of multiple devices or components, which can vary in size and input/output handling capacity. In small PLCs, all devices are integrated into a single unit, while in larger or medium-sized PLCs, different modules operate independently and are interconnected via cables, connected to a bus unit. This flexibility allows for the addition of further modules or units. The basic working principle is almost the same for all types of PLCs. The pictures below depict a small and medium-sized PLC.


A complete PLC unit consists of the following primary elements:

  • Power supply unit
  • A central processing unit (CPU)
  • Input module
  • Output module
  • Analog input and output module

Power supply unit

The power supply unit generates a regulated DC voltage to supply other elements such as the CPU and input/output modules. Most PLCs operate with only 24V DC and 220V AC input voltages. The power supply unit provides separate low-rating DC voltages to various modules. In a small PLC, the power supply unit, input/output modules, and CPU are fabricated on the same base without separate cabling connections. In medium or large PLCs, different units or modules are connected to the power supply unit using ribbon cables to obtain the necessary voltage. The current rating of a power supply unit increases when managing more sensors and actuators.

 

Central processing unit or CPU

The CPU can be considered the brain of a PLC, as it supervises and controls all the work performed by the PLC. The CPU contains a microprocessor unit that controls the output devices or actuators associated with the PLC. It is compatible with a program stored in memory and the state of input devices or sensors. The CPU module is connected to input/output modules either through cables or a common bus. It features LED indicators that display the status of the PLC, such as Ready, Run, Stop, and Fault. A small toggle switch is also provided on the CPU module, allowing switching between the "Program" and "Run" modes of the PLC. The CPU module is equipped with a "Communication port" that enables the PLC to communicate with external programming devices or computers. This port is used for uploading or downloading programs to the PLC memory. The CPU unit also includes two different types of memory: ROM and RAM. Additionally, the CPU can be further subdivided into the following categories:

  • Executive memory
  • System Memory
  • Input / Output status memory
  • Data memory
  • User program memory 

Executive memory – The PLC operating system is stored in a ROM-type executive memory, which defines how the PLC unit will function. This memory is specified by the PLC manufacturer and does not need to be modified. Along with the operating system, the PLC program is scanned and processed by the microprocessor, which also monitors the status of all input and output elements.

System memory – A portion of memory stores temporary results and information while the PLC operating system is functioning. This RAM memory is specific to the operating system and cannot be used by the user for PLC programming.

Input / Output Status Memory – Another part of the RAM memory stores the input/output status of different sensors and actuators associated with the PLC unit. It contains an image table that represents a specific location for each input and output module of the PLC. During PLC program execution, the state of different sensors is retrieved from the image table instead of directly registering from the input module. Similarly, the output status of the PLC program is not sent directly to the output module but rather transferred to the image table in the input/output status memory.

Data memory – A portion of RAM memory is used independently as data memory, storing values related to timers, counters, and other process parameters applied in the PLC program. Some PLC manufacturers allocate this data memory into fixed and variable data segments.

User program memory – During the development of a new PLC program, PLC users manage the user program memory in RAM, allowing for the rectification of any errors within the program. Once the PLC program is error-free and successfully tested, it is copied to an EPROM module, which the PLC subsequently runs.

 

Input Module

An input module interfaces different sensors or input elements with the PLC unit. It allows the PLC to monitor the state (active or inactive) of all sensors and interfaces them with the microelectronics of the PLC in the real world. Most PLCs operate with 5V to 15V DC, while the sensors used may have different voltage ratings such as 24V DC and 220V AC. The input module plays a crucial role in isolating input elements or sensors with different voltage ratings from the PLC. Each input terminal within the input module uses an Opto-Isolator circuit, which allows only the signal voltage while preventing any surge voltage from sensors, thus protecting the PLC from damage.

PLC manufacturers produce different input modules to handle input elements or sensors, such as 8-point, 16-point, and 32-point modules. The basic operating principle of all input modules is nearly the same. Input elements or sensors connected to an input module are assigned input addresses, which consist of an alphabet (e.g., I, X) followed by a numeric number (e.g., I1.5, X4.7). For instance, SIEMENS PLCs designate input addresses with an "I," while FANUC PLCs use the alphabet "X." The picture below illustrates how to input elements or sensors are designated and connected to an input module. 

The previous image shows an "8-point" input module, which can accommodate eight input elements or sensors (represented by three input switches, a push-button switch, and a sensor). All input elements receive a 24V DC voltage. The input addresses for the switch, push-button, and sensor are I0.1, I0.4, and I0.7, respectively. The state of switches or sensors (active or inactive) is recognized by the PLC based on the logic 0 or logic 1 status of these input addresses. If more than eight sensors need to be interfaced with the PLC, instead of using multiple 8-point input modules, a 16-point or 32-point module can be utilized. Several input modules with different input channel numbers can interface with the CPU.

Inputs are addressed as byte addresses (where one byte equals 8 bits). At the end of one byte address, the next byte address is acknowledged. For example, if the input module starts with input address I0.0 (as shown in the previous picture), it will address up to I0.7. The addressing of subsequent input modules will start from I1.0 and continue up to I1.7. Similarly, the addressing of the following input module will start from I2.0 and so on. It is not necessary for the addressing of input modules to always start from I0.0; this depends on the choice of the PLC manufacturer. However, the addressing number will always be the next number of the previous address number. For example, if I32.0 is the starting address of an input module, the subsequent module addressing will start with I33.0. This addressing method is also applicable to 16-point or 32-point input modules. The picture below explains the addressing procedure for two 16-point input modules, where the first 16 points are addressed from I0.0 to I1.7 (representing two input channels together), and the second module starts addressing from I2.0 to I3.7.


Output Module

Actuators or output elements that function with PLC-operated machines or automated systems usually interface with the PLC through an output module. The output module supplies a 24V DC voltage to activate different actuators. Low current rating elements, such as relays or LEDs, directly connect to the output module. However, higher voltage or current rating actuators like solenoid coils and motor contactors interface with the output module through a relay unit. Similar to the input module, the actuators also interface with the output module through an optoisolator circuit, which reduces electrical noise and prevents damage to the electronic circuits inside the output module.

Output modules come in different types, such as 8 points and 16 points. The PLC manages separate output addresses for the actuators or output elements connected to the output module. Output addresses are defined with alphabets Q, Y, or O, followed by a numerical number. For example, Y1.5 or Q4.7. SIEMENS PLCs use the letter Q, while FANUC PLCs use the letter Y to define output addresses. The diagram below illustrates how actuators or output elements interface with an output module and how they are addressed. 

The diagram above shows an '8 point' output module, which can connect up to eight actuators or output elements. In this example, three output elements are used: a light, a relay, and a solenoid coil. The first two elements (Q0.1 and Q0.4) directly connect to the output module, as they have lower current ratings, and are activated with a 24V DC supply. The solenoid coil, which has a higher current rating, is triggered by a separate 24V DC supply that passes through a relay. The relay is interfaced and controlled by the PLC output module (Q0.7). When the output address is set to Logic 1, a 24V DC supply is present at the corresponding output terminal, which energizes or activates the respective actuator. Each output terminal is equipped with an LED indicator to indicate its activation. A Logic 0 status of an output address represents the deactivation of the corresponding element or actuator. For higher voltage ratings actuators, such as those requiring 110V AC or 220V AC, the relay unit is used to manage the required voltages. In cases where more than eight output elements need to be interfaced with the PLC, a 16 points or 32 points output module can be used instead of multiple 8 points output modules.

Outputs are also addressed byte-wise (one byte with 8 bits), similar to input addresses. After the end of the one-byte address, the subsequent address byte is used. Since the output module starts from output address Q0.0, it is addressed up to Q0.7 (as shown in the diagram). The addressing of subsequent output modules will start from Q1.0 and extend up to Q1.7. The addressing of the following output modules will continue in the same manner. It is not mandatory for the output module addressing to always start from Q0.0; it depends on the preference of the PLC manufacturer. The addressing can start from any output address number, such as Q32.0. However, regardless of the starting address number, the subsequent output modules will always have consecutive address numbers. For example, if Q32.0 is the starting address of the output modules, the next module's address will start with Q33.0. This addressing method is also applicable for 16 points or 32 points output modules. The following diagram illustrates the addressing procedure of a 16-point output module. In this example, the first 16-point output module addresses Q0.0 to Q1.7 (two output channels together), and the second module starts addressing from Q2.0 to Q3.7. 


Analog Input and Output Module

Most PLCs are also capable of functioning with analog input and output signals. Analog inputs come from various sensors and transmitters that measure events such as liquid level, flow, temperature, distance, and velocity. The sensor or transmitter converts these events into an electrical signal and feeds them to the PLC's analog card. An analog signal is a continuous signal and typically ranges from 4 to 20 milliamperes or 0 to 10 volts. When the analog input signal reaches the PLC, it passes through an A/D (Analog-to-Digital) converter circuit, and the PLC's analog input card converts this analog signal into a 16-bit digital signal. In the PLC, an analog signal is represented by a word, which is a binary sequence of 16 zeros (e.g., '00000000 00000000'). However, programming with analog input and output in a PLC can be challenging.

A field device or analog sensor is usually connected to a transducer, and the transducer's output is provided to the PLC's analog input card. In the following example, a measuring scale or weighing machine is equipped with a load cell (not shown in the picture). The load cell translates changes in weight into a variable voltage or current output. In this case, the load cell converts the weight value into a 0-10V DC output, representing a 0-50 Kg input. This voltage is then connected to the PLC's analog expansion module.

Analog outputs are used to control appliances that require continuous voltage or current levels. Different equipment such as control valves, chart recorders, electric motor drives, and pressure transducers are managed by analog outputs. Similar to analog inputs, analog outputs are connected to the controlled devices through a transducer unit. The transducer receives a voltage signal from the PLC, amplifies, reduces, or changes it into another voltage signal, which controls the device. The following example shows a 0-10V DC signal used to control the opening of an analog valve.



No comments:

Post a Comment

Popular Posts