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..
Solved! Go to Solution.
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.
DMA FIFO supports only U32 data type. It is given here:
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?
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:
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
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:
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?