Writing S-Functions Previous page   Next Page
ssIsSpecialSampleHit

Determine whether sample is hit

Syntax

Arguments

S
   SimStruct representing an S-Function block.

sti1
   Index of the sample time.

sti2
   Index of the sample time.

tid
   Task ID.

Description

Returns true if a sample hit has occurred at sti1 and a sample hit has also occurred at sti2 in the same time step. You can use this macro in mdlUpdate and mdlOutputs to ensure the validity of data shared by multiple tasks running at different rates. For more information, see Synchronizing Multirate S-Function Blocks.

Languages

C

See Also

ssIsSampleHit


Previous page  ssIsSampleHit ssIsVariableStepSolver Next page

© 1994-2005 The MathWorks, Inc.