PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in FPGA write

I am trying to access "Y-component of the cluster in the FPGA write "while loop". But when I am trying to access Y-component there I got nothing. Its indicator inside FPGA write while loop shows nothing although the indicator of Y-component  inside another while loop (where I am dequeue "IQ WF Q" shows values. I have two different codes and both codes behaves the same. 

 

Can anyone look at the codes and guide me how to fix this issue. Many thanks in advance.  

Download All
0 Kudos
Message 1 of 4
(2,602 Views)

Hello josephkirmani,

 

Looking over your code what is currently happening is that the loop where you are able to read the Y component (dequeue "IQ WF Q" while loop) is running continuously, stopping the FPGA write while loop to execute. Once the dequeue "IQ WF Q" while loop is done completing, it will transfer the last value of the cluster to the FPGA write while loop and then this same value is being used over and over again by this while loop.

 

In the current code setup, there is no way that the while loop where you dequeue "IQ WF Q" and the FPGA write while loop will execute at the same time. If this is what you want to do, then you need to transfer the cluster data or just the Y component values with a different data transfer method other than using wires. In the current configuration, the FPGA write while loop will wait to execute until the dequeue "IQ WF Q" while loop is finished completing, and then will only transfer the last value of that loop to the next.

 

I recommend looking into using a queue to transfer data between these two loops.

0 Kudos
Message 2 of 4
(2,573 Views)

Many thanks for your reply. What will happen if I merged these two separate loops will it be the same or it will be different from what you suggested. In my previous version of code I am dequeue and writing on FPGA in the same while loop. But in that code when I am checking the status of queue using Get queue status it tells me that there are elemensts in the queue. and it is not emptying the queue properly.

 

See attachement.

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

I also remove FPGA write in my attached code and just simply do the enqueue and dequeue for just checking. But when I do this It does not dequeue the elements from "While loop 5" having "IQ WF Q". Please look at it and guide me what is problem,

 

Once again many thanks for your guide.

0 Kudos
Message 4 of 4
(2,538 Views)