MATLAB: Is the pulse generated by the Pulse Generator block delayed when placed in an Enabled Subsystem using Simulink 7.6 (R2010b)

simulink

I have placed a Pulse Generator block within an enabled subsystem (phase = 0). I expect the output of this subsystem to go high as soon as the subsystem is enabled. However, this is not always the case.

Best Answer

If the Pulse Generator block is not reset when the enabled subsystem is enabled, then there may be a delay in the output. To work around this issue, see the attached model that uses a Discrete-Time Integrator block to obtain the expected signal.
For more information consult the documentation by executing the following at the MATLAB prompt:
doc 'discrete-time integrator'