Writing S-Functions Previous page   Next Page
ssGetTaskTime

Get the current time for the current task

Syntax

Arguments

S
   SimStruct representing an S-Function block.

st_index
   Index of the sample time corresponding to the task for which the current time is to be returned.

Description

Returns the current time (time_T) of the task corresponding to the sample rate specified by st_index. You can use this macro in mdlOutputs and mdlUpdate to compute the output of your block.

The ssGetTaskTime macro should be called only inside an ssIsSampleHit check. It will not give the correct results if called with the tid passed into mdlOutputs. The following example illustrates a correct usage of this macro:

Languages

C

See Also

ssGetT


Previous page  ssGetT ssGetTFinal Next page

© 1994-2005 The MathWorks, Inc.