Hi, I need to connect Labview to a C++ network client program. The user want to be able to easily modify the Labview part (ex : adding other components that follows a well defined interface) without having to touch to the network part. The solution is to develop a kind of "driver" (code that links 2 softwares, not soft/hard) between the labview part and the network one.
I thought at first to the following solution : connecting labview and the network through a DLL of my own. What other possibilities do I have ?
Can I make a real Labview driver, and make it interact with my network code, as if the network code was a piece of hardware, (I'm not sure I'm clear, there ) since the network code and the hard ware would have the same comportement : giving me arrays of bytes ?
I just begin discovering the Labview world and this is quite a hard project, so my ideas are perhaps totally stupid Please tell me what you think I could do.
First, if the application utilizes networking then the commmunications should use some standard protocol. It shouldn't matter what's at the other end of the wire.Second, could you say a little more about what you men by "adding other components"?Mike...ps: feel free to contact me directly at firstname.lastname@example.org
Certified Professional Instructor Certified LabVIEW Architect LabVIEW Champion
In fact, the global application is divided in three parts : a GUI made with Labview, fully customizable by the user (he should then recompile the GUI after each modification), a 2nd program that handles networking with a server.
Labview <-> network client <==========> Server Local | Remote
I need to find a way to connect Labview to the network client : these are 2 programs, running on the same PC at the same time.
Here are the ideas I have :
I first think to create an IVI driver, and to switch the VISA hardware calls by external function calls.
If I find a way to put my network client into a DLL, I need to make Labview call that DLL. But it must work in both way : labview calling the DLL, and t he DLL calling Labview.
Connect Labview and the network client threw another network code : sockets on both sides.
Is my overall problem a little bit clearer for you ? Thx anyway for answering.
If the remote server application receives and replies requests thru TCP/IP, the client application can be written with LabVIEW. The server sends a series of bytes that LabVIEW can handle.
If the client application is already written and debugged in C++ then you need to build a LabVIEW interface to the client then what is the interface available for the client? LabVIEW can call DLL functions, use ActiveX, DDE, etc. to operate the client. Check out; as long as LabVIEW is concerned, it may be as easy/difficult interfacing to the client app than the server app.
I have some experiences in Labview, and I am currently exploring on the use of C++ code to handle some of my time-critical applications. While I cannot give you an enlightening solution you your problem (since I am also in the exploring stage), I think I know where you can find help: http://www.ni.com/pdf/manuals/370109a.pdf . I think if you could establish a CIN and if your C++ parameters and variables are compatible with Labview, you should be able to take advantage of your already written code, without having to start from scratch. Reading the manual has been a great help for me, I hope it could provide you the same as well!!! Santiago
In fact, Labview v6 can't handle the type of communication I want : web services I should have told it before, but I need to handle web services, which are a way to connect 2 applications object-oriented, that enables methods calls as if there was no network. Its compatible between C++/C# (Microsoft) and Java !!! it works quite well. Check on google for better explanations I've got an existing server, that provides web services (Tomcat), running under Linux. Labview, running under Windows, must use these webs services. But web services are available only in a java or C# or C++ program. That's why I'm wondering how to connect Labview with a 2nd program (C# or C++, I don't want java).
I can't put the web service handle code in a DLL that Labview could call. This doesn't work since web services are designed for object oriented languages). DDE or basic socket seem to be the 2 only options I have.
thx for the link. I already read this pdf before posting messages on the forum. I'm not sure to understand everything about CIN code.
What are the languages supported ? It speaks about C code, but it does not solve my problem : indeed, I need to program in C# or in C++ managed language : the languages of the new Visual Studio.NET, which supports web services (read my answer to Jean-Pierre's message).
Do you think I can use CIN ? I don't understand everything