07-17-2012 05:09 AM
I have an application working in LabVIEW version 7.1 and 8.5. This application is used to gather data from a remote computer using TCP/IP.
When the application is built as an executable, using an installer, the executable just returns failed to connect error messages.
The question is, do i need to do something special in the build process to enable the TCP/IP.
I get the same issue in both versions of LabVIEW and this is even the case when the executable is run on the original development machine.
Thanks in advance for any help.
AliasSmith&Jones
07-17-2012 08:39 AM
I have built the simple client and simple server example code and built these into a executable.
These work, so it would strongly suggest that the issue is within my application and not specifically the conversion to an executable.
07-17-2012 01:36 PM
I have built tons of applications using TCP/IP and have not had any issues. As you suspect I think it is something specific to your application. Make sure you are using the correct address and port. Also check that there isn't a firewall blocking your communications. What is the specific error message you are gettting? That can help narrow down what the problem is.
07-17-2012 01:42 PM
It may be something else within your code that is pulling your legs from successful execution. The following link explains one of the common issues your executable fails after building your executable. If you are using Current VI's Path within your VI, please read. If not, sorry about the spam.
http://digital.ni.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363
07-18-2012 02:07 AM
Mark, TailofGon,
Thanks for the replys, both would be helpful
but I have managed to sort the problem. It was in the application, I had placed a reference to the TCP/IP connection in a Global variable and referenced it in a subvi. It appears that the code was a little too sensitive to the order of execution........ and under the LabVIEW runtime engine that order changed so I was trying to use a reference that had not been initialised.
Just putting a control on the front panel for debug has fixed the issue, now I just need to organise my code.....
Thanks
AliasSmith&Jones - Aka Simon.
07-18-2012 11:00 AM
You have now discovered why global/locl variables are not recommended. You run into race conditions. You are much better off using other means to pass the data as well as use specifics methods (data flow being one, messaging being another) to control when things execute. Welcome to the workd of data flow programming. It is extremely powerful but you do need to understand it.
07-18-2012 11:33 AM
yeah, started writing LabVIEW many years ago, in version 3.1.1 ...... you would have thought i would have learned my lesson by now, but old habbits die hard, also time scales and project managers etc want it all done yesterday for no cost ![]()