Documentation

Instrumentation for Real-Time Applications

To visualize the behavior of a real-time application running on a target computer, Simulink® Real-Time™ Explorer provides instrument panels. An instrument panel is an Explorer workspace into which you can insert one or more instruments. You can create and load instrument panels from the toolbar, from the File menu, and from the Panels tool window. You can display simultaneously as many panels as can fit on the screen.

After creating one or more instrument panels, you can drag instruments to the panels and drag parameters and signals to the instruments. You can add layout elements to clarify the relationships among the instruments. You can then start your real-time application from Simulink Real-Time Explorer and start the instrument panels to control the parameters and view the signal outputs.

At design time, you can manipulate the instruments by using the toolbar buttons.

ActionIconNotes

New, Open, Save, SaveAll

   

The available operations vary with the active window.

  • You can save an instrument panel from within only the window for that panel.

  • You can create or open a signal or parameter group from within only the Applications window.

  • You can save a group from within only the window for that group.

  • You can create or open an instrument panel regardless of the active window.

  • You can use the SaveAll button regardless of the active window.

Cut, Copy, Paste, Delete

   

Applies to instruments only.

Layer

 

Applies to instruments only.

Align on edges

   

Applies to instruments only.

Align on centers

 

Applies to instruments only.

Equalize sizes

  

Applies to instruments only.

Undo, Redo

 

Available after unsaved change only.

Run, Stop, Run all, Stop all

   

Run and stop all active instrument panels.

Instrument Selection and Binding

To instrument a real-time application, populate an instrument panel with instruments compatible with the parameters and signals that they represent.

To make an instrument interact with the real-time application, bind a signal or parameter to the instrument. You bind the signal or parameter by dragging it from the signal or parameter viewer and dropping it on the instrument. You can also drag a signal or parameter from a signal or parameter group to an instrument.

You can bind a signal to a display instrument but not to a tuning instrument. You can bind a parameter to a tuning instrument and to a display instrument.

When you bind a signal to a display instrument, the Signal button  appears next to the instrument.

When you bind a parameter to a tuning or display instrument, the Parameter button  appears next to the instrument.

When the instrument panel is running, you can tune parameters by using tuning instruments. The software transmits the parameter changes to the real-time application. You can view the changed behavior by using display instruments.

When the instrument panel is not running, you can add, remove, and lay out instruments and connect signals and parameters to them.

Display Instruments

The table shows some of the tasks that you can do with display instruments.

ActionRequiringUse
  • Show the pressure in a container.

  • Show the speed of a vehicle.

  • Show current or voltage in a circuit.

  • Real-valued data

  • Show approximate value by angular displacement

GaugeAngular Properties

  • Show the level of fluid in a container.

  • Show the pressure in a pipe.

  • Real-valued data

  • Show approximate value by vertical displacement

GaugeFluidLevel Properties

  • Show the pressure in a container.

  • Show audio output power.

  • Show current or voltage in a circuit.

  • Real-valued data

  • Show approximate value by linear displacement

GaugeLinear Properties

  • Show traffic on a digital bus.

  • Show the state of a state machine.

  • Hexadecimal-valued data

  • Show values in hexadecimal format

HexadecimalDisplay Properties

  • Show on-off state of a switch.

  • Show on-off state of a bidirectional pin.

  • Boolean data

  • Show value by light turning on and off

LED Properties

  • Show a temperature measurement to given precision.

  • Show a voltage measurement to given precision.

  • Show a date and time.

  • Real-valued data

  • Show real values in decimal or other format

NumericDisplay Properties

  • Show a time-varying temperature measurement.

  • Show a time-varying voltage measurement.

  • Real-valued data

  • Show time-varying waveforms

Scope Properties

Tuning Instruments

The table shows some of the tasks you can do with tuning instruments.

ActionRequiringUse
  • Control gain of a radio receiver.

  • Control amplification of a radio transmitter.

  • Real-valued data

  • Set approximate value by angular displacement

Knob Properties

  • Enter initial set point control value for thermostat.

  • Enter seed value for random number generator.

  • Real-valued data

  • Set exact numeric value

NumericEntry Properties

  • Control car radio audio volume using step-increment.

  • Smoke test controller range in small number of clicks.

  • Real-valued data

  • Set initial value and step increment

NumericUpDownEntry Properties

  • Control frequency of a radio receiver.

  • Control pressure valve setting.

  • Real-valued data

  • Set approximate values by linear displacement

Slider Properties

  • Turn on a power supply.

  • Close a gate valve.

  • Boolean data

  • Turn control on or off

SwitchLED Properties

SwitchLever Properties

SwitchRocker Properties

SwitchToggle Properties

Layout Elements

To make the relationships among the instruments clearer, you can add layout elements, such as a picture box. In the figure, a picture box shows to which signals the instruments are bound.

The table shows some ways that you can modify your layout with layout elements.

ActionRequiringUse
  • Group electrical instruments together and label the group.

  • Group pressure instruments together and label the group.

  • Design-time box resizing

  • Run-time static display

GroupBox Properties

  • Label an electrical instrument.

  • Label a pressure instrument.

  • Design-time box resizing, left-right and up-down text alignment

  • Run-time static display

Label Properties

  • Group the electrical group with the pressure group and scroll between the groups.

  • Group a picture box with a group of instruments to show what the instruments are measuring.

  • Design-time box resizing

  • Run-time box scrolling

Panel Properties

  • Insert an image of a circuit diagram on a panel behind electrical instruments.

  • Insert an image of a circulation diagram on a panel behind pressure instruments.

  • Design-time image stretch, zoom, center, and autosize

  • Run-time static display

PictureBox Properties

Graphical Properties

You can configure the graphical properties of the instruments. The figure shows an instrument in its default configuration and with representative property changes.

To access a dialog box containing key instrument properties, select the instrument and in the top, right corner of the instrument, click the Tasks button .

To access the complete Properties list for an instrument, in the instrument panel, select the instrument. To access a dialog box for a particular property group, click the group. To the right of the group, click the continuation button .

Instrument Properties

The table shows some of the ways that you can modify the appearance of your instruments through the Instrument properties.

ActionUse

Set instrument value range

ScaleRange

  • Min, Span — Value bounds. Max is read-only.

  • Reverse — If True, reverse direction of display

  • ScaleType — One of Linear, Log10, SplitLinearLog10.

  • SplitStart, SplitPercent — Value and percentage of scale split for ScaleType SplitLinearLog10 only.

  • AngleMin, AngleSpan — Angular value bounds. AngleMax is read-only. For GaugeAngular and Knob only.

Set value display properties

ScaleDisplay > GeneratorStyle > Auto

In ScaleDisplay > GeneratorAuto:

  • MidIncluded — If True, insert a tick halfway between major ticks.

    If MinorCount is even, space the minor ticks equally around the center tick. If MinorCount is odd, replace the center tick with the middle tick.

  • FixedMinMaxMajor — If True, the top and bottom ticks are constrained to be major ticks with min/max values defined by Min and Span.

  • MinorCount — Number of minor ticks between major ticks.

  • MinTextSpacing — Minimum space between scale ticks.

  • DesiredIncrement — Display of major tick values. number of labels = span/(desired increment + 1). Does nothing if the required labels do not fit in the space available in the graphic.

You can also set properties for ScaleDisplay > GeneratorStyle > Fixed and ScaleDisplay > GeneratorStyle > Custom.

ScaleDisplay > TextFormatting

  • Style — One of Number, Thousands, Prefix, Exponent, Price32nds, DateTime, DateTimeUTC.

  • PrecisionStyle — One of FixedDecimalPoints, SignificantDigits, None.

  • Precision — Number of digits to the right of the decimal point.

  • UnitsText — Text to display next to tick labels.

Set pointer properties

Pointer

  • Style — The pointer style depends upon the instrument.

    • GaugeAngular — One of Arrow, ArrowLine, Line, Triangle.

    • GaugeLinear — One of Pointer, Triangle, TLine, ColorBar, Tube.

    • Knob — One of Dot, DotRaised, DotSunken, LineCenter, LineCustom, Triangle.

    • Slider — One of Bar, BarIndicator, BarIndicatorLight, Pointer

  • Size — The width of the pointer, in pixels.

  • Margin — The margin around the pointer, in pixels.

Set border properties

Border

  • Style — One of Bump, Etched, Flat, Raised, RaisedInner, RaisedOuter, Sunken, SunkenInner, SunkenOuter, RoundedSides.

  • Margin — Border margin, in pixels

  • ThicknessDesired — Specified thickness, in pixels

Set font properties

ScaleDisplay > TickMajor > Font

ScaleDisplay > TickMid > Font

  • Name — Font for text display.

  • Font style — One of Light, Semilight, Regular, Italic, Semibold, Bold, Bold Italic, Light Oblique, Semibold Oblique.

  • Size — Font size, in points

  • Strikeout — If True, add strikeout effect.

  • Underline — If True, add underline effect.

Set color properties

ColorSections

By default, the list of color sections is empty. To add color sections, open the Color Section Collection Editor dialog box and click Add.

  • Color — Open the Color dialog box, which contains the color palettes Custom, Web, and System.

  • Start — Start of color section, in range units.

  • Stop — End of color section, in range units.

Color properties are associated with the following instrument properties: Border, Pointer, ScaleDisplay > TickMajor, ScaleDisplay > TickMid, ScaleDisplay > TickMinor.

Appearance Properties

The table shows some of the ways that you can modify the appearance of your instruments through the Appearance properties.

ActionUse

Set font properties

  • Name — Font for text display.

  • Font style — One of Light, Semilight, Regular, Italic, Semibold, Bold, Bold Italic, Light Oblique, Semibold Oblique.

  • Size — Font size, in points

  • Strikeout — If True, add strikeout effect.

  • Underline — If True, add underline effect.

Set color properties

BackColor, ForeColor — Open the color palettes Custom, Web, and System.

Set image properties

  • BackgroundImage — Navigate to a background image file.

  • BackgroundImageLayout — One of Tile, None, Center, Stretch, Zoom.

See Also

| | | | | | | | | | | | | | | | | |

Related Examples

More About

Was this topic helpful?