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.


Determine whether a sample time and offset value pair indicate a triggered or asynchronous sample time


boolean_T ssSampleAndOffsetAreTriggeredOrAsync(real_T st, real_T ot)



The sample time.


The offset time


The Boolean value true if st is equal to INHERITED_SAMPLE_TIME (-1) and ot is either INHERITED_SAMPLE_TIME (-1) or any other negative integer.


The Simulink® engine sets the sample time and offset pairs of a block or its ports (for port-based sample times) to INHERITED_SAMPLE_TIME if the block resides in a triggered subsystem. The Simulink engine sets the offset time to an integer value less than -1 when the block resides in an asynchronous function-call subsystem. By invoking this macro on its sample time/offset pairs, an S-function can determine whether it resides in a triggered subsystem or an asynchronous function-call subsystem.


C, C++

Introduced in R2007a

Was this topic helpful?