-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulink interface with OpenFAST crashes Matlab #605
Comments
I just tried to generate S-function changing the parameter #define CHANNEL_LENGTH 20 in FAST_library.h file and I got the same problem. Here is my Matlab output:
Configuration: Fault Count: 1 Abnormal termination Register State (captured): R8 = 00000000000dc430 R9 = 00007ffc4a14e930 RIP = 000000001055292a EFL = 00000206 CS = 0033 FS = 0053 GS = 002b Stack Trace (captured): This error was detected while a MEX-file was running. If the MEX-file Originally posted by @eletroinf in #548 (comment) |
Due to the bug in the tagged OpenFAST 2.4.0 release, I would expect the S-Function built with it to run with the OpenFAST DLL built from OpenFAST 2.3.0, but not OpenFAST 2.4.0. I would also expect that when you changed the header file:
that this S-Function will work with the DLL built from OpenFAST 2.4.0 (or the current dev branch) but not with the DLL from OpenFAST 2.3.0. Other combinations of the S-Function and DLL versions from 2.3.0 and 2.4.0 will result in Matlab crashing. Did you use the correct DLL after you changed the S-Function? |
Thank you for the help I redid the entire compilation process and I build the S-function with #define CHANNEL_LENGTH 20 in FAST_Library.h file. I obtained the same result: The Matlab crashes and close when I try to run my simulation. I reviewed my files to make sure that I was using the correct ones. |
I have model working perfectly well with the OpenFast V2.2.0 (through simulink). But I have recently compiled and generated s-function from V2.4.0. When I run my model with the latest, matlab crashes. By any chance, are there changes made to the input files (like Aerodyn etc) requiring more inputs compared to the v2.4.0? I mean can the input files created for V2.2.0 be directly used for V2.4.0 as well or do they need to be modified? Regards, |
Dear @kumaraeedara, The input files must be changed between OpenFAST v2.2 and v2.4. The input file changes associated with each release of OpenFAST are documented here: https://openfast.readthedocs.io/en/master/source/user/api_change.html. Best regards, |
Dear @jjonkman Thanks. I made the relevant changes as pointed in the document and able to run V2.4.0 without issues using .exe (that I obtained after compilation). Regards, |
@kumaraeedara, If you incorporated the change from #550 before building the S-Function for v2.4.0, I wouldn't expect Matlab to crash. Is Matlab finding and using the correct version of the S-Function that you built? Do you have compatible S-Function |
Dear @bjonkman I am using the V2.4.0 Latest release (zip file). Just changing the CHANNEL_LENGTH from 10 to 20 in FAST_Library.h file as suggested in #548 (comment) and recreating S-function did work for me. Thank you. Regards, |
Only to give a final feedback. Thanks anyway. |
I am creating a new issue here because there are too many topics going on in issue #548:
From @eletroinf:
I Have the same problem with openFAST 2.4.0-master and dev.
Compilation with Visual studio and mex generated by C compiler installed by means of Matlab Add-on (Matlab 2018b).
The S-function generated using v 2.4.0 source files works fine with openFAST 2.3.0 that I also compiled with Visual Studio. So I think the problem is not with the S-function.
Neither my project nor the examples works - all them result in Matlab crash.
Originally posted by @eletroinf in #548 (comment)
The text was updated successfully, but these errors were encountered: