SetAllowConstantSampleTime - Specify sample time behavior and tunability for S-function
blocks with port-based sample times - MATLAB (original) (raw)
Main Content
Specify sample time behavior and tunability for S-function blocks with port-based sample times
Syntax
SetAllowConstantSampleTime(s,flag)
Arguments
s
Instance of Simulink.MSFcnRunTimeBlock class representing the Level-2 MATLAB S-Function block.
flag
Logical value to allow a sample time of Inf
for ports in the S-function. The default is False
.
Description
Use this macro to specify sample time behavior for your S-function with port-based sample times. If you set flag
to False
, the Simulink engine does not allow a sample time of Inf
for this S-function. If you set flag
to True
, the S-function block is tunable and its ports can have a sample time of Inf
. To set the sample time for ports in the S-function, use SetInputPortSampleTime and SetOutputPortSampleTime. These ports execute every time you tune any parameter in your model during simulation.