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.
01-15-2010 01:28 PM
I am having problems with my Matlab Script Node not executing. The script inside the node executes flawlessly when run in Matlab (takes about 10 seconds). It writes an array to a user-defined Excel file (which I chose to be placed on the desktop).
When I run the VI, everything in LabVIEW seems to be properly executing. For some reason, it seems like the Matlab Script node is ignored. I have browsed other threads in this forum and verified the following:
- Matlab installed and has been opened previously.
- Shipping examples Lorenz Diff Eq.vi and Factal.vi both execute properly.
Any thoughts, feedback, or comments?
01-15-2010 03:42 PM
01-15-2010 05:24 PM
I am not getting an error. I however have noticed that on a similar VI that was working on my computer did not execute on another computer. Additionally, this VI was working yesterday and today is not. I do not know what could be causing the 'inconsistent' behavior.
01-20-2010 11:03 AM
01-22-2010 02:47 PM
Hey Mark,
I've just tried it with LabVIEW 2009 and MATLAB r2007b and the program ran fine for me.
What versions of MATLAB, LabVIEW and MS Office do you have?
01-23-2010 02:49 PM
Mark,
There are two main reasons this problem will occur.
1. MATLAB is not very compatible with Excel 2007, and you have Excel 2007 installed,and no excel 2003 tools on your computer
2.Most likely problem: if you are using LabVIEW 2009, and you did not install the patch, MATLAB might not work properly as a script node.
It worked fine for me on LabVIEW 2009, and MATLAB 2008b.
Initially, my MATLAB script node was not working properly when I installed LabVIEW 2009. I have to reinstall both, making sure to include the LabVIEW patch.
If you regularly use MATLAB script node in LabVIEW, like I do, I will suggest uninstall both, reinstall LabVIEW first with the patch, then install MATLAB.
01-25-2010 12:36 PM
01-25-2010 03:22 PM
What operating system are you using? if it is Vista - then that is your problem right there- VISTA.
If you use XP, the only advise is to reinstall both software, (assuming you use MATLAB as a script node inside LabVIEW a lot).
Otherwise, use the write to spreadsheet file in LabVIEW, and ignore the MATLAB script node completely.
If you use VISTA, make sure in the properties of each shortcut(LabVIEW, MATLAB),run as administrator is checked. Frankly, if you use VISTA, reinstalling may be your only solution(if you are bent on always using MATLAB inside LabVIEW) and make sure you install as admin.
Another problem sometimes about MATLAB script node is the accuracy of your syntax. I will suggest you have a file on your desktop(word, excel or anyfile), right click, under properties, highlight the filepath, copy, and paste in the MATLAB, then type \test.xls. to complete the full file path. sounds basic, but from experience your mistyping may cause you hours of pain.
Also, in your last statement on the MATLAB script node; use proper syntax and try saving in your default MATLAB path.
xlswrite('mytestdata.xls', C) % where C is your data,and make sure the quotation inside the xlswrite is included.
Normally, if you save into your default MATLAB path, you do not need to specify the pathname.
One last thing, in your data A = 2, B = 3, C = A+ B, try and put A = 2.0, B = 3.0. The reason for this is that MATLAB by default takes all numbers as a double. Hence, for some reason, your computer might be sending an integer to the MATLAB workspace, this is especially common when working with image processing, and it will generate error.
I do not have access to LabVIEW write now, ao I am not looking at your code as I reply to you: so I might have mistyped something, but all I have written are suggestions, because I use MATLAB and LabVIEW a lot, and I have experienced some of this problem in the past.
08-22-2012 06:10 AM
Can any body help me....
I have some bearing data files in .m format. Now my program is in Lab veiw and i want to read these data files in lab veiw
how can i do this?
08-22-2012 07:10 AM
@arsi986 wrote:
Can any body help me....
I have some bearing data files in .m format. Now my program is in Lab veiw and i want to read these data files in lab veiw
how can i do this?
Please do not double post. http://forums.ni.com/t5/LabVIEW/reading-matlab-m-file/m-p/2131440#M690755