LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using '!' in matlab script

It seems unable to invoke the '.EXE' file in the matlab script node.
In my matlab code I use '!' to invoke a .exe file, it can be execute in matlab, but when I copy the same code to labview(matlab script node), it does not work
the error messages are
 
 
 
 
LabVIEW:  Error occurred while executing script. Error message from server: Warning: Name is nonexistent or not a directory: D:\Wastewater_experiment\programCodes\DymolaFiles.
> In c:\matlab6p5\toolbox\matlab\general\path.m at line 116
  In c:\matlab6p5\toolbox\matlab\general\addpath.m at line 88
< c:\matlab6p5\bin\win32\dsu.txt created.
 
... Error message from alist
Error opening file "dsin.txt": No such file or directory
 
??? Error using ==> load
Unable to read MAT file temp.mat: not a binary MAT file.
Try LOAD -ASCII to read as text.
Error in ==> C:\dn\programCodes\initload.m
On line 43  ==>      load temp
Error in ==> C:\dn\programCodes\operatingPoint.m
On line 17  ==> [x_init, x_name] = initload; % loads initial conditions from txt-file 'dsin.txt'.
. in labviewmatlab.vi
 
 
 
I am sure I have add all the path. and If I just run the code
! alist -a dsin.txt dsintest.mat
in matlab script node. There is no errors but it can not be execute.
 
 
This alist.exe file is from 'Dymola' to transfer the 'txt' to 'mat'.
 
How can I do with this error
0 Kudos
Message 1 of 3
(2,875 Views)
Hi eternityzh,

Could you please post the code that is causing the error code (I have not been able to reproduce the error with the files that was posted). Thanks!

Best regards,

Steven C
0 Kudos
Message 2 of 3
(2,803 Views)
Sorry
The problem have solved.
When I invoke .txt .mat .exe in LabVIEW matlab script node, this files should be under '.../matlab' path. I do not kown why it is not '.../matlab/work'.And 'addpath' is useless except to 'invoke .m' files.
It can work now.
0 Kudos
Message 3 of 3
(2,790 Views)