Re: help me about this very simple stateflow chart



HI Ashish,

i need intermediate values of a counter 'i' in "for" loop to trigger
someother functionality in the other chart. After executing that
functionality it has to come back to original for loop without
triggering the entire chart once agian and increment the counter 'i'
and then with this counter 'i', i need call again same functionality
once again. How i can get the intermediate values of counter 'i' for
one time trigger of chart?

Thanks and Regards,
Satyanarayana M

Praetorian wrote:



cdrsir wrote:
I just have tried the example from the matlab help file that
using the
stateflow to do a For Loop. but why is my results/output[speed]
become
immediately 100?

screen shot of the statflow chart[8K]
<http://cdrsir.googlepages.com/stateFlowForLoopTry.PNG>

results/output [speed] [11K]
<http://cdrsir.googlepages.com/stateFlowresultSpeed.PNG>

the simulink model (matlab/simulink needed) [27K]
<http://cdrsir.googlepages.com/stateFlowForLoopTry.mdl>


thanks

You've created a loop which is entered only if i < 100 and once
it
is
entered, cannot be exited until i > 100; so the first time that
your
chart is triggered i is incremented until it reaches 100, the
entire
incrementing operation happens within a single time step which is
why
you only see the final value instead of intermediate values. If you
want to see a ramp/stair step waveform remove the self loop and
increment i once every time the chart is triggered.

HTH,
Ashish.


.



Relevant Pages

  • Re: help me about this very simple stateflow chart
    ... If you want some other chart/simulink block to trigger within the same time ... In your case this means that your second chart will be function call ... i need intermediate values of a counter 'i' in "for" loop to trigger ... increment i once every time the chart is triggered. ...
    (comp.soft-sys.matlab)
  • Re: Implementing
    ... into equivalent stateflow diagram. ... I have a stateflow chart that is ... in this chart i need to implement a "for" loop ... that should output a function call trigger 'n' number of times. ...
    (comp.soft-sys.matlab)
  • Re: help me about this very simple stateflow chart
    ... i need intermediate values of a counter 'i' in "for" loop to trigger ... someother functionality in the other chart. ... executing this second chart you want it to return control to the first ...
    (comp.soft-sys.matlab)
  • Re: Bug with Chart.Name?
    ... loop should "normally" return same as a For Each shape. ... PS * eg, rename a chartobject, copy it, group the pair, loop For Each ... Dim shp As Shape, chtObj As ChartObject, cht As Chart ... processed as you can see in the debug output, ...
    (microsoft.public.excel.charting)
  • Re: Bug with Chart.Name?
    ... .Chartobjects.Count loop ... Dim shp As Shape, chtObj As ChartObject, cht As Chart ... processed as you can see in the debug output, ...
    (microsoft.public.excel.charting)

Loading