Variable airfoils using the MulTabLoc USER function

Wth the modifications you have done, you should not have to recompile the FAST_SFunc.mexw32 or FAST_SFunc.mexw64 files. What you do need to recompile is the FAST_Library_Win32.dll or FAST_Library_x64.dll file.

If you have compiled the FAST_Library dll and are still getting the error with the OpenLoop example, you need to isolate the problem: is it coming from the Simulink model or from your changes to the FAST source code?

Have you changed the OpenLoop example at all? If NumAdditionalInputs = 0, this shouldn’t have any effect on the code. You may want to try to compile the standalone FAST executable with your changes and see if it still runs (and be careful, because if you added variables to types without using the FAST registry, your changes will be lost if the FAST registry runs). Or, if you want to debug the dll directly, you could also compile the FAST_Prog.c file to link with your FAST_Library (compiled with SysIVF.f90 instead of SysMatlab.f90–there are compiling configurations for OpFM that have this set up already). The errors you get from running in a C driver like FAST_Prog.c are much more helpful than what Matlab tells you.

If you modified the S-function parameters so that Matlab/FAST thinks there are additional inputs, make sure you’ve modified Mux1 to accept another input block and that the input block returns 3 values.