Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Real Time transfering waveform from target to host in real time

I´m using LabVIEW Real Time ver 8.0, with PC as Desktop and a NI PCI-6251 for a PID control.
 
Each iteration of the timed loop takes just 1 ms and I want to display every 60 seconds to display in an XY graph, two sinous waves.
 
I have tried to transfer the data using shared variables, but I have not been able to transfer the data.
 
Does any one can help me ?. Thanks
 
Simbani
0 Kudos
Message 1 of 3
(3,021 Views)
Hi Sibani

 What is the problem exactly? The comunication between host and PC? or how to plot 60 iteration from your loop?

In the first case; I suggest using the RT wizard you can find on the LabVIEW splash screen (image attached) or try to run several communication examples depeding on which method you prefer to use (I strongly suggest shared variables). Once the comunication works, add the PID control on the RT target

On the second case, do you mean a XY-plot or an graph? The easiest is to use a waveform plot with lenth=60, where you feed your signals. Some examples included with LabVIEW you can check are

"graph temperature.vi", "XY graphs.vi", "Waveform and XY plot.vi", "waveform graph.vi".

Hope this helps
Javier Gutiérrez
NI Application Engineering
0 Kudos
Message 2 of 3
(3,002 Views)
Hi Javier,
 
I am already using shared variables to send the data from the target to the PC. 
 
If I store the data in an array of 20 000 points in the taget and I send them, just after the test has finished, to the PC without any problem. However, when I try to send the data by means of two shared variables (the same I use for the 20 000 points) to the PC continuously, during the test, I get not any data and quitre often the program hangs. In the first case, the shared variables are outside the Time Loop and
in the second case inside it
 
Because, each iteration of the Time Loop takes 1 ms, I guess, the system has not enough power to do all the jobs, PID + sending such a huge amount of data. Thus, I intend to send to the PC, say every 60 seconds or 600 seconds..., just the number of points correspondent to two sinous waves, this would make a total of no more than 500 points depending on the frequency. After the PC receives the points, I would display them in the XY graph. The screen will refresh with the arrival of the next sending and so on.
 
I have tried to program so that within the critical loop I connect single process variables that I read from in a none critical loop to write their values to a network shared variables, but until now, I have not overcome the problem.    
 
Thanks for your help
Simbani
 
0 Kudos
Message 3 of 3
(2,992 Views)