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.

ssIsSampleHit

Determine whether the sample time is hit

Syntax

boolean_T ssIsSampleHit(SimStruct *S, int_T st_index, int_T tid)

Arguments

S

SimStruct representing an S-Function block.

st_index

Index of the sample time.

tid

Task ID.

Returns

The Boolean value true when the simulation is executing in the task represented by task ID tid. Otherwise, returns false.

Description

Use in mdlOutputs or mdlUpdate when your S-function has multiple sample times to determine the task your S-function is executing in. You should not use this in single-rate S-functions or for an st_index corresponding to a continuous task.

Languages

C, C++

Example

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

Introduced before R2006a

Was this topic helpful?