From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Transfer Speeds Capped Using Network Shared Variables between RT PXI and Host PC

Host PC: Dell Precision 7530 with Intel(R) Ethernet Connection (7) I219-LM running Windows 10

RT Target: PXI-8840 in an 8-slot PXI-1042 running NI Real-Time Phar Lap ETS 13.1

LabVIEW Professional Development Suite 2017

 

I am trying to write an array of doubles from a non-deterministic real-time loop (running at 10 ms) to a network shared variable that is read from a host PC loop (running at 100 ms). I am using a direct wired, 1:1, Ethernet connection between the RT target and the Host PC. There appears to be a cap on the speed at which I can transfer data. If I send an array size of 8000 elements at 100Hz, I expect to see a transfer rate of about 51.2Mbps on the Ethernet port. It seems that the port is capped at ~28Mbps and the data does not update on the host PC for 5-7 seconds. If I set the array size to 4000 elements and send at 100Hz, I expect to see a transfer rate of 25.6Mbps and that is what I see on the port. The data updates immediately on the host PC. The Port Status on the Host PC says that my speed is 1.0Gbps and the Ethernet port on the RT controller has the bottom LED lit as Amber (1000Mbps). I have tried configuring both Ethernet Ports Link Speed as 1.0 Gbps/Full Duplex but there still appears to be a cap on the transfer speed. I am using the task manager to monitor port traffic. I have tried all variations for configuring the network shared variable (RT FIFO, Buffering, etc) and they seem to have no effect on the transfer rate.  

 

I have tried two different real-time setups. I tried a PXI-8115 using the same code and received the same results. I tried a cRIO-9066 using the same code and was able to achieve a maximum transfer rate of 128Mbps but that was still capping and would not go any higher. 

 

I tried uninstalling all unnecessary software on the real-time system to see if there was an issue with driver support. The only things installed on the controller are LabVIEW RealTime 2017 and the Network Variable Engine 2017 (and both their dependencies).

 

The ideal rate I need to achieve is 130-135Mbps (~20,000 array elements) which is less than 15% of port-load over a gigabit connection. Attached is a sample project showing the issue. Also attached is an excel file with my bench marking transfer speeds, a folder containing the configuration for the network shared variables, real-time system and software installed.

 

Has anyone run into this issue before? 

 

Thanks in advance for any help.

 

Chris

0 Kudos
Message 1 of 3
(2,084 Views)

Have you checked your CPU use? That could be the bottle neck

http://www.ni.com/tutorial/14675/en/

 

Also, have you considered trying network streams instead of shared variables. I think there's better optimization for throughput there.

0 Kudos
Message 2 of 3
(2,067 Views)

Nanocyte,

 

Using the RT Get CPU Loads.vi I found that I am only using 2% on each core. Also, when using the timed loop nodes I am able to look at the Expected End vs Actual End and I can see that each loops takes about 1 ms or less to execute and my loop time is 10 ms. When writing to a shared variable does the variable itself have it's own process/loop that handles the Ethernet hardware calls?

 

Network Streams might be overkill for my application because I do not need lossless communication. My real time controller does all the data handling and event/error logging in another non-deterministic loop via a RT FIFO. The use of the shared variable and the host PC is a means of controlling an external environment in which the RT controller cannot. For example, the host PC will tell a linear actuator to push on the DUT, the RT controller handles the communication of the DUT and reports what the DUT tells us back to the host PC via the shared variable. The problem we have is the 5-7 second delay because we don’t want the linear actuator pushing on the DUT for longer than it has to, especially when it undergoes hundreds of thousands of cycles.

 

I will continue reading on the network streams and see if I can get a test project going for that. Although I am starting to think my problem is more hardware related than program/software related. It is weird that I can change between an RT PXI controller and a cRIO and magically get an additional 100Mbps transfer rate out of the same program/software.

 

Thank you

0 Kudos
Message 3 of 3
(2,023 Views)