RangeParameter

Parent Previous Next

Model Setup / RangeParameter
Block Name: RangeParameter

Code File Location: VisualSim/data/expr/RangeParameter

Block Overview

Description

RangeParameter is a variable containing a constant that can be of Int/Double/Long VisualSim data type between a specific range, function and/or a RegEx expression. The RangeParameter is defined by drag-n-drop action from the ModelSetup->RangeParameter Library folder into the Block Diagram.  The RangeParameter value and name must be updated before it can be used.  The parameter can be modified, prior to the start of each simulation. 

Double click of a RangeParameter provides 3 attributes; namely Value, Min and Max. Min and Max is to define the acceptable range, while Value is the value assigned to the parameter. If the user tries to assign value beyond Min and Max, then an exception is generated. For example; if Min is assigned with 10 and Max is assigned with 20; then Value cant be less than 10 and not greater than 20.


This RangeParameter name is available to the current window and all hierarchy blocks below this level.  The RangeParameter name can be accessed directly from lower-level hierarchy blocks, provided there is no intermediate parameter with the same name.  


The RangeParameter can be used in any Block fields, other parameters and in Virtual Machine code.   The RangeParameter name must be unique for each Block Diagram Window.

RangeParameters can be created for a Window, Hierarchical block and standard VisualSim library blocks. 

Note: Illegal data values and values beyong specified range for the parameter will generate error messages.

Refer RangeParameter Demo 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

Value

Value assigned for the Parameter

Int/Double/Long

30.0

Min

Lower bound for the Range

Int/Double/Long

10.0

Max

Upper bound for the Range

Int/Double/Long

40.0


 

Created with the Personal Edition of HelpNDoc: Write EPub books for the iPad