MATLAB: How to delay a Function-Call signal in Simulink 7.0 (R2007b)

simulink

I would like to delay my Function-Call signal to ensure that my function call subsystem is run one step later than the trigger.

Best Answer

The unit delay block does not support-function call signals in Simulink 7.6 (R2010b). There are several possible workarounds, including using Stateflow charts and/or triggered subsystems. The attached model is one example.
The Function-Call Delay block, within the example model, is itself a Function-Call subsystem that uses its function trigger to activate an Enabled subsystem. The internal function trigger signal is a numerical signal rather than a function-call and therefore can be delayed. Additionally, the Enabled subsystem contains a Function-Call generator block to propagate your original function call at a later time.
The original function call is triggered at 4 seconds, but the unit delay block causes the Delayed Subsystem block to be called at 4.01 seconds.