problem with FAST on MATLAb/Simulink

Hi everyone,
I’m getting started with the FAST v8 tools and i have some issues when running the Simulink model “OpenLoop.mdl " and the M.file " Run_OpenLoop.m”
( please review the attachment for the error message .

Just check the file it’s trying to find. It’s probably going to be “Test01.fst” instead of “Test1.fst”. Edit the .m file…

I tried to do it , but it gives no result :unamused: :unamused:

Dear Abdeljalil,

As Gergely said, it appears that the Run_OpenLoop.m file is not locating the proper input file. You must ensure that the FAST primary input file (e.g., the file named Test01.fst) is in the proper directory.

Best regards,

Dear Mr Jonkman

In my case the File " Test01.fst " is located in the directory " C:\FAST\CertTest " , should i change it ?

thank you for your concern and your patience

Dear Abdeldjalil,

It’s up to you how you want to set up your directory structure, but you must ensure that the scripts you’re running use the same structure.

Best regards,

If you use Run_OpenLoop.m, run it from the directory where it is located in the FAST archive. It looks like you are in the CertTest directory instead of the Simulink/Samples directory. If you do decide to move that file, you’ll have to change the location where it’s looking for the FAST input file(s). The Run_OpenLoop.m file in the fAST archive also prints the leading zero in the file name, so it looks like you have already modified the contents of that file, too.

Thank you all

I appreciate the help you’ve given , i finally got it , it was a problem of directory in " Run_OpenLoop.m " file … i was totaly lost :blush: :blush: hh…

hope all the best

Dear Sir,
I am facing another problem while running Run_OpenLoop.m,. The errors are-

Error using Run_OpenLoop (line 30)
Error reported by S-function ‘FAST_SFunc’ in ‘OpenLoop/FAST Nonlinear Wind Turbine/S-Function’:
FAST_InitializeAll:SrvD_Init:ValidatePrimaryData:Yaw angle and rate are not commanded from Simulink model.
ValidatePrimaryData:Pitch angles are not commanded from Simulink model.
ValidatePrimaryData:Generator torque and power are not commanded from Simulink model.
ValidatePrimaryData:HSS brake is not commanded from Simulink model.
SrvD_Init:BladedInterface_Init:The dynamic library …..\CertTest\5MW_Baseline/ServoData/DISCON_win32.dll could not be loaded. Check that the file exists in the specified location and that it is
compiled for 64-bit applications.

Thank you

Dear @Aman.Ali,

From the error message, it looks like you are trying to use a DISCON controller compiled in 32-bits with an executable compiled in 64 bits. The addressing schemes must be the same.

I’m a bit surprised, though, why you want to enable the DISCON controller if you are simulating with the Simulink interface, which is intended for implementation of Simulink-based controls.

Best regards,

Dear @Jason.Jonkman
I didn’t enable the DISCON controller.

I just run the Run_OpenLoop.m file by adding file path C:\Users\DELL\Desktop\FAST\Simulink\Samples.

After running this, got the information FAST completed in the MATLAB command window. And after that got the above previous error.

Run_Test01_SIG.m file completely working fine but error occurred during Run_OpenLoop.m file.

Thank you

Dear @Aman.Ali,

That is because the Run_OpenLoop.m script runs a simulation without active control implemented in Simulink. You’d should modify this example to implement your own controller. Or, if you don’t wish to implement your own controller in Simulink, you could switch to using the executable of OpenFAST uncoupled from Simulink.

Best regards,

Dear @Jason.Jonkman

I just want t run C:\Users\DELL\Desktop\FAST\Simulink\Samples Run_OpenLoop.m file. This file is a sample file provided by FAST. I think it will be run, but it couldn’t.

For running this file, do I need any other changes in the file, or is this not a sample file?

Dear @Aman.Ali,

Are you still getting the error regarding the DISCON_win32.dll could not be loaded with a 64-bit application of Simulink? The solution is to switch to a DISCON controller DLL compiled in 64 bits.

Best regards,

Dear @Jason.Jonkman

I changed in the file NRELOffshrBsline5MW_Onshore_ServoDyn.dat at script line #66. I changed ServoData/DISCON_win32.dll into ServoData/DISCON_x64.dll and then run the Run_OpenLoop.m script file. Again I get the same error.

Error using Run_OpenLoop (line 30)
Error reported by S-function ‘FAST_SFunc’ in ‘OpenLoop/FAST Nonlinear Wind Turbine/S-Function’:
FAST_InitializeAll:SrvD_Init:ValidatePrimaryData:Yaw angle and rate are not commanded from Simulink model.
ValidatePrimaryData:Pitch angles are not commanded from Simulink model.
ValidatePrimaryData:Generator torque and power are not commanded from Simulink model.
ValidatePrimaryData:HSS brake is not commanded from Simulink model.
SrvD_Init:BladedInterface_Init:The dynamic library …..\CertTest\5MW_Baseline/ServoData/DISCON_win32.dll could not be loaded. Check that the file exists in the specified location and that it is
compiled for 64-bit applications.

Could you please tell me if I changed anything else? Or there is some another issue.

Thanks

Dear @Aman.Ali,

Are you sure you saved the file after changing the DLL_FileName? The error is still referring to DISCON_win32.dll.

Best regards,

Dear @Jason.Jonkman

Out of 26 Test files one ServoDyn file didn’t cahnged at that time, that is why I got error. Now it’s working fine.

After running the Run_OpenLoop.m file, Test18.SFunc.outb file generated. When I used the command ReadFASTbinary('Test18.outb') , I got an error.

Error using ReadFASTbinary (line 113)
Could not open the FAST binary file: Test18.outb

What is the reason for this error?

Dear @Aman.Ali,

Does it work if you type include the full path to the file in the name? Do you have any trouble reading other OpenFAST binary output files?

Best regards,