Hello, Sometimes the problem is the name of the file (in matlab is not recommended to use "space") or the file path where trnsys is reading the file is not correct including the name of the file. I suggest you to review this. Best luck.
Some more tips about coupling TRNSYS-MATLAB and calling TRNSYS from MATLAB are listed below.
1. ""STEP by STEP to couple TRNSYS with MATLAB""
Try using type 155 ? Its in \Trnsys17\Studio\Proformas\Utility\Calling External Programs\Matlab and there is even an example in \Trnsys17\Examples\Calling_Matlab
For coupling try the following steps:
1. Update TRNSYS to 17.01( and TESS libraries to 17.1)
2. Go to ".....Trnsys17ExeDLLs", directory
3. Choose archive named by Matlab version you are going to use
4. Place Type155.dll file from archive in the ".....Trnsys17Exe" directory.
5. Make Matlab's "binwin32" folder appear on Windows' search path
If the sample file is run from the same folder where *.m file lays - there is no need to correct path to this file.
-------------------------------------
2. Calling TRNSYS in MATLAB:
mycommand=['!','start',' "TRNSYS"',' /wait /b C:\Trnsys17\Exe\TRNExe.exe',' "C:\Users\.............\NAME OF DECK.dck"',' /n /h'];
"mFileErrorCode" is just a "mark" for you find the place/location of the errors of your Matlab code when calling Trnsys. So, should not bother the "mFileErrorCode".
You can use the same Matlab code, but with "mFileErrorCode=100" or "mFileErrorCode=101". The only difference is that you will get a "mFileErrorCode=???" when encounters error. This is for you to quickly locate the error location.
hello please if any one can help iam trying to link matlab R2018a with trnsys 16 so that i can perform a mathematical calculation with output from trnsys as input to matlab