GetVariable (beta feature)#

This command returns the value of a robot variable.

For more information, see Commands for managing variables (beta).

Syntax#

GetVariable(name)

Arguments#

  • name: name of the variable to get (e.g., “myVar”).

Responses#

  • [2551] [name, value, cyclicId]

  • [1551] [errorMsg]

    • errorMsg:

      • An error message explaining why the variable could not be retrieved;

      • e.g., “Variable ‘myVar’ does not exist”.

Usage restrictions#

This command can be executed in any robot state.

Cyclic protocols#

This command is not available in cyclic protocols. See Managing variables with cyclic protocols.