Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

pci 5640r not acquiring contiguous samples

Hi,

 

I'm running LabVIEW 2009, NI R Series 3.3.0, NI-5640R 1.4, NI-RIO 3.3.1 and using a PCI-5640R.  Using NI's template for ni5640R Dual Channel Analog Input and Output, I am aquiring data blocks that are not contiguous.  Using sinusoidal signals, there were discrete jumps in phase at the edges of the aquisition blocks.  The phase jumps were typically small, but never constant and sometimes quite large (see the first attachment, this is the I channel of ADC0).  Since the jumps do not exhibit bandlimited-induced ringing (Gibbs phenom.), I am discounting any problems with AO.

 

I then replaced the sinusoidal signals with m-sequences (reg length=7, 0=> 1, 1=>-1) to see if the jumps were due to losing data or repeating data.  I witnessed blocks that seemed to repeat several (maybe 5-20) samples from the end of the previous block...but the sample amplitudes did not match exactly like I had expected (see the second attachment where there are about 3 samples per m-sequence symbol and, by my calulation, about 10 or 11 samples of the m-seq appear again with slightly different amplitudes). Since the repetition rate of the data is seemingly uncorrelated with the aquisition rate and block size, I am a bit baffled at what I am experiencing.  I hope someone can help.

 

I've included a couple images of data concatenated between aquisitions to demonstrate.

 

Thanks!

Chris

acq_problem1.jpg acq_problem2.jpg

0 Kudos
Message 1 of 9
(5,126 Views)
My guess is this is a lossy data transfer from FPGA to Real Time or an asynchronous system that causes these hic ups. Can you post your code so we can see exactly what you are doing?
0 Kudos
Message 2 of 9
(5,109 Views)

Hueter,

 

Attached is my project folder.  There are a few subVIs for the m-seq that may need to be relinked (or, someone can just delete it and look at the sinusoid).  I've tried setting the sampling rate low (decimation factor high) and I've tried to find a buffer that gets overran, but no luck.

 

Thanks!

Chris

0 Kudos
Message 3 of 9
(5,104 Views)

Here is another template...from ni5640r Analog Input and Ouput.lvprj.  The only modification I have made is to concatenate two consecutive data blocks to check for continuity (and it appears to be regularly losing data).

 

Chris

0 Kudos
Message 4 of 9
(5,046 Views)

I looked at my first post and realized that I didn't mention an obvious potential issue...I'm running on Windows 7.  Are their steps I should take to reduce latency caused by the OS?

 

Thanks,

Chris

0 Kudos
Message 5 of 9
(5,044 Views)

I just got back in contact with a couple of my students who did a project last spring.  Unknown to myself, they fought this same problem at the end of their work.  The resolution was discussed at http://forums.ni.com/ni/board/message?board.id=ifrio&thread.id=932&view=by_date_ascending&page=2 .  I'll try to follow the recommendations from Jerry_L to see if I can achieve continuous acquisition.  If anyone has already done this and can provide a template, please let me know.  If I am successful, I'll post my solution here as well.

 

Thanks!

Chris

0 Kudos
Message 6 of 9
(5,031 Views)

Hi,

 

I just made, in the most simplistic manner possible, the two changes recommended by Jerry_L in the other post.  (see attached snapshots)  Now, the glitches are gone when the sampling rate is held to 3.125 MS/s (even with the FFT running) and when the glitches appear at the higher sampling rates, the AI.Overflow accurately warns you.

 

Thanks,

Chris

 

 

0 Kudos
Message 7 of 9
(5,018 Views)

Hi,

 

I made the same two changes in the ni5640r Dual Analog Input and Output (times two, of course), but I didn't have the same luck.  The discontinuities persist in the dual IO program at all sampling rates.  I've looked at the code closely and cannot determine why the dual would be any different from the single-channel.  Can someone take a look at the code and comment?

 

Thanks!

Chris

0 Kudos
Message 8 of 9
(4,988 Views)

Hi Chris,

 

I'm sorry that there haven't been a lot of responses here.  There's actually a forum for IF-RIO devices, which you can find here.  You might try reposting this information there.  Someone there might no a little better than the people who look through the RT forums (and myself).

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 9 of 9
(4,976 Views)