The objective of this tutorial is to explain how to insert and use the MOVE operator 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
MOVE is an operator used for direct transfer of values between variables within the program logic.
This operator is very useful when there is a need to update a variable with the value of another, store sensor readings, or organize the data flow within the control logic.
Unlike some operators that have multiple inputs or perform calculations, MOVE works with only one input and one output, performing an operation equivalent to a direct value assignment.
Functionality
The MOVE operator performs a simple data movement operation.
It takes the value present in the operator's input and copies that value to the output variable, maintaining the same data type.
This operation is equivalent to a direct value assignment, allowing you to update a variable based on another variable or constant.
How to insert it in the code
To use the MOVE operator in the program logic:
- Open the Toolbox
- Go to the Other Operators category
- Locate the MOVE operator
- Drag the operator to the logic area
- Parameterize the IN input with a variable or constant
- Define the OUT output variable that will receive the value
Remember that, since it is not a function block, the variable used in the output needs to be declared beforehand in the program.
Figure 2. Inserting the MOVE operator in the code
Input Parameter
IN
Represents the value that will be transferred to the output.
- Can be a variable
- Can be a constant
- Must have a data type compatible with the output
Examples of use:
- IN = Temperature
- IN = 50
- IN = Tank_Level
Output Parameter
OUT
Represents the variable that will receive the input value.
- Must be declared beforehand in the program
- Must have a data type compatible with the input
Whenever the logic containing the MOVE operator is executed, the value present in IN will be copied to OUT.
Operation Logic
The operation of the operator can be represented as follows:
OUT := INThat is, the value of the input IN is directly assigned to the output variable OUT.
Figure 3. Parameterization of the MOVE operator
Application Example
Suppose a system where the value of a sensor needs to be stored in another variable for later use.
Operator Configuration:
- IN = Sensor_Temperature
- OUT = Current_Temperature
Operation:
Whenever the logic is executed, the value of the Sensor_Temperature variable will be copied to Current_Temperature.
Figure 4. Operation of the MOVE operator
Applications in Automation
The MOVE operator is frequently used to:
- Copy values between variables
- Store sensor readings
- Update process variables
- Transfer data between parts of the program
- Organize the data flow in the logic
In short, the MOVE operator allows transferring the value of an input to an output variable, being a simple operation, but widely used in the organization and manipulation of data within programs developed in MasterTool X.
Comments
0 comments
Please sign in to leave a comment.