User manual

30
tool. In addition, Dymola always support the three latest dSPACE releases with the three
latest Matlab releases. Although not officially supported, it is likely that other combinations
should work as well.
Compatibility xPC Target
Compatibility with Matlab xPC Target has been verified for all Matlab releases that are
supported by the Dymola Simulink interface, which means R2009a (xPC Target ver. 4.1)
to R2014a (Simulink Real-Time ver. 6.0). Only Microsoft Visual C compilers have been
tested.
3.5.3 JavaScript interface for Dymola on Windows
available
The class DymolaInterface provides a JavaScript API for accessing the most useful built-in
functions in Dymola.
To use the JavaScript interface, Dymola must be started specifying server port 8082, for
example by adding this port as the last part of
Target in a shortcut for starting Dymola:
…\Dymola.exe" –serverport 8082
There is a one-to-one correspondence between the parameters in a Dymola command and
the parameters in the corresponding JavaScript method. Note that JavaScript does not
support named parameters.
If you want to execute a command that is not part of the Java interface, you can use the
method
ExecuteCommand. It takes a string parameter that can contain any command or
expression. For example:
dymola.ExecuteCommand("a=1");
The command is not type checked so you are responsible for making sure that the command
is valid. It is not possible to retrieve the output from the command.
Note! The JavaScript interface is currently only supported on Windows.
The JavaScript interface has been tested on Firefox, Google Chrome, and Internet Explorer
11.
Below an example of how to use the JavaScript interface: