S-Function 'FAST_SFunc' does not exist

This forum if for discussing controls. Questions about how to implement controls in FAST are more appropriate to the CAE Tools forum.

Moderator: Bonnie.Jonkman

AbdelRahman.Elkattan
Posts: 18
Joined: Sun Sep 14, 2014 12:15 am
Organization: Ain Shams University
Location: Egypt

S-Function 'FAST_SFunc' does not exist

Postby AbdelRahman.Elkattan » Tue Feb 24, 2015 12:39 pm

Dear All;
This error message appear when i run the FAST model in Matlab/Simulink.
Please, Can anyone help me to know the reason and fix it?

Thanks in advance
Attachments
Untitled.jpg
Untitled.jpg (52.52 KiB) Viewed 12940 times
ِAbdelRahman Elkattan
ِM.Sc. Student Of Mechatronics Engineering, Interested in Renewable Energy
Ain Shams University (www.asu.edu.eg),
Cairo,
Egypt

Bonnie.Jonkman
Posts: 564
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: S-Function 'FAST_SFunc' does not exist

Postby Bonnie.Jonkman » Wed Feb 25, 2015 9:31 am

This error means Matlab can't find the file 'FAST_SFunc'. If you are running 32-bit MATLAB on Windows, it is trying to find 'FAST_SFunc.mexw32'; if you're running 64-bit MATLAB, it's looking for 'FAST_SFunc.mexw64'.

You must make sure the file exists and that MATLAB can find it (i.e., the directory where the file exists must be on the MATLAB path). You can look at the CertTest/Simulink_CertTest.m file in FAST v7 for an example of how to add that directory to the MATLAB path.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

AbdelRahman.Elkattan
Posts: 18
Joined: Sun Sep 14, 2014 12:15 am
Organization: Ain Shams University
Location: Egypt

Re: S-Function 'FAST_SFunc' does not exist

Postby AbdelRahman.Elkattan » Wed Feb 25, 2015 10:55 pm

Thanks Bonnie.Jonkman a lot
ِAbdelRahman Elkattan
ِM.Sc. Student Of Mechatronics Engineering, Interested in Renewable Energy
Ain Shams University (www.asu.edu.eg),
Cairo,
Egypt

Shar.Shah
Posts: 8
Joined: Tue Jul 04, 2017 5:26 am
Organization: IIT
Location: India

Re: S-Function 'FAST_SFunc' does not exist

Postby Shar.Shah » Wed Jul 05, 2017 12:41 am

Hello!

I want to be able to run the FAST and Simulink interface.
Even I have been facing the error-
Error using Run_OpenLoop (line 32)
Error in S-function 'OpenLoop/FAST Nonlinear Wind Turbine/S-Function': S-Function 'FAST_SFunc' does not exist
I am using FASTv8 and MATLAB 2015b-64bit on a 64bit Windows machine

The only mex file that is installed in the FAST bin folder is FAST_SFunc.mexw32. The FAST_SFunc.mexw64 file is not there.
As the FAST_SFunc.mexw64 file is missing I tried running create_FAST_SFunc.m.
I am copying the code that I ran inside create_FAST_SFunc.m

addpath('C:\Users\shar\Desktop\project\witumetron\software\bin');
addpath('C:\Users\shar\Desktop\project\witumetron\software\Simulink\Samples');
%% 64-bit Matlab:
mex -v -L../../bin -lFAST_Library_x64...
-I../../Source -I../../Source/dependencies/OpenFOAM -outdir ../../bin COMPFLAGS='$COMPFLAGS /MT' FAST_SFunc.c

I am using a Mingw-win64 compiler
On running this code I get another error
Error using mex
../../bin/FAST_Library_x64.lib: error adding symbols: File in wrong format
collect2.exe: error: ld returned 1 exit status

Error in create_FAST_SFunc (line 13)
mex -v -L../../bin -lFAST_Library_x64 ...

If someone gives a solution to get around these errors and run the FAST-Simulink interface it would be of immense help to me.

Jason.Jonkman
Posts: 4843
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: S-Function 'FAST_SFunc' does not exist

Postby Jason.Jonkman » Wed Jul 05, 2017 6:36 am

Dear Shar,

I'm not familiar with that error, and I'm not sure which version of FAST v8 you are using, but FAST_SFunc.mexw64 is included in the archive of the latest public release of FAST, FAST v8.16, available here: https://nwtc.nrel.gov/FAST8.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Shar.Shah
Posts: 8
Joined: Tue Jul 04, 2017 5:26 am
Organization: IIT
Location: India

Re: S-Function 'FAST_SFunc' does not exist

Postby Shar.Shah » Thu Jul 06, 2017 4:56 am

Dear Jason,

Thank you very much.I installed FAST v8.16 from the site.I copied the FAST_Sfunc.mex64 file into my FAST bin folder.
I was successfully able to run Run_Test01_SIG.m after doing this and changing a few paths.
Once again , thanks a lot for your fast and prompt reply.

Regards,
Shar

Vahid.Fazlollahi
Posts: 23
Joined: Mon Nov 20, 2017 1:47 am
Organization: Shahid Beheshti University
Location: Iran, Tehran

Re: S-Function 'FAST_SFunc' does not exist

Postby Vahid.Fazlollahi » Thu Dec 07, 2017 4:25 am

Dear All;
I want to run the FAST in MATLAB/Simulink at the first time. But these error messages have been appeared.
Please, Can anyone help me to know the reason and fix it?
Attachments
fast error.jpg
fast error.jpg (118.51 KiB) Viewed 9670 times

Jason.Jonkman
Posts: 4843
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: S-Function 'FAST_SFunc' does not exist

Postby Jason.Jonkman » Thu Dec 07, 2017 7:15 am

Dear Vahid,

It doesn't look like you are running the Run_Test01_SIG.m script.

Please review the documentation on the Simulink-FAST v8 interface available in the FAST v8 ReadMe file: https://wind.nrel.gov/nwtc/docs/README_FAST8.pdf.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Muddassir.Nawaz
Posts: 19
Joined: Mon Jan 15, 2018 1:57 am
Organization: Hochschule Bremerhaven
Location: Germany

Re: S-Function 'FAST_SFunc' does not exist

Postby Muddassir.Nawaz » Wed Aug 29, 2018 8:16 am

Hello Jason,

I am running FASTV7, I got the same error "FAST_SFunc" does not exist. I tried but could not find FAST_SFunc.mexw64 file. it was not in archive that i download and extract. Please can you provide link to download FAST_SFunc.mexw64 file or instruction for how to compile FAST_SFunc.mexw64 file.

Thank you

Best regards
Muddassir Nawaz

Jason.Jonkman
Posts: 4843
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: S-Function 'FAST_SFunc' does not exist

Postby Jason.Jonkman » Wed Aug 29, 2018 3:23 pm

Dear Muddassir,

Please find my post dated May 17, 2018 in the following forum topic for a link to the FAST_SFunc.mexw64 compatible with FAST v7: viewtopic.php?f=4&t=2077&p=11259.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Muddassir.Nawaz
Posts: 19
Joined: Mon Jan 15, 2018 1:57 am
Organization: Hochschule Bremerhaven
Location: Germany

Re: S-Function 'FAST_SFunc' does not exist

Postby Muddassir.Nawaz » Mon Nov 05, 2018 4:42 am

hello Jason,
I am trying to work with Matlab 2015a but this problem occurs.
I have a folder called "myfolder" in CerTest.

Matlab: Set Path [c:\user\nawaz\Downloads\fast7\CerTest\myfolder]

"myfolder" contains
    FAST_SFunc.mexw32, FAST_SFunc.mexw64, Read_FAST_Input.m

I tried to simulate OpenLoop.mdl with Test06.fst in CerTest folder[Which contains Simsetup.m]. I Already run Simsetup.m and got values in Workspace. But when simulate model, i got this problem. This problem is related to MEX file. But i already gave correct path to MEX file, so why this happens?
Attachments
error.jpg
error.jpg (38.87 KiB) Viewed 6485 times

Jason.Jonkman
Posts: 4843
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: S-Function 'FAST_SFunc' does not exist

Postby Jason.Jonkman » Mon Nov 05, 2018 9:04 am

Dear Muddassir,

In FAST v7, the name of the FAST input file is stored in a MATLAB variable named input_fast. In FAST v8, the name of the FAST input file is stored in a MATLAB variable named FAST_InputFileName. I thought you were trying to run FAST v7, but the error seems to be generated by a mex function for FAST v8.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov


Return to “Controls”

Who is online

Users browsing this forum: No registered users and 1 guest