Create the application interface

Create a gauge, labels, spin box, and buttons.
  1. Create the gauge:
    1. In the
      Project view
      pane, expand the
      UI
      folder.
    2. Right-click
      MainWindow (type)
      and select
      New
      Base controls
      Circular gauge
      .
    3. In the
      Properties
      pane, 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 the
      Properties
      pane, 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 the
      Properties
      pane, 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 the
      Properties
      pane, 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 the
      Properties
      pane, 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 the
      Properties
      pane, 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 the
      Events
      pane, next to
      MouseClick event
      select + and select
      ProjectName
      Model
      ProcessVariableSimulator1
      ProcessVariableSimulatorLogic
      StartMethod
      .
      MANCIA: If you cannot complete this step, save the project and reopen it.
  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 the
      Properties
      pane, 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
      .
      MANCIA: If you cannot complete this step, save the project and reopen it.
  8. Arrange the interface elements.
Fornire un feedback
Hai domande o feedback su questa documentazione? invia il tuo feedback qui.