LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case switch

Hi guys.

 

I am working on a new project and im facing something i don't know how to solve.


Lets think that i have for example 8 accelerometers and i wan't to save the output voltage using a while / timer loop. Pretty simple.

 

My idea is to have 16 txt:

 

Accel 1: X axis

Accel 1: Y axis 

...

 

My question is how to make in the front panel menu just an X/Y axis switch so if i have just X highlighted my loop will export the data just in the X txts and therefore if i hae my Y label active i will record in Y txts. I want to have like a block that allows me to choose where i want to activate the cable. 

 

May i have to introduce 2 switchs one for X other one for Y then treat them as boolean and introduce OR?

 

Really thanks for the help.

 

Best regards.


PD: Quick paint attached to try to help

0 Kudos
Message 1 of 3
(3,984 Views)

That looks like the Select Function.  Boolean Input of True or False determines which of two inputs goes out of the single output.

 

If it is more complicated than that, then use the Case structure.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 2 of 3
(3,950 Views)

I think you might be able to use just one switch in your case.

 

Think about it like you are switching between two states, 0 and 1, the states don't necessarily mean On and Off, they can mean Read X and Read Y. You just have to use a compare function to know witch action you have selected.

 

If you wanted to have the option to read neither or both at the same time, you would need two switches, but if not, one is fine.

 

I hope this helps.

Rodrigo Martín
Application Engineer
NI Spain
0 Kudos
Message 3 of 3
(3,898 Views)