Data Exchange with ModuleInterface
If you want to exchange data with the axis, there are several ways to accomplish this.
The most efficient way is via ModuleInterface.
Step |
Action |
---|---|
1 |
Open the ModuleInterface. ![]()
1 STANDARD_INTERFACE 2 USER_INTERFACE 3 Textual view 4 Tabular view The ModuleInterface provides two sections: STANDARD_INTERFACE (1) and USER_INTERFACE (2). |
2 |
Add variables in the: oTextual view (3) or oTabular view (4) |
3 |
If you add VAR_INPUT, VAR_OUTPUT or VAR_INPUT_OUTPUT you must update the call of the axis). |
4 |
If you use the Code Generation Option for Non-Template Axes, the call of the axis is updated automatically. |
Step |
Action |
---|---|
1 |
Right-click the Axis object to add, for example, a method. |
2 |
You can use the method to set/get data of the axis. |
Step |
Action |
---|---|
1 |
Add a global variable to use it inside and outside of the axis. |
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.
If you need nonvolatile variables to save data, you must define the variables in the ModuleInterface.