From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-22-2016 04:38 AM
Thanks for the help.
11-22-2016 09:34 AM
When you are starting to learn how to use LabVIEW, the best idea is to use the Example Finder (menu Help >> Find Examples...) or just browse the shipping examples (C:\Program Files (x86)\National Instruments\LabVIEW 2015\examples\).
Now, about your question, I would advice to try to open the following example:
C:\Program Files (x86)\National Instruments\LabVIEW 2015\examples\Mathematics\Scripts and Formulas\MATLAB script node - Fractal.vi
If you have LV 2014 or Lv 2016, just adjust the year on the path.
As you can see in this example, you do not need to "run script". When you run the LabVIEW VI that has the "matlab script", this will get the script inside the node, transfer it over, execute and get the results and bring it back into LabVIEW. Look into help for more information.
Now, if you do not mind adapting your script, I would advice you to look into the other nodes in LabVIEW that could do what you want (of course, it all depends of what you have on your script).
11-23-2016 04:28 AM
11-29-2016 09:28 AM
I believe you can just use the "run" command inside the Script Node (not Mathscript). This should run the script.
However, maybe the best would be to convert your script to functions (or use the create a function that runs the command above) and then call that from the Script Node. That is the most cleaned way to encapsulate the script (and you can standardize the inputs and outputs of it) and, most importantly, other people could change the other files as they need.
Hopefully this helps.