From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data channel switch in FPGA application

Solved!
Go to solution

Hi, I add your quotient & Remainder selection to " the number of elements to read ". I found the channel constantly switched to the previous one ( like AI1 goes to AI0), even if I connected the right channel in hardware. So I can now save the data as it switched and do the post processing later. However, I still have no idea why it becomes switched.  The problem was solved in an unexpected way. But I really apreciate your help! Thank you1

0 Kudos
Message 11 of 18
(1,069 Views)

yes you are right!

Message 12 of 18
(1,069 Views)

 

0 Kudos
Message 13 of 18
(1,044 Views)

Actually I've the same problem, in the RT side when I plot them they shift one position, for example: I see the data of channel 1 in graph for channel 2, etc.

0 Kudos
Message 14 of 18
(1,039 Views)

@bjoa wrote:

 


That's not what I was pointing out.  Certainly, I understand taking N Chan number of samples out of a buffer.  Quotient and remainder is your friend in that!  

 

I merely pointed out the ridiculousness of changing the logic when the remainder is zero.  Work it through as a mental exercizeSmiley Wink  samples avaiable - 0 is equal to samples available minus remainder ONLY when Remainder = 0 and both inputs to select are equall to each other!  The selection criterea is Remainder Not equal to 0.   

 

So just read samples available  minus samples available mod n remainder


"Should be" isn't "Is" -Jay
0 Kudos
Message 15 of 18
(1,000 Views)

Hi all,

 

I had the same problem, and was able to solve it this morning thanks to the Labview engineers. I added the FIFO reset to my software on the host side and it has stopped the channel switching errors. Because the FIFO Reset does not work in simulation mode, I removed it a long time ago, and therefore forgot to add the Reset when it was time to execute on the target. The Reset worked for me, so just add it in once you are ready to execute your software on the FPGA target. I hope it works! I have attached two images on how to set up the Host and Target DMAs, and also how to clear the FIFO using FIFO reset. 

These VIs were provided by tech support! Also, the software seemed to stop switching when using the case structure on the host side (see pictures); I found that the software did not stop the channel switching with the remainder technique.

 

Zee

Download All
0 Kudos
Message 16 of 18
(968 Views)

Jeff·Þ·Bohrer

 

Got it, I didn't see your point, you are right.

Message 17 of 18
(943 Views)

@bjoa wrote:

@JÞB

 

Got it, I didn't see your point, you are right.


It happens that occasionally I am right,  It usually supprises my wife too when that happensSmiley Very Happy


"Should be" isn't "Is" -Jay
0 Kudos
Message 18 of 18
(916 Views)