08-23-2024 02:55 AM
Hello all,
I would like to program a set of labview executables.
1 executable will be the main interface.
The other executable will be a driver for a sensor which we want to use.
In order for this to work, I would like for the executables to communicate with each other.
It is possible that we will need a configuration where we will connect more then 1 sensor to the interface.
My preference would be to use the same set of commands for this sensor.
I can the call a second instance of the same sensor driver executable.
The structure of this software would be like the structure shown in the diagram below:
I have tried to do this using "shared variables". This works incredibly for 1 sensor.
As far as my knowledge about shared variables stretches, it is quite hard to use the same set of commands for 2 different drivers.
It is not possible for shared variables to have something alike an address to make a distinction between one driver or the other.
I would like to ask this forum for your opinion on methods to program this.
This method does not specifically have to be based on shared variables, I am open to all advise.
I am using LabVIEW 2019.
Thanks in advance!
Solved! Go to Solution.
08-23-2024 05:47 AM
Try Asynchronous Message Communication (AMC) Library (NI Asynchronous Message Communication (AMC) Library Toolkit for LabVIEW) ?
08-26-2024 09:00 AM
The AMC (Asynchronous Message Communication) Library is a strong option, particularly given its ability to handle asynchronous, modular communication between different parts of a LabVIEW application, including separate executables. However, whether it's the "best" option depends on several factors specific to your project, such as complexity, real-time requirements, and ease of implementation. Here's how AMC compares to other methods:
AMC:
Network Streams:
AMC:
TCP/IP:
AMC:
Shared Variables:
AMC is likely the best option if:
Network Streams might be better if your primary need is continuous data streaming rather than discrete command-based communication.
TCP/IP could be optimal if you need maximum flexibility and are comfortable implementing and managing a more complex communication protocol.
Shared Variables might still be a viable option if you decide to simplify your system or if you're handling just one or two sensor instances where the complexity of AMC or TCP/IP isn't justified.
AMC is one of the best options available for your described scenario, especially considering the need for modularity, scalability, and handling multiple sensor instances with the same command set. However, it's important to weigh its benefits against the specific needs of your project to determine if it's the most appropriate choice. If the complexity AMC introduces is justified by your application's needs, then it stands out as a strong, scalable solution.
09-02-2024 02:48 AM
Thank you for this informative answer!
I will review the options you presented to find a suitable solution for our use case.