08-11-2011 10:37 AM
How do I save the output that I write to a AO channel, along with some input from a different AI channel, to the same TDMS file so that they are syncronised?
Summary of what I want to do:
- I have some signal that I want to write to a AO channel. Call it x.
- I have some signal I want to capture from a AI channel. Call it y.
- I want to save x and y to a TDMS file so that x and y are syncronised.
The way I have been doing it in the past is to feed the output from x back into a new AI input and then capture that. This wastes an AI channel, and I'm sure there's a better way to do it.
08-12-2011 12:59 PM
For your analog input virtual channel, you can select your AO channel vs ground as and AI channel. You will have to right click your physical channel control/constant and click I/O Name Filtering... Then make sure you select internal channels. Then you can just use channel expansion to select both your AI channel and the ao0_vs_gnd channel. You will still need to use a setup similar to the Multi-function Synch AI-AO example to physically synchronize the AI and AO, but this way you won't waste a channel. Just to verify, I created an AI task and selected all physical channels, as well as ao0_vs_gnd and I didn't get a reserved error. You will obviously need to change your DAQmx Read to read multiple channels and then just write to the TDMS from the the Read VI.
Thanks,
Sean