Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
2 ratings:
 3 out of 5     Rate this Document

UDP Communication Using Multiple IP Addresses on the Same Port

Primary Software: LabVIEW Development Systems>>LabVIEW Professional Development System
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I am trying to communicate with multiple devices using the LabVIEW UDP VIs. I have two devices with unique IP addresses that are both listening on the same port. I can open a connection to a single device using UDP Open VI without a problem. When I try to open a second connection on the same port to communicate with the other device, I get receive the error

Error 60 occurred at UDP Open in name_of_vi.vi.

How should I go about communicating to both of these devices?

Solution:
This error occurs because you cannot open multiple UDP connections on the same local port. However, the local port and the remote port do not need to be the same. The local port is determined by the port input of the UDP Open VI. The remote port is determined by the port input of the UDP Write VI. For each write, set the remote port to the port number on which the corresponding device is listening.

Related Links:
Developer Zone Tutorial: UDP Communication in LabVIEW
KnowledgeBase 39B8E4DS: Recommended Packet Size for UDP Communication

Attachments:





Report Date: 05/20/2004
Last Updated: 07/27/2007
Document ID: 39J9C1HD

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit