LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

things to consider when using UDP

Hello all,

 

I am trying to create a UDP receiver program which can receive short messages from four different network devices.

Could you please tell me what should be considered when doung so:

 

1) Should I use four different vi-s for that (each vi for a device) or is it ok to use four loops in one vi.

2) If the latter, how should the loops operate (is there some timing required, etc) so that the messages are received as safely as UDP allows.

 

I know this question is somewhat  imprecise or blurry, but I would really appreciate some pointers on the subject.

Thank you in advance,

Märt Juurma 

 

0 Kudos
Message 1 of 2
(2,358 Views)

Hi Juurma,

 

You can do this in one program. There is an example program under Help>>Find Examples...>>Communicating with External Applications named Multiple Connections - Server.vi that is for TCP, but the top loop displays how you can use to listen for multiple ports at the same time by creating an array of connection IDs.

 

If you need to, you can also use UDP Receiver.vi as an example of how to set up a UDP receiver, which you can integrate with the loop structure from the VI above.

 

I hope this helps.

 

Regards,

Stephen S.

National Instruments
Applications Engineering
0 Kudos
Message 2 of 2
(2,323 Views)