Documentation

Lamp

Display color reflecting input value

  • Library:
  • Simulink / Dashboard

Description

The Lamp block displays a color indicating the value of the input signal. You can use the Lamp block with other Dashboard blocks to build an interactive dashboard of controls and indicators for your model. You can specify pairs of input values and colors to provide the information you want during simulation.

Connection

Dashboard blocks do not use ports to connect to signals. To connect a signal to a Dashboard block, use the Connection table in the block's parameters.

  1. Double-click the block.

  2. Populate the Connection table by selecting signals of interest in your model.

  3. Mark the option button next to the signal you want to display.

  4. Click Apply.

Limitations

  • You cannot save the block connections or properties in model files that use the MDL format.

    To save connections and properties, save the model file in the SLX format.

  • Dashboard blocks can only connect to real scalar signals.

  • Dashboard blocks cannot connect to blocks that are commented out.

  • Dashboard blocks cannot connect to signals inside reference models.

  • If you turn off logging for a signal connected to a Dashboard block, the model stops sending data from that signal to the block. To view the signal again, reconnect the signal.

  • External mode simulation does not support visualization Dashboard blocks.

Parameters

expand all

Signal connection options. Populate the Connection table by selecting signals of interest in your model. Mark the check box next to the signal you want to display. Click Apply to connect the signal.

States

Input value that causes the specified color indication. The [undefined] state specifies the Lamp block's behavior when the input value is anything other than values specified in the States table. Click the + button to add another state.

Color indicating the input value specified in the corresponding State. You can select from a palette of standard colors or specify a custom color with RGB values. The Lamp block displays the color specified for the [undefined] state when the input's value does not correspond to a value in the States table. Click the + button to add another state.

Position of the block label. When the block is connected to a signal, the label is the name of the connected signal. When the block is not connected, the label is the instructional text.

Introduced in R2015a

Was this topic helpful?