LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structure Control

Hello! 

I need to control a case structure using values read from a database. The string values read from the database are either a "yes", "EN", or null. I have been tinkering with this all day with no good results. Thanks for your assistance! 

 

- Nathan 

0 Kudos
Message 1 of 16
(2,610 Views)

Can you please share the VI in which you will be trying for this. 

0 Kudos
Message 2 of 16
(2,608 Views)

Have you tried connecting your string directly to the case structure? Then you make cases for each of your strings. Be sure to put the strings in quotation marks in the case.

0 Kudos
Message 3 of 16
(2,602 Views)

Hi Nathan

Since you are getting string values from your db, you can have 3 values for your case selector as shown in attached screenshot. Would that not work?

Capture1.PNG


Kudos are the best way to say thanks 🙂
0 Kudos
Message 4 of 16
(2,570 Views)

Hi Winter!

What would you connect to the question mark that controls the case? - John

0 Kudos
Message 5 of 16
(2,568 Views)

That would be the string output from your database.


Kudos are the best way to say thanks 🙂
0 Kudos
Message 6 of 16
(2,564 Views)

Of course you should ensure that the strings are clean and don't e.g. contain a termination character or similar. Maybe pipe it through "trim whitespace" before connecting to the case structure if this is a concern.

0 Kudos
Message 7 of 16
(2,548 Views)

Also note that there is a difference between a null character (ASCII 0), and an empty string.

0 Kudos
Message 8 of 16
(2,537 Views)

Also note that you can right-click on the frame and select "Case Insensitive Match".

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 9 of 16
(2,481 Views)

Thanks everyone for the comments! I am working on a VI per your directions provided. As soon as I have it working I will post it. The VI which I will use this for is considered company proprietary and I am unable to share it. More to follow...  -  John 

0 Kudos
Message 10 of 16
(2,476 Views)