Skip to content
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

Issue using Openfast 2.4.0 with simulink #1098

Closed
ElioDaka opened this issue Apr 19, 2022 · 3 comments
Closed

Issue using Openfast 2.4.0 with simulink #1098

ElioDaka opened this issue Apr 19, 2022 · 3 comments

Comments

@ElioDaka
Copy link

Dear all,

I am trying to use openfast 2.4.0 in simulink. I'm currently running simulations using the executable of openfast 2.4.0 in windows. To use openfast with simulink I need the FAST_Sfunc.c that I have, but I need also the file FAST_SFunc.mexw64. This file does not already exists for my version of openfast. I have found the matlab file create_FAST_SFunc.m that I think is the one I need to create the missing file. The problem is that this matlab script tells: "Before running this script, you must have compiled OpenFAST for Simulink to create a DLL". Using the executable file of openfast I never compiled openfast using cmake or Visual Studio so I don't have the DLL that the script is asking for and I cannot find them. How can I solve?
Thank you
Elio

@bjonkman
Copy link
Contributor

For OpenFAST 2.4.0, the create_FAST_SFunc.m file is located here: https://github.com/OpenFAST/openfast/tree/v2.4.0/glue-codes/simulink/src. You will have to follow the instructions to build the required DLL.

If you wanted to upgrade to a newer version of OpenFAST, the files Simulink binaries are already built and available for download on the releases page. You will need OpenFAST-Simulink_x64.dll and FAST_SFunc.mexw64, and for any release earlier than v3.1.0, you will also need MAP_x64.dll.

@ElioDaka
Copy link
Author

Ok thank you!
Regards
Elio

@jyotrimaya1993
Copy link

while building i got this output....
why simulink is skipped and why some warning kindly tell me

Build started...
1>------ Build started: Project: FAST_Registry, Configuration: Release Win32 ------
1>data.c
1>gen_c_types.c
1>gen_module_files.c
1>misc.c
1>my_strtok.c
1>registry.c
1>reg_parse.c
1>sym.c
1>symtab_gen.c
1>type.c
1>Generating code
1>0 of 75 functions ( 0.0%) were compiled, the rest were copied from previous compilation.
1> 0 functions were new in current compilation
1> 0 functions had inline decision re-evaluated but remain unchanged
1>Finished generating code
1>FAST_Registry.vcxproj -> C:\openfast\openfast-main\build\bin\Registry.exe
2>------ Build started: Project: MAP_dll, Configuration: Debug x64 ------
2>bstraux.c
2>C:\openfast\openfast-main\modules\map\src\bstring\bstraux.c(1004,26): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
2>C:\openfast\openfast-main\modules\map\src\bstring\bstraux.c(1017,13): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
2>bstrlib.c
2>C:\openfast\openfast-main\modules\map\src\bstring\bstrlib.c(367,32): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
2>dpmpar.c
2>enorm.c
2>enorm_u.c
2>lmder.c
2>lmpar.c
2>qrfac.c
2>qrsolv.c
2>freedata.c
2>jacobian.c
2>lineroutines.c
2>mapapi.c
2>maperror.c
2>mapinit.c
2>numeric.c
2>outputstream.c
2>residual.c
2>simclist.c
2>Generating Code...
2>lmroutines.cc
2>MAP_dll.vcxproj -> C:\openfast\openfast-main\build\bin\MAP_x64.lib
2>Done building project "MAP_dll.vcxproj".
C:\openfast\openfast-main\modules\nwtc-library\src\SysIVF.f90 : warning: Module 'x64\Debug\syssubs.mod' is created by both 'C:\openfast\openfast-main\modules\nwtc-library\src\SysIVF.f90' and 'C:\openfast\openfast-main\modules\nwtc-library\src\SysMatlabWindows.f90'.
3>------ Build started: Project: FASTlib (IFORT), Configuration: Debug x64 ------
3>Performing Pre-Build Event...
3>'git' is not recognized as an internal or external command,
3>operable program or batch file.
3>'git' is not recognized as an internal or external command,
3>operable program or batch file.
3>Creating library...
3>
3>Build log written to "file://C:\openfast\openfast-main\vs-build\FASTlib\x64\Debug\BuildLog.htm"
3>FASTlib - 0 error(s), 0 warning(s)
4>------ Skipped Build: Project: OpenFAST-Simulink (IFORT), Configuration: Debug_Matlab x64 ------
4>Project not selected to build for this solution configuration
5>------ Build started: Project: FAST (IFORT), Configuration: Debug x64 ------
5>Linking...
5>FASTlib_x64_Debug.lib(mapapi.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
5>
5>Build log written to "file://C:\openfast\openfast-main\vs-build\FAST\x64\Debug\BuildLog.htm"
5>FAST - 0 error(s), 1 warning(s)
========== Build: 4 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants