DSP Blockset
  Go to block:
    Search    Help Desk 
Triggered Shift Register    See Also

Buffer a sequence of inputs into a frame-based output.

Library

Buffers, in General DSP

Description

The Triggered Shift Register block acquires a collection of Mo input samples into a frame, where Mo is specified by the Register size parameter. The block buffers a single sample from input 1 whenever it is triggered by the control signal at input 2 (). The newly acquired input sample is appended to the output frame (in the same simulation step) so that the new output overlaps the previous output by Mo-1 samples. Between triggering events the block ignores input 1 and holds the output at its last value.

The triggering event at input 2 is specified by the Trigger type pop-up menu, and can be one of the following:

Note that the Triggered Shift Register block has direct feedthrough, so the new input appears at the output in the same simulation time step. The output frame period is the same as the input sample period, Tfo=Tsi.

Scalar Inputs.    Scalar inputs are buffered into a frame vector of length Mo, where Mo is specified by the Register size parameter.

Vector Inputs.    Length-N sample vector inputs are buffered into a Mo-by-N matrix, where Mo is specified by the Register size parameter.

Matrix Inputs.    An M-by-N matrix input is treated as a single vector with M*N elements (channels). In other words, the matrix input u is reshaped to the vector input u(:).

Initial Conditions

The Triggered Shift Register block's buffer is initialized to the value specified by the Initial condition parameter. The block always outputs this buffer at the first simulation step (t=0). If the block's output is a vector, the Initial condition can be a vector of the same size, or a scalar value to be repeated across all elements of the initial output. If the block's output is a matrix, the Initial condition can be a matrix of the same size, a vector (of length equal to the number of matrix rows) to be repeated across all columns of the initial output, or a scalar to be repeated across all elements of the initial output.

Note
If you expect to generate code for the Triggered Shift Register block using the Real-Time Workshop, you should ensure that inputs are contiguous in memory. See the Contiguous Copy block for more information.

Dialog Box

Trigger type
The type of event that triggers the block's execution.
Register size
The length of the output frame (number of rows in output matrix), Mo.
Initial condition
The value of the block's initial output, a scalar, vector, or matrix.

See Also

Buffer
Shift Register
Unbuffer


[ Previous | Help Desk | Next ]