This program detects if a numerical value is entered in two contiguous scan cycles.
Hypothesis: A system for temperature control, requires a hysteresis high threshold and a low threshold. The acquired value must stay in the center.
Thesis: The operator can introduce the upper value, the lower value, in this sequence. Then you must enter the value in which you want to thermostat. This is entered by the operator who can make mistakes. The system automatically corrects depending on whether the error is above the maximum or below the minimum.
- If the value entered is greater than the maximum, it is forced to the upper margin.
- If the value entered is less than the minimum then it is forced to the lower margin.
This is the main page of the project where the operator enters the current value and the margins of the insertable range.
Download full project CPU 1212C AC/DC/RLY & KTP600 basic -> autorange_1
The realization of the control is left as a useful exercise that the minimum is less than the maximum and the maximum greater than the minimum. Otherwise, default automatic values are entered, for example 60 max and 20 min.
The new edition of the book Professional PLC programming, based on TIA V16, is on sale on Amazon, in Italian language.
For schools and as an introductory guide use the text with the black cover in the language, Italian, English, Spanish, Portuguese. Soon it will be translated into Danish.