Skip to Main Content Skip to Search
Product Documentation

Triggered Signal From Workspace - Import signal samples from MATLAB workspace when triggered

Library

Signal Operations

dspsigops

Description

The Triggered Signal From Workspace block imports signal samples from the MATLAB workspace into the Simulink model when triggered by the control signal at the input port ( ). The Signal parameter specifies the name of a MATLAB workspace variable containing the signal to import, or any valid MATLAB expression defining a matrix or 3-D array.

When the Signal parameter specifies an M-by-N matrix (M≠1), each of the N columns is treated as a distinct channel. You specify the frame size in the Samples per frame parameter, Mo, and the output when triggered is an Mo-by-N matrix containing Mo consecutive samples from each signal channel. For Mo=1, the output is sample based; otherwise the output is frame based. For convenience, an imported row vector (M=1) is treated as a single channel, so the output dimension is Mo-by-1.

When the Signal parameter specifies an M-by-N-by-P array, the block generates a single page of the array (an M-by-N matrix) at each trigger time. The Samples per frame parameter must be set to 1, and the output is always sample based.

Trigger Event

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

Initial and Final Conditions

The Initial output parameter specifies the output of the block from the start of the simulation until the first trigger event arrives. Between trigger events, the block holds the output value constant at its most recent value (that is, no linear interpolation takes place). For single-channel signals, the Initial output parameter value can be a vector of length Mo or a scalar to repeat across the Mo elements of the initial output frames. For matrix outputs (Mo-by-N or M-by-N), the Initial output parameter value can be a matrix of the same size or a scalar to be repeated across all elements of the initial output.

When the block has output all of the available signal samples, it can start again at the beginning of the signal, or simply repeat the final value or generate zeros until the end of the simulation. (The block does not extrapolate the imported signal beyond the last sample.) The Form output after final data value by parameter controls this behavior:

Dialog Box

Signal

The name of the MATLAB workspace variable from which to import the signal, or a valid MATLAB expression specifying the signal.

Trigger type

The type of event that triggers the block's execution.

Initial output

The value to output until the first trigger event is received.

Samples per frame

The number of samples, Mo, to buffer into each output frame. This value must be 1 when you specify a 3-D array in the Signal parameter.

Form output after final data value by

Specifies the output after all of the specified signal samples have been generated. The block can output zeros for the duration of the simulation (Setting to zero), repeat the final data sample (Holding Final Value) or repeat the entire signal from the beginning (Cyclic Repetition).

Supported Data Types

See Also

Signal From WorkspaceDSP System Toolbox
Signal To WorkspaceDSP System Toolbox
Triggered To WorkspaceDSP System Toolbox

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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