Hi Suraj,
As per my understanding, you are getting an error when using the Integrator block inside a Triggered Subsystem. According to the error message, the sample time of the integrator block is “0”, but it should be inherited when it is in a triggered subsystem.
Since there is an error regarding the sample time, it can be inferred that the block is Discrete-Time Integrator block. A sample time of “0” cannot be set for the block because this value specifies a continuous sample time, which the Discrete-Time Integrator block does not support.
To make the sample time inherited, change the sample time of the block to “-1”. To set the sample time of a block interactively:
- In the Simulink model window, double-click the block. The block parameter dialog box opens.
- Enter the sample time in the Sample time field.
- Click OK.
When the sample time is set to be inherited, please verify that the upstream block uses a discrete sample time. For example, the Discrete-Time Integrator block cannot inherit a sample time of “0”.
Please refer to the documentation on “Specify Sample Time” and “Discrete-Time Integrator” for more information:
- www.mathworks.com/help/simulink/ug/how-to-specify-the-sample-time.html
- www.mathworks.com/help/simulink/slref/discretetimeintegrator.html
I Hope this helps.