LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

simplest way to send data between applications?

Is CNV (CVI Network Variables) the answer to this question?

 

I'm looking at a single computer, running by necessity three different LabWindows CVI applications that I wrote.  One of which needs to send data (one string and another periodic float from a temperature sensor) to the other two applications for usage.

 

In my experience, CNV has been... unpredictable.  Once it's set up, it works fine enough, but it can be challenging to gaurantee that the clients are getting the freshest data.

 

Thoughts?

0 Kudos
Message 1 of 3
(3,825 Views)

Have you tried the Network Streams Library? It is point-to-point, so you would have to have Programme A sending seperate streams to each of the receiving applications.

Of course, you could go old-school and use the native Windows mailbox inter-process communications system.

 

There is also the Dynamic Data Exchange (DDE) mechanism, that appears to support call backs, so you do not need to constantly poll the data source.

 

There is UDP that also supports call-backs, and one-to-many broadcasts.

 

I have only used the Windows mailbox and CNV mechanisms. I wish we could have a bit more guidance from NI on the reletive merits of each of these methods. I agree with your comments on CNV.

 

Message 2 of 3
(3,798 Views)

If you're using a Windows OS, you can used named pipes, an OS interprocess communication (IPC) mechanism.  There are several other IPC mechanisms available in Windows, but with named pipes the scheme will work no matter how you distribute the process across a set of computers.  You have to come up with your own messaging to send across the pipes, essentially the pipe gives you a reliable byte stream.  And you have to coordinate the pipe names by design - each process must know the name of the pipe it wants, though you can have a master process distribute the names of the pipes when it schedules other processes (if that's how you're architected).  We've used this scheme successfully for many years.

Message 3 of 3
(3,567 Views)