11-21-2008 04:07 AM
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
11-24-2008 03:49 PM
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.