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.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Group

Model Interaction, MATLAB Variables
Description

Sets the values of one or more MATLAB variable type parameters by specifying each variable's ID and Value as a pair.
The API call only works only when the <model_name>.param file has these MATLAB variables defined. MATLAB variables get added to the 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

RtlabApi.SetVariables(((varID1, varVal1),(varID2, varVal2), ... ))

Input
  • varID1: ID of a MATLAB variable
  • varVal1: Value of the related MATLAB Variable.
  • ((varID1, varVal1), ...): A Tuple of pair-like tuples with each pair consisting of variable ID & its related value e.g. (varID1, varVal1) represents one such pair-type tuple.

Output

None

Exception
  • EOK: Success.
  • EINVAL: One of the variables doesn’t exist.
  • ENOMEM: Memory allocation error.
  • EIO: Error sending the request or receiving the reply.
  • EBADF: Model not specified by previous Connect or SetCurrentModel.
  • 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.
  • No labels