LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you toggle between multiple channels to indicate from which channel to acquire data from?

Solved!
Go to solution

Hi tbob,

   I did take a look at the VI that you sent me. Its kinda hard me to understand everything as I am still a novice. 😛 But I am trying to learn as much as possible.

   Yes, I would like to choose from a list of channels that are connected to the DAQ system and be able to add or delete any channel that I want even when the VI is running. Also when looking at the plots of the channels that are connected, I should be able to look at the signals from atleast 2 channels on separate graphs, and should change as I add/delete the channels.

  Can you also please explain me something about the property nodes? Can these be used to achieve what I want to do? I have attached my VI. Please have a look at it again. I have made some changes to it.

Thanks a lot.

0 Kudos
Message 21 of 28
(789 Views)

Hi tbob,

    Can you also post some simple examples of the Property nodes so that I can understand them. Thanks.

0 Kudos
Message 22 of 28
(788 Views)

ksurdi wrote:

Hi tbob,

    Can you also post some simple examples of the Property nodes so that I can understand them. Thanks.


 

The two vi's I posted earlier, Main.vi and Subvi.vi, contain examples of property nodes.  Take another look.  You will see a value property node connected to the control references.  Property Nodes can be used with any type of control or indicator, not just for references.  Create a control, on the block diagram, right click on the control and select Create - Property Node.  You will see a slew of selections.  If your context help screen is up, you will see a description of any property node you create.  It is up to you to study and learn.

 

On your latest vi, you can have more than one channel being used to gather data, but your Read function is set to 1Chan NSamp.  Change it to Multiple Channels Multiple Samples.

 

An easy way to select channels is to use the drop down arrow on the Physical Channel I/O control.  It will give a list of all available channels defined in your system.  The user can select each channel in the array.  This is the simple way.  Of course if your previous run had an array of 4 channels, and your next run is only 2 channels, the user would have to know how to delete the last two elements in the array.  It is easy to do so.  Just right click on the array element you want to delete and select Data Operations - Delete Element.  To make a list that the user can select from is more complicated.  If you really want to do it this way, let me know and I will see about creating an example.  But it will take time.

 

Message Edited by tbob on 06-03-2010 09:13 AM
- tbob

Inventor of the WORM Global
0 Kudos
Message 23 of 28
(761 Views)

Hi tbob,

  Firstly thank you very much for all the help rendered. Not being rude, but let me tell you what exactly I am trying to do. Your suggestions helped me a lot.

I did set my Read function to N samples and N channels. Now I can acquire data from multiple channels at the same time. But there are some certain things that i am trying to do.

 This is how I require my front panel to look like :

 

Tab 1 -

 

1.  Table containing 5 columns -

      1 - physical channels (can choose from a drop-aown menu)

      2 - Active (ON/OFF) options for each channel

      3 - Calibration Factors for each channel that is ON

      4 - Calibration Units for each channnel that is ON

      5 - Options of AC/DC/ICP for each channel

 

2.  Sampling Parameters which would be the same for any channels that are turned ON

3.  Trigger ON/OFF with the necessary parameters

 

Tab 2:

1. Three waveforms displaying the data from the channels that are connected and turned ON. Now if possible there would be an option to see the plots of the channels connected without actually going back and changing any parameters in the 1st tab (like check boxes. like I can check whichever channels i want to look at)

2.  Data writing to a file option which can be turned ON/OFF according to the needs

3.  The trigger ON/OFF button to be placed on this tab

4.  Also I should be able to add/remove any channels even when the program is running and watch the plots.

 

I think I have achieved quite a few things mentioned above. I have attached my VI again for you to look at. I am stuck at making that table and the plots. Also I do not know how to separate the Create Channel VI for each channel (suppose i have an accel on channel 1 and a microphone on channel 2 so it would be different for these 2 channels right?) Or can you have a common voltage VI for anything that you connect to the physical channels?

 

Actually I am trying to write this for a lab for students and need to make the front panel as easy to interpret as possible for them. I am sorry if I sound a little demanding, but its kinda urgent. Your help is greatly appreciated.

 

Thanks

 

 

0 Kudos
Message 24 of 28
(743 Views)

I'm sorry but I won't have time to send an example until later this afternoon.  I hope you can wait.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 25 of 28
(734 Views)

oh ya sure not a problem. But if you can send it to me maybe today, it would be great so that I can work on it during weekend. Thanks again tbob.

0 Kudos
Message 26 of 28
(732 Views)

Hi tbob,

   Can you please find time to go over my problem? I kinda need it urgently. I appreciate the help. Thank you.

 

ksurdi

0 Kudos
Message 27 of 28
(703 Views)

You don't separate the channels.  The DAQ takes all measurements for all channels together and outputs a 1D array of waveforms.  You separate the data by indexing the 1D array.  The first element will be the data for the first DAQ channel.  The next element for the 2nd channel, etc.  You can plot each channel individually after you index them out of the array, or you can plot them all on one graph with each channel data being a different colored line.  Your vi has the DAQ output 1D array wired to a graph.  This will produce a line for each channel.  The graph legend will show which color belongs to which channel.

 

Lets take one problem at at time.  Let me know if your graphing goes OK, then we will go on to the next item.

 

Sorry for the long wait.  I don't touch a computer at home over the weekend.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 28 of 28
(694 Views)