DSP Blockset
  Go to block:
    Search    Help Desk 
Triggered Signal From Workspace    See Also

Acquire and output a workspace signal when triggered.

Library

DSP Sources

Description

The Triggered Signal From Workspace block references a specified vector or matrix in the MATLAB workspace to generate scalar, vector, or matrix output. Each element of a workspace vector, and each row of a workspace matrix is considered to be individual sample. (Matrix columns represent independent channels.)

The block acquires and outputs a frame of M new samples from the specified workspace variable each time it is triggered by the control signal at the input port. The output frame size, M, is specified in the block dialog by the Samples per frame parameter. When the Samples per frame parameter is set to 1, the block acquires and outputs a single sample (a vector element or matrix row) each time it is triggered.


For a W-by-N workspace matrix, the output size is M-by-N, with each column representing a distinct signal channel. For example, if the Signal parameter references a W-by-4 workspace matrix and the Samples per frame parameter is set to 6, the block generates a sequence of 6-by-4 matrices, as illustrated below. Each matrix contains six consecutive samples from four distinct channels

.

Note, however, that a 1-by-N matrix (row vector) is treated as a N-by-1 matrix (column vector), and acquired element-wise rather than row-wise.

Trigger Event

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

Initial and Final Conditions

The Initial output parameter specifies the output of the block from the start of the simulation until the first trigger arrives. Subsequently, the block holds the output value constant (at its last value) between trigger events. For vector signals, the Initial output parameter value can be a vector of length M or a scalar to copy across the M elements of the initial frame. For matrix signals, the Initial output parameter value can be a vector of length N to copy across the M rows of the initial output, or a scalar to copy across the M*N elements of the initial output.

When the block has output all of the signal samples, it can start again with the beginning of the signal or simply output zeros (or zero-vectors or zero-matrices, as appropriate) until the end of the simulation.

Dialog Box

Signal
The name of the workspace vector or matrix from which to acquire data, or a valid MATLAB expression.
Trigger type
The type of event that triggers the block's execution. This parameter is not tunable in Simulink's external mode.
Output signal repeatedly
Specifies continuous (repeating) operation or one-time operation.
Initial output
The value to output until the first trigger event is received. This parameter is not tunable in Simulink's external mode.
Samples per frame
The number of input samples (vector elements or matrix rows) to acquire into each output frame, M.

See Also

From Wave Device
From Wave File
Matrix From Workspace
Sine Wave
Signal From Workspace
Triggered Signal To Workspace


[ Previous | Help Desk | Next ]