NREL / ROSCO_toolbox

A repository for generating ROSCO controller input files and more.
http://rosco-toolbox.readthedocs.io/
Apache License 2.0
23 stars 20 forks source link

FAST_SFunc - How to implement mex. #65

Closed Gouwslouis closed 2 years ago

Gouwslouis commented 2 years ago

Hi.

I have been running the runfast.m file, making sure that all the utilities found in the OpenFast matlab toolbox are in the same directory.I have adapted the various paths to point to these locations on my drive as well. I have also added the necessary AddOn's to ensure proper execution.

I am just now struggling to get rid of this error: Error using runFAST Error in S-function 'ROSCO/FAST Nonlinear Wind Turbine/S-Function': S-Function 'FAST_SFunc' does not exist. I have read online and suspect that it has something to do with a FAST_SFunc written in c that has to be made into MEX, but I don't know how to do it. Also, do you then add this MEX file to the same directory? I have added the MinGW addon.

Could you please help me solve this problem?

dzalkind commented 2 years ago

I think you run this in MATLAB and add the FAST_SFunc mex file to your path: https://github.com/OpenFAST/openfast/blob/main/glue-codes/simulink/src/create_FAST_SFunc.m

Gouwslouis commented 2 years ago

Thank you for the help!