Products & Services Industries Academia Support User Community Company

Learn more about Simulink   

ssGetInputPortSampleTime - Get the sample time of an input port

Syntax

real_T ssGetInputPortSampleTime(SimStruct *S, int_T inputPortIdx)

Arguments

S

SimStruct representing an S-Function block.

inputPortIdx

Index of port whose sample time is required.

Returns

A real_T value indicating the sample time of the input port specified by the index inputPortIdx.

Description

Use in any routine (except mdlInitializeSizes) to determine the sample time of an input port. You should use this macro only if you have specified the sample times as port-based. Use ssGetSampleTime to determine the sample time of S-functions that do not use port-based sample times.

Languages

C, C++

Example

See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_multirate.c used in sfcndemo_sfun_multirate.mdl.

See Also

ssSetInputPortSampleTime, ssGetInputPortOffsetTime

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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