The purpose of this tutorial is to explain how to insert and use the HYSTERESIS functional block in a MasterTool X project.
Components
Equipment: 1 computer/laptop.
Software: MasterTool X
Tutorial Sections
- ARCHITECTURE
- DEVELOPMENT
- ARCHITECTURE
A computer/laptop is required to use MasterTool X.
Figure 1. Computer running MasterTool X
2.DEVELOPMENT
The HYSTERESIS block is used to prevent signal oscillations by creating an operating range between two limits (HIGH and LOW). It is very useful when the monitored variable is close to a trigger point, avoiding constant switching.
This block is widely applied in:
- Level control
- Temperature
- Pressure
- On/off limit systems
Prerequisite
The HYSTERESIS block is only available in the Util library.
Therefore, the library must be added to the project through the Library Manager.
Operation
The block behavior follows the logic below:
- If IN is below LOW → OUT = TRUE
- If IN exceeds HIGH → OUT = FALSE
After this:
- The output remains FALSE while the value is above LOW
- Only when IN falls below LOW again, the output returns to TRUE
Inserting the block into the logic
The block does not appear directly in the toolbox, so it must be inserted manually:
- Create a new network
- Insert a generic box (EN/ENO)
- Inside the box, type:
HYSTERESIS
Figure 2. Adding the HYSTERESIS Functional Block
Input Parameters
IN (INT)
- Monitored value
HIGH (INT)
- Upper limit
LOW (INT)
- Lower limit
Output
OUT (BOOL)
- Result of the hysteresis logic
Practical Interpretation
- Activation occurs at the lower limit (LOW)
- Deactivation occurs at the upper limit (HIGH)
- Between these values, the output maintains the last state
This creates a hysteresis band that prevents rapid oscillations.
Example of application
Configuration:
Analog_Value :INT; //IN
Min_Value_IN: INT := 20; //IN_MIN
Max_Value_IN: INT := 80; //IN_MAX
Operation:
- If the level falls below 20 → OUT = TRUE (turns on, for example, a pump)
- If the level rises above 80 → OUT = FALSE (turns off the pump)
- Between 20 and 80 → maintains the previous state
Figure 3. Parameterization of the HYSTERESIS block
Applications in Automation
The HYSTERESIS block is used in:
- Pump level control
- Temperature control with tolerance range
- Prevent constant on/off switching
- Increase equipment lifespan
- Stabilize signals
Important Notes
- Works with INT type values
- Requires the Util library
- HIGH must be greater than LOW
- Essential to avoid unwanted oscillations
In summary, the HYSTERESIS block creates a control band with state memory, ensuring stability in the logic and preventing excessive activations in automation systems.
Figure 4. Operation of the HYSTERESIS block
Comments
0 comments
Please sign in to leave a comment.