This website uses local storage to ensure you get the best experience on our website.

Table of Contents

Logging and Message via Swap Array Controller

Sending Messages to the Simulation

The controller can send a message to the simulation, that will be displayed to the user in the message window.

In the DLL case, a separate argument to the DLL is provided for this purpose, as described. Element 49 of the DATA array gives the maximum number of characters allowed. Each 1-byte element of the MESSAGE array can store one character of the message.

In the EXE case, there are two methods of specifying the message, which should not exceed 80 characters in length:

  1. Record 49 should contain the number of characters in the message, and the subsequent records should contain the message, four characters per record. This option is now obsolete.

  2. Place the message in records \(M_1\) onwards, 4 characters per record. Enter the number of characters in the message as an integer in record number \(M_0\) where \(M_0 = M_1 - 1\), and set record 49 to \(-M_0\) (note negative sign). Choose \(M_0\) so that all these records occur after other output records, for example \(M_0 = 61\). In practice it does not actually matter if any of the records in the Swap Array are overwritten since they are refreshed each time step.

The EXE controller write to record 49: a zero should be written if there is no message.

Note that in the EXE case, messages should be written using Method 1 if the override control is to be used. The external controller will always take precedence if Method 1 is used.

Sending Logging Output to Bladed

In the DLL case only, additional data may be sent back to Bladed for logging in additional simulation output files in a similar format to other simulation outputs. This data can then be viewed directly using the Data View facility, or post-processed. This is particularly useful for debugging the controller, or for illustrating the details of its operation.

Element 62 of the DATA array gives the maximum number of logging outputs which can be returned. On the first call, the DLL should set element 65 to the number of logging outputs which will be returned, and their values should be returned starting at the element whose number is given by the value of element 63.

The OUTNAME array can be used to specify the names and units for the logging outputs. This should be set on at least the first and last calls to the DLL (overwriting the existing information in that array). This array should be set to a sequence of characters as follows:

Name:Units;

repeated for each logging output. Name is a description of the logging output, and the Units should be specified, provided the logging output is presented in strict SI units.

Last updated 28-08-2024