LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fundamental Question about using datasockets

I have been experimenting with a client/server set up using DataSocket functionality as the communication mechanism. My 'client' needs to also be switched into a 'server' when the User chooses to do so. In this instance, the 'client' machine now reads AND writes data to a DataSocket server.

The 'Server' is already running in this instance and is busy publishing DAQ data to a DataSocket Server. I am currently using just the 'DataSocket Read.VI' and 'DataSocket Write.VI' in both the VIs running on the 'client' and 'server' to retreive and send data to the DataSocket Server. What I can't work out is how to ensure I am sending/retrieving data from the same DataSocket server.

I can successfully achieve my go
al ONLY when the 'client' starts its own DataSocket Server by using the "Launch DS Server if local URL.VI". However, I understand that this is not the preferred method since I now have 2 data socket servers running on my network and hence 2 security profiles to maintain. Help!

What I don't really understand is how to set up the client machine to write to the same DataSocket server that has previously been started on the "Server" machine. This Server machine is the same machine performing the DAQ. I hve been experimenting with the additional DataSocket VIs in the vi.lib/platform/dataskt.llb library but have had no luck.

Is there a way to achieve my goal by starting the one DataSocket server on the designated 'Server' machine? Or does the nature of the design require 2 DataSocket servers to be run in order to send and receive data successfully.
0 Kudos
Message 1 of 2
(2,222 Views)
Reading and writing to the same DataSocket Server in a single VI is not a problem. However, I would recommend only using one DataSocket Server -- doing so will keep the complexity down. If you are concerned about running the DataSocket Server on a machine that will be switched from 'client' to 'server' then you might try running the DataSocket server on a networked 3rd machine (Win 32). Just be sure to reference the 3rd machines IP address in the DataSocket URLs.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 2 of 2
(2,222 Views)