01-23-2014 09:27 AM - edited 01-23-2014 09:28 AM
I got a network stream implemented to tranfer a big amount of data from my cRIO 9068 to my PC to save it there.
Now I noticed a performance decline of the RT when the tranfered data through the network stream was quite big. I'm talking about arrays with the size of around 5MB here. My goal is to transfer even bigger arrays through the network stream with the performance of the RT not beeing influenced.
The program is build with 2 loops.
One loop for the network stream, the other to simulate the controls.
Both loops are timed with 10 Hz.That's the frequency necessary for the controls.
Usually every dataset reaches my PC. The performance decline I mentioned before I notice when a generated test signal generated by the RT becomes iregular.
Didn't find nothing on this in the forum. Can somebody help me?
Thank's a lot!
Solved! Go to Solution.
01-23-2014 10:04 AM - edited 01-23-2014 10:05 AM
why did you scale your picture before uploading? Atleast the text is hard to read...
Do you really want to stream 5MB arrays with a 5ms interval (that makes 1GB/s!)? And then you really wonder on high CPU consumption on the cRIO? Really?
Is your "size" in number of elements or really in memory footprint?
01-23-2014 11:28 AM
If you are trying to "stream" data from one system to another, you should probably use a Producer-Consumer structure -- a loop that generates the data (at whatever rate it is), puts it in a Queue of "reasonable" size (maybe a few KB), and sends it to the Consumer loop that dequeues it and hands it off to the Network Stream engine (which acts as yet another Producer, with the Consumer being on your Host PC).
If you are running LabVIEW 2013, there is a (somewhat complex) Project Template, LabVIEW Real-Time Wavefore Acquisition and Logging (NI-DAQmx) that you can adapt to do some of what you need. I believe that the "logging" it discusses is local on the RT side, but it is not difficult to configure a third Network Stream for transmission of data-to-be-logged from the Remote RT side to the Host PC.
Once you understand what's going on in this example (read the documentation!), you'll be able to modify it to suit your needs.
01-23-2014 11:47 AM - edited 01-23-2014 11:50 AM
thanks a lot! Streaming ratio was the key!
The solution now was to go down with the frequency (in my case down to 2 Hz) and to split the signals (arrays) into smaler parts. I can define that size on the front panel.
In fact this VI was mainly to find out about the limits of Network streams.
But there is still one curious thing. When I set the buffer size of the network stream up to 160,000,000 elements (Int 16) - around 300MB- my RT collapses or doesn't write any data on the stream.
I guess that is because of the memory of my RT? (NI cRIO 9068)
@Bob_Schor: Thanks a lot! I'll try that as well.