modelINITest

INI file read test
Diagram of INITest

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This example model reads the gain parameters from different sections of the INI file test.ini. For gain1 the gain parameter is read as Real value using the function ExternData.INIFile.getReal. For gain2 the String value is retrieved by function ExternData.INIFile.getString and converted to a Real value (using the utility function Modelica.Utilities.Strings.scanReal). The read parameters are assigned by parameter bindings to the appropriate model parameters.

Parameters

TypeNameDefaultDescription
StringsetName"set1"Parameter set name
ExternData.INIFiledataSourceINI file

Components

TypeNameDefaultDescription
Modelica.Blocks.Math.Gaingain1
Modelica.Blocks.Math.Gaingain2
Modelica.Blocks.Sources.ContinuousClockclock