Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

GetVariablesDescription

Group

Model Interaction, MATLAB Variables

Description

Provide the details of each variable defined as MATLAB variables under the model trees. The details for each variable include:

  • Variable Id

  • Variable name (as defined in MATLAB)

  • Variable value

  • Tuple of paths of all parameters in blocks using the variable

The API call only works when the <model_name>.param file has these MATLAB variables defined. MATLAB variables get added to these variables if they are assigned inside the MATLAB command before opening model box of the Simulation Tool tab (in the model explorer window).

Usage

((id1, name1, val1, (path1.1, path1.2,...)), (id2, val2, name2, (path2.1, path2.2, ...)), ...) = RtlabApi.GetVariablesDescription( )

Input

None

Output

Return a tuple containing tuples for each variable. Tuple for each variable contains

  • id1: Variable Id

  • name1: Variable name as defined in MATLAB

  • val1: Variable value

  • (path1.2, path2.2, ...) : Tuple of paths of all parameters in blocks using the variable.

Exception

  • EOK: Success.

  • EINVAL: One of the variables doesn’t exist..

  • EIO: Error sending the request or receiving the reply.

  • EBADF: Model not specified by previous Connect or OpenProject.

  • OP_API_MODEL_IO_TIMEOUT: Timed out waiting for reply from model.

  • OP_API_MODEL_IO_ERROR: Model is missing some or all processes or subsystems.

Examples

None

Related Items

SetVariables

Modules

import RtlabApi

 

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter