06-20-2014 03:37 PM
I have the following problem:
I want that the structure from the TRUE case of the bigger case structure to start only when I switch from the button and activate the TRUE position. I observed with the probe tool that the structure is still executed in backgroun even if the bigger case is on FALSE. I want to make it start from the first position (the default case) of the inner case structure whenever I will switch from the button. I hope I made myself cleared. Thanks
Solved! Go to Solution.
06-20-2014 04:07 PM - edited 06-20-2014 04:13 PM
Please don't maximize the diagram and front panel to the screen. That is very annoying on large monitors! Thanks.
No you did not make yourself clear.
If the outer case is false, the inner case structure in the true case will not execute. Most likely your troubleshooting techniques are flawed. Explain exactly what you are doing, what you observing, and what you expect to see instead.
Please convince us otherwise!
Is this running on a RT system?
(General notes: You know that you can have multiple conditions per case. All you need is two cases for the inner case structure. If the number of iterations is known before the loop starts, you need a FOR loop, not a while loop, right? Don't use hidden controls (e.g. to define the wait), use diagram constants instead.)
06-20-2014 04:10 PM - edited 06-20-2014 04:11 PM
Hi maryus,
your observation (or better assumption) is wrong.
As long as you set your button to FALSE the inner case structure in the TRUE case is not executed!
But: when you switch to TRUE case you wired the loop iterator to the inner case selector. So the inner case structure is not starting with it's first case but with the case corresponding to loop iteration count!
You can see all this by using execution highlighting!
Btw. when you have several cases in a case structure you can combine them to one case. It's all explained in the context help of the case structure! So you can combine cases (1, 3,4,6) and (2,5,7) into just one case each…
Edit: Damn, Christian was faster (with same conclusions)… 😄
06-20-2014 07:03 PM
You are both right, I would want to make my itieration from the inner TRUE case structure to always begin with the first case whenever I press the button, because I need that order to create a specific graph.
I think you both understood, but I will still attach some photos.
06-20-2014 07:56 PM
The you should keep your own incrementer in a shift register. Initialize it with zero and increment it in the true case of the outer case structure (Wire it across the false case).
06-20-2014 08:08 PM
Here's what I had in mind.
06-20-2014 11:44 PM
Why would switch when pressed be the correct mechanical action?
I am tired and need sleep. go get em! g`night!
06-21-2014 01:54 AM
Thank you very much, you've saved me! Have a beautiful weekend!