From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-24-2009 02:22 PM
Hi,
I have the following FPGA vi and RT vi (attached). I am simply trying to transfer the data from the FPGA to the RT vi (using Target to Host DMA FIFO) and then to plot the data in the RT vi.The signal that I take as analog input is a 10 Hz, 1 V amplitude sine wave though 9215 module.
However, in the RT vi , I get only a fluctuating output, with only values 0 or 1. Also I see no timeout happening with the RT vi settings as: "TimeOut = -1" and "Count(uC) = 25"
Why could this be happaning?
Thanks in advance..
-Mandar
Solved! Go to Solution.
02-24-2009 02:23 PM
I am also attacing the VIs for convenience...
02-24-2009 11:04 PM
Hi Mandar,
Have a look at the data type of your FPGA and RT code.The FIFO that you have setup needs to have it's datatype changed to a Fixed point. You can do this by navigating to the properties of the FIFO and changing the datatype to FXP. Then, make the appropriate changes in the RT side as well so it exposes FXP instead of an unsigned 32-bit integer.
02-24-2009 11:52 PM
Dear Adnan,
DMA FIFO supports only U32 data type. It is given here:
http://zone.ni.com/reference/en-XX/help/371599C-01/lvfpgaconcepts/pfi_data_transfer/
I tried converting the FXP data from the 9215 module to U32 before sending it through the FIFO (screen shot of this block dig is attached), but this is not helping and I am getting a similar output (as earlier) on the RT vi viz. fluctuations between 0 and 1.
However, I am able to transfer the data from the FPGA vi to the RT vi by Programatic Front Panel Communication (which happens in FXP data type only)....
I am attaching the output on front panel if the RT vi. In this the chart on the right shows almost the same signal that I am giving through the 9215 module, but the graph on the left, which has data plotted directly obtained from the FIFO, which is a horizontal line 😞
Can you suggest what else I could do?
Thanks,
Mandar
02-25-2009 12:12 AM
Hi Mandar,
Not with 8.6. You have pointed me the documentation of 8.5 (I didn't realize you were using that version). Have a look at the following article; it should solve the issue you are facing:
How Can I Transfer My Fixed-Point Data Using a FIFO In LabVIEW?
02-25-2009 01:51 AM
Hi Adnan,
Thanks for that link... I am now able to get the data in the RT vi using FIFO...
However, I am not able to understand the time stamps when I plot the data on the waveform chart and waveform graph... hence I am not able to check if the signal that I plot is of the same frequency that I input or is different
I am attaching the screenshots of front panel and block dig of RTCode
Thanks,
Mandar
02-25-2009 02:28 AM
You need to understand what the difference is between a graph and a chart. The following link and the examples will help you understand them:
Have a look at the examples:
labview\examples\general\graphs\gengraph.llb
labview\examples\general\graphs\charts.llb
02-25-2009 01:09 PM
I have read the Help and now I use Build Waveform vi to generate the waveform before plotting it on a waveform graph.
(1) In this, I put the value of dt same as the "Count (usec)" control which sets the loop rate for my FPGA vi. Eg: If I set "Count (usec) = 500", I put "dt = 0.0005"
Is this correct? Does it mean that the FPGA while loop and the while loop in my RT code run at the same rate?
(2) For " t0 " , I use the Get Date/Time in Seconds vi , however, it is giving correct date, but wrong time. However, the "Create Waveform example VI: labview\examples\Waveform\Operations.llb " shows the correct date and time. Where can I be wrong?
Thanks,
Mandar