You should look into a Producer/Consumer setup. This way your acquisition will be completely separate from your analysis and file I/O.
I would have an array of channels to keep. So you can just run your data into a FOR loop and use Index Array to keep the channels you care about.
Another note: How fast are you sampling? You might want to read more than a single sample per iteration of your loop.
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