LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between 2 LabVIEW applications

Solved!
Go to solution

Dear all,

 

I'm looking for the best way to implement a communication between 2 Labview applications. The context:

- 2 exe build from labview code

- 2 exe on the same computer

- communication must be fast and safe (no data loss)

- application 1 send a data to application 2, application 2 must process data received as fast as possible (like an event)

- time between 2 data not known (between 1s and...)

 

In your opinion, what is the best way to do that?

 

Regards,

 

FrancisM

Francis M
0 Kudos
Message 1 of 7
(2,696 Views)

A lot more information is needed to properly make suggestions. What is the data? When you say "fast" what do you mean? Will there be large packets of data? 

 

Is there a reason that you chose to make two separate applications on the same machine? Could this be made into a single application with two separate loops? 

0 Kudos
Message 2 of 7
(2,687 Views)

Assuming that there's some reason you want two exes (as John said above, making a single exe might be easier, and if it's for maintaining/upgrading parts of code, PPLs might be a better solution than separate exes, but anyway...), I'd take a look at Network Streams.


GCentral
Message 3 of 7
(2,681 Views)

Hello,

In my specific problem, I've a big and complicated application (application 2) who received data from RS232. It's not so big data, typically a bar code or a datamatrix (sting of maybe 50 characters max). This application is use in some places in my company. To automate the process, I wanted modified the application to add another reception canal, to be defined.

The other application (application 1) I wanted to developp will be specific to a machine. I wanted to implement to specific code in this application, and send the codes to application 2.

With this solution, application 2 is updated once to be able to work in the 2 ways every where, and I build a specific appliciation 1 depending of my need. Am I clear?

Regards,

 

Francis M
0 Kudos
Message 4 of 7
(2,676 Views)

I would recommend that you consider LVOOP options. You can use LVOOP to choose which method to utilize at runtime. I think this will be much better than a patchwork of separate programs that must be running (what happens when you need to add a third or fourth method). This really is an encapsulation problem. Running two programs to try to solve this problem just seems to be asking for issues.

Message 5 of 7
(2,651 Views)
Solution
Accepted by Cisco

@Cisco wrote:

Hello,

In my specific problem, I've a big and complicated application (application 2) who received data from RS232. It's not so big data, typically a bar code or a datamatrix (sting of maybe 50 characters max). This application is use in some places in my company. To automate the process, I wanted modified the application to add another reception canal, to be defined.

The other application (application 1) I wanted to developp will be specific to a machine. I wanted to implement to specific code in this application, and send the codes to application 2.

With this solution, application 2 is updated once to be able to work in the 2 ways every where, and I build a specific appliciation 1 depending of my need. Am I clear?

Regards,

 


This sounds like an application for a Factory Pattern based on Packed Project Libraries.  The idea is you use OOP to create a hierarchy of interfaces that you can talk through, only loading the actual interface you need.  The factory pattern works with PPLs quite well, making it so you can just compile the PPL for the exact interface you are dealing with in order to update your system.  It will also be extendable for when the next system needs something similar.

 

But if you insist on the two executables, I would go with a simple TCP protocol.  Network streams would be my second choice mostly due to personal preference.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(2,650 Views)

Thank you to all of you for your answer!

 

I've made a little patch to send/receive information between my 2 programm with TCP protocol. OOP will definitively be more proper, but I'm not very comfortable with this and it implies a redesign of the main application...

 

Regards,

Francis M
0 Kudos
Message 7 of 7
(2,581 Views)