LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select signal to writte and to graph

Hi, I'm starting with labview and I've done a simple VI (attached) to aquire 4 analog signals from a NI9215. Now I would like to create a list box or some buttoms to select the channel I want to writte on the file and graph.

 

Can someone help me?

 

Thank you very much.

0 Kudos
Message 1 of 3
(2,667 Views)

Hi, TXL,

 

I have modified your code and saved it on 8.0 since I don't know what version you are using. Besides, I made a couple of screenshots just it case you cannot open the code. Your code is quite redundant, it means, there's no need to place 4 DAQmx Create Channel VIs since an only one is pretty enough. When you select channels on the front panel control, you must write something like Dev3/ai0:3, that's the way of avoiding the four Create Channel VIs.

 

On the other hand, I have added and editing an enum control with 4 cases so as to select the signal and an Index Array to perform this operation. You can see in the second waveform graph that the signal selected appears. Do the same with the writing of the text file. I have put a small voltage supply on one of the channels and the rest of them are not connected, that's why you see those noisy signals, but the code itself works as expected.

 

I hope this helps! Ánimo!

 

Jesús

 

 

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

Hi Jesus,

 

Its a good solution, thak you very much.

 

About the use only 1 DAQmx Create channel VI I didn't know. It's ok but the problem is that I can use diferent names for the channels but is not very important.

 

Muchas gracias!

 

 

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