N-Sample Enable - Output ones or zeros for specified number of sample times

Library

Description

The N-Sample Enable block outputs the inactive value (0 or 1, whichever is not selected in the Active level parameter) during the first N sample times, where N is the Trigger count value. Beginning with output sample N+1, the block outputs the active value (1 or 0, whichever you select in the Active level parameter) until a reset event occurs or the simulation terminates.

The output is always sample based.

The Reset input check box enables the Rst input port. At any time during the count, a trigger event at the input port resets the counter to its initial state. The reset sample time must be a positive integer multiple of the input sample time. This block supports triggered subsystems when you select the Reset input check box.

You specify the triggering event in the Trigger type pop-up menu:

Dialog Box

Opening this dialog causes a running simulation to pause. See Changing Source Block Parameters During Simulation in the online Simulink documentation for details.

Trigger count

Specify the number of samples for which the block outputs the active value. Tunable.

Active level

Specify the value to output after the first N sample times, 0 or 1. Tunable.

Reset input

Select to enable the Rst input port. The rate of the reset signal must be a positive integer multiple of the rate of the data signal input.

Trigger type

Select type of event that triggers a reset when the Rst port is enabled.

Sample time

Specify the sample period, Ts, for the block's counter. The block switches from the active value to the inactive value at t=Ts*(N+1).

Output data type

Select the output data type. For information on the Logical and Boolean options of this parameter, see Effects of Enabling and Disabling Boolean Support.

Supported Data Types

See Also

CounterSignal Processing Blockset
N-Sample SwitchSignal Processing Blockset

  


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