Main Content


Create instrument manager component for App Designer components in instrument panel UI



hInstManager = slrealtime.ui.tool.InstrumentManager(hFigure) creates an instrument manager component that managers instruments for App Designer components, which you add to an instrument panel uifigure figure.

The instrument manager component manages a collection of Instrument objects that are used by the instrument panel and provides the features of Simulink Real-Time app components. When an instrument panel switches target computers, the managed instruments are removed from the previous target computer and added to the new target computer.

For information about instrument manager properties, see slrealtime.ui Properties.


collapse all

Create an instrument manager component and add instruments to it for App Designer components.

% Create figure 
hFig = uifigure(); 
hAxes = uiaxes(hFig); 
hGauge = uigauge(hFig); 
% Create some slrealtime.Instruments 
hInstAxes = slrealtime.Instrument(); 
hInstAxes.connectLine(hAxes, 'SineWave'); 
hInstGauge = slrealtime.Instrument(); 
hInstGauge.connectScalar(hGauge, 'BlockPath', 1); 
% Create InstrumentManager object and add instruments 
hInst = slrealtime.ui.tool.InstrumentManager(hFig); 
hInst.Instruments = [hInstAxes hInstGauge];

Input Arguments

collapse all

The hFigure argument identifies the uifigure to which you are adding the UI component.

Example: hFig = uifigure()

Data Types: function_handle

Output Arguments

collapse all

The hInstManager argument is the handle to the instrument manager component that manages instruments for the App Designer components.

Introduced in R2021b