The purpose of this tutorial is to explain how to insert and use the RAMP_REAL functional block in a MasterTool X project.
Components
Equipment: 1 computer/laptop.
Software: MasterTool X
Tutorial Sections
- ARCHITECTURE
- DEVELOPMENT
1.ARCHITECTURE
A computer/laptop is required to use MasterTool X.
Figure 1. Computer running MasterTool X
2.DEVELOPMENT
The RAMP_REAL block is used to limit the variation of a value over time, controlling the rise (ascending) and fall (descending) speed of a signal.
It is very useful when you want to avoid abrupt changes in variables, ensuring a smoother transition.
This block is widely applied in:
- Speed control
- Motor soft start
- Gradual setpoint adjustment
- Smoothing of analog signals
Prerequisite
The RAMP_REAL block is only available in the Util library.
Therefore, the library must be added to the project through the Library Manager.
Functionality
The RAMP_REAL block limits the speed at which the output value follows the input, controlling:
- How much the value can rise per time interval
- How much the value can fall per time interval
Unlike the RAMP_INT, the only difference is the data type, which in this case is REAL.
The block works as follows:
- If the input value increases rapidly, the output rises in a limited way according to ASCEND
- If the input value decreases rapidly, the output falls in a limited way according to DESCEND
- The variation occurs over the time defined in TIMEBASE
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:
RAMP_REAL
Figure 2. Adding the RAMP_REAL Functional Block
Input Parameters
IN (REAL)
- Input value of the function
ASCEND (REAL)
- Maximum allowed rise value per time interval
DESCEND (REAL)
- Maximum allowed fall value per time interval
TIMEBASE (TIME)
- Defines the time interval for applying the rise and fall rates
RESET (BOOL)
- Resets the block
Output
OUT (REAL)
- Resulting value after applying the ramp limitation
RESET Behavior
- When RESET = TRUE, the ramp is interrupted
- The last output value (OUT) is held
- When RESET returns to FALSE, the ramp continues from the last stored value
Important:
The block does not automatically return to zero — it continues from the point where it stopped.
Note about TIMEBASE
- If TIMEBASE is less than the PLC cycle time, unexpected behaviors may occur
- If TIMEBASE = T#0s:
- ASCEND and DESCEND act directly (without relation to time)
- Limitation occurs per execution cycle
Application Example
Reference_Speed :REAL; //IN
VALUE_S :REAL := 10.0; //ASCEND
VALUE_D :REAL := 20.0; //DESCEND
TIMEBASE :TIME := T#1s; //TIMEBASE
RESET_RAMP: BOOL; //RESET
Operation:
- The output will increase by a maximum of 10 units per second
- The output will decrease by a maximum of 20 units per second
Figure 3. Parameterization of the RAMP_REAL block
Applications in Automation
The RAMP_REAL block is used in:
- Smooth speed control
- Avoiding spikes in systems
- Soft start and soft stop
- Gradual adjustment of analog variables
- Equipment protection
Important Notes
- Works with variables of type REAL
- Requires the Util library
- The TIMEBASE value must be consistent with the PLC cycle
- RESET holds the last output value
In summary, the RAMP_REAL block allows controlling the rate of change of a signal, ensuring smooth and safe transitions, being essential in applications that require stability and equipment protection.
Figure 4. Operation of the RAMP_REAL block
Comments
0 comments
Please sign in to leave a comment.