LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network streams influence performance

Solved!
Go to solution

Hey guys,

 

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!

 

Max

0 Kudos
Message 1 of 4
(2,422 Views)
Solution
Accepted by topic author Mtothaax

Hi Max,

 

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,393 Views)

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.

0 Kudos
Message 3 of 4
(2,378 Views)

Hi GerdW,

 

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.

 

Cheers

 

Max

 

0 Kudos
Message 4 of 4
(2,370 Views)