Add Controls to Displays and edit properties, mapping to tags.

Displays Controls →  Tutorial | Concept | How-to Guide | Reference


This Tutorial Teaches you to:

  • Use basic controls
  • Configure control properties
  • Bind controls to tags
  • Create control interactions

Prerequisites:


1. Basic Input Components

Open display in Draw editor.

Button:

  1. Drag Button from toolbox
  2. Double Click the button and go to Settings
  3. Properties:
    • Label Text: "Start Motor"
    • Width: Auto
  4. Click Dynamics and check Actions:
  5. In Actions, choose ToggleValue
  6. In Object, type @Tag.Equipment/MotorRunning


Numeric Input:

  • Drag NumericTextBox from toolbox
  • Double Click the button and go to Settings
  • Bind LinkedValue to: @Tag.Setpoint
  • MinValue: 0, MaxValue: 100



2. Text Components

Text Display:

  • Drag TextBlock from toolbox
  • Double Click the button and go to Settings
  • Text with {Tags}: {Tag.TankFarm.Tank1/Temperature} °C
  • On the bottom right menu set Font to 24

ProgressBar:

  • Drag ProgressBar from toolbox
  • Double Click the button and go to Settings
  • Bind LinkedValue to: @Tag.Tank_Level
  • Maximum: 100
  • On the bottom right menu set Font color to Red

Digital Gauge:

  • Drag DigitalGauge from toolbox
  • Double Click the button and go to Settings
  • Bind LinkedValue to: @Tag.Pump_Running



3. Gauge Components

Circular Gauge:

  1. Add CircularGauge
  2. Double Click the button and go to Settings
  3. Bind LinkedValue to: @Tag.Pressure
  4. Minimum Value: 0
  5. Maximum Value: 150
  6. Major Ticks Quantity: 11 (means 0 to 100)

Linear Gauge:

  • Add LinearGauge
  • Double Click the button and go to Settings
  • Gauge Orientation: Vertical
  • Bind LinkedValue to: @Tag.Tank_Level



4. Chart Components

Trend Chart:

  1. Add TrendChart
  2. Double Click the button and go to Settings
  3. Configure pens:
    • Pen1: TankFarm/Tank1/Temp (Blue)
    • Pen2: TankFarm/Tank1/Pressure (Red)
  4. Auto: true

Pie Chart:

  • Add PieChart
  • Double Click the button and go to Settings
  • ChartType: Percent
  • LinkedValue field:
    • TankFarm/Tank1/Pressure (Blue)
    • TankFarm/Tank2/Pressure (Red)
  • Name field:
    • Pressure Tank 1
    • Pressure Tank 2



5. Container Components

Tab Control:

  1. Create three more pages with the following names:
    1. TankPage1
    2. TankPage2
    3. TankPage3
  2. Go back to your MainPage and add a TabControl
  3. Double Click the button and go to Settings
  4. Under Items Source Link set Designer and add three ChildDisplay components, and type the previous created display names in Linked Display 



6. Images

Image Display:

  1. Find the Import File control
  2. Choose and image from your computer
  3. This image will be available to reuse once you import it the first time

Web Browser:



7. Advanced Interactions

ComboBox with Database:


  • Add ComboBox control
  • In ComboBox Properties → Uid, type combo1
  • Go to the page Code Behind
  • Inside the DisplayOpening function, add:

TComboBox ComboBox1 = this.CurrentDisplay.GetControl("combo1") as TComboBox;
    
    DataTable dt = await @Dataset.Query.ActiveOrders.SelectCommandAsync();
    
    if(dt != null && dt.Rows.Count > 0)
    {
        foreach(DataRow row in dt.Rows)
        {
            ComboBox1.Items.Add(row["ColumnName"].ToString());
        }
    }    

  • Consider changing the ColumnName to one of the columns of your query return



8. Dynamic Animations

Add dynamics to any control:

  1. Double click control
  2. Select Dynamics
  3. Add:
    • Visibility: Show/hide by condition
    • MoveDrag: Move based on value
    • Scale: Resize dynamically
    • FillColor: Change by state
    • Rotate: Rotate by angle

9. Symbols

Create reusable control sets:

  1. Select controls to group:
    1. Choose any of the controls created in previous steps, or create two new controls 
    2. Use Ctrl+click to select multiple controls
  2. Group the controls
    1. Click the Group button in the top horizontal toolbar
    2. Alternatively, Right-click  → Group
  3. Create the symbol:
    1. Right-click on the grouped controls → Make New Symbol
    2. In the Name field, type: SymbolExample
    3. Click Yes to create the symbol
  4. Reuse across displays:
    1. The symbol now appears in the Symbol Library
    2.  Drag and drop from the library to any display



In this section...