09-09-2010 10:10 AM
Hi all,
I have got two applications, a Server (that is connected to Embedded Device sensoring Temperature and Humidity), and a Client that recieves this information. Now the way which I have these applications working is that BOTH have the ability to Read or Write. The Server needs to Write Temp and Humid information, and the Client needs to Read these values. But also the Client needs to Write Control information (such as Turn on fan, turn on heater, turn on humidifier etc) and the Server needs to Read these values (and process, then pass them down to the Embedded device).
In order to do this I have set up two DataSocket connections on each application, one for Read and other for Write. They worked fine with a 'localhost' connection, but I am now testing it with two different computers over my home network.
The problem is the Server is to be running and Connected (waiting for the Client to connect), when I connect the server the client recieves information fine, but when I try to send control information via clicking a button, the Servers error message displays (using the DS_GetLibraryErrorString I think) "Error: Not Connected: Connection timed out.".
When I then Disconnect and Re-connect the Server everything works fine. But obviously I want to be able to prevent this situation, any ideas??
I can post code if need be.
Much appreciated
Rhys
09-10-2010 05:48 AM
Hi Rhys,
If you could attach your code (or a stripped down version of it that achieves the behaviour) along with the version of LabVIEW you're using that'd help hugely.
Thanks,
09-12-2010 09:52 AM
Thanks,
I have attatched code as suggested, and my LabWindows CVI is version 9.0
09-17-2010 10:09 AM
Hi Rhys,
That's a damn good name you've got there by the way, Rhys.
I've tinkered about with your project and managed to get it to connect first time on my PC. I've done this by including some files from the CVI folder into your project, then re building.
But once your code was running I wasn't able to get much functionality out of it except for the boolean buttons. Was this an issue just on my side?
I've attached the editted project in a zip file, and also a picture showing where I found the .fp and .h datasocket files I included.
I hope this works your side too! Have a great weekend now.
09-21-2010 04:32 AM
Hi again! not sure if you've managed to get the fix working?
I'll stay subscribed and keep a look out for a response. Otherwise I hope the application goes well!
09-21-2010 08:33 AM
Hi Rhys,
Your right, such a brilliant name!!
Much appreciated for your help, I have just come back from hols, and straight into Project write up work so at this time I have yet to test it out, but should do by tomorrow and I will let you know.
Thanks again
Rhys