08-10-2017 12:47 AM
Hi,
I need to avoid / find alternate for nested case structure. is there any good solution for the nested case structure inside. I have attached sample nested case structure VI. Can some one help out with better solution.
Solved! Go to Solution.
08-10-2017 01:04 AM - edited 08-10-2017 01:06 AM
Hi details,
I have attached sample nested case structure VI.
Why do you need all those local variables?
Just use wires:
Can some one help out with better solution.
Use values of 0/1 for "DUT Sel" too. (Infact all 3 parameters use just two items: why not use boolean inputs then?)
When using item value ranges starting with zero you could use those input parameters to index an array of "action items" and simply call a state of a state machine using this "action item":
(I would just use a QMH approach with a state machine handling the messages…)
08-10-2017 01:16 AM
Hi Gred,
I have use Ring / Enum instead of Boolean because i may add few more parameter in the drop down in future if required.
secondly, when i tried to index the way you did it happened like this
08-10-2017 01:20 AM - edited 08-10-2017 01:21 AM
Hi Dteails,
when i tried to index the way you did it happened like this
Well, you did not wire l"the way I did" - you did something different!
Why did you increase/resize the IndexArray node to index 3 elements?
Why did you only wire the page input? I wired all 3 index inputs to index a single element from a 3D array…
I have use Ring / Enum instead of Boolean because i may add few more parameter in the drop down in future if required.
Then use consecutive ring item values starting from zero (like in enums) for easier array indexing…
08-10-2017 03:59 AM
Hi Gred,
I have tried the way advised but i couldnt figure it out exactly how it works and am not getting the correct sate. attached the VI
08-10-2017 04:17 AM - edited 08-10-2017 04:17 AM
Hi details,
several problems:
- in your array constant you only created the first page: as soon as you switch "Man/Auto" to "Auto" you try to index non-existing elements
- in your array constant you created a page containing 8×3 elements, yet "DUT" and "Parameter" only provide two different items each: it would be sufficient to create a page of 2×2 elements…
- minor problem: there is no wait in your loop…
08-10-2017 04:26 AM
Hi Gred,
I have understood the issue and the concept. as you said 2x2 matrix is sufficient for this case and the page to be filled with desired value. Thanks.
08-10-2017 04:32 AM
(I would just use a QMH approach with a state machine handling the messages…)
You have stated that we can use Queued Message handler for this case. how it makes difference in using QMH and how effective it will be.
08-10-2017 04:43 AM
Hi details,
how it makes difference in using QMH and how effective it will be.
You could separate UI handling (using efficient event structure) from processing your data (in your consumer loop). You could have your data processing sorted in a clean statemachine.
(The "effectiveness" depends on your programming :D)