09-24-2016 07:37 AM
Hi all,
I have the following problem..
I want a case structure with a few options.. No problems here.. But the thing is;
I have my arduino connected and I want the case selector not selected by whatever I select on the front panel..
I want to select a case on whether or not a true output from the button reader from my arduino.
For example: If button 1 is true, I want case 'number1' active
If button 3 is true, I want case 'number 2' active
I can fix this b using 2 different case structures with a simple true or false case per button, but I would love it if I can make a if-then situation to the selector of one case structure.
Hope I am making myself clear..
Thank you for trying!
09-24-2016 10:28 AM
What is the data type of your button reader from arduino? numeric? Boolean?
-If it is numeric you can connect the number directly to case selector. Case selector accepts other types also(numeric,ring,string to name few)
-You can also have array of booleans and check the index of the boolean changed and connect to case structure.
-If you have started just learning LabVIEW please check these links:
Start with below links to learn about LabVIEW programming
LabVIEW Graphical Programming Course
09-24-2016 12:30 PM - edited 09-24-2016 12:30 PM
@MCdyna wrote:
Hope I am making myself clear..
No. Please attach some simplified code so we can get a better idea.
A case selecter connects to "data" and it is not important if it comes from a user interaction on the front panel, a result of some calculation, or from a hardware IO. If you have two booleans, there are four possible cases (FF, TF, FT, TT) so ideally you need a case structure with four cases. Build an array out of the two booleans and use "boolean array to number" to create posible numbers 0..3 (In binary 00, 01, 10, 11) to be connected to the case selector. Then create as many unique cases as needed and create a default case for the rest.
09-26-2016 02:17 PM
Perhaps Radio Buttons will serve you.
09-26-2016 03:20 PM
I understand what you mean! I think I can make it work! Thank you so much!