The controller DLL could not be loaded

When you open a model that uses a Bladed DLL controller, Ashes loads the DLL as part of initialising the model. If the file cannot be loaded at all, opening the model fails with a message such as

Could not open the model: Error when opening external controller DLL. DLL wrapper returned
'Could not load dll: 'Cannot load library controller.dll: invalid ELF header''

This is different from The controller DLL was not running, where the DLL starts and then fails: here the operating system refuses to load the file in the first place. The usual causes are:
  • The DLL is built for another operating system. A Windows DLL cannot be loaded on Linux, and the invalid ELF header message above is Linux reporting that the file it was handed is not a Linux library. A DLL controller is platform specific, so a model that runs with its controller on Windows needs a Linux build of the same controller to run with it on Linux.
  • The DLL is missing, moved or renamed, or one of the libraries it depends on is.
  • The DLL has the wrong architecture. 32-bit controllers are supported on Windows only.

1 Opening the model without its controller

A model whose control systems are set to Bladed DLL cannot be initialised without the DLL, so this error would otherwise leave you unable to open the model at all - and therefore unable to change the settings that ask for the DLL. The dialog that reports the error offers a way out:
  • Open without the DLL controller opens the model with the controller removed
  • Cancel leaves the model closed, as before

Opening without the controller switches every control system that used the DLL to a scheme that needs no external controller:
  • Demanded pitch becomes Fixed, so the blades keep the pitch angle set in the analysis parameters
  • Generator becomes None
  • Yaw actuator becomes Fixed
The path to the DLL is cleared, so the change is kept when you save the model, and the control systems that were switched are named in the status bar.

Note: nothing is substituted for what the DLL did. With the generator set to None there is no torque acting against the rotor, so it will speed up if you run a simulation. Choose a generator and a demanded pitch scheme before running the model, or point the model at a controller that loads on this machine.

The same thing can be done while a model is open: on the Wind turbine part, click the Bladed DLL action button and clear the Enable DLL check box. Ashes then names the control systems that use the DLL and asks you to confirm before switching them.