12-30-2009 04:51 PM
Hi All,
I have a VI that uses DAQ.mx to aquire data where I can dynamically change the sampling rate without stopping the program and restarting it. The aquired data goes to to a queue and then gets written to a TDMS file in a separate VI. I know the aquisition part of the routine is properly changing the sampling rate, but when I view the TDMS files all of the data has been changed to one sampling rate for the entire file. Does anyone know what may be causing this and how I might fix it?
Thanks in advance!
01-04-2010 04:49 PM
Hi amswak,
How are you changing the sampling rate without stopping the program and restarting it? Are you using a property node? What sampling rate are you coming from and going to? Thanks
Thank you for choosing National Instruments.
Aaron
National Instruments
Applications Engineer
01-04-2010 07:11 PM
01-04-2010 08:51 PM
"How are you changing the sampling rate without stopping the program and restarting it?"
I have tried changing the sampling rate two ways to see how they differed with system resource load. Both still leave me with the same TDMS file issue.
1) there is a case structure in the aquisition loop and a "low speed"/"high speed" switch. There is also an "equal to" comparison coming off and the switch's value from the last loop via shift register. If I flip the switch true case stops the device, changes the sampling rate through a datamx task property node to high speed or low speed (depending on the boolean, a second case structure inside the first), then starts the tast again at the new rate. The case then is false until the switch is flipped again.
2) the loop always samples at high speed and downsamples the waveforms when "low speed" is clicked.
What sampling rate are you coming from and going to?
High Speed = 50kS/second
Low Speed = 10kS/second
01-04-2010 08:51 PM
01-04-2010 09:11 PM
Hi amswak,
If you write to the same channel in the TDMS file, and you write as waveform to the channel, then I'm afraid it can only takes one sample rate. Maybe that's the reason why you had such a problem.
The workaround is that if you want to write different sample rate, you can consider to write to different channels.
Hope it helps.
01-04-2010 10:12 PM
That helps a bit in the sense that now I won't waste any more time on something that won't work. The downside is that requires a pretty significant rework to the backbone of my program. Thank you for the help though!
Would different groups with the same channel names get treated like different channels?
01-04-2010 10:33 PM
01-05-2010 05:10 PM
01-06-2010 09:12 AM