Create target computer selector component for instrument panel UI
creates a target computer selector component for an instrument panel
hTargetSelector = slrealtime.ui.control.TargetSelector(
uifigure figure. Simulink®
Real-Time™ refers to target computers by mapping unique names to IP addresses. Multiple
mappings are allowed.
You can access each target computer by using its name. One mapping is the default and is used when no target computer name is supplied. The target selector component displays the list of all named target computers currently defined on the development computer.
The target computer selector list entry
Simulink Normal Mode
is not a customer-defined target. This selection appears at the end of the list to support
Simulink normal mode simulation of a model. When you select
Mode in the target selector, the load application button changes to a load
model button. Use this button to select the model to interface with the control panel
The drop-down list is editable. You can enter a valid IP address and create a temporary target computer mapping that is removed when the target computer selector component is destroyed.
It is possible to have different components in the same instrument panel synchronize
with different target computers. By selecting a target computer for a component by using the
TargetSelector, instrument panel components with their
TargetSource property set to the
synchronize and are updated to the current state of the target computer selected by the
TargetSelector. For more information, see the
TargetSource property description in slrealtime.ui Properties.
Create Target Computer Selector
Create a target selector component and adjust the position of the component.
% Create figure hFig = uifigure(); % Create target selector component hTgSelect = slrealtime.ui.control.TargetSelector(hFig); % Change position of the component hTgSelect.Position = [100 100 200 30];
hTargetSelector — Handle to target selector component
hTargetSelector argument is the handle to the target selector
component that you create.
Version HistoryIntroduced in R2021b
R2022b: MATLAB Compiler Compatibility
For compatibility with the MATLAB Compiler, if no target computer is set in the
instrument panel app, the initial value for the
TargetSelector control is
R2022a: Simulink Normal Mode Option
TargetSelector control for instrument panel apps provides a
Simulink Normal Mode selection. This selection lets you interface the
instrument panel with a normal mode simulation of a model.
UpdateButton | slrealtime.ui Properties