From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,462 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,437 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,427 Views)