Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to toggle the amount of signals obtained from the DAQ assistant?

Hi, I am relatively new to LabView and I am wondering if I can get some helpful tips to write my code.

 

I have a NI 9191 wifi chasis with a 16-channel thermocouple input module (NI 9213). I would like to show the last minute of temperature readings from the channels and save all data in a CVS file while the program is running. The first hurdle I am facing is that I would like to toggle between the channels to be read by the program with a booleans for each channel in the front pannel. I tried to make 16 different DAQ assistants (one for each channel), merge the signals and show them in a waveform chart but I receive an error saying that I cannot utilize the same device with different DAQ assistants. If I set to read every channel and do not have a thermocouple attached to all the channels it will give me a constant high number. How could I add more or less signals to the graph on command?

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

You need to get away from the DAQ Assistant and instead use the actual DAQmx API.  Though, you could configure one of your DAQ Assistants and then right-click on it and select to show the block diagram.  That will convert it from an Express VI and change it into a normal VI.  From there, you should be able to figure some things out.  But a better route would be to go into the LabVIEW examples (Help->Find Examples) and do a search for thermal couple DAQ.  There should be some really good setups in there.  Once you get the hang of how the API works, then we can get into more specifics of what you are trying to do.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(3,765 Views)

As the error message said, you cannot have multiple tasks for the same hardware process. So, the first step is to configure your DAQ VIs to acquire all possible channels in one task.

 

If you decide to continue using the DAQ Assistant, then you will be forced to deal with the (evil) Dynamic Data Type for the output. Since you are measuring temperature, the exact timing is not likely to be critical. Convert the data to an array. If you get one sample per channel on each Read, then the array would contain one element for each channel (whether connected to a thermocouple or not). If you use hardware timed acquisition and get multiple samples per channel per read, it will be a 2D array.

 

You can use Index Array to get the data for the channels of interest.

 

There are many ways you could set it up for the user to select the channels to be used/displayed/saved. A simple method is to have an array of boolean buttons. The user presses the buttons representing the channels of interest. A Multicolumn Listbox is another choice. It would allow you to place meaningful names on the channels like Intake Manifold or North Vent. On the graph you can show Plot Visibility Checkboxes, but expanding the Plot Legend for 16 plots takes a lot of front panel space.

 

Lynn

 

Multichannel graph.png

Message 3 of 3
(3,762 Views)