| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
time_T ssSetOffsetTime(SimStruct *S, int_T st_index, time_T offset)
SimStruct representing an S-Function block.
Index of the sample time whose offset is to be set.
Offset of the sample time specified by st_index.
The time_T offset value specified by offset.
Use this macro in mdlInitializeSizes or mdlInitializeSampleTimes to specify the offset of the sample time where st_index starts at 0. You must first invoke the macro ssSetSampleTime to set the sample time before assigning an offset. Otherwise, a continuous sample time is assumed and the offset is ignored.
C, C++
See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/mixedmex.c used in sfcndemo_mixedmex.mdl.
ssGetOffsetTime, ssSetSampleTime, ssSetInputPortOffsetTime, ssSetOutputPortOffsetTime
![]() | ssSetNumSFcnParams | ssSetOneBasedIndexInputPort | ![]() |

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 |