By adding the keyword global to a parameter or variable in the Equation Editor, its value is shared all over the model. It means that various submodels can use the same parameter or variable, but you only have to assign the value once. In equation models, the keyword global is added after the definition of the data type:
parameters
real global par1 = 100 {Hz};
real global par2 ;
variables
real global var1;
real global var2;
..
..
Parameters can only be assigned a value once. The same goes for variables. In only one submodel the global variable can be assigned a value using an equation. If parameters or variables are assigned more than once, 20-sim will generate an error.
By default, global parameters and variables and valid in the entire model. However, the scope can be limited to a certain branch in your model tree.
You can change the value of a global parameter in the Parameters/Initial Values Editor. By default, global parameters and variables and valid in the entire model. In the Parameters/Initial Values Editor you will find the parameters at the top level of the hierarchy. If the parameter has a scope, you will find it in the specific branch of the model hierarchy.