I/O task linking

You do not need a paid TwinCAT license for reading push button extensions. After reading in, you can extract the ADS info and use it as part of the ADS (Automation Device Specification) communication protocol. You can find more information about ADS here.

To cyclically address connected inputs and outputs (I/Os) without a PLC project, you must link the EtherCAT devices to an I/O task. Proceed as follows:

1. Click Add New Item under SYSTEM > Tasks on the left side of the tree view.
I/O task linking 1:
2. Give the task a name and select the TwinCAT Task With Image option.
I/O task linking 2:
3. Accept the default values for the task.
I/O task linking 3:
4. Right-click on Inputs on the left in the tree view and then click Add New Item.
I/O task linking 4:
5. Create a BOOL variable with a size of one byte.
I/O task linking 5:
6. Link the BOOL variable to the EtherCAT device.
7. To do this, right-click on the created BOOL variable in the tree view on the left, then click Change Link.
I/O task linking 6:
8. Connect the BOOL variable with a variable of the EtherCAT device, e.g. Key 1.
I/O task linking 7:
9. Activate the configuration and restart the TwinCAT system when requested.
I/O task linking 8:
10. Remove the ADS info from the variable in order to use it later in the ADS programming.
I/O task linking 9:
Configuration is now complete.