Specify the sample time of an output port
real_T ssSetOutputPortSampleTime(SimStruct *S, int_T outputPortIdx, time_T period)
SimStruct that represents an S-Function block.
Index of the output port whose sample time is being set.
Sample time of the output port.
real_T value of the sample time passed into the
ssSetNumOutputPorts) to specify the sample time period as
continuous or as a discrete value for each output port index. Output port index
numbers start at 0 and end at the total number of input ports minus 1. For a
continuous sample time, specify
CONTINUOUS_SAMPLE_TIME. To inherit the sample time, specify
INHERITED_SAMPLE_TIME. You should use this macro only
if you have specified port-based sample times.
If the S-function specifies
INHERITED_SAMPLE_TIME for any of
its ports, the S-function should include an
callback method. The callback
method should set the sample time and offset of ports that inherit their sample time
to the status that the Simulink® engine assigns to them using its sample time propagation rules. The
callback method can also assign the sample times and offsets of other ports on the
block whose sample times are inherited.
Introduced before R2006a