VScrollBar
VScrollBar (Vertical Scroll Bar)
The VScrollBar is a control object used for scrolling operations in the vertical direction. The operator can select a value between a Minimum and Maximum range by moving the scroll box (thumb).
This object is ideal for quickly adjusting a setpoint (e.g., a 0-100 tank level setting) or a parameter by sliding up or down with the mouse, without needing to use a keyboard. It is functionally identical to the HScrollBar, only its orientation is vertical.
Basic Configuration and Operation
1. Defining the Range (Advanced Panel) The operational logic of the object is defined in the Advanced panel.
- Minimum: The value when the slider is at the bottom (e.g., 0).
- Maximum: The value when the slider is at the top (e.g., 100).
2. Setting Increment Amounts (Advanced Panel)
- SmallChange: The amount the value changes when the operator clicks the small arrows (â–²/â–¼) at the ends of the bar (e.g., 1).
- LargeChange: The amount the value changes when the operator clicks inside the empty bar area (track) between the slider and the arrows (e.g., 10).
3. Binding the Value (Properties Panel) The integer value selected by the operator is linked to a SCADA tag via the Value property in the Properties panel.
Properties Panel – Key Properties
Value
- Tag:
- Function: This is a two-way link connecting the slider’s current position (within the Minimum and Maximum range) to a tag.
- Read: If the linked tag (e.g., Motor_Speed) is set to 50 by a script or the PLC, the VScrollBar slider automatically moves to the middle position (assuming Min=0 and Max=100).
- Write: If the operator drags the slider to the 75% position (assuming Min=0 and Max=100), the value 75 is written to the Motor_Speed tag.
Advanced Panel – Key Properties
- SmallChange
- The amount added to/subtracted from the tag when the directional arrows at the ends are clicked.
- LargeChange
- The amount added to/subtracted from the tag when the bar area (track) is clicked.
Note: Minimum and Maximum Value Precedence
The VScrollBar object allows for defining minimum and maximum limits in two different ways:
- Fixed Values (Advanced Tab):
- The Minimum and Maximum fields in the Advanced tab set a static operating range for the control.
- These are used when a fixed range is required (e.g., 0–100).
- These values do not change during runtime.
- Values Defined via Tag (Properties -> Value Tab):
- The Minimum and Maximum fields in the Properties -> Value tab allow the control to retrieve its range dynamically from a tag.
- This ensures the slider automatically updates based on the current value range of the connected variable.
Priority Rule: If both static (Advanced) and Tag-based (Properties) minimum/maximum values are defined, the values coming from the tag take precedence. This ensures the control behaves according to real-time system data.
Common Usage Examples
Example: Tank Level Adjustment (0-100)
- Add a VScrollBar and a TextBox to the screen.
- Go to the Advanced panel of the VScrollBar object:
- Minimum: 0
- Maximum: 100
- SmallChange: 1
- LargeChange: 10
- Go to the Properties panel of the VScrollBar object:
- Bind Value -> Tag to the Tank_Level tag.
- Go to the Properties panel of the TextBox object:
- Bind Value -> Tag to the same Tank_Level tag (to visualize the exact value).
Result:
- As the operator moves the slider, the Tank_Level tag takes a value between 0 and 100, and the TextBox displays this value instantly.
- Conversely, if the PLC or the operator writes “25” to this tag via the TextBox, the slider automatically moves to the quarter position.
