- Full Library / Model / Parameter / PortParameter
- Block Name: PortParameter
- extends VisualSim.data.expr.Parameter
This parameter creates an associated port that can be used to update the current value of the parameter. If this actor is placed in a container that does not implement the TypedActor interface, then no associated port is created, and it functions as an ordinary parameter. This is useful, for example, if this is put in a library, where one would not want the associated port to appear.
There are a few situations where PortParameter might not do what you expect:
- If it is used in a transparent composite actor, then a token provided to a PortParameter will never be read. A transparent composite actor is one without a director.
Workaround: Put a director in the composite.
- Certain actors (such as the Integrator in CT) read parameter values only during initialization. During initialization, a PortParameter can only have a value set via the parameter (it can't have yet received a token). So if the initial value of the Integrator is set to the value of the PortParameter, then it will see only the parameter value, never the value provided via the port.
Workaround: Use a RunCompositeActor to contain the model with the Integrator.
Created with the Personal Edition of HelpNDoc: Free help authoring tool