
Consider some high-end products you have recently purchased. For example, consider a smart home center.
The smart home hub is ready to use out of the box and can control your smart home devices at any time. For this purpose, it uses its microprocessor, which is equipped with a set of programming instructions loaded at the factory. If you and your friends have the same smart home hub, the two hubs will have the same programming.
Now, consider the automated production line in the factory. The factory's automated production line is similar to the smart home hub in some respects. It accepts input from many sensors. It processes these inputs and opens the output according to the input received.
For the home automation hub, it may be receiving voice commands, time of day and RF signals as inputs, and may be setting outputs, such as locking the front door, turning on the lighting or closing a set of electric switches and shutters.
For PLC, it may accept proximity sensors, motor temperature and operator buttons as inputs, and may set outputs, such as telling the motor to rotate, flashing the indicator light on the panel or moving the actuator to locate parts.
PLC even has the feature of using a microprocessor to perform its functions. The difference between PLC and smart home hub is that although manufacturing equipment such as smart home hub all have the same programming, each PLC running an automated production line or process usually has a custom programming.