LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connection Labview/c++ program. What choices do I have ?

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 Smiley Happy) 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 Smiley Happy Please tell me what you think I could do.
0 Kudos
Message 1 of 8
(1,122 Views)
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 mlportersr@webtv.net

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."
0 Kudos
Message 2 of 8
(1,122 Views)
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.

Or

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.

Or

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.
0 Kudos
Message 3 of 8
(1,122 Views)
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.


LabVIEW, C'est LabVIEW

0 Kudos
Message 4 of 8
(1,122 Views)
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
0 Kudos
Message 5 of 8
(1,122 Views)
In fact, Labview v6 can't handle the type of communication I want : web services Smiley Happy
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 Smiley Happy
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.
0 Kudos
Message 6 of 8
(1,122 Views)
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 Smiley Happy
0 Kudos
Message 7 of 8
(1,122 Views)

Altaf,

 

It isn't necessary to spam multiple messages with a link to your video.  Particularly a message thread such as this which is over 9 years old.

Message 8 of 8
(535 Views)