HScrollBar

HScrollBar

The HScrollBar is a control object used for scrolling operations in the horizontal 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 using only the mouse, without needing a keyboard.

Basic Configuration and Operation

1. Defining the Range (Advanced Panel)The operational logic of the object is defined in the Advanced panel. Here, you determine the maximum and minimum values that the scroll bar can reach.

2. Setting Increment Amounts (Advanced Panel) This defines how much the value changes when the operator clicks the small arrows (▶︎) at the ends of the bar, or when they click inside the empty bar area.

3. Binding the Value (Properties Panel) The 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 HScrollBar 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 HScrollBar object allows for defining minimum and maximum limits in two different ways:

  1. 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.
  1. 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: Adjusting Motor Speed Setpoint (0-100)

  1. Add an HScrollBar and a TextBox to the screen.
  2. Go to the Advanced panel of the HScrollBar object:
  • Minimum: 0
  • Maximum: 100
  • SmallChange: 1
  • LargeChange: 10
  1. Go to the Properties panel of the HScrollBar object:
  • Bind Value -> Tag to the Motor_Speed_Setpoint tag.
  1. Go to the Properties panel of the TextBox object:
  • Bind Value -> Tag to the same Motor_Speed_Setpoint tag (to visualize the exact value).

Result:

  • As the operator moves the slider, the Motor_Speed_Setpoint 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.

Leave a Reply