Adding a Profibus slave

The example shows a CX2020 Profibus slave with CX2500-B310 fieldbus module, connected to the Profibus master. In order to ensure that the Profibus slave is configured and subsequently detected by the Profibus master with all inputs and outputs, the Profibus slave first must be added in TwinCAT.

Prerequisites for this step:

  • A scanned and selected target device with Profibus slave. This example uses a CX2020 with CX2500-B310 fieldbus module.

Add the Profibus slave as follows:

1. Start the System Manager.
2. In the tree view on the left, right-click on I/O Devices.
3. In the context menu click on Scan Devices.
Adding a Profibus slave 1:

 

4. Select the devices you want to use and confirm the selection with OK.
Adding a Profibus slave 2:

 

5. Confirm the request with Yes, in order to look for boxes.
Box 1 (CX2500-B310) is integrated. The Insert Module window appears.
6. Add modules such as 1 BYTE Slave-Out/Master-In and 1 BYTE Slave-In/Master-Out for your process image.
Adding a Profibus slave 3:

 

7. Click on Cancel to close the Insert Module window.
8. Confirm the request whether to enable FreeRun with Yes.

  • The Profibus slave was successfully added in TwinCAT 2 and is displayed in the tree view with the inputs and outputs.

    You can add further variables by right-clicking on the box and then clicking on Append Module in the context menu.
    Adding a Profibus slave 4:

    In the next step you can extend the process image by creating additional virtual slaves. Or you can set the address, once the slave configuration is complete.