09-01-2024 05:55 PM
Hi,
I am want to transfer data from FPGA target to host using DMA FIFO. The datatype of DMA FIFO is set to U32. I have been following the steps given on this page (https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8wdSAC&l=sv-SE&OpenDocument=) while performing this task. On the FPGA side, the analog voltage is acquired using NI-9229 module. 'Loop Time 1' and 'Loop Time 2' can be integer values. I am taking them to be equal to 20 and 200000, respectively.
I am encountering an issue in Output Configuration Properties of the 'Boolean Array to Number' on the Host side. As shown below, I am not getting an option to change the representation to fixed-point and fill in the Fixed-Point Configuration according to the properties of the fixed point data type on the FPGA.
Is there something wrong with my code?
Kind Regards
Solved! Go to Solution.
09-01-2024 08:51 PM
You are missing while loops on both FPGA and host VI. Hence your program will not run continuously.
I would recommend you refer to shipping examples. Go to Help >> Find Examples >> Hardware Input and Output >> CompactRIO >> Module Specific IO >> Analog Input >> NI 9229 Getting Started
09-02-2024 12:51 AM - edited 09-02-2024 12:54 AM
Hi okidoki,
@okidoki21 wrote:
Is there something wrong with my code?
Yes.
09-02-2024 07:27 AM
Hi,
Thank you for the reply.
I can define the FIFO with FXP datatype (word length of 24 bits and integer word length of 7 bits), so as to match the datatype of NI 9229 module. However, I also want to transfer the loop time (value upto 20000) using the same DMA FIFO. Loop time changes with the iterations, that is why I want to save it along with the acquired signals using NI 9229.
I am struggling to find a optimal solution to do so. So, as per guidelines here, I was trying to convert all the FXP datatype to U32 before inputing it into DMA FIFO 'Debug' with datatype defined as U32. On the host side, I then want to convert the U32 data back to FXP datatype.
Kind Regards
09-02-2024 07:34 AM
Hi okidoki,
@okidoki21 wrote:
I can define the FIFO with FXP datatype (word length of 24 bits and integer word length of 7 bits), so as to match the datatype of NI 9229 module. However, I also want to transfer the loop time (value upto 20000) using the same DMA FIFO. Loop time changes with the iterations, that is why I want to save it along with the acquired signals using NI 9229.
You could scale down the integer values (upto 20000) by 512 to fit into the range of your FXP data…