Main Content

slrealtime.ui Properties

slrealtime UI component properties for instrument panel UI

Since R2021b

Using these properties, you can customize the appearance and operation of slrealtime.ui.control controls and slrealtime.ui.tool tools.

Component Operation

expand all

This property is available for each of the Simulink Real-Time components. The property selects whether the component is enabled (true) or disabled (false) when the app runs. For graphical (non Simulink Real-Time) components that are configured with a Simulink Real-Time ParameterTuner, you can use the Enable property on the ParameterTuner to enable or disable the graphical component.

  • When true, the ParameterTuner sets or clears Enable property of the graphical component based on state of target computer.

  • When false, the ParameterTuner sets the Enable property of the ParameterTuner component to false but continues to update the graphical component. In this way, the ParameterTuner Enable property acts as an enable property for the graphical component.

Example: k = uiknob; pt = slrealtime.ui.tool.ParameterTuner; pt.Component = k; pt.Enable = false;

Data Types: logical

Position and Size

expand all

This property applies to all slrealtime.ui.control controls. For more information, see the property description in UI Figure Properties.

Example: h.Position = [0 0 200 200]

Data Types: integer array

This property applies to the slrealtime.ui.control button controls. For more information, see the property description in Button Properties.

Example: 'left'

Data Types: string

This property applies to the slrealtime.ui.control button controls. For more information, see the property description in Button Properties.

Example: 'center'

Data Types: string

This property applies to the slrealtime.ui.control button controls. For more information, see the property description in Button Properties.

Example: 'center'

Data Types: string

Component Appearance

expand all

This property applies to all slrealtime.ui.control controls. For more information, see the property description in UI Figure Properties.

Example: 'Helvetica'

Data Types: system supported font name

This property applies to all slrealtime.ui.control controls. For more information, see the property description in UI Figure Properties.

Example: 12

Data Types: positive number

This property applies to all slrealtime.ui.control controls. For more information, see the property description in UI Figure Properties.

Example: 'normal'

Data Types: string

This property applies to all slrealtime.ui.control controls. For more information, see the property description in UI Figure Properties.

Example: 'normal'

Data Types: string

This property applies to all slrealtime.ui.control controls. For more information, see the property description in UI Figure Properties.

Example: 0 0 0

Data Types: RGB triplet

This property applies to all slrealtime.ui.control controls. For more information, see the property description in UI Figure Properties.

Example: [0.96 0.96 0.96]

Data Types: RGB triplet

Connect Button Component

expand all

This property applies to the slrealtime.ui.control.ConnectButton component. The property selects the icon that is displayed on the button in the connected state.

Example: 'slrtConnectIcon.png'

Data Types: string

This property applies to the slrealtime.ui.control.ConnectButton component. The property selects the icon that is displayed on the button in the disconnected state.

Example: 'slrtDisconnectIcon.png'

Data Types: string

This property applies to the slrealtime.ui.control.ConnectButton component. The property selects the text that is displayed on the button in the connected state.

Example: 'Connected'

Data Types: string

This property applies to the slrealtime.ui.control.ConnectButton component. The property selects the text that is displayed on the button in the disconnected state.

Example: 'Disconnected'

Data Types: string

Load Button Component

expand all

This property applies to the slrealtime.ui.control.LoadButton component. The property selects whether the button displays the name of the loaded real-time application in the loaded state.

Example: true

Data Types: logical

This property applies to the slrealtime.ui.control.LoadButton component. The property selects the icon that is displayed on the button.

Example: 'slrtLoadIcon.png'

Data Types: string

This property applies to the slrealtime.ui.control.LoadButton component. The property selects the text that is displayed on the button.

Example: 'Load Application'

Data Types: string

This property applies to the slrealtime.ui.control.LoadButton component. The property selects whether the button action skips installation and just loads the real-time application.

Example: false

Data Types: logical

This property applies to the slrealtime.ui.control.LoadButton component. The property selects whether the button action that loads the real-time application is asynchronous (does not block) MATLAB operation.

Example: false

Data Types: logical

This property applies to the slrealtime.ui.control.LoadButton component. The property selects the application that loads when you click the button. If set, the button loads the specified application instead of opening a dialog box to select an application.

Example: 'myApplication'

Data Types: string

Instrument Manager Component

expand all

This property applies to the slrealtime.ui.tool.InstrumentManager component. Use this property to add Instrument objects to the array of managed instruments. The Instrument objects are bound to one or more UI components.

Example: [hInstAxes hInstGauge]

Data Types: array of Instrument objects

Menu Component

expand all

For property information, see AsyncLoad description. For an example applying this property for the slrealtime.ui.container.Menu component, see Create Menu by Using App Generator

Example: 0

Data Types: logical

For property information, see AutoImportFileLog description. For an example applying this property for the slrealtime.ui.container.Menu component, see Create Menu by Using App Generator

Example: 0

Data Types: logical

For property information, see ExportToBaseWorkspace description. For an example applying this property for the slrealtime.ui.container.Menu component, see Create Menu by Using App Generator

Example: 0

Data Types: logical

For property information, see ReloadOnStop description. For an example applying this property for the slrealtime.ui.container.Menu component, see Create Menu by Using App Generator

Example: 1

Data Types: logical

For property information, see SkipInstall description. For an example applying this property for the slrealtime.ui.container.Menu component, see Create Menu by Using App Generator

Example: false

Data Types: logical

Parameter Table and Signal Table Component

expand all

This property applies to the slrealtime.ui.control.ParameterTable and slrealtime.ui.control.SignalTable controls. For more information, see the RGB triplet table the property description in UI Figure Properties.

Example: [0 0 0]

Data Types: RGB triplet

This property applies to the slrealtime.ui.control.ParameterTable and slrealtime.ui.control.SignalTable controls. For more information, see the RGB triplet table in the property description in UI Figure Properties.

Example: [1 1 1]

Data Types: RGB triplet

This property applies to the slrealtime.ui.control.SignalTable control. The Signals property value is a struct that contains fields:

  • BlockPath — provides either the full block path or name for each signal.

  • The PortIndex — provides either the port index value (for signals identified by block path) or the value -1 (for signals identified by name).

  • Decimation — provides a decimation value for each signal. Default values is 1.

  • ArrayIndex — provides an array index for each signal. Default values is [].

  • BusElement — provides bus element selection for each signal. Default values is [], '', or "".

  • Callback — provides callback code for each signal. Default values is [].

hSTable.Signals = struct( ... 
  'BlockPath', {'testmodel/Constant1', 'testmodel/Constant2', ...
                'Sine', 'String', 'testmodel/Switch1'}, ... 
  'PortIndex', {1, 1, -1, -1, 1}, ...
  'Decimation', {1, 2, 5, 1, 1}, ...
  'ArrayIndex', {[], [], 2, [2 2], 3}, ...
  'BusElement', {'', 'b', '', 'z', 'a'}, ...
  'Callback', {[], cb, [], [], []});

Example: struct

Data Types: struct

This property applies to the slrealtime.ui.control.ParameterTable control. The Parameters property value is a struct that contains fields BlockPath and ParameterName. The BlockPath field provides the full block path for each parameter in the table. The ParameterName field provides the parameter name for each parameter in the table. When using workspace variables in the Parameters property, the BlockPath is empty for the workspace variable, and the ParameterName value is the name of the workspace variable.

hPTable.Parameters = struct( ... 
  'BlockPath', {'testmodel/Constant1', '', ...
         'testmodel/Constant5', '', ... 
         'testmodel/str1', 'testmodel/str2', ...
         'testmodel/multi-line block name', ... 
         'testmodel/Constant6'}, ... 
  'ParameterName', {'Value', 'model_wksp_var', ...
           'Value', 'base_wksp_var', 'String', ... 
           'String', 'Value', 'Value'}); 

Example: struct

Data Types: struct

Parameter Tuner Component

expand all

This property applies to the slrealtime.ui.tool.ParameterTuner component. The property identifies the underlying App Designer component connected to the parameter tuner.

Example: hKnob

Data Types: graphic object

This property applies to the slrealtime.ui.tool.ParameterTuner component. The property identifies a parameter that is specified by block path and parameter name.

Example: 'testmodel/Constant6'

Data Types: string

This property applies to the slrealtime.ui.tool.ParameterTuner component. The property identifies a parameter that is specified by block path and parameter name.

Example: 'Value'

Data Types: string

This property applies to the slrealtime.ui.tool.ParameterTuner component. Use this property to convert a parameter value to a value used by the component Value property.

The ConvertToComponent property must be a function handle that accepts one argument and returns one value. When a value changes on the target computer, the real-time application uploads the new value to the app to keep the components in sync with the real-time application. The ConvertToComponent property manipulates the value from the target computer into a value that is suitable for writing to the Value property of the component.

For example, you can convert a fixed-point value to a double. For a code example, see Apply ConvertToTarget and ConvertToComponent Properties.

Example: @app.convToDouble

Data Types: object handle

This property applies to the slrealtime.ui.tool.ParameterTuner component. Use this property to convert a component value to a value used by the real-time application on the target computer.

The ConvertToTarget property must be a function handle that accepts one argument and returns one value. When the uicontrol changes the value, the app downloads the value to the corresponding parameter. If the ConvertToTarget property is non-empty, the app executes the function handle, passes in the new value, and uses the return value to download to the parameter. This operation provides an opportunity to apply value manipulation before downloading.

For example, you can convert discrete knob states to integer values. For a code example, see Apply ConvertToTarget and ConvertToComponent Properties.

Example: @app.convertedInt

Data Types: object handle

Reboot Button Component

expand all

This property applies to the slrealtime.ui.control.RebootButton component. The property selects whether to pause operation of the instrument panel while the target computer completes the reboot process.

Example: 0

Data Types: logical

Record Button Component

expand all

This property applies to the slrealtime.ui.control.RecordButton component. The property selects the icon that is displayed on the button.

Example: 'slrtStartRecordIcon.png'

Data Types: string

This property applies to the slrealtime.ui.control.RecordButton component. The property selects the text that is displayed on the button.

Example: 'Start Recording'

Data Types: string

This property applies to the slrealtime.ui.control.RecordButton component. The property selects the icon that is displayed on the button.

Example: 'slrtStopRecordIcon.png'

Data Types: string

This property applies to the slrealtime.ui.control.RecordButton component. The property selects the text that is displayed on the button.

Example: 'Stop Recording'

Data Types: string

Start-Stop Button Component

expand all

This property applies to the slrealtime.ui.control.StartStopButton component. The property selects whether the button stop action imports the file log from the real-time application.

Example: 1

Data Types: logical

This property applies to the slrealtime.ui.control.StartStopButton component. The property selects whether the button stop action exports the file log data to the model base workspace from the real-time application.

Example: 1

Data Types: logical

This property applies to the slrealtime.ui.control.StartStopButton component. The property selects whether the button stop action reloads the real-time application.

Example: 1

Data Types: logical

This property applies to the slrealtime.ui.control.StartStopButton component. The property selects the icon that is displayed on the button.

Example: 'slrtRunIcon.png'

Data Types: string

This property applies to the slrealtime.ui.control.StartStopButton component. The property selects the text that is displayed on the button.

Example: 'Start'

Data Types: string

This property applies to the slrealtime.ui.control.StartStopButton component. The property selects the icon that is displayed on the button.

Example: 'slrtStopIcon.png'

Data Types: string

This property applies to the slrealtime.ui.control.StartStopButton component. The property selects the text that is displayed on the button.

Example: 'Stop'

Data Types: string

System Log Component

expand all

This property applies to the slrealtime.ui.control.SystemLog component. The property selects whether the log entries include timestamps.

Example: false

Data Types: logical

Target Computer Selection

expand all

When you select a target computer from the target computer selector component, the component updates its TargetName property and synchronizes the TargetSource property of all instrument panel controls to the current state of the selection. See the TargetSource property.

Example: myTarget = h.TargetName

Data Types: string

When you select a target computer from the target computer selector component, all instrument panel controls synchronize and update to the current state of the selection. All Simulink® Real-Time™ components (other than the TargetSelector component) have a TargetSource property that has one of these values:

  • empty (default)

    Empty is the default and tells the component to use the default SLRT target computer.

  • string

    String is the name of an SLRT target computer.

  • slrealtime.ui.control.TargetSelector

    slrealtime.ui.control.TargetSelector enables a component to query the currently selected target and to be notified when the selection changes.

Example: h.TargetName = 'TargetPC1'

Data Types: string | slrealtime.ui.control.TargetSelector

Update Button Component

expand all

This property applies to the slrealtime.ui.control.UpdateButton component. The property selects the icon that is displayed on the button.

Example: 'slrtUpdateIcon.png'

Data Types: string

This property applies to the slrealtime.ui.control.UpdateButton component. The property selects the text that is displayed on the button.

Example: 'Update Software'

Data Types: string

Version History

Introduced in R2021b

expand all