LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multicast UDP server - receiver

Highlighted

What I am trying to do?

Establish a multicast UDP server and receiver.

 

Problems  faced?

  • When I run the receiver for the first time (i.e before running the server), it is shows “message received” which should not be happening until actually the message is passed.
  • I want to be able to send and keep receiving messages in real time, but with the attached code it is not happening. I need to start and stop the server between two messages.

I kindly request you to help me fix this code and furnish details about the things I am missing out.  Herewith, I attach the code with this. Thank you in advance.

0 Kudos
Message 1 of 5
(231 Views)

Ah, what a mess!

Your message popup in the receiver run in parallel of the UDP read. Place it inside a case structure so it only executes if UDP read completes without error.

 

(Your port should be U16 datatype, not orange. You should not have any connection ID constants. Use a simple state machine instead of deeply stacked structures.)


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2 of 5
(196 Views)
Highlighted

I am learning this tool myself since a week or so. I am partially able to infer what you are trying to communicate. It will be helpful for me if you will be able to provide the solution in the form of code. Sorry for the trouble.

0 Kudos
Message 3 of 5
(189 Views)
Highlighted

There are many more things wrong with your VI, for example the inner receiver loop can never stop.

 

Here's what I had in mind:

 

altenbach_0-1574094358031.png

 

Personally, I would not use popups. Just use an status indicator on the front panel.


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 4 of 5
(163 Views)
Highlighted

Really so kind of you. Thank you so much. I will study what you have furnished here. Sure, It is helping to get better perspectives and code better.

0 Kudos
Message 5 of 5
(127 Views)