The objective of this tutorial is to create logic using Set and Reset coils 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
SET and RESET coils are used to maintain the state of a variable, functioning as an alternative to traditional latching logic. They allow turning an output on and off without the need for parallel contacts, making the logic simpler and more organized.
Concept and operation
- SET Coil (Set):
When activated, sets the variable to TRUE, maintaining this state even after the condition that activated it ceases to exist. - RESET Coil (Restart):
When activated, sets the variable to FALSE, also in a sustained manner.
The variable's state then depends on the last command executed, and no longer on the continuity of the logic.
Use in pairs and duplicate addresses
The SET and RESET coils should always be used in pairs, acting on the same variable:
- One coil is responsible for turning on (SET)
- The other for turning off (RESET)
Important:
This is the only case in which it is allowed to have more than one coil with the same address in the program. In any other scenario, using two conventional coils with the same address is incorrect.
Inserting SET and RESET coils
The insertion of SET and RESET coils is done in the same way as the conventional coil:
- Through the context menu
- Through the top bar
- Through the toolbox
After inserting the coil, simply associate the desired variable.
Figure 2. Inserting SET/RESET coils
Conversion between coil types
If a conventional coil already exists in the logic, it is not necessary to remove it to use SET or RESET:
- Right-click on the coil.
- Select the SET/RESET or Define/Reset option (depending on the language).
- With each selection, the coil will alternate between the three types:
- Normal coil
- SET coil
- RESET coil
Repeat the command until you reach the desired coil type.
Figure 3. Changing the type of coil in the logic
Comparison with seal logic
- Seal logic:
Uses parallel contact and depends on the continuity of the logic. - SET / RESET:
Maintains the state internally, without the need for a seal contact, making the program cleaner and easier to maintain.
Logic Test
After assembling the logic with SET and RESET coils:
1. Download the application.
2. Put the CPU in RUN mode.
3. Activate the SET and RESET conditions.
4. Observe that the variable maintains its state until the opposite command is executed.
Figure 4. Operation of the SET/RESET coils
The SET and RESET coils are ideal for on/off commands, mode selection, and state control, providing a robust and organized solution to replace traditional latch logic.
Comments
0 comments
Please sign in to leave a comment.