Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga input/output problem (CompactRio)

I try to simulate a mechanical system, generating an excitation and acquiring the system response with a captor. I’m using a CompactRio with the NI9263 (for the output) and the NI9234 (for the input) modules.


I succeeded to manage the generation and acquisition of signals independently with 2 different projects, according to the NI examples. These two projects work correctly.


Now, I would like to make a single project, with the management of the 2 steps (generation and measurement of the signal). Here, I'm in trouble. To begin, I choose to regroup the two FPGA VI, and to only focus on the acquisition of signal. So I combined the FPGA VI of the 2 projects, and selected the Host VI of the acquisition project. After compilation of the FPGA, when I execute the Host VI, the acquisition of signal doesn't work anymore.

I don't understand what I really did wrong. I think my problem comes from the FPGA/Host link. Please, someone, could help me, tell me how to proceed exactly ?

I join my code

 

Thank you

0 Kudos
Message 1 of 3
(3,497 Views)

 

Hello Ccodet,

 

In the example you've used is not designed for continuous acquisition. The on the FPGA side, you will only acquire on burst of the number of sample per channel you've asked. This is the Host VI that is responsible for looping operation; at every loop iteration it runs the FPGA VI and requires samples.

 

Pick a look the example NI 923x Continuous DMA; there is a main loop, that allow you to navigate between wating the start from host, configuring, and acquiring (note the acquisition loop). The loop in the waiting state (first frame of the sequence structure) allow you to wait for a start signal from the host.

 

Hope this helps,

 

0 Kudos
Message 2 of 3
(3,454 Views)

Hi,

 

Thanks a lot for the answer. I added a while loop in my FPGA code to put the acquisition sequence in a loop, and after recompiling, the program seems to work.

 

But I think, that I will probably look at the example, you were talking about in order to have an idea of the correct method to perform a continious acquisition.

0 Kudos
Message 3 of 3
(3,443 Views)