10-16-2014 08:44 AM
I'm having a weird output from statechart calls inside a parallel loop. I'm taking the instance name and comparing to the input passed to statechart.
The output matches with the loop Id but doesn't match with the input and the iteration index.
The Calling VI is reentrant so I didn't expect this behaviour.
I used a synchronization scheme to avoid a dead lock in the parallel loop. This statechart has just one state to pass the name to the output.
10-16-2014 09:05 AM
How does the second part of the code ever run. You have an infinite while loop to start your code with the False constant wired to the stop terminal.
10-16-2014 09:36 AM
It runs because they are parallel.
But I could handle the issue with the output. I was using the entry action section to set the output of the statechart instead of use a static section.
Now I'm having another problem and this time I'm really worry about it. The same behaviour is happening now in the active state output, and it is handled directly by Labview.
I did a small chance to get the active state. The statechart now has five states (1,2,3,4,5). One state is activate for each chart name. But the state output is coupled with the loop Id.
10-16-2014 09:42 AM
I'm sorry. You're correct.
The way it was drawn side by side, and it was looking like the wire was coming out of a loop to go to the second.
Now paying closer attention, I see the source of those wires are outside of both loops.
10-16-2014 10:08 AM
I'm thinking the Calling VI reentrancy is binded with the thread Id not to the Instance Name of the statechart. I won't get this working.
But I still need to run several statechart instances at the same time. Does anyone have any idea how to do this?