07-31-2015 02:42 PM - edited 07-31-2015 02:52 PM
Hello,
I want to run a game (that I did not write) in LabVIEW which is all programmed using MATLAB. It runs on MATLAB but I have no clue why it does not run on LabVIEW. Please take a look at the attachments to see the error, VI and game.
Note: I tried running other simpler .m functions that also call outside functions in the same folder using the same VI and they work so it is not the MathScript Node. Also, I already changed the search paths for the MathScript Node therefore the root of the problem is not there either.
Thank you!!
Solved! Go to Solution.
08-03-2015 12:40 PM
Hello,
When using the MathScript RT Node you should enter your m code into the Node itself. Have you tried taking your code from the Missile Commander file and putting it in the node? Are you using any funtions that are on the unsupported list?
Below are a few resources on getting started with the MathScript Node.
Getting Started with the MathScript RT Module
MathScript RT Module Functions
MathScript Functions Not Supported in the LabVIEW Run-Time Engine (MathScript RT Module)
08-04-2015 01:41 PM
Hi,
If you have MATLAB and just want to call the 'Missile_Commander' function from LabVIEW, you could use the MATLAB script node instead of the MathScript node by using
run 'Missile_Commander_function_file_path'
08-04-2015 03:41 PM
Hi M. Whitaker,
Thank you for your reply. Yes, I have tried putting the code directly in the node and it did not work either. I am not using functions on the unsupported list (which I did not know about so thank you for the heads up).
If you have any other suggestion please let me know,
glovato
08-04-2015 03:43 PM
Hi BR,
Thank you for your reply. Using the MATLAB script was my first attempt but had to abandon it because it does not allow me to call functions, only run scripts.
If you have any other ideas please let me know,
glovato
08-05-2015 03:09 AM
In LV 2014, I can, without any error, call the function Missile_Commander.m from MATLAB script using the 'run' command.
08-05-2015 02:28 PM
Hello BR,
Thank you so much for your help. It worked!
I had to upgrade my LV version and modify the path that I was using to call the function.
Have a nice day,
glovato