Code File Location: VisualSim/data/expr/Parameter
Parameter is a variable containing a constant that can be any VisualSim data type, function and/or a RegEx expression. The parameter is defined by drag-n-drop action from the Model->Parameter Library folder into the Block Diagram. The parameter value and name must be updated before it can be used. The parameter can be modified, prior to the start of each simulation.
This
parameter name is available to the current window and all hierarchy
blocks below this level. The parameter name can be accessed
directly from lower-level hierarchy blocks, provided there is no
intermediate parameter with the same name.
The
parameter can be used in any Block fields, other parameters and in
Virtual Machine code. The Parameter name must be unique for each
Block Diagram Window.
Parameters can be created for a Window, Hierarchical block and standard VisualSim library blocks. The addition of parameters to the library blocks allows the user to reference the value in other parameters of the same block.
ÞNote: Illegal data values for the parameter will generate error messages.
Refer Parameter Demo Model. The Instance Parameter demo shows how two instances of the same class in the same model can access different parameter values. The Transaction_Source block of the first instance (top-right) accesses the parameter X1 inside the hierarchical block while the Transaction_Source block of the second instance (bottom-right) accesses the parameter X1 of the top-level model.
Parameter | Explanation | Type | Example |
Customized Name > New name | Set the parameter name. | String | StopTime |
Parameter (or Customized name) | Set the value to the define the parameter. | Any | 10.0 |
Display Name | Define a unique name for the tooltip | String | MyParameter |