10-22-2008 06:11 AM
Hi,
I am using NI cRIO 9014 and NI 9215 module to read the AC voltage signal. I used FPGA interface mode.
I read the FPGA control output in the RT program. I have to transfer the analog waveform to windows VI.
In the RT VI, i have a timed while loop with 1 MHZ clock .I am passing 500 microsec as FPGA 9215 loop rate and 500 microsec as iteration rate in RT. i place the data from FPGA on to a network double data type shared variable. I keep the RT VI running continuously. Now i open a VI on windows in the same project explorer and read from the same shared variable. Here i have to give the loop rate in millisec. i gave as 10 millisec. When i plot the data on to a chart in windows, the waveform data is completely skewed. If i put a chart in RT and check, i can see the plot correctly. So how do i synchronize the loop rates of RT and windows VI.
I want to use shared variables because they are simpler to code(transfer data).
Please let me know how to get the correct analog voltage data waveform on windows using shared variables from RT. The waveform in RT and windows should match. actually i can remove the plot in RT as the user only sees the windows VI.
Thank you. Hema
10-23-2008 05:33 AM
Hi Hema,
Thanks for the post and I hope your well today.
I noticed you hadn't received any support thus far.
There are several common ways to communicate between VIs running on RT targets and host VIs running on a Windows based desktop PC. You are correct, shared variables are a good method.
Please see this link - which explains more:
Real-Time VI to Host VI Communication Methods
http://digital.ni.com/public.nsf/allkb/48D244EC86971D3986256BD4005CCC28?OpenDocument
My understanding is to acheive Deterministic Data Transfer Between VIs you would need to use Real-Time FIFO. Are you familar with this?
If not, please take a look at this developer zone artcile:
Real-Time FIFO for Deterministic Data Transfer Between VIs
http://zone.ni.com/devzone/cda/tut/p/id/3934
and there is also an example,
Real-Time FIFO Example
http://zone.ni.com/devzone/cda/epd/p/id/1898
Please let me know what you think and how you get on,
Kind Regards
10-24-2008 05:59 AM
Hi Hillman,
Thanks for the post and links. I was basically not doing deterministic transfer. i used RT FIFO and wavefrom is fine .
-hema.
10-24-2008 06:16 AM
Hi Hema,
Im glad thats all sort! and thanks for letting me know.
Kind Regards,