LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Concatenated Strings in Case Structure

Solved!
Go to solution

Hi everyone,

I am brand new to LabView. Right now I am just trying to build a program that graphs different waves (such as sine or square) with or without different types of noise. I concatenated two strings and then have that input into a case structure. Nothing graphs when have the two options concatenated, but it does work when it's just the different types of waves being chosen. I think it might have to do with how I'm titling the each of the case structure options, but I'm not sure. Any help or suggestions is greatly appreciated.

 

 

 

0 Kudos
Message 1 of 5
(3,345 Views)

"Concatenation" of strings means "Take two strings and make a single string with the characters of the second following after the characters of the first".  So concatenating "Sine" and "White" will give you "SineWhite".  If your case has (as yours does) "Sine", "White", then a string of either "Sine" or "White", but not "SineWhite", will satisfy it.

 

Bob Schor

Message 2 of 5
(3,332 Views)

Oh ok. That makes sense. Thank you!

Do you know if there is any way to make the loop execute like:

if sine && white

  this graph

else if sine && no noise

  other graph

else...

0 Kudos
Message 3 of 5
(3,325 Views)
Solution
Accepted by topic author lvgerns

I would use a sequence of case structures. Take it step by step. Use enums for better readability.

 

0 Kudos
Message 4 of 5
(3,315 Views)

Thank you! I got everything to work from there.

0 Kudos
Message 5 of 5
(3,309 Views)