01-14-2010 03:39 PM
I have a 9237 and I am doing the workaround presented http://digital.ni.com/public.nsf/allkb/93EF476730B6D16F862572340079291A to get it down to the 40Hz needed. I need to write the data to a TDMS file but I also need to be able to set the group index so the WriteMeasFile functionality won't quite do it. I am reading 50 samples per channel at a rate of 2000 samples per second (=40 Hz) and I want a time channel the reflects this rate (40Hz) at relative time. WriteMeasFile seems to be able to do this and I have tried looking at the code for this VI to replicate but I have been unsuccessful.
Could someone either provide an example of how to add a time channel to my Arithmetic Mean dynamic data stream or list a cDAQ 4-Channel, ±25 mV/V, 24-Bit Simultaneous Bridge Module that can handle any sample rate?
Thanx.
01-17-2010 02:44 PM
Hi, what version of DAQmx are you using and is it possible for you to upgrade to a newer version? That would help you avoid this problem as the KB you linked to indicated. I have attached a link to another KB that also addresses this type if issue and it recommends resampling your data if the rate is being coerced or the data was not sampled at the rate that was desired.
If you want to change the time information of your signal manually, then it may be easier to work with the data outside of the dynamic data type. There is an express from that is called 'From DDT' which can convert your signal into another format. I would recommend working in the waveform or 1D array of waveform format. You could then take advantage of the Waveform section of the functions palette which could allow you to get the waveform components or change deltaT, etc.
01-19-2010 07:56 AM
I added the attached VI and created it from the arithmetic mean. This took care of my time channel and I appended it to the beginning of my dynamic data array.
I have NI-DAQmx 9.0.2 installed but I am unable to set up a sample rate less than the minimum on the card.
Anywho, adding the VI has taken are of things and as long as I am good in my math between sample rate, number of channels and number of samples per channel I should be able to calculate any desired sampling frequency.