Multi-Variable Data Table
The Multi-Variable Data Table lists the name and current value of several values in a two-column table. It suits monitoring several variables at once, or viewing several fields split from one packet.
Values can come from parts of the received text, or from variables that already exist in SerialStudio. The table shows only the latest data and keeps no history. For the shared rules on data sources, see the Plugins Overview.
Data Requirements
- The number of values is not fixed. The number of values in each piece of data sets the number of rows, so the row count changes with the data.
- The first value must be convertible to a number. If the first value is invalid, or the data contains no values, the whole piece of data is ignored, and the table keeps its previous display.
- If the second or a later value is invalid, its row records a missing value and shows
--as the current value. The other rows still update.
Data Source
The plugin uses one of the two data sources below. They are mutually exclusive, so turning on one turns the other off.
Text Split (Default)
Text Split is the default data source. It is turned on in the Text settings. The plugin splits the received text by the Prefix and the Separator, and each part becomes one value. The name column shows Channel 1, Channel 2, and so on.
The examples below use the prefix $DATA, and the separator ,:
- Received
$DATA,12,3.5,-7: The table shows 3 rows. Channel 1 is 12.000, Channel 2 is 3.500, and Channel 3 is -7.000. - Received
$DATA,12,abc: Channel 1 is 12.000, and Channel 2 shows--. - Received
$DATA,abc,3.5: The first value is invalid, so the whole piece of data is ignored, and the table keeps its previous display. - Received
$DATA,12,,3: The empty part is skipped, and the table shows 2 rows. - Received
12,3.5: It does not start with the prefix$DATA,, so the whole piece of data is ignored.
Variable Rendering
Variable Rendering reads the current value of each variable directly. Once it is on, the plugin no longer parses the received text. In the Variable settings, turn on Enable variable mode, then check one or more numeric variables in the variable list. Boolean and string variables do not appear in the list.
- The name column shows the variable name. Rows follow the order of the variable list, from top to bottom, regardless of the order in which the variables were checked.
- The top variable in the list is the first value. If that variable is invalid or does not exist, the whole piece of data is ignored, and the table keeps its previous display. If any other variable is invalid or does not exist, its row shows
--. - While variable mode is on, the variable list is locked. To change the checked variables, turn variable mode off first.
- When variable mode is turned off, the refresh mode returns to Refresh on receive.
- After you switch variable mode or change the checked variables, the name column changes only at the next data update.
The two refresh modes, Refresh on receive and Timed refresh, are described in the Plugins Overview.
Channel Settings
The table has no channel settings. Names come from the data source. Colors, units, and ranges cannot be changed inside the plugin.
Display
The table has two columns, Name and Current value. Both columns are centered, and the rows alternate background colors. The table is for display only. Cells cannot be edited or selected.
- Current values have 3 decimal places. For example, 3.5 shows as 3.500.
- A missing value shows as
--. - The table keeps only the latest data. Each update replaces all rows. When the number of values drops, the extra rows are removed.
Toolbar
For the general behavior of toolbar buttons, see the Plugins Overview. This toolbar has three buttons, from left to right: Variable, Text, and Help.
| Icon | Button | Description |
|---|---|---|
| Variable | Opens the Variable rendering settings window. When the button is selected, variable mode is on. | |
| Text | Opens the Text split settings window. When the button is selected, text split is on. | |
| Help | Opens this plugin's online help page in your browser. |
Main options in the Variable rendering settings window:
- Enable variable mode: A checkbox. Variable mode cannot be turned on until at least one variable is checked.
- Variable list: Lists only numeric variables. The checked variables are displayed. The list is locked while variable mode is on.
- Refresh mode: Refresh on receive (default) reads the variables each time data is received. Timed refresh reads them at the Refresh interval. The interval ranges from 10 to 99999 ms, and the default is 100 ms.
Main options in the Text split settings window:
- Enable text mode: A checkbox, on by default. When it is unchecked, the two fields below cannot be edited.
- Prefix: Only data that starts with this text is processed. The prefix is removed before splitting. If the field is empty, no prefix check is made.
- Separator: The character that splits the values. It defaults to the English comma and cannot be empty.
- Preview example: A read-only example that shows the split result for the current settings.
Notes
- The clear button in the device window (tooltip Clear window content) also clears the table.
- If both text split and variable rendering are off, the plugin splits received text by English commas.
