Data Exchange with ModuleInterface

Overview

If you want to exchange data with the robot, there are several ways to accomplish this.

Via ModuleInterface

The most efficient way is via ModuleInterface.

Step

Action

1

Open the ModuleInterface.

2

Click the G-SE-0065894.1.png button to add a variable to the ModuleInterface.

3

Click the Section of the variable to select the type of variable (VAR_INPUT, VAR_OUTPUT, VAR INPUT_OUTPUT, VAR).

4

Enter a variable name.

5

Select a data type.

6

As Data type you can use the standard data types (BOOL, LREAL, ...) or user-defined data types (for example ST_MyStruct).

G-SE-0065893.1.png

 

 

7

If you add VAR_INPUT, VAR_OUTPUT or VAR_INPUT_OUTPUT you must update the call of the robot (see example in Calibration).

8

If you use the Code Generation Option for Non Template Robots, the call of the robot is updated automatically.

Via Method

Step

Action

1

Right-click the Robot ... -Series object to add, for example, a method.

2

You can use the method to set/get data of the robot.

Via Global Variables

Step

Action

1

Add a global variable to use it inside and outside of the robot.

2

As Data type you can use the standard data types (BOOL, LREAL, ...) or user-defined data types (for example ST_MyStruct).

Save Data

Variables, which have been defined in methods are volatile and are reinitialized with each call of the method.

Step

Action

1

Click the G-SE-0065894.1.png button to add a variable to the ModuleInterface.

2

Click the Section of the variable and select VAR.

3

Enter a variable name.

4

Select a data type.