Compile A2AD with Bladed-DLL Interface

After I was successfull in compiling FAST with the bladed DLL-Interface (which was quite easy as the compile-script is included in the FAST archive) I now want to compile A2AD interfacing the Bladed-DLL. This was not successfull. I have modified the compile-script of A2AD to use the source files changed for the Bladed-Interface by using:

SET FAST_Files=%FAST_Files% “%FAST_LOC%\BladedDLLInterface.f90”
SET FAST_Files=%FAST_Files% + “%FAST_LOC%\UserSubs_forBladedDLL.f90”
SET FAST_Files=%FAST_Files% + “%FAST_LOC%\UserVSCont_KP_forBladedDLL.f90”

instead of using

SET FAST_Files=%FAST_Files% “%FAST_Loc%\UserSubs.f90”
SET FAST_Files=%FAST_Files% + “%FAST_Loc%\UserVSCont_KP.f90”
SET FAST_Files=%FAST_Files% + “%FAST_Loc%\PitchCntrl_ACH.f90”

This results in many errors, the first one says:
ADAMS.f90(23284) : Error: Error in opening the compiled module file. Check INCLUDE paths. [OUTPUT]

How do I need to change the compile script to build an A2AD version which uses the controller in a Bladed-DLL?

Many thanks in advance,

Hi, Felix.

Not only do you have to change the 3 files you mentioned, but they have to be compiled in a slightly different order. I created a version that takes care of the necessary changes, and you can download it here: If you call the new script using “CompileLinkA2AD_130001a-bjj DLL”, it compiles using the files for the Bladed-style dll option.

Hope that helps.

Hi Bonnie,

thank you very much for providing the batch file. This solved all problems, ADAMS is no running perfectly with a controller from a Bladed-DLL.

I would suggest to put your batch file into the ADAMS2AD-archive, so that the same options as with FAST are avaiable (compilation with Bladed-DLL support or not). There is another small bug in the batch file: You should not put quotation-marks around the compiler-path but instead around the calls to the compiler scripts like this:

It is also working like it is currently implemented, but in case of an error it says:
Bin: Errormessage
instead of
IFORT: Errormessage

I really appreciate your help. Best regards,

I just want to add a comment:

One needs to set DecFact in *.fst to 1 when interfacing a BladedDLL with A2AD to ADAMS.

I had the following setup:

DT=0.005 DecFact=10 DTAero=0.005 DTCntrl=0.005
→ The DLL was called every 0.05s by ADAMS instead of 0.005s.

I think the reason is the statment

SIMULATE/DYNAMICS, END =  6.000000E+01, DTOUT =  5.000000E-02

in the *.acf-File. The VARSUB and other functions seem to be called at DTOUT. As I am new to ADAMS I don’t understand if this is correct or not. Maybe somebody can explain the behavior.

Also a second comment:
Using the C+±Solver does not work. No output is written (i.e. no *.plt-File). (I did apply the patch from MSC, which is mentioned in other topics).