08-20-2015 06:12 AM
Hi,
I have a case structure with 5 separate tests that can be selected. Currently I select each case through a dropdown enum selector. This is fine for selecting one test (case) to run but I want to be able to select multiple tests(cases) to run consecutively by checking each test with a checkbox.
I created an example VI to try to show what I am aiming for. For example, if I check the Add, Multiply and Power checkboxes, cases 0, 2 and 4 will run one after another. Is this possible?
Many thanks
08-20-2015 06:28 AM
You can expand upon the enum concept by creating an array of those enums (take a look at the attached example). The array of enums will represent the sepuence of tests to be executed. All you have to do is auto index that array into a for loop containing a case structure.
08-20-2015 06:37 AM
08-20-2015 08:20 AM
JGar,
Thank you for your suggestion but I'd quite like to utilise check boxes for ease of use unless the implementation is much more difficult than enum dropdowns. Is something as simple as your solution possible with checkboxes?
Mike,
I cannot watch tutorial videos on my machine, could you possibly make a short example VI of using check boxes with event-driven structures and a state machine? I do not have any experience using event driven structures or state machines.
Kind Regards,
Parker
08-20-2015 08:48 AM
Parker,
Mikes suggestion is deffinitely more modular than mine and would be the best route to go. Here is a link that does a pretty good job of describing what the queued state machine is and how to implement it.
https://decibel.ni.com/content/docs/DOC-32964
You should understand how this architecture works before trying to implement it. After you have read the article let us know if you have any specific questions about implementing your idea.
08-20-2015 09:23 AM - edited 08-20-2015 09:25 AM
You could use a ListBox with selection mode set to "1 or More"
This will return an array of the index's of the selected items [0,1,4]
Then use an auto index For Loop with your case structure inside.
This is pretty basic stuff and all covered in the tutorials. The none video tutorials.
08-20-2015 09:49 AM
Listboxes with check boxes you say?
https://decibel.ni.com/content/docs/DOC-42155
Also supports Multicolumn Listboxes and Trees.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-21-2015 02:55 AM
Hi Guys,
Thank you all for your suggestions.. as I only started working with LabVIEW last week I think the QSM architecture is too complex for me at this stage, the vast majority of that document goes over my head with an almighty wooosh. As such I will just stick with Omar's suggestion for now as it suits my needs however I will revisit this topic when I become more confident with LabVIEW and am in a better position to understand such architecture.
Many thanks,
Parker
08-21-2015 03:17 PM
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-21-2015 03:49 PM - edited 08-21-2015 04:06 PM
try a queued state machine (QSM), your selection will be added to an array. start the process and peel an element off that case statement array ,one by one. pass the value on the shift register. look at the CLD car wash solution