The PLC, being a microprocessor based device, has a similar internal structure to many embedded controllers and computers. They consist of the CPU, Memory and I/O devices. These components are integral to the PLC controller. Additionally the PLC has a connection for the Programming and Monitoring Unit, Printer and Program Recorder.
This is shown in a block diagram below:
Depending on the type of the PLC system i.e. small, medium or large the component parts are all housed in one compact unit (small PLC) or distributed. The distributed system has the CPU/memory module, I/O racks and remote I/O units which may be hundreds of meters away from the main PLC module. Larger PLC units may also have analog input/output units and provision for more complex control programs that support arithmetic and other complex operations not originally present in relay logic controllers.
The main differences between PLCs and other microprocessor based devices are that PLC are units of rugged design for an industrial setting and are shielded for improved electrical noise immunity. Further they are modular, allowing easy replacement and addition of units. They support standardized I/O connections and signal levels and are designed for the ease of programming, to allow personnel unfamiliar with computer languages to program the PLCs in-plant.
Some of the capabilities of the PLC systems not present in earlier
relay logic systems are the analog I/O, PID control and interfaces
to a central PLC or a controlling computer.
The CPU used in PLC system is a standard CPU present in many other microprocessor controlled systems. The choice of the CPU depends on the process to be controlled. Generally 8 or 16 bit CPUs fulfill the requirements adequately.
Memory in a PLC system is divided into the program memory which is usually stored in EPROM/ROM, and the operating memory. The RAM memory is necessary for the operation of the program and the temporary storage of input and output data. Typical memory sizes of PLC systems are around 1kb for small PLCs, few kb for medium sizes and greater than 10-20 kb for larger PLC depending on the requirements. Many PLC would support easy memory upgrades.
Input/Output units are the interfaces between the internal PLC systems and the external processes to be monitored and controlled. Since the PLC is a logic based device with a typical operating voltage of 5 volts and the external processes usually demand higher powers and currents, the I/O modules are optically or otherwise isolated. The typical I/O operating voltages are 5V - 240 V dc (or ac) and currents from 0.1A up to several amperes. The I/O modules are designed in this way to minimize or eliminate the need for any intermediate circuitry between the PLC and the process to be controlled. Small PLC units would have around 40 I/O connections with larger ones having more than 128 with either local or remote connections and extensive upgrade capabilities.
Programming units are essential components of the PLC systems. Since they are used only in the development/testing stage of a PLC program, they are not permanently attached to the PLC. The program in a ladder diagram or other form can be designed and usually tested before downloading to the PLC. The Programming unit can be a dedicated device or a personal computer. It allows the graphical display of the program (ladder diagram). The unit, once connected to the PLC can download the program and allows for the real time monitoring of its operation to assist debugging. Once the program is found to operate as required the Programming Unit is disconnected from the PLC which continues the operation.
The PLC operates internally in a way very similar to computers. The inputs are continuously monitored and copied from the I/O module into RAM memory which is divided into the input and output sections. The CPU steps through the control program in another section of the memory and fetches the input variables from the input RAM. Depending on the program and the state of inputs, the output RAM is filled with the control variables which are then copied into the I/O module where they control the processes.
One of the main advantages of the PLC controller is that it is a programmable device, which makes it possible, unlike in the relay logic, to easily design and modify the control program or process without any changes in the wiring (no hardware modifications). To make the programming of the PLC systems easy and efficient, industry standards defining the programming approach and the programming languages used were adopted. This reduces the need for personell training by making a set of languages standard for all PLC platforms on the market. Knowing the PLC programming languages and programming standards is thus one of the most important considerations for anyone involved in the PLC area.