Data Exchange with ModuleInterface
If you want to exchange data with the robot, there are several ways to accomplish this.
The most efficient way is via ModuleInterface.
Step |
Action |
---|---|
1 |
Open the ModuleInterface. |
2 |
Click the |
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). ![]()
|
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. |
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. |
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). |
Variables, which have been defined in methods are volatile and are reinitialized with each call of the method.
Step |
Action |
---|---|
1 |
Click the |
2 |
Click the Section of the variable and select VAR. |
3 |
Enter a variable name. |
4 |
Select a data type. |