Error by Running Test18 or Test01 in Simulink with Code gene

Hello all,

I have a problem. I have simulated FASTv8 (Test01 and Test18)in Simulink Extrenal mode and I get this error.

Build procedure for model: ‘Test01_SIG’ aborted due to an error.

Input (“u”) index must be a positive integer in the expression: u(strmatch(‘LSSGagVxa’,OutList))
in ‘Test01_SIG/Fcn’
when used for code generation

Hat maybe someone an idea how I can solve this? Thank you very much

Do you have a variable called OutList? This variable actually gets generated/populated from the FAST_SFunc mex function, but if it doesn’t exist at the beginning of your project, the Simulink model doesn’t build. There also seems to be a problem in that the index for u(strmatch(‘LSSGagVxa’,OutList)) doesn’t change during the simulation (values of u change, but strmatch(‘LSSGagVxa’,OutList) is whatever the value is at the beginning of the simulation), at least in Matlab R2014b. So, that means you’ll probably have to prepopulate OutList correctly if you want to use it as an index.

Dear Bonnie,

Thanks for your answer. Do you have any idea how I can do this OutList as an index?. Please, do you have perhaps ein small example. Ich use Matlab 2015a
Thank you very much.

When you run, for example, the OpenLoop.m script for FAST’s Certification Test01, you get this OutList variable in the workspace:

[code]OutList = {‘Time’;‘Wind1VelX’;‘Wind1VelY’;‘Wind1VelZ’;‘LSSGagVxa’;‘LSSGagPxa’;‘TeetDefl’;‘TipDxb2’;‘TipDyb2’;‘TipALxb2’;‘TipALyb2’;‘Spn2ALxb1’;‘Spn2ALyb1’;‘YawBrRDxt’;‘YawBrRDyt’;‘YawBrRVxp’;‘YawBrRVyp’;‘YawBrRAxp’;‘YawBrRAyp’;‘RootMyc1’;‘RootMxc1’;‘RootFxc2’;‘RootFyc2’;‘Spn3MLxb1’;‘Spn3MLyb1’;‘RotTorq’;‘YawBrMzn’;‘TwrBsMzt’};

[/code](I just copied the values from the MATLAB workspace browser). The values will depend on what outputs you have selected in each module, but will not change after initialization.

For Test 18, I get this:[code]OutList = {‘Time’;‘Wind1VelX’;‘Wind1VelY’;‘Wind1VelZ’;‘OoPDefl1’;‘IPDefl1’;‘TwstDefl1’;‘BldPitch1’;‘Azimuth’;‘RotSpeed’;‘GenSpeed’;‘TTDspFA’;‘TTDspSS’;‘TTDspTwst’;‘Spn2MLxb1’;‘Spn2MLyb1’;‘RootFxb1’;‘RootFyb1’;‘RootFzb1’;‘RootMxb1’;‘RootMyb1’;‘RootMzb1’;‘RotTorq’;‘LSSGagMya’;‘LSSGagMza’;‘YawBrFxp’;‘YawBrFyp’;‘YawBrFzp’;‘YawBrMxp’;‘YawBrMyp’;‘YawBrMzp’;‘TwrBsFxt’;‘TwrBsFyt’;‘TwrBsFzt’;‘TwrBsMxt’;‘TwrBsMyt’;‘TwrBsMzt’;‘GenPwr’;‘GenTq’};

[/code]

Dear Bonnie,

thank you for your Answer. Please what du you mean, the Outlist value will not change after initialization? After Run OpenLoop.m
If I use the OpenLoop.mdl to implement an model and using Test18. I have replace iTest with 18 for Test18. After running the OpenLoop.m, I start the model OpenLoop to test the Test18.
FileRoot = sprintf( ‘Test%02.0f’, 18);

disp('***********************************************');
disp( ['FAST_SFunc certification test for ' FileRoot] );
disp('***********************************************');

FAST_InputFileName = [CertTest_Dir filesep FileRoot '.fst'];
TMax               = CertTest_TMax(iTest);

% sim(‘OpenLoop.mdl’,[0,TMax]

Or can I use Simulink Test01.mdl to test also Test18.

There is one OutList associated with each FAST input file. When you run a model, it calls FAST_SFunc many times: (1) once to initialize, (2) again each time step to update states and calculate outputs and (3) at the end of the simulation to terminate it. OutList gets set in that initialization step, and because it is a parameter in FAST, does not change until you initialize another FAST model.

Test01.mdl has set up the simple induction generator used in FAST’s Test01.fst file (though you need to tell ServoDyn to get the control inputs from Simulink instead of calculate them internally). If you want to use that controller for Test18, you could do it, but I’m not sure why you’d want to. If you don’t set VSControl=4 in ServoDyn, that should basically be the same as OpenLoop.mdl.

Hello Dear Bonnie,

when I run now model Test01_SIG without the selecton function Fcn. I get another error:
gmake: *** No rule to make target FAST_SFunc.obj', needed by …/Test01_SIG.rxw64’. Stop.

With Fcn block : Input (“u”) index must be a positive integer in the expression: u(strmatch(‘LSSGagVxa’,OutList))
in ‘Test01_SIG/Fcn’
when used for code generation

The Outlist appear after the initialzation in Workspace. When I start the model occurs the error.

Could you help me please ?

Thanks