Creating variables
The variables required for the exchange of data are created in TwinCAT in the tree view. Any type and number of data items can be created. Please note that the same variables also have to be created on the master side for successful communication.
Create the variables as follows:
- 1. Click on the Box (TC EtherNet/IP Slave) of the CX8095 in the tree view on the left-hand side.
- 2. Click on Append IO Connection Object in the context menu.
The IO Assembly object is appended under the box. - 3. Right-click on Inputs or Outputs and then on Insert Variable in the context menu.
The Insert Variable window appears. - 4. Select the desired data types and click on OK.
- You have successfully created variables for the CX8095. You can subsequently link them to the PLC or the task.
Configuration overview
Once the variables have been created, the entry IO Assembly 1 Settings(0x8001) appears on the Configuration tab:
The pictured instance numbers of an EtherNet/IP slave are important for the entry in the master.
- Value 128 for the configuration, which should always be used with the value 0.
- Value 129 for the input data; the length in this example is 18 bytes (4 bytes which are automatically created in the system and 14 bytes for variables created by the user).
- Value 130 for the output data; the length in this example is 10 bytes (4 bytes which are automatically created in the system and 6 bytes for variables created by the user).