Skip to Main Content Skip to Search
Product Documentation

LED - Panel LEDs

Description

Some units have two LEDs that you can control. These LEDs are labeled USER 1 and USER 2.

From the library, drag an LED block into your Simulink model. You can have only one block of this type in any model.

Library

xPC Target Library for LED

Block Parameters

LED vector

Enter either 1 and 2. This driver allows the selection of individual LEDs in any order. The number of elements defines the number of LEDs used. For example, to control the USER 1 and USER 2 LEDs, enter

[1 2]
Reset vector

Enter 0 or 1 for each LED. This parameter controls the behavior at model termination. A value of 1 causes the corresponding LED to be reset to the value specified in Initial value vector. A value of 0 causes the corresponding LED to be left at the most recent value set while the model was running. The Reset vector should either be a scalar value or the same length as the LED vector. For scalar values, the block performs a scalar expansion and assumes the same value for each element in the vector.

Initial value vector

Enter 0 or 1 for each LED. This parameter specifies the initial value (0 or 1) to which the LED should be set between the time the model is downloaded and the time it is started. The Initial value vector should be the same length as the LED vector. If the vector does not have the same length, the block performs a scalar expansion and assumes the same value for each element in the vector.

Sample time

Enter a base sample time or a multiple of the base sample time.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS