The Difference Between Microcontrollers and PLCs
PLCs (Programmable Logic Controllers) and Microcontrollers have the ability to perform much of the same functions, including mathematical operations, controlling devices, and logic and data processing. Microcontrollers are much less expensive to obtain than PLC systems, so why aren’t manufacturers replacing their current PLC systems with microcontrollers?
To better understand why PLCs are still the best choice for industrial applications is to look at the key characteristics that make these two different beyond just their price point.
A microcontroller is an integrated compact circuit device that is embedded within another device. This might be a home appliance, television, or a car, to control a single function. To handle varying tasks, multiple microcontrollers can be used. For example, a car will have one microcontroller for different operations including the speedometer, the auto-braking system, and another for the powered windows.
How It Works
Microcontrollers have different components including a processor (CPU), data and program memory, input/output (I/O) controls, and supporting circuitry. Data from the device’s inputs are then received by the microcontroller’s I/O and stored in the memory temporarily. Next, the processor analyzes the incoming data to determine the correct response based on pre-programmed instructions that are stored in the program memory in the microcontrollers. The I/O is then used to communicate the response and give an output function.
Benefits of Microcontrollers
Microcontrollers work best for applications that require limited computing functions. However, they do have the ability to perform a wide range of different operations as mentioned above. In addition, microcontrollers are typically smaller in size and less expensive.
PLCs (Programmable logic controllers) are ruggedized computers used for industrial automation. PLCs monitor inputs and outputs to make logic-based choices for automating processes, as well as controlling machine functions and entire production lines if needed.
How PLCs Work
PLCs consist of a processor, a power supply, I/O modules, and an external programming device. The processor is the ‘brains’ of the PLC and has pre-programmed functions based on data received from connected input devices, such as a sensor, thermometer, or switch. For example, if a thermometer sends low-temperature data to the PLC, the processor will analyze that data, figure out the appropriate response, and execute a command to activate a heating element.
The I/O modules are connected to field devices and provide input data to the processor, and communicate commands to output devices. I/O modules can be either analog or digital and can be mixed and matched to fit the appropriate application.
The external programming device is usually a desktop or laptop and is used to write the PLC program, and download it to the controller. There are several different PLC programming methods, including function block diagrams, structured text, ladder logic, instruction lists, and sequential flow charts.
Benefits of PLCs
PLCs are designed and tested to ensure they have the ability to withstand operating in industrial environments where they are exposed to shock and vibration, noise, corrosive materials, and extreme temperature fluctuations. PLCs are built for longevity, meaning manufacturers operate the same PLC in their facilities for over a decade. PLCs are also supported for years generally, making it easier to find replacement parts and have your systems serviced whenever needed. If a PLC model is discontinued, clear migration paths to more current hardware are usually available, removing the need to completely rewrite your programs.
New versions of microcontrollers are often introduced every few years, which can make it difficult to find replacement parts for models that are discontinued.