LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquisition with Labview FPGA

Hi all, 

I'm new to labview and have some problems with the application I'm trying to develop.

I have an NI SbRio9636 to which I have connected a laser sensor. I'm running the program on my laptop, which is an Acer Aspire F15 running windows 10. I have three VI's running on the board, which are attached.

- FPGA.vi is running on the FPGA-target of the board. It defines which inputs/outputs of the board I want to use in my project. 

- interface_FPGA assigns these inputs/outputs to different variables that I can use in other VI's in the project. 

- werking_bordje is used to record the data. I want to save some signals (time, laser_voltage, position_counter and the sine wave) to process them after the program is finished. The program is pretty simple: I compare two signals and determine the direction (forward or backwards) and action (take step or do nothing) my motor has to take. 

The problem I'm encountering is the following: Every 512 loops, my program starts to miss iterations, they normally start around the 2048th loop and then repeat every 512 loops. At the start the period of these missed iterations equals about 2 ms, but the further along the program goes the period of such a missed iteration grows (27ms for the 53248th iteration). I have tested this with different sample frequencies, they don't seem to influence the problem. 

I figured the problem may have something to do with the auto-indexed tunnel, where it is "full" every 512 values and has to "grow", but I cannot find a lot of information about it on the web. 

Any help as to what may cause this "buffer-problem" or how to overcome it, would be greatly appreciated. 

Thanks in advance!

Oliver

0 Kudos
Message 1 of 2
(705 Views)

Hi Oliver,

 

Glad to see you are using an SbRIO

 

After a short examination of the code there are a couple of recommendations I have. 
We don't recommend using auto indexing on FPGA Vis as this doesn't work with the architecture. I would recommend using some sort of transfer to the RT 

This is the same for the global variables. To pass information in to the VI I recommend using the methods in the following links 

 

http://zone.ni.com/reference/en-XX/help/371599G-01/lvfpgaconcepts/fpga_transfer_data/

 

http://zone.ni.com/reference/en-XX/help/371599F-01/lvfpgaconcepts/pfi_data_transfer/

 

Hope this helps,

Daniel

 

 

 

Message 2 of 2
(634 Views)