LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DataSocket

    Hi,
           I'm new to DataSocket.. I'm using Labview V8.0.. I was wondering how am i able to get the input from a joystick and send it to another computer? How am i able to setup a DATASOCKET connection? Is there like any Simple LAbview Program for me to Try GetTing the COnnEcTIon Up BEtween MY labtop and THe DesktOP... THanks.. ^_^
0 Kudos
Message 1 of 6
(3,928 Views)

You can do a search on the N.I. website for "shared variable" and get lots of articles on it's use. Here's a couple of excellent links:

Using the LabVIEW Shared Variable
NI Publish-Subscribe Technology

There is also a Shared Variable example in the NI Example Finder: (Tools...Find Examples....New Examples for LabVIEW 8.x....Shared Variable)


 
0 Kudos
Message 2 of 6
(3,915 Views)

Erm.. i'm sorry.. Cause my teacher wanted me to use the DATASOCKET in the Labview... So is there any way you can help me to solve my problem using DATASOCKET??

 

0 Kudos
Message 3 of 6
(3,914 Views)
Sure, I'll give it a shot...here's a screenshot of two loops (I did this in LabVIEW 8.5), you would put one your desktop and the other on your laptop.
1) Make sure the data socket Server is running on one of the two machines, for example the desktop.
2) Run the READ loop on the laptop first and find the DataSocket server by typing in the name of the machine, for example: "\\desktop" in the dialog. Pick the "samplenum" as the data type.
3) Run the WRITE loop on the desktop and browse to the Datasocket server under "My Computer", again choose "samplenum" as the datatype.

You should now have communication from the one machine to the other, in this example an incrementing number showing in the indicator on the laptop side.

Keep in mind that this is a simple example.






Message Edited by Bill@NGC on 08-23-2007 10:44 PM

Message 4 of 6
(3,907 Views)
Hi,
      The previous post was a great help to me... I think i forget to tell you that i'm using wireless network to connect up between my labtop and desktop.. So do i have to key in any URL or is there any configuration that need to be done cause somehow, my desktop( is unable to find the DATAsocket server(labtop))... Hope you can help.. Very SOrry about IT..
0 Kudos
Message 5 of 6
(3,897 Views)
Try running the datasocket server on the desktop instead of the laptop and typing in the name of the desktop, e.g, "\\desktop" when you run the VI on the laptop.

By the way, my example above was a poor one I noticed. Pull the Datasocket Open out of the while loop and put it to the left of the while loop just after the DataSocket URL. This way you're not doing an Open each loop iteration without a corresponding Close.

Message Edited by Bill@NGC on 08-24-2007 11:56 AM

0 Kudos
Message 6 of 6
(3,868 Views)