LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between two process(cvi 7)

Hello ,

I want to design two separate programs , they can be as client/server mode . Excepting TCP/IP , I'd like to know that if there are another different ways to setup the communication relations between the two processes ? Thanks .
0 Kudos
Message 1 of 7
(3,379 Views)
datasocket and TCP are relatively simple to use, datasocket being the simpler of the two since it takes care of tracking any data types for you as well. You can find several Keywords Search: cvi datasocket online about how to use datasocket to send data from one app to another. There are several documents available for this as well.

Hope this helps

Bilal Durrani
NI

Message Edited by Molly K on 02-19-2005 12:01 AM

Bilal Durrani
NI
0 Kudos
Message 2 of 7
(3,380 Views)
David,

ActiveX is also an option, It takes some more programming, but it's a non-TCP way to to communicate. CVI has a wizard that can help you create an ActiveX server and an ActiveX client. There is an example at C:\Program Files\National Instruments\CVI70\samples\activex\servers\SimpleEXE where they create a simple ActiveX server and a client. Run first the server in release mode and then the client to test it.

I hope this helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 3 of 7
(3,379 Views)
I do not think the DT is an easily way , because the DT server can not be configured by program , it always needs to configure by manual , and the server window can be seen on the taskbar . I am afraid that once user closing the window , all tasks would have to break down .

David
0 Kudos
Message 4 of 7
(3,379 Views)
Juan ,

Could you advise me the advantage between the ActiveX and the interprocess communication technologies ? Maybe the Activex technologies has more excellence ?

David
0 Kudos
Message 5 of 7
(3,379 Views)
David,

ActiveX is a good way of having a client application launch a server application, call functions and pass data. The advantages are that Windows handles threading and synchronization issues for you. The main draw back is that takes some programming and time to get the server up and running. A big advantage of ActiveX is that someone else could use some other programming language (Visual Basic, LabVIEW, etc.) to access you application.

If you will have just 1 client, TCP/IP will be much faster to develop, the hardest part will be transferring data types. The problem here is that only the client application that you create will be able to talk to your application.

I hope this helps.

Juan Carlos
0 Kudos
Message 6 of 7
(3,379 Views)
Im assuming by DT you meant datasocket .

Most of the configuration in the datasocket server does not need to be touch unless the application needs something really specific. Plus you would only need to make the change once and the server would save the setting for you.
And if there is an active connection, users cannot close the datasocket server on the taskbar since they will get an error message saying that an application is using this and has a reference open to it. So it will not allow users to close the server.
For master-slave type applications, the default settings of the datasocket server should work.

Bilal
Bilal Durrani
NI
0 Kudos
Message 7 of 7
(3,379 Views)