The basic operation of a PLC is to perform a pre-programmed output, depending on the input signal, by following a set of rules. The PLC completes the following stages in its basic operation.
First, there is the input scan, which detects the state of the inputs. Then, the program scan, to see what needs to be done. Then it will execute the program logic, to actually implement what the rules state. Then it must update the outputs, to operate output devices based on the program requirements. Finally, the housekeeping, for self-diagnostics, communications, updates and reporting.
The Scan time, which is the time it takes to complete all the stages, depends on the sensitivity, the resilience and systems processing time. Analogue inputs tend to take longer to process compared to more simple digital on off inputs.
For example, a water tank might have a fast scan time of 2 milli seconds and this will prevent over filling. But a room temperature control can be much slower, perhaps 100 milli seconds.

Example 1: Simple response example
Let’s see an example of a simple response. We have a bi-metallic strip temperature sensor, a PLC and a boiler. The bi-metallic strip bends as it becomes hot and cold so we can use this to detect if the room is at the desired temperature and from this, control the boiler.

When the room is at the correct temperature, the circuit is complete and the PLC receives a signal, so the boiler is off. When the room temperature drops, the circuit is no longer complete and the PLC detects this change on the input. It reacts by sending an output signal to turn the boiler on. This is very simple and we could also use a simple relay to achieve this.
However, a PLC is better because it has a time function, so it can check the time before switching on the boiler. For example, the building might be empty at night and on weekends. So, we don’t want the boiler to turn on then. The PLC is told the room is too cold, it checks the time and date to see if it’s allowed to turn on, and then based on this, it decides whether to turn the boiler on or leave it off.

We can then add extra functions and inputs. For example, a motion sensor on the input. The thermostat tells the PLC the room is too cold. The PLC will check the time to ensure it is allowed to turn the boiler on, and now it can also check to see if the room is occupied. For example, there could be a public holiday that isn’t listed on the calendar. The building is empty and so the boiler doesn’t need to turn on.
Example two: Advanced response.
In this next more sophisticated example we have a thermistor, the PLC as well as an actuator valve. The thermistor can provide a temperature scale rather than the simple on off input like the bi-metallic strip. The actuator valve can open anywhere between 0 and 100% to control how much hot water is provided to heat the room.

For this we would use a PID control loop. Which stands for Proportional, Integral and Derivative control. We won’t go into too much detail on PID’s but essentially this will control the valve position, to ensure it only opens enough to suit the difference between the rooms desired temperature and the rooms actual temperature.
For example, if the room temperature dropped very slightly, we don’t want the heating valve to instantly open 100%, because the room will heat too quickly and this will overshoot the desired temperature. At this point it will then instantly turn off and repeat this cycle. Instead we want the valve to gradually open, in proportion to the demand. So, if there is a small temperature difference, the valve slowly opens a small amount. If there is a large temperature difference the valve opens further and faster. It then decreases as it approaches the desired temperature until the valve finds the perfect position to maintain the desired room temperature.

Example 3: Complex Response
Let’s see a more complex example. In many commercial buildings, the heating or cooling system will use a control strategy known as an optimiser. This learns, over a period of time, how quickly the building heats up and cools down. It then starts the heating or cooling system at the optimal time, before the building will be occupied. For example, if the staff are due to turn up and start work at 9am, the heating system knows that it will need to turn on at 7am to ensure the rooms are all the correct temperature.
Let’s say this system has a PLC with the optimiser software installed. This controls an actuator valve for the heating system. This system also has two pumps, which are setup in duty and standby configuration so only one pump runs at a time. The PLC will decide which pump to turn on, based on whichever has the lowest number of previous run hours. The PLC will monitor a flow sensor to detect if the pump turns on when told to do so. If it fails to turn on, the PLC receives an alarm and it will cut the power. It then tells the other pump to start.

However, before the heating system and pumps start, the PLC will check with the clock, should the heating turn on today and if so, at what time will the building be occupied. The clock says yes, the scheduled occupancy time is 9am. The PLC then checks the current temperature of the room and calculates the difference between this and the desired temperature. It then checks the outdoor temperature to calculate how long it will take to heat the building, because on a very cold day, there will be a greater heat loss so it will take longer. From this, the PLC calculates what time it needs to turn the heating system on, so that the building is at the desired temperature, ready for 9am.
Leave a Reply