The objective of this tutorial is to explain how to use combination logic in a MasterTool X project.
Components
Equipment: 1 computer/notebook.
Software: MasterTool X
Tutorial Sections
- ARCHITECTURE
- DEVELOPMENT
1. ARCHITECTURE
A computer/notebook will be required to use MasterTool X.
Figure 1. Computer running MasterTool X
2. DEVELOPMENT
In this example, a logic will be built that activates a coil when the level is outside the normal range, i.e., below the lower limit (20) or above the upper limit (80).
For this, two mathematical operators LE and GE will be used, connected in parallel, characterizing an OR logic (logical OR).
Logic Concept
The logic evaluates two independent conditions:
- LE → level ≤ 20 (lower limit)
- GE → level ≥ 80 (upper limit)
If either condition is true, the coil will be energized.
Main Logic Line Setup
- Create a new network in Ladder logic.
- Insert the LE operator via the Toolbox → Mathematical Operators.
- Insert a coil at the end of the network.
At this point, you will have the main logic line, composed of:
- LE operator
- Output coil
Inserting the operator in parallel
- Select the LE block already inserted in the logic.
- Right-click on the block.
- Select the option Insert Parallel Box Below.
- In the box created in parallel, insert the GE operator.
In this way, the software correctly creates the parallel structure, ensuring the operation of the OR logic.
Figure 2. Insertion of the mathematical operator for combination logic
Operator Parameterization
After assembling the structure:
- In the LE operator:
- First parameter: level variable
- Second parameter: constant 20 or lower limit variable
- In the GE operator:
- First parameter: the same level variable
- Second parameter: constant 80 or upper limit variable
The inputs can receive variables or constants, according to the application's needs.
Logic Operation
- Level ≤ 20 → LE = TRUE → coil activated
- Level ≥ 80 → GE = TRUE → coil activated
- Level between 20 and 80 → both FALSE → coil deactivated
That is, the coil will be activated whenever the level is outside the allowed range.
Figure 3. Parameterization of the mathematical operator for combination logic
Practical Application
After finalizing the logic:
- Download the application.
- Put the CPU in RUN mode.
- Vary the value of the level variable.
- Observe:
- The coil activating at the lower and upper limits
- The coil de-energizing when the level is within the normal range
Important Observations
- This technique is ideal for:
- High and low level alarms
- Process monitoring
- Equipment protection
- Limits can be easily adjusted by replacing constants with variables.
The correct assembly of the logic in parallel, starting with the main line and adding the secondary conditions through the parallel box, ensures a clear, safe logic aligned with good Ladder programming practices.
Figure 4. Mathematical operator performing a combination logic
Comments
0 comments
Please sign in to leave a comment.