06-30-2011 06:49 PM
Hi All,
Background:
I am not a LabView programmer: I know a bit about LabView and have worked with it a few times. I'm working on supporting some collaborators who have online data collection and analysis software implemented in LabView. My questions here are regarding interfacing with an existing and very complicated LabView program developed by my collaborators, which I will not be modifying myself, and to which I intend to request that they make only minimal modifications. Most of my work has been in MATLAB, which is in general more convenient for the work I'm doing (machine learning), and for which I have a great deal of code. To provide my contribution in an online fashion, I'm trying to find a way that they can pass their data from LabView to MATLAB without being too clumsy. The updates I need should not be too frequent (e.g. one every minute or so, but each one should be computed quickly); it would certainly be possible to do the "dumb" solution and just write out to a file from LabView and read in from MATLAB, then write out the results from MATLAB and read them in in LabView. However, I can imagine some synchronization issues with that, so I'd prefer LabView to be able to call MATLAB. The LabView documentation mentions Matlab Script Nodes, which supposedly calls the "Matlab Script Server" to execute a script. <http:?OpenDocument LabView Tech Note on MATLAB script nodes>
LabView technical note on Matlab script calls
Ok, so critical points / Questions here:
I've never heard of a MATLAB Script Server before, and Mathworks doesn't seem to use that terminology to talk about it. There are certainly similar sounding things on the Mathworks site, but I haven't found anything that looks quite right. Does anyone here have a better explanation of what it is / how it operates? A link to appropriate documentation on the Mathworks site?
To execute the online computations I want to do, you need a LOT of data to be loaded into and out of the workspace in MATLAB if you have to start it up clean every time you get a call to this MATLAB Script Server. What I'd really like would be to have the workspace persist between calls, thus avoiding reading and writing to the HD every call. Is this possible? What is the normal behavior of the "Script Server" / LabView Matlab Script nodes? Has anyone here used this before?
Also: Is there any better way to do this (still retaining my code in MATLAB, their code in LabView)? I have also read notes on the Mathworks website and other places indicating that it's possible to set up a UDP / TCP/IP connection between MATLAB and LabView. That might be an easier solution instead, but again, outside my current areas of expertise.
Thank you in advance for your help!