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에 대해 자세히 알아보기

제품

질문:

2013년 6월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by