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.

Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Products

Asked:

on 24 Jun 2013

Community Treasure Hunt

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

Start Hunting!