While Iterator Behaviour in Simulink (ignoring "cond" input?)
显示 更早的评论
Good morning everybody. I am fairly new to Simulink and I seem to have a problem with the while Iterator Subsystem. I would like Simulink to do the following:
- Initially run subsystem1 which gives output Y
- if Y is "OK", leave it like that;
- if Y is "not OK", enter a while loop and execute subsytem2 (differs from subsys1 by some constants) till the output is "OK" again.
I tried to do this with the While Iterator subsystem, using the IC port to check Y (the first of my ifs) and using the port "cond" inside the while subsystem as the condition to keep running the while.
It seems that whatever I give as an input to the cond port, it is completely ignored. Even if the input is a constant value 0 or FALSE... the while iterator keeps running. I checked the MATLAB documentation and the only example available makes use of the Iteration Number output (I don't need that).
As I said I am quite new to Simulink. Is there something that I'm doing wrong?
Thank you in advance for your help.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 General Applications 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!