11-14-2007 04:42 AM
11-14-2007 02:01 PM
I have tried using two FIFOs and failed. Some very odd data is stored to one file and no data to the other. (although the filenames are the same above, they are differnent in my VI). I am recieving a 50400 error can not read from fpga. Please help, i have been trying to get this simple information for my thesis for days as i have no labview experience.
Are there any comprehensive tutorials for the CRIO or similar devises?
Many Thanks
11-14-2007 04:29 PM
ern,
Here are some thoughts.
Make sure that your FIFO type is Target to Host - DMA. If you use more than one, make sure that the DMA Channel is unique for each (0 and 1 for instance). Check the depth to make sure that you are not running out of space in the FIFO. Your FPGA code looks ok to me.
In the GUI, you are specifying to read 1023 elements at a time. Is your FIFO this same size? This means that you will most likely always miss edges as the GUI will not read out the data until 1023 data points are present. You are trying to stream edge timestamp information to the GUI so you have to stay ahead of the FPGA or you will miss data. You could code your GUI so that you use a shift register to pass the number of Elements Remaining back as an input to the read operation as the Number of Elements to read. You could seed the shift register with a value of 500 (or something like that) as the initial read. You would also have to make sure that if the number of elements remaining was too small (or zero) that you set it to some minimum or you may read data out one point at a time depending on your edge rate.
In you GUI loop, you are writing to a file too. You might want to use a producer consumer type architecture to read in the data. One thread would read out the fifo as you currently have. A second thread would write the data to a file. You would pass data from the fifo thread to the file writer thread with a queue.
Hope this helps!
-cb