09-29-2014 04:33 PM
10-18-2014 06:03 PM
@Merb wrote:
The Matlab Script is specific for one function only with putting in arguments and getting output.
I'm a little confused by this statement. There are definitely ways in LabVIEW to evaluate more than one function in a script node.
You basically have three options:
Check out this article for some more details: Scripting Languages in NI LabVIEW (this article doesn't have much infornation on the MATLAB node - NI and MathWorks don't get along very well)
10-19-2014 10:47 AM
What is it you are actually trying to do. Any of the options you are looking at will add overhead. When you start to add overhead to over a hundred functions, that starts to add up.
Unless there's a valid need, you should choose one platform and stick with it. You'll have better code that way.
10-19-2014 01:47 PM
Wow thanks for replying and providing some feedback. I had pretty much given up in finding hints through this community
The issue is that legacy products were tested via Matlab scripts and we are now doing testing through Labview. In order to support this legacy products and continue testing/supporting them, I'd like to have a Labview platform that would call to Matlab code process it and return result back to Labview. That being said, the options you outlined are useful if to were to make something from scratch. The script node, I would literally have to rewrite all Matlab code into the script node and add the input and output of Labview, this would take forever and I don't want to do that. I was hoping for a more generic way of transfering functions with pertaining arguments. All Matlab needs is the directory path of where the Matlab functions are, so through Labview open that directory path and from Labview send function name with arguments. Similiar as to looking for a function in a header file.
Anyhow I've solved my problem by pretty much using external Matlab commands via DOS command line. Opposed to the script node, this is a more generic use since I can reuse all those hundreds of Matlab scripts without writing them in the script node. I just send in the path where Matlab functions are, name of function with arguments and well in that path should be a script containing such function and process it with the arugments I send from Labview. The output is then saved into a file of which then I read from Labview. It works, but somehow I don't know why Labview is taking 3-4 seconds to read from a file, I'm trying to fight that off, I've found a workaround, but well, another issue.
thanks for the suggestions and for the resposne, I can only hope any future person with similar question can understand my giberish and articulate it better.