From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

connect to an application on a differnt PC by udp

I would like to connect to an application on a different computer by UDP. Therefor I download and tested the UDP-example and but it didn't work. The socket address is an integer. How can I transfer the name of the second computer into an IP-address and how may I get this value into the UDPWRITE command. Any help will be great.
0 Kudos
Message 1 of 4
(2,656 Views)
You might want to consider using Datasocket or TCP if you want a relaible way of sending data across a network. CVI has some shipping examples for TCP and datasocket that demonstrate this. They're extremely robust and simple to use.
You can find them under ..\CVI\samples\tcp and ..\CVI\samples\datasocket.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(2,656 Views)
Thank you for your answer, but the problem is that the application, where I would like to connect to, is written by a different department and they use Labview and UDP. Using a Labview-dll is possible, but will be not so useable for me.
0 Kudos
Message 3 of 4
(2,656 Views)
The example that you saw was based on Win32 api. It gave you some basic functionality, but you can go into the code and see how it worked. Here is a link to an example of this using VC. Once you install the windows sdk that comes with CVI, you can use those functions with CVI. This way, you can customize it to what ever you need.

Good luck with your app.

Bilal
Bilal Durrani
NI
0 Kudos
Message 4 of 4
(2,656 Views)