Debugging the controller
1 Log file
If an error occurs during a simulation with an
External controller
(i.e. a controller defined by a dll), it is possible that the issue lies within the dll itself. In that case, you can produce a
controller log file
with information that will help fix the issue. To do so, you can take the following steps:
-
When selecting the dll file, tick the
Extended debug output
box, as shown in the picture below.
-
Open the
%temp%
folder. The easiest way to do that is to open an Explorer window, type in
%temp%
and press Enter, as shown in the picture below
-
In the
%temp%
folder, you will find a file named
ashescontrollerdebug-{nnn}.txt
, where
nnn
is a hexadecimal key, as shown in the picture below. Open this file.
Note:
there might be several
ashescontrollerdebug
files in the folder, open the largest one.
This file contains the values that the
swap array
has contained at each time step. Tracking down the values of the swap array can help you understand where the error comes from.
2 Command window
To check that the dll is working correctly, you can run a quick test in the command window. To do so, you can take the following steps:
-
Open a
command window
. You can do so by typing
cmd
in the Windows Search Bar and opening the
Command prompt
app, as illustrated in the figure below:
-
In the command window, go to the folder
C:\Program Files\Ashes X.xx\ControllerDllWrapper\x64
. You can do so by typing the following command in the command window
1cd C:\Program Files\Ashes X.xx\ControllerDllWrapper\x64
and pressing enter.
Note: you have to replace X.xx with your current version of Ashes
-
In the command window, type
and press enter1
ControllerDllWrapper.exe --dllpath="YourDllPath"
For the default NREL 5 MW controller, if you applied the default settings when installing Ashes, the path will be1"C:\Users\UserName\Documents\Ashes X.xx\DLL Controllers\NREL Offshore 5MW controller\NREL Offshore 5MW controller.dll"
Note: you have to replace X.xx with your current version of Ashes, and UserName with your Username under Windows
-
In the command window, type
and press enter. This will perform a simple test on the dll. If the dll is correctly implemented, the text ok will be displayed1
Update