Graphical-Interface Blocks

Connect model behavior with a control.

Review graphical-interface components and their configuration. Follow the documented interfaces before introducing user interaction.

Graphical Interface Models


Button_box 0 1

File: general_blocks/Miscellaneous/Button_box.sim
Description
Asynchronous button model - Outputs token when pressed. Single click outputs a single int "1" token. A double click outputs a 1 on the first, and a 2 on the second click.

Ports

Input Ports

  • none

Output Ports

  • out     Data Type: INTEGER

Parameters

  • none

ColorBox

File: general_blocks/All.sim

Description

ColorBox displays color based upon whether the input received is active (received a nonzero int) or inactive (received an int = 0).

Ports

Input Ports

  • in      Data Type: ANY (trigger)

Output Ports

  • (none)

Parameters

  • active_color Data Type: INTEGER
  • inactive_color Data Type: INTEGER
          Black    0         Green    9
          Fuchsia  1         Violet  10
          Blue     2         Orange  11
          Cyan     3         Gold    12
          Gray     7         Pink    13
          Red      8         White   15

ColorController

ColorController
File: general_blocks/Miscellaneous/ColorController.sim
Description
The model toggles its color based upon whether the box or modules it "enacpsulates" are "active". ColorController receives a data structure at its "in" port, increments its counter, and passes the received data structure out of its "to" port to the active boxes or modules. They do their thing and then pass an output data structure back to the ColorController into its "from" port. When the ColorController receives a data structure through its "from" port, it decrements its counter and passes the data structure out its "out" port. While the counter is zero ("inactive"), the inactive_color is displayed. While the counter is greater than zero ("active"), the active_color displayed.
Ports

Input Ports

  • in       Data Type: ANY
  • from     Data Type: ANY

Output Ports

  • to      Data Type: ANY
  • out     Data Type: ANY

Parameters

  • active_color            Data Type:INTEGER

  • inactive_color          Data Type:INTEGER

Black 0 Fuchsia 1 Blue 2 Cyan 3 Gray 7
Red 8 Green 9 Violet 10
Orange 11 Gold 12 Pink 13 White 15


GenericProbePopup

File: general_blocks/All.sim

Description

GenericProbePopup generates a popup describing in detail each message it receives (it also writes the description to the terminal). It lists the token arrival time and its content. It will accept any kind of data and pass it unchanged.

Ports

Input Ports

  • in      Data Type: ANY DATA STRUCTURE

Output Ports

  • out Data Type: ANY DATA STRUCTURE

Parameters

  • ProbeLabel Data Type: STRING Label for probe name. Defaults to box's instance name.

Hilite_Box

Hilite Box

File: general_blocks/All.sim

Description

Hilite_Box executes hilite_box or hilite_link commands, which allow control of the animation of arbitrary boxes or links. The box_name is the complete path to the box,

i.e. "/Cabinet1/Card2"

A link is specified by its box and port connection. Hilite_Box enables the animation of system representations which are not actually part of or relevant to the actual simulation. This will often be used in combination with Navigate_View boxes.

Ports

Input Ports

  • in      Data Type: ANY (trigger)

Output Ports

  • (none)

Parameters

  • Type Data Type: INTEGER (0 = box, 1 = link)
  • Box_Name Data Type: STRING
  • if Type = 1 (link), Port_Name Data Type: STRING
  • Color Data Type: INTEGER (can be 1 through 232)

MPGraph MPGraph

File: general_blocks/Miscellaneous/MPGraph.sim
Description
"Wirelessly" receives data from compatible probes and displays the data in a variety of formats (an enhanced xygraph capability).

Ports

Input Ports

  • (none)

Output Ports

  • (none)

Parameters

  • Display_Type            Data Type:CHARACTER
    May be: Line, Scatter or Histogram
  • NumberOfStreams = N     Data Type:INTEGER (1 <= N <= 10)
  • Stream_Name_M           Data Type: CHARACTER(1 <= M <= N)
  • LineColor               Data Type: INTEGER, i.e.
    Fuchsia 1 Blue 2 Cyan 3 DkBlue 4 Gold 5
    DkGray 6 Gray 7 Red 8 Green 9 Violet 10
    Orange 11 Yellow 12 Pink 13 LtGray 14 White 15
    (up to 240)
  • Min_X                   Data Type: REAL
  • Max_X                   Data Type: REAL
  • Min_Y                   Data Type: REAL
  • Max_Y                   Data Type: REAL
  • X_Axis_Label            Data Type: CHARACTER
  • Y_Axis_Label            Data Type: CHARACTER

File: general_blocks/All.sim

Description

Navigate_View executes CSIM_NavigateView commands. Up to 12 (specified by the NumberOfFields parameter) field name/value pairs may be specified (Field_Name_1 through Field_Name_12, assigned the values Value_1 through Value_12, respectively). The complete set of commands will be executed whenever a messsage is received.

Valid commands include:

ZoomIn

ZoomOut

ZoomToFit

OpenGraph "object_name"

CloseGraph

Flatten "object_name"

PanRight

PanLeft

PanUp

PanDown

NO_SCREEN_REFRESH

REFRESH_SCREEN

EXAMPLE:

NumberOfFields = 3

Field_Name_1 = Flatten

Value_1 = "/Cabinet1"

Field_Name_2 = Flatten

Value_2 = "/Cabinet1/Card1"

Field_Name_3 = Flatten

Value_3 = "/Cabinet1/Card2"

Ports

Input Ports

  • in      Data Type: ANY DATA STRUCTURE

Output Ports

  • none

Parameters

  • NumberOfFields = N Data Type: INTEGER (1 <= N <= 12)
  • Field_Name_n Data Type: STRING
  • Value_n Data Type: INTEGER or STRING

PlotLive

File: general_blocks/All.sim

Description

PlotLive is a real time xgraph interface. PlotLive receives a real envelope at its input port and uses the real data to construct an (x, y) data pair, where the x value is the current simulation time (CSIM_TIME), and the y value is the received value. It then sends the data pair to xgraph via a socket. A variety of attributes are available to specify xgraph labels, ranges, colors, etc.

Ports

Input Ports

  • in      Data Type: REAL

Output Ports

  • (none)

Parameters

  • NumberOfFields
  • Field_X
  • Field_Y
  • color
  • shape
  • socketnum
  • pan
  • x_min
  • x_max
  • y_min
  • y_max
  • plot_title
  • x_title
  • y_title

PopUpMessage PopUpMessage

File: general_blocks/Miscellaneous/PopUpMessage.sim
Description
This box pops up a message window when triggered. It prints the message contained in the Message attribute. The simulation pauses until the user dismisses the popup window. This box passes the token through.

Ports

Input Ports

  • in     Data Type: ANY DATA STRUCTURE

Output Ports

  • out     Data Type: ANY DATA STRUCTURE

Parameters

  • Message - Message to show in pop-up window. *Required*

PromptFloat PromptFloat

File: general_blocks/Miscellaneous/PromptFloat.sim
Description
PromptFloat model - This model prompts for a floating-point value when triggered. It outputs the user's response value on it's output port. This enables you to interact with your models while your simulation runs. You can instantiate any number of these prompt boxes in your diagrams.

Ports

Input Ports

  • in     Data Type: Trigger

Output Ports

  • out     Data Type: REAL

Parameters

  • Prompt - Optional prompt. The prompt appears in the ueser's text window. By default, the prompt somes up as the instance-name of the prompt-box. By setting this attribute, you can create more elaborate, specific, or meaningful prompts.

PromptInt PromptInt

File: general_blocks/Miscellaneous/PromptInt.sim
Description
PromptInt model - This model prompts for an integer value when triggered. It outputs the user's response value on it's output port. This enables you to interact with your models while your simulation runs. You can instantiate any number of these prompt boxes in your diagrams.

Ports

Input Ports

  • in     Data Type: Trigger

Output Ports

  • out     Data Type: Integer

Parameters

  • Prompt - Optional prompt. The prompt appears in the ueser's text window. By default, the prompt somes up as the instance-name of the prompt-box. By setting this attribute, you can create more elaborate, specific, or meaningful prompts.

Slider_box 0 1

File: general_blocks/Miscellaneous/Slider_box.sim
Description
Slider model - The model has one slider and one output port. Whenever the slider is moved, it outputs the new value on it's output port. You can instantiate any number of these slider-boxes in your diagrams.

Ports

Input Ports

  • none

Output Ports

  • out     Data Type: REAL

Parameters

  • min - Integer, sets a minimum value.
  • max - Integer, sets a maximum value.
  • init - Integer, sets the initial slider value.
  • scale - Real, sets a divisor to scale the integer range (min:max).

This page is an editorial rewrite of source documentation. Historical status, availability, and platform notes are not independently verified for a current release. Technical examples are reference material, not a live simulator.