Create the application interface

Create a gauge, labels, spin box, and buttons.
  1. Create the gauge:
    1. In
      Project view
      , expand the
      UI
      folder.
    2. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Circular gauge
      .
    3. In
      Properties
      , create a dynamic link between
      Value
      and
      ProjectName
      Model
      ProcessVariableSimulator1
      Value
      .
      For more information about dynamic links, see Create dynamic links.
  2. Create the value label:
    1. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Label
      .
    2. Hover-over the label, select
      Edit
      , and enter
      ValueLabel
    3. In
      Properties
      , set the
      Text
      property value to
      VALUE
  3. Create the step label:
    1. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Label
      .
    2. Hover-over the label, select
      Edit
      , and enter
      StepLabel
    3. In
      Properties
      , set the
      Text
      property value to
      STEP
  4. Create the spin box:
    1. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Spin box
      .
    2. In
      Properties
      , create a dynamic link between
      Value
      and
      ProjectName
      Model
      ProcessVariableSimulator1
      Value
      Step
      .
      For more information about dynamic links, see Create dynamic links.
  5. Create the message label:
    1. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Label
      .
    2. Hover-over the label, select
      Edit
      , and enter
      MessageLabel
    3. In
      Properties
      , create a dynamic link between
      Value
      and
      ProjectName
      Model
      ProcessVariableSimulator1
      Value
      Message
      .
      For more information about dynamic links, see Create dynamic links.
  6. Create the start button:
    1. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Button
      .
    2. Hover-over the button, select
      Edit
      , and enter
      StartButton
    3. In
      Properties
      , set the
      Text
      property value to
      START
    4. Create an advanced dynamic link between
      Enabled
      and
      ProjectName
      Model
      ProcessVariableSimulator1
      Value
      IsRunning
      with an expression evaluator
      !{0}
      For more information about dynamic links, see Create dynamic links.
    5. In
      Events
      , next to
      MouseClick event
      select
      Add
      and select
      ProjectName
      Model
      ProcessVariableSimulator1
      ProcessVariableSimulatorLogic
      StartMethod
      .
      TIP: If you cannot complete this step, save and reopen the project.
  7. Create the stop button:
    1. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Button
      .
    2. Hover-over the button, select
      Edit
      , and enter
      StopButton
    3. In
      Properties
      , set the
      Text
      property value to
      STOP
    4. Create a dynamic link between
      Enabled
      and
      ProjectName
      Model
      ProcessVariableSimulator1
      Value
      IsRunning
      .
      For more information about dynamic links, see Create dynamic links.
    5. In the
      Events
      pane, next to
      MouseClick event
      select
      Add
      and select
      ProjectName
      Model
      ProcessVariableSimulator1
      ProcessVariableSimulatorLogic
      StopMethod
      .
      TIP: If you cannot complete this step, save and reopen the project.
  8. Arrange the interface elements.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.