LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Real-Time UDP Issue

I have a CVI Real-Time ethernet communication issues that I am trying to resolve.

I am using CVI 8.5 with the real-time module for an embedded application on a PC/104 target.  I am using UDP to communicate with another system.  Also, I am using the Winsock 1.1 API functions to send and receive the UDP information. 

 

I am encountering a problem with what appears to be intermittent dropped packets.  The external system reliably responds to requests on the order of 1ms.  The size of the packets are small (approximately 25 bytes).  I have used WireShark to verify the packets are sent and received correctly.  However, on random basis some of the response packets are not detected by the embedded CVI application.  Again, WireShark shows that the response packets were sent but the CVI RT application does not detect the packet. 

Are they any outstanding TCP/IP stack issues with CVI Real-Time?

 

 

0 Kudos
Message 1 of 6
(4,103 Views)

Hi tedoyle,

I'm not seeing records of specific issues regarding UDP with CVI Real Time. If you can use another method, such as TCP/IP, you might want to take that route. If not I recommend reading this discussion forum. To summarize, you might try increasing your buffer size or check for CPU hogs. Let us know if it works.

Regards,

Hillary E
National Instruments
0 Kudos
Message 2 of 6
(4,074 Views)

Thanks for the reply!

I have dug a little deeper into this issue and have found a situation that I cannot explain.  The PC/104 card uses an Intel 82551ER Ethernet controller.  The NIC is set to interrupt mode.  If I manually set the NIC speed to 10Mbit I have no problems.  If I let the NIC auto negotiate or force the speed to 100Mbit then I experience random dropped packets.  However, my packet sniffer (WireShark) shows the packets are infact being sent.  This problem does not exist if I use Windows as the OS.  This seems to point towards a CVI-RT issue. 

Any ideas?

 

0 Kudos
Message 3 of 6
(4,052 Views)
My main thought is that this could be related to lower priority loop. It's possible that the lower priority loop happens to be sleeping when the packet is sent. That might be why it works at the slower rate but not at the faster rate. UDP is shown to be lossy. 
Regards,

Hillary E
National Instruments
0 Kudos
Message 4 of 6
(4,025 Views)
I don't believe the issue is related to some sort of thread priorty inversion.  The CPU loading is approximately at 10%.  I have done some real-time traces of the application and see nothing odd.
0 Kudos
Message 5 of 6
(4,010 Views)
An update: R&D is working with this issue offline.
Regards,

Hillary E
National Instruments
0 Kudos
Message 6 of 6
(3,956 Views)