LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data type while transferring data using DMA FIFO

Hi,

 

In my testbench, I have written a LabVIEW code for thermal characterizing a device. The design uses the hybrid interface (using RT and FPGA target), therefore, I am restricted to using only 1 DMA FIFO. The datatype of the DMA FIFO have been set to FXP with 24 bits Word Length and 7 bits Integer word length. This provides the range of -64 till 63,999992, with 7,62939E-6 resolution. I have different input data that I want to transfer from FPGA target to host. First are the sampled signals using NI - 9229 and NI - 9239 modules (8 in total). Second, I also want to transfer the loop time (can vary from 20 - 20000 microsecond). Loop time increases by 1 usec in each loop. Right now, as shown in the pic below, I am multiplying the loop time in microsecond by 0.001 (SGL datatype) and converting it into FXP before inputting it into the Build Array function.

 

okidoki21_0-1724173906716.png

 

 

I was wondering if this is a  good way to transfer the loop time using the DMA FIFO. It will be great if somebody can recommend me better practice. Please find the attached code.

 

Kind Regards

0 Kudos
Message 1 of 2
(194 Views)

That doesn't seem crazy. You have to assume that the loop rate won't go over 64,000us but that may be a fine assumption.

 

You could also look at just converting everything to SGL in the first place. In these situations I find it useful to do a back of the envelope calculation to get an idea of how much data I'm really transferring to get an idea of whether the difference between SGL and FXP is important (and if SGL has the precision you need).

0 Kudos
Message 2 of 2
(170 Views)