LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

datasocket and ethernet crossover cable

Hallo,
I would need to share a variable between two CVI applications running on two different computers directly linked with an ethernet cable. I am not an expert but I guess I realized how to do it with datasocket when these computers are attached to the lan but I have no idea how to proceed if computers are directly linked. Do I need a crossed cable? Is it enough?
Any help would be greatly appreciated..
thanks
Michele
0 Kudos
Message 1 of 4
(3,329 Views)

Yes, a cross-over cable is sufficient. You will have to set up the TCP/IP connection on each side so that each machine has a fixed (different) address on the same subnet (e.g. addresses 192.168.0.1 and 192.168.0.2 with a subnet mask of 255.255.255.0).

Then all you have to do is start the datasocket server on one of the machines.

--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 4
(3,324 Views)

Connecting two computers directly together through ethernet can be done with a crossover cable as you suggest.  You are basically creating your own local network. 
You can also connect them through a hub, switch or router all of which will allow connecting more than two computers to your own little network.  These range from the kind of thing you see used for home networking at your local store (netgear, linksys, dlink) well under $100 to the fancy stuff from cisco.   With these you just use a standard (non-crossover) cable. 
A hub/switch just provide a way to connect to multiple computers.  A router is a switch with added features such as a dhcp server to assign IP addresses to your computers and a way to route data out from your local network to another network (WAN).

When using the crossover cable you will need to assign a static IP address for each of your network cards.  This is done under the properties settings for TCPIP.  There is lots of help on the internet on how to do this.  If you have anyone around who is familiar with home networking setups they should be able to walk you through it easily. 

0 Kudos
Message 3 of 4
(3,317 Views)
Dear all,
thanks for your kind help. I managed to run the reader/writer CVI example with two different machines but when I try my own example I can see that my reader
>DS_check = DS_OpenEx ("dstp://industrial/setup_data", DSConst_Read, NULL, NULL, DSConst_EventModel, 10000, &DS_setup_handle);
is seen by the ds server running on the other machines (the number of connection is increased by one) but after the 10000 msec I always get the following error message:
 NON-FATAL RUN-TIME ERROR:   "oo_system.c", line 284, col 40, thread id 0x00000504:   Function DS_OpenEx: (return value == -2147220221 [0x80040503]). The DataSocket operation timed-out
Why?
 
thanks againg for your help,
regards
Michele
 
0 Kudos
Message 4 of 4
(3,288 Views)