LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pragmatically interleave array for DMA FIFO

Hello,

 

I'm attempting to make a DMA FIFO that uses a module number and channel number as a flag to tell the HMI how to decode the data. The reason I want to do this is to be able to turn channels on and off, as needed, and increase the speed the reads (if aiming for high speed logging).

 

Is there a way that I can programmatically interleave an array for putting into a DMA FIFO?

 

I.e if I had three channels, AI0, AI1 and AI2, and from my HMI I sent boolean to the FPGA saying 101, ie, send AI0 and AI2, how do I interleave for those two channels, prior to sending to the DMA FIFO. 

 

Cheers,

Peter 

0 Kudos
Message 1 of 4
(2,776 Views)

Hi Peter,

 

there is a Interleave1DArrays function…

 

It always helps when you supply a sketch (or even an example VI) to illustrate your question!

How do you want to interleave data? Which data comes first, which next? How many samples? …

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,773 Views)

Hi GerdW,

 

Sorry I wasn't all that clear. I want to interleave N channels to send through a DMA FIFO. The target end result is to have multiple channels (up to 8 voltage NI 9205, 8 current NI 9203, and a few custom channels). The user will then be able to select what channels he wants to be read and put through the DMA. The reason for wanting to do this programmatically on the FPGA side is to increase the possible logging frequency with lower number of channels, i.e. when using 1 voltage, the A/D converter is focusing solely on that single channel.  

 

My initial plan was to use case structures, and some sort of interleaving: 

 

Capture.PNG

 

But in this sort of design, I'll have to send through a zero or default number for the false cases, which will mean the DMA will alway be sending the same amount of information, regardless of the read speed of the module. 

 

Edit: Hadn't finished replying. 

 

Cheers,

Peter 

0 Kudos
Message 3 of 4
(2,758 Views)

I think instead you will have to send an array of booleans as well to tell the for loop which ones to actually enqueue.


You could also read this from the host to know which channels are enabled as well if needed.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
Message 4 of 4
(2,752 Views)