Sample Time Issue Using Pulse Generator Inside a If Action Subsystem
Show older comments
I have a Simulink model running in discrete time. Inside one portion of a subsystem I have a if action subsystem, inside of this is a pulse generator running a Stateflow chart. I get the following error:
Sample time 0.05 of 'System/SystemPerCar/Determine/Protection/Level Protection/Pulse Generator2' does not match the sample time [0, 1] of the If block 'System/SystemPerCar/Determine Mode/Level Protection/If' controlling its execution.
It's a bit unusual that I had this working previously, until a coworker added some work in another subystem (if-enabled) that uses some of the outputs, and then I started receiving this error. His subsystem is within the same reference model as mine and everything is running at the same Sample Time.
The image below is the two different set of settings I have tried to get this working. I had the TimeBased one previously working, but including the Sample Based to show I had tried.

.
As the issue didn't start until my co-worker added his work I am unsure if fixing it at the generator is even the issue.
Edit: The attached model is a very simple example I created, the actual model is much more complicated, but I cannot upload it since its for work.
Thank you for any help,
Accepted Answer
More Answers (0)
Categories
Find more on Schedule Model Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!