Skip to content

Dashboard

A dashboard shows selected values of the model on the Dashboard tab and lets you change them. File → Load Dashboard Config loads a dashboard; File → Clear Dashboard Config removes it.

The Dashboard tab

Control

Control Function
Start Update / Stop Update Uploads all values from the target periodically, every "Interval:" ms
Update values Uploads all values from the target once
Download editable values Downloads all editable values to the target
Save Block Parameters to NVM As the item of the Model menu

Data

The table of the dashboard's values. Colored cells have not been synchronized with the target yet.

Dashboard config file

A dashboard is described by a plain text file, loaded with File → Load Dashboard Config. Its name and extension are free. The Communicator keeps the path in its settings file (see Files) and loads the dashboard again with it.

Layout

  • One KEY = value per line. Keys are written in capitals; spaces around = are ignored. A value must not contain =.
  • An optional MODEL line names the X2C model file (.xml) of the dashboard, absolute or relative to the dashboard file. Loading the dashboard then loads this model and replaces the current one. Without MODEL, a model must already be loaded.
  • Each row of the dashboard is an entry of several lines, starting with VARIABLE or BLOCK. An empty line ends the entry, so entries must be separated by empty lines.
  • Lines with other keys between the entries are ignored, e.g. comments.

Entries

A variable shows a variable of the application, read from the target's memory. It cannot be edited.

Key Value
VARIABLE Name of the variable as in the MAP file of the application
TYPE Data type, right after VARIABLE: int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32 or float64

The address of the variable is taken from the MAP file chosen under Download settings in the toolbar. Without a MAP file the Communicator says "No MAP file loaded. Variables will not be available."

A block parameter shows a parameter of a block of the model and can be edited: a new value is downloaded to the target at once. This needs a connection.

Key Value
BLOCK Path of the block in the model: its subsystems and its name, separated by dots, e.g. Controller.PI_Speed; a block at the top level by its name alone
PARAMETER Name of the parameter, right after BLOCK, as in the "Parameters:" table of the Model tab
VALUE Optional, right after PARAMETER: value the row starts with instead of the model's value; Download editable values writes it to the target

Both kinds of entries take these optional keys:

Key Value
ALIAS Name shown in the "Alias" column
UNIT Unit shown in the "Unit" column
GAIN, OFFSET Scaling: value on the target = shown value · GAIN + OFFSET; 1 and 0 by default
MIN, MAX Limits of a value entered in the dashboard; a value outside is refused ("Lower limit error", "Upper limit error")

GAIN, OFFSET, MIN and MAX apply to numbers only.

Example

MODEL = MotorControl.xml

VARIABLE = speedActual
TYPE = float32
ALIAS = Actual speed
UNIT = rpm

VARIABLE = adcPhaseCurrentU
TYPE = int16
ALIAS = Phase current U
GAIN = 1000
UNIT = A

BLOCK = SpeedControl.PI_Speed
PARAMETER = Kp
ALIAS = Speed controller Kp
MIN = 0
MAX = 10

BLOCK = SpeedRef
PARAMETER = Value
VALUE = 1500
ALIAS = Speed reference
UNIT = rpm

The first two rows show variables of the application; the phase current is stored as 1000 counts per ampere and shown in A. The last two rows are block parameters that can be edited; the speed reference starts at 1500 instead of the model's value.

If an entry cannot be read, e.g. a block or parameter that the model does not have, the dashboard is not loaded and the Log says "Dashboard File: Error: …".