Documentation Center

  • Trial Software
  • Product Updates

Contents

SetInputPortSamplingMode

Specify whether an input port accepts frame data

Required

No

Language

MATLAB

Syntax

SetInputPortSamplingMode(s, port, mode)

Arguments

s

Instance of Simulink.MSFcnRunTimeBlock class representing the Level-2 MATLAB S-Function block.

port

Integer value specifying the index of port whose sampling mode is to be set.

mode

Integer value specifying the sampling mode of the port (0 = sample, 1 = frame).

Description

This method is called with the candidate frame setting for an input port.

For Level-2 MATLAB S-functions, if the value of mode is acceptable, this method sets the sampling mode using the line

s.InputPort(port).SamplingMode = mode;

The Simulink® engine calls this method until all input ports with inherited frame settings have their frame settings specified.

The use of frame-based signals (mode has a value of 1 or frameData has a value of FRAME_YES) requires a DSP System Toolbox™ license.

Was this topic helpful?