LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Shifting in DMA FIFO

Hello,

 

I am using NI AI 9225 Module on cRIO 9022. I want to accquire data from three 3 diferent channels using 3 different triggers controlled from RT and for each trigger a certain number of samples(say 600) are to be written into DMA from the triggered channel.

my code works fine if the triggers do not overlap, I have the data accuratley from which ever channel I trigger.

The  problem is if any two of the triggers overlap the data is getting shift. 

I do not understand what I am missing ?

 

I have tried the DMA Multiple channel Interleaving procedure instead of the joining and splitting of numbers too but this shifting phenomeon continues.

 

I request some one to throw light on what is my error and how can i get rid of this.

 

Thanks

I have attached a the host and target VI´s running only the logic , AI 9225 modules are replaced by sine wave generators 

Download All
0 Kudos
Message 1 of 7
(2,876 Views)

What exactly do you mean by shifting?  You are getting data in the wrong channel?  The data is delayed?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(2,851 Views)

Thanks for the response

 

Shifting is within the same channel its self ... more like an offset but only by 1 or 2 places.

 

for example if read I read a sine wave which starts at position 0 during trigger 1, for the next trigger the the wave is starting at 1 and this continues to shift for every trigger 

this phenomenon  is observed only when I have 2 simultaneous trigger for 2 channels

 

It works fine when i operate 3 channels with separate triggers.

 

I think I am messing the read and write in the host and target.

 

If possible run my vis attached above so that my logic can be corrected

0 Kudos
Message 3 of 7
(2,843 Views)

There's a subVI missing.  It might be best to just zip up your entire little project here and post that.  It would also help if you posted a screen shot showing the data that you are seeing.

 

I have a feeling that you are just misunderstanding what the express VIs for the sine wave generation is doing.  You are not resetting that, so the value will just continue from where it left off when its previous trigger expired.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(2,823 Views)

Yes I know that the sine wave does not reset.

I am attaching my project
I am using 2- 9751 modules and 1- 9225 module on cRIO 9022, trying to trigger 3 channels on the 9751 modules and measure their voltages during the trigger, the trigger is generated by FPGA with a frequency range what I need is (0-80 KHz). triggers are independent of each other.

 

Please suggest me the best practice to achieve this.

 

I am limiting my samples from each channel from 9225 to 600 as writing and reading more data leads to higher CPU usages

Hence when there is a trigger in channel 1 in module 9751 its corresponding measuring channel  9225 has to measure voltage of 600 samples.
the 3 channels AI0 AI1 AI2  tranfer data using a DMA FIFO.

 

the problem is the voltage peaks are scatterd in the 600 samples if i use multiple triggers.

 

for 1 9751 and 1 channel of 9225 my code works fine

should I plan more regarding the data inside the DMA ?

Download All
0 Kudos
Message 5 of 7
(2,769 Views)

Your zip file can't be opened.  The error message says it is invalid.

 

I'm afraid your picture still doesn't help explain to me what it is you are trying to do.

0 Kudos
Message 6 of 7
(2,755 Views)

Hello,

Thank you for taking the effort .

Strange that the zip has failed sorry about that. I am attaching a new zip file
please have a look

and just in case if the zip does not open I am attaching the hosts and traget vi s screenshots

My problem is as explained above i want to measure from 3 AI 9225 channels usinga a DMA
and when using the finite acq technique on all the 3 channels the data is moving inside the interleaved array.

in the screenshot shifting.png the first wave form is from channel 1 when operated independent of the remaing two.
The second wave form is from the same channel 1 but the position of the wave keeps moving as I triggered all the 3 channels at the same time
Normally there must not be any problem but i do not understand why is my FIFO acting weired, what am I missing
Channel 1 triggerd  : voltage curve
shifting.pngChannel 1 : voltage curve when operated with channel 2 and 3



Download All
0 Kudos
Message 7 of 7
(2,715 Views)