03-04-2013 05:21 PM
I am saving TDMS data obtained from a cRIO-9144 with a 9205 module. The data is transferred from the target to the host computer via ethernet using FTP. I am studying two sample rates of 200 Hz and 1000 Hz and I noticed that almost every second data is missing. For the 1000 Hz, 0.025 sec of data is missing every second around time of XX.4 sec and between 0.05 to 0.1 sec of data is missing almost every second from the 200 Hz data around time of XX.9 sec. I've attached a screenshot showing the missing data (Red curve is at 1000 Hz and blue curve is at 200 Hz).
Can anyone could please tell me why I am missing data every second or if me some suggestions how to troubleshoot this issue? It occurs on every channel used in the NI-9025 module. I do not get any error messages from the RT FIFO Create VI.
Also, when I increase the sample rate above 1000 Hz, the data logged becomes all scrambled up in that every second the data that is logged loops back to an earlier timestamp. I've attached an example of this scrambled data at 3000 Hz. We can live with the sample rate of only 1000 Hz but I would like to know what is happening at 3000 Hz to cause this issue and if it is related to the data missing at 1000 Hz and 200 Hz.
Thank you, Bill
03-05-2013 01:27 PM
Hi bill_schieber,
Could you please elaborate further on how your code is structured? It sounds like the data is being passed via FIFO from the FPGA to a Real Time VI. Do you write the data to the TDMS file within the Real Time VI, or do you pass the data to your computer and write to the TDMS file on a host computer VI?
One troubleshooting step I would recommend is wiring your data into a graph or chart indicator. If the data shows up correctly in the indicator, there is a problem with the way things are being written to the TDMS file.
03-05-2013 07:00 PM
Andrew,
Thank you for your reply. I write the data to the TDMS file within the real time target vi and also pass the data to the host and write to the TDMS file on the host computer. The data logged on the host computer does not any problems. But the data logged on the real-time target is missing data and also becomes scambled when the sample rate is larger than 1000 Hz. The program is very complex and too large to provide as an attachment. I thought I'd see if any one else experienced this problem logging TDMS data within the cRIO-9144 target.
03-06-2013 01:35 PM
I think I see why I cannot increase the data logging sample rate above 1000 Hz. I've attached a screenshot of the back panel where data is read from the 9205 on the Real-time cRIO-9144. A timed while loop is used to control how fast the data is read. Above 1000 Hz, the period (dt) is rounded to either 1 or 0 because the Terminal Data Type of dt is 64-bit integer. Thus at a sample rate of 3000 Hz, for example, the dt = 0.33333 ms but this is rounded to 0 in I64 representation.
Does anyone have any suggestions how I can overcome this problem to use a sample rate of 3000 Hz?
Thanks, Bill
03-06-2013 06:13 PM
Hi bill_schieber,
The units for dt change depending on the timed loop's source name. Therefore, if you change your timed loop's clock source to a 1MHz clock, and were sampling at 3kHz, you would want dt to be 333 because the units change to microseconds. This is probably the best way to get around decimal inputs for the timed loop.
How does the code that writes to the TDMS file on the host VI compare to the code in the Real Time VI?
03-06-2013 06:37 PM
Andrew,
I tried to change the timed loop clock to 1 MHz in the Configure Timed Loop Source Type, but 1 MHz clock is grayed out. The Source Name is set to "Synchronize to Scan Engine." Sorry if I'm missing the obvious. I have the same problem on the host vi - scrambled timestamps looping back giving bogus data. The same timed while loop with 1 kHz clock loop timing source is occurs on the host side. Again the 1 MHz clock is grayed out in the Configure Timed Loop. Does this mean I cannot use the 1 MHz clock for this application?
Regards, Bill