07-11-2017 09:39 AM
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
07-13-2017 04:50 AM - edited 07-13-2017 05:06 AM
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)
07-19-2017 05:15 AM
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.
07-19-2017 05:52 AM
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.