LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am not receiving any data over UDP

Hi,

I am trying to read data on LABVIEW that is being sent over UDP from a micro-controller across the room. I know that the micro-controller is sending the required data as I can read the data using packet sender.

 

However, when I tried to implement the same thing on labview, I can't seem to get anything (I tried sending data to the micro-controller over UDP using UDP write and that worked perfectly fine). Both the micro controller and PC running labview are connected to the same network. When I run the code and highlight the execution, i notice that the program gets stuck at the UDP Read block. 

I am very new to LABVIEW and I don't understand what the problem is.

I have attached the code that I am using below.

 

Thanks in Advance.

Muda

0 Kudos
Message 1 of 4
(2,465 Views)

looks very much like the "Simple UDP - Receiver.vi" from the labview examples.

 

are you sure you don't get anything? it might just be overwritten by an empty string, because the string will be updated every 100ms

 

add an indexing out tunnel to your loop, and have a look afterwards.

i think, that highlight execution might hinder your debugging in this case.

 

also use the "Simple UDP - Sender.vi" from the example project to simulate your micro-controller-sender and see what happens then.

 

in case you don't know where to find this:

Menu "Help" -> "Find Examples" --> Search for "UDP" and then open the "Simple UDP.lvproj"

 

regards

 

 

UPDATE: so after playing with the example vi myself, you should have seen something

could you confirm with something like wireshark, that the udp packets reach your machine? (i don't know what packet sender is or does, or where it resides)


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 4
(2,418 Views)

Hi,

Sorry for the late reply, I haven't recieved an email for you reply for some reason.

The example vi work fine.

 

In erply to your update, packet sender is similar to wire shack, it send a packet to the port and reads any packet from the port.

 

thanks for the prompt reply and once again sorry for my late reply.

0 Kudos
Message 3 of 4
(2,382 Views)

I think it is probably a firewall issue, so I will disable my firewall and attempt to see if i can read the udp packets.

I tried to read the packets using the myRIO and that also didn't work.

0 Kudos
Message 4 of 4
(2,372 Views)