05-26-2010 11:52 AM
Solved! Go to Solution.
05-26-2010 12:25 PM
Are you using DAQmx? In order to change the channel assignment for acquiring data, you need to close the currently open session and then create a new session with the new channel definition. So the order of execution would be:
Create Task or Virtual Channel - setup timing and triggering - Read - Clear Task - define new channel list and Create Task - read - Clear Task, etc....
05-26-2010 12:38 PM
05-26-2010 12:50 PM
Hi,
Thanks a lot for the help. what I am trying to do is to setup a VI which gives me an option where I can just turn ON or OFF the channels that i do not want to acquire the data from, but keep rest of the sampling parameters same. So suppose I have 16 channels but I want to acquire continuous data from only 4 of the channels, I should be able to turn only those ON and take the data. So I should be able to do that using my front panel. May I attach the V that i have right now?
Thanks.
05-26-2010 12:52 PM
05-26-2010 12:54 PM
ok. thanks. Here is my VI.
05-26-2010 12:57 PM
05-26-2010 01:07 PM
Make your Lab1_Trial2 vi into a subvi. Wire the physical channel control to a terminal in the terminal pane. Call from a main vi where you pass in the physical channel. Whenever you want to change the channel, you must allow the subvi to end, then call it again with a new channel. You cannot change the channel on the fly because that messes up the session. The session must be closed and re-opened with a new channel.
05-26-2010 01:28 PM
Did you look at the system that I sent you? If you take a look at it everything that you need is in what I gave you. How are you setting up your channels? The easy way is to set up global virtual channels. If you set them up then put them as the default values for your program then all you have to do is add booleans to the front panel and build your channel array when a button is pushed.
Do you know haw to build global virtual channels in DAQMX?
If so Set up two analog input channels channels named:
MyVoltageChannel1
MyVoltageChannel2
Then start this Main.VI and see what happens
05-26-2010 01:38 PM
Pretty nice system aeastet. A value change event triggers all the states necessary to reconfigure the channel list. Are your VIs in 8.5? That is what the OP has. He mentioned that he couldn't open your previously posted VIs.
I don't know the OP's level of experience, but this would be quite overwhelming for a beginner to absorb.