Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ssSetOffsetTime

Set the offset time of a block

Syntax

time_T ssSetOffsetTime(SimStruct *S, int_T st_index, time_T offset)

Arguments

S

SimStruct representing an S-Function block.

st_index

Index of the sample time whose offset is to be set.

offset

Offset of the sample time specified by st_index.

Returns

The time_T offset value specified by offset.

Description

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.

Languages

C, C++

Example

See the S-function mixedmex.c used in sfcndemo_mixedmex.

Introduced before R2006a

Was this topic helpful?