03-21-2005 02:04 PM
03-21-2005 03:40 PM
03-21-2005 04:03 PM
03-21-2005 04:27 PM - edited 03-21-2005 04:27 PM
Message Edited by altenbach on 03-21-2005 02:48 PM
03-21-2005 05:00 PM
03-21-2005 05:34 PM
01-08-2016 04:28 AM
This above conversation is really helpful. but my VI still doesnot seem to run. I have used the simplest udp send example by Altenbach (very new to LabView) and the server coudnot get the data. Hence I tried the last one adding a udp read after udp sent and attached a string indicator at the data out of it. still not working. Can anyone please help. I have attached a picture of my current VI. Thanks so much.
01-08-2016 07:26 AM
The UDP Write function needs a server address to send the data to. Enter the IP address of your server machine into the "Server Name" string control and try again. With an empty Server Name, the String To IP function will return the localhost network address so try to send the data to your own computer. And your server is located at port 25000, isn't it?
That your receive VI doesn't work could mean many things. Either you got the address or port wrong so the UDP datagram is sent to a not existing server. Or the message you send is not recognized by the server and simply dropped. Or there is a firewall that disallows the connection. Since UDP is connectionless you generally do not receive any indication if the data was even received. A non existing server or a firewall in between will simply mean the data is put on the network wire and then gets lost. The UDP Write has no way to verify that there is a server on the other side accepting the data package.
01-08-2016 08:21 AM
Yes i have added the destination server IP onto the server name. Even after that data is not received. I guess my data packet is not correct. As in not per UDP format. Can you help me with what do I fill in the "datagram" /data in of UDP write.
01-08-2016 09:01 AM
@Sabiha wrote:
Yes i have added the destination server IP onto the server name. Even after that data is not received. I guess my data packet is not correct. As in not per UDP format. Can you help me with what do I fill in the "datagram" /data in of UDP write.
Eeehm, no! The original writer of the UDP Server application is the first person you should ask about that. Or if it is documented you can read the manual. Otherwise the only other way to get to know what the data should be is to use a network sniffer and listen in on the communication between an existing client that works and the server. Even then it is often pretty cumbersome as you only get the raw bytes that are transmitted and have to figure out the actual message protocol with trial and error, which for more complex protocols can be a futile attempt.