Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for istructions/examples for using winsock in Labview

I'm looking for instructions or examples of using winsock in Labview. Looking in the NI examples I found an example using winsock UDP with Labwindows but nothing for Labview. Is the same function named different in Labview?
0 Kudos
Message 1 of 8
(8,414 Views)
Hello,

Re-stating David Duffey's response: "winsock" is simply the tcp/ip stack implimentation and api for Windows. The standard LabVIEW TCP/IP functions will work just find connecting / listening with winsocket applications.

So you can use any TCP/IP example that is shipped with LabVIEW. Do let me know if you have any specific application for Winsock that is not covered.

I hope it helps,
Rajiv G
Message 2 of 8
(8,401 Views)
I have a similar request: I would like to dial a number (which will each time be different) and connect to another PC via PPP or TCP through a modem. How to do it?

Message Edited by alysko on 03-08-2006 04:00 PM

Message Edited by alysko on 03-08-2006 04:00 PM

0 Kudos
Message 3 of 8
(8,167 Views)
alysko,
 
That's a pretty open-ended question, as there may be many different ways of doing that.  I found a couple links that are probably a good place to start:
 
 
 
I hope these help!
 
-Justin
0 Kudos
Message 4 of 8
(8,147 Views)
Thanks for the links. Unfortunately, I am specifically looking for the ways to use WinSock (I want to collect data from a number of remote locations and the WinSock would provide me with an effective way to
a) control the telephone number to be dialed (different for different remote stations)
b) provide me with TCP/IP, so I could use the full power of LabVIEW seeing a remote computer as an IP address (and being able to use shared variables, web server, data socket etc. instead of me having to program all that myself)
 
The other acceptable way would be to utilise a driver for a virtual network card (so I can programmically access it as TCP/IP on one side, and as a flow of bytes on the other, "virtual network cable", side). Any suggestions in this direction? By the way, it would be the best if the National Instuments would do such a virtualisation themselves. It would allow to utilise a number of solutions painlessly.
0 Kudos
Message 5 of 8
(8,148 Views)
Hi Alysko,
 
I found some example code which uses the Winsock ActiveX method for doing TCP comms: 
 
The server should be run first, and then the client.
The client can connect and disconnect and leave the server listening. If the server disconnects then the client is set to stop too.
The method uses register event callbacks to run the code responsible for connect (server side only), disconnect and data available.

 
This code was developed in LabVIEW 7.1.  I hope that this will help you get started!  By the way, in the future you will have better luck getting replies on this topic if you start a new post in the LabVIEW forum.
 
Best Regards,
Megan B.
National Instruments
0 Kudos
Message 6 of 8
(8,128 Views)

Forgot the attachment!  Here it is...

-Megan

Message 7 of 8
(8,124 Views)

I tried the code example under vista with 8.5.1 version of labview but it is not working.

 

I need to reimplement the DSTP reader using winsock in labview.

 

Thanks,

0 Kudos
Message 8 of 8
(7,374 Views)