LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/write problem with Datasockets.

Hi, I'm a newcomer to Labview, and I'm having a problem with Datasockets. When trying to create a 'Publish & Subscribe' socket between two machines it only works on one, the one whose dstp address is the local machine, the other being incapable of writing to this 'host' and displaying red LEDs, although it is reading from the host. Also I've only managed to set up these read/write connections using the right-click options, how is it done programatically? Any clarification on the issue (whether directly connected or not 🙂 would be appreciated. Many thanks,


Tom
0 Kudos
Message 1 of 4
(2,320 Views)
Hi Lector!

This is normal behavior for DataSocket. You want to run a DataSocket server on both machines. Although you can SUBSCRIBE to a DS server anywhere on the network, you can only publish to your local server. We do a LOT of Datasocket work here, and this has never been a problem. It's a real security bonus, as well.
It's a good idea to split all your read and write functions. Although some front panel objects (knobs, particularly) can be controls and indicators simultaneaously, it's good practice, for a number of reasons, to NOT use both functions. I build "dummy" front panels for all my VI's which I distribute to all my colleagues who need to work with a remote instrument.
You cannot really appreciate DataSocket, till you've tried to rem
otely control something with PC Anywhere over a slow network! A bit of practice, and you'll wonder how you ever did anything without DataSocket. I'd be glad to work with you on any particulars. Good Luck!

Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 2 of 4
(2,320 Views)
Thanks for the reply Eric, but I'm still a little confused. Specifically, what I have is a Double control that tells a CAL at what temperature to set a cryostat. What I want to be able to do is read what temperature the cryostat has been set to from another machine, and also to alter the setpoint on this secondary machine so that the host machine reads it as a new setpoint. I can't see how it's done as a control can't accept an input (can it?). Thanks for any further clarification,


Tom
0 Kudos
Message 3 of 4
(2,320 Views)
Actually, you can publish to a DataSocket item from a remote machine. You are probably unable to because of your DataSocket Server settings. Open Start>>All Programs>>National Instruments>>DataSocket>>DataSocket Server Manager. Check the settings for DefaultWriters. You probably have it set to localhost if you are unable to write from a remote machine. You can either add the remote IP address or change it to everyhost, which would allow anyone to write to it.

Also, with LabVIEW 7.0, there are new DataSocket features which are very helpful. For one, you can programmatically set a communication line to be Publish & Subscribe. Second, it now offers buffered DataSocket which makes sure that you don't overwrite data on the DataSocket server. If
you will be doing much DataSocket programming, you might want to look into that.
J.R. Allen
0 Kudos
Message 4 of 4
(2,320 Views)