LabVIEW Control Design and Simulation Module

getmodelparam (MathScript RT Module Function)

  • Updated2023-03-14
  • 2 minute(s) read

getmodelparam (MathScript RT Module Function)

Owning Class: info

Requires: Control Design and Simulation Module and MathScript RT Module

Syntax

y = getmodelparam('parampath')

y = getmodelparam('VIname', 'parampath')

y = getmodelparam(aliasgroup, 'alias')

Legacy Name: get_param

Description

Returns values from model parameters of Simulation functions and/or subsystems. The VI with the simulation diagram must be in memory.

The y = getmodelparam(aliasgroup, 'alias') syntax is available only in MathScript Nodes, and you must define aliases for model parameters before you call the function with this syntax.

Examples

Inputs

Name Description
VIname Specifies the filename or path on disk of the VI with model parameters you want to access. VIname is a string and can be just the filename and extension, an absolute path, or path relative to the current VI. If you call this function in the LabVIEW MathScript Window, VIname is a required input.
parampath Specifies the path of the model parameter whose value you want to read. parampath is a string in the format of 'loop label (if any).top subsystem label (if any).nested subsystem label (if any).function label.parameter'.
aliasgroup Specifies the label of the MathScript Node input terminal to which you wire information about aliases and their corresponding model parameters.
alias Specifies the alias for the parameter you want to configure.

Outputs

Name Description
y Returns the value of the model parameter you identify.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

Use the following example in a MathScript Node within the same VI as a Control & Simulation Loop with a Sine Signal function inside. The frequency parameter of the Sine Signal function must be unwired.

Y = getmodelparam('Control & Simulation Loop.Sine Signal.frequency')

Related Topics

setmodelparam
setmodelparam_eval