This is a question that comes up occasionally.
The two main issues are
We have put some effort into solutions for this use case. For example, there was an early version of the simple messaging protocol for Windows and LVRT for PXI and 900x controllers that converted LV data structures to XML for compatibility with non-LV targets. This approach had some challenges, however. It required the user to build an XML-capable client or server component. Over time, new LV targets (PDA, Linux and VxWorks,including the 9012) have been released that do not support XML, so it has been replaced in STM with LV "flatten to string", which is more widely supported.
We do not have a C version of STM, but that would be a nice project for someone when we agree to a solution to the first problem.
In the meantime, here is a white paper we wrote several years ago that discusses the low-level issues and provides some examples for implementing a messaging protocol directly on top of TCP/IP for heterogeneous systems. The examples are for LV <=> LW/CVI, but it should cover most of the issues with other targets. As of this writing, the code download and reference links are live.
Message Edited by Doug S on 09-20-2007 02:48 PM
Modify the typedef then it can contain anything appropriate for the application. Very handy.
As for the problem I mentioned, it may be related to another issue that came up at the same time.
The application I am working on runs on a PXI system, running LVRT, and I noticed that with my project open, and the STM examples open and running, occasionally LV would lose contact with with the PXI. Don't have any more information on that.
I don't believe that any of the examples included with the STM component use shared variables. The command-based architecture as been around for several years and has been adapted by a number of content authors for other use cases. If you can point me to the shared variable example I may be able to clarify what you are seeing.
The example I found was in the shipped RT examples - \LabVIEW 8.5\examples\Real-Time\RT Network Communication\Command Based Architecture The RT part uses local shared variables.
I still need an answer to the shared variable question - moving to this method and removing network shared variables - should I stop using shared variables completely because of engine size/ deployment issues? Its not just the ones in the example, I was using them already. Perhaps I should post on a different thread?
Thanks I found the STM examples within minutes of posting. Like the previous discussion in this thread, I've puzzled a bit about the properties, but can see they would be useful for controlling data streams. Also I've been thinking about the Meta-data. I understand about naming the comms, but is it necessary to dynamically set the metadata upon connection as this bit is already specific to the project and not generic.
Yet another sub-question: Are examples available using added security and performance measurements with this architecture. The systems are monitoring production continuously and I cannot afford for the comms to fall over! I need to balance good GUI refresh rate with a balanced TCP/IP data flow.