"Rouzbeh " <firstname.lastname@example.org> wrote in message <email@example.com>... > Hello, > > I have a general question. Is there a way to collect data from only ONE channle in a session based data acquisition format from NI devices (assuming that you have multiple channels added to the same session. If you don't care about the data from the other channels, release the session and start over, or use the "removeChannel" method.
It's not clear if you want to keep the data from the second channel or not. I have code that triggers off of one channel and collects data from a number of channels. In which case, I just use normal Matlab matrix manipulation methods to extract the single channel.
Plotting the data as you get it in is done in any way that you set it up. If you want to add more data to the end of your previous plot, you can do that assuming you kept all of the data that you want to plot. I have thought about doing this for one of my applications, but I'm not sure if I have enough time in the listener to get everything plotted. I thought about using a timer routine to update the plots, but in my case that's starting to add too much complexity.
Note that there is a limit to how many times per second that a listener should be called. Matlab occasionally issues a warning that says it should be called no more than 20 times per second, which seems consistent with my experience. It still works if you call it a lot more often than that, but the user experience might not be what you want.