Back to Blog
Applications and How-Tos

Beckhoff TwinSAFE Setup Guide for KEB Drives with TwinCAT Software

Conner Glaser | June 26th, 2025

Looking to implement a robust safety system? This Beckhoff TwinSAFE setup guide will show you how to configure a safety PLC program using TwinCAT software and establish Fail-Safe over EtherCAT (FSoE) communication with a KEB S6A drive. We’ll cover everything from the necessary hardware and software to successfully linking your Beckhoff PLC, safety PLC, KEB safe I/O, and KEB drive.

 

1. Software and Hardware Requirements

Here is the list of equipment used in this FAQ:

When all of the hardware is wired up correctly and the proper software is installed you may begin the next step of creating a project and beginning the PLC programming.

 

2. Set Up the TwinCAT Program

The first thing you want to do is open a new project in TwinCAT software.

 

Beckhoff TwinCAT setup_step 1_create project
Figure 1 – Create a new TwinCAT project

After opening a new project, choose a target system for your application.

 

Beckhoff TwinCAT setup_Step 2_Choose target system
Figure 2 – Choose target system

 

Beckhoff TwinCAT setup_Step 3_Search Ethernet
Figure 3 – Search Ethernet

Then you will need to go to “Search (Ethernet)” in order to find the IP address of the PLC port connected to the PC. Ensure the PC’s Ethernet port is in the same subnet as the PLC’s IP address. If the IP is unknown, try “Broadcast Search.” Once your PLC appears, click “Add Route.”

 

Beckhoff TwinCAT setup_Step 4_add route
Figure 4 – Add route

A prompt will appear asking for the username and password. The default username and password are Administrator and 1, respectively. If changed, enter the updated credentials.

 

Beckhoff TwinCAT setup_Figure 5_add remote route credentials
Figure 5 – Add remote route credentials

Click “OK” and close the routing window. Select your PLC from the dropdown menu. Ensure the PLC is in “Config Mode” by clicking the blue button shown below and restarting the TwinCAT system in Config Mode.

 

Beckhoff TwinCAT setup_Figure 6_Switch to config mode
Figure 6 – Switch to config mode

 

3. Configure I/O Devices

In this section, we will guide you through the process of adding your devices and configuring them properly for the application.

 

3.1 Add Devices

Under I/O, right-click “Devices,” select “Add New Item,” and add “EtherCAT Master.” For this guide, we’ll configure Safety IO modules connected via PCI slots with an EtherCAT junction.

 

Beckhoff TwinCAT setup_Figure 7_Add PCI Adapter
Figure 7 – Add a PCI Adapter

The correct EtherCAT description files must be imported in TwinCAT in order to proceed with using a Safety Module 3 KEB drive. Assuming Combivis 6 is already installed, you can likely find the EtherCAT description files at:

 

Beckhoff TwinCAT setup_Table 1_Add KEB files to EtherCAT directory
Table 1 – Add KEB files to EtherCAT directory

After the files have been moved over to the TwinCAT folder, the main TwinCAT program must be closed and reopened again. The simple “Reload Device Descriptions” in TwinCAT is insufficient.

Reopen the project, right-click on the “EtherCAT Master,” and click “Scan.” (You will only be able to do this in Config Mode)

 

Beckhoff TwinCAT setup_Figure 8_Box 7 error and add Drive Module
Figure 8 – Resolve box 7 error and add the correct drive module

The KEB drive will not be correctly identified in the scan, and will likely show up as something similar to “Box X.” To add the drive, right-click on the item above “Box X” and click “Add New Item.”

For this example, we right-clicked on “Term 5 (KEB Buscoupler),” and selected “Add New Item.” Under the KEB Automation KG folder, select “KEB_S6A_EtherCAT (MDP).” A window will pop up about appending a linked axis, and you can click “cancel,” unless your application requires otherwise.

Once the KEB drive is added, you can delete the “Box X” device.

 

3.2 Configure I/O Devices

Open the S6A_EtherCAT module and click on the “EtherCAT” tab. Open “Advanced Settings.” In the General/Behavior settings, make sure “Check Vendor ID,” “Check Product Code,” and “Check Revision Number” are all unselected.

 

Beckhoff TwinCAT setup_Figure 9_Startup Checking
Figure 9 – Startup checking under advanced settings

Next, click the “Slots” tab in the S6A_EtherCAT module.

 

Beckhoff TwinCAT setup_Figure 9a_Slots
Figure 10 – Slots drive tab

Select the safety module slot (Sicherheits-Modul Slot). A view with available modules should now be displayed on the right side of the window. Select a module description and accept with the “<” button. Make note of the number after “SM3” in the module that you selected. This will be used later as the number of bytes being transferred over the safety process data. In our example, we are using 6 bytes of safety process data.

 

Beckhoff TwinCAT setup_Figure 10a - Slots safety module descriptions
Figure 11 – Slots safety module descriptions

A standard process data description can additionally be mapped in the process data module slot A. For this example, we will use KEB’s “std PD map (S6)” standard process data mapping.

 

4. Configure Safety

With all the devices added to your TwinCAT project and mapped properly, we can move forward to configure the safety side in TwinSAFE.

 

4.1 Create and Configure Safety Project

Before safety is configured on the software level, determine each safety address of all of the safety devices used. Most devices have a physical dip switch to configure. Each safety device needs to have a unique safety address.

In this example, the safe addresses are assigned accordingly:

 

Beckhoff TwinCAT setup_Table 2 -Device Hardware Safe Address
Table 2 -Device Hardware Safe Address

To start configuring safety on the software level, right-click on the “SAFETY” item, and select “Add New Item.” Add a “TwinCAT Safety Project Preconfigured ErrAck” safety project.

 

Beckhoff TwinCAT setup_Figure 12 - Add new TwinCAT Safety Project
Figure 12 – Add new TwinCAT Safety Project

Next, select “Target System” under the new safety project.

 

Beckhoff TwinCAT setup_Figure 13 - target system tab and configuration
Figure 13 – Target system tab and configuration

Select your “Target System” and “Physical Device.” We will be using a EL6910. Also, ensure that you check the boxes for “Map Serial Number” and “Map Project CRC.” Select the green “up arrow” next to “Hardware Address” for the software to map the safe address according to the physical DIP switch configuration on the device. Also make sure to click the “save all” icon in the toolbar to save the Target System configuration and the project altogether.

 

4.2 Create and Configure KEB Drive Safety Project

Next, we will open Combivis 6, KEB’s drive software. Once the program is open, click “Scan for KEB devices.”

 

KEB Combivis 6 software device scan screenshot
KEB Combivis 6 software device scan

The KEB USB Serial Adapter (0058060-0040) is necessary to program the drive. Plug the serial end of the adapter into the X4A port of the drive, and the USB end into the PC.

 

Close up of the X4A port on a KEB Drive to connect to Combivis 6 programming software
Close up of the X4A port on a KEB Drive to connect to Combivis 6 programming software

The associated COM port should appear. Once it does, select that COM port and select “Start search.” Once the drive appears, select “Add selected devices.”

 

KEB Device Scan Window in Combivis 6 software
KEB Device Scan Window in Combivis 6 software

Go to the fieldbus wizard tab. First, select the EtherCAT fieldbus configuration. Second, add “standard PD mapping.” Third, activate PDO for Transmit PDOs and Receive PDOs. Fourth, click “run software reset” to apply the fieldbus changes.

 

Beckhoff TwinCAT setup_Figure 14_Combivis fieldbus setup
Figure 14 – COMBIVIS 6 fieldbus setup

Open the KEB Safety Module in the navigator under the drive. In the top right-corner, log in with your credentials. The default username is ‘1’ and the default password is ‘default’. This default username and password are only used to create new users, and it is not possible to download safety parameters with this login information. More information on safety module users can be found in the “KEB Safety Module Type 3” manual.

Once you are logged in, click the “safe parameterization” tab.

 

Beckhoff TwinCAT setup_Figure 15 - combivis 6 safety module parameterization
Figure 15 – COMBIVIS 6 safety module parameterization

At the very bottom of the “Safe parameterization” tab, you will find “Bus general options.” Select “FSoE” for bus type. Select a unique safety address and select the safety bus data length to match the number of bytes chosen for the safety module slot of the S6A_EtherCAT module in TwinCAT. In this example, the safety address was chosen as 2. The safety process data chosen was “SM3_6_Rx_SF1_Tx_SF1,” so there are 6 bytes of safety bus data.

It is also necessary to change the safety module address in the “Settings” tab of the KEB Safety Module to match the safety address chosen in the “Safe parameterization” tab.

 

Beckhoff TwinCAT setup_Figure 16 - Safety module address
Figure 16 – Safety module address

After configuring the bus general options, in “Safe parameterization,” click “download” to download the safety configuration to the drive. You must be logged into the safety module and have STO dropped to perform this action.

 

Beckhoff TwinCAT setup_Figure 17 - combivis 6 download safety and CRC number
Figure 17 – Download safety and copy the CRC number on COMBIVIS 6

After completing the download, copy the “CRC (Online)” (shown in the image above) to your clipboard. Perform a power cycle to the drive. Remember, when power cycling high voltage, it’s best practice to leave the drive off for 15 seconds to let the capacitors completely discharge before powering back on.

We will now return to TwinCAT.

 

4.3 Safety I/O Configuration

Under your new TwinSAFE Group in your safety project, right click on “Alias Devices,” and select “Import Alias-Device(s) from I/O-configuration.”

 

Beckhoff TwinCAT setup_Figure 18_Import Alias Devices
Figure 18 – Import Alias Devices

You can select the I/O devices being used in the project, which should be the all the devices shown, and you can “Select All.”

Under the KEB Drive device alias device, and under the “Safety Parameters” tab, expand “Safety Device Info.” Edit the Configuration CRC and paste the Device CRC from Combivis 6 into the Hex entry. Click “OK.”

 

Beckhoff TwinCAT setup_Figure 19 - Edit configuration CRC
Figure 19 – Edit drive TwinSAFE configuration CRC

Configure each of the safety alias devices within each alias device module according how they will be used.

Next, verify their safe addresses by right-clicking on the safety project instance and selecting “Check Safe Addresses.”

 

Beckhoff TwinCAT setup_Figure 20 - check safe addresses
Figure 20 – Check safe addresses

If everything is connected, configured, and communicating properly, you should have all non-zero integers for all three columns in the “Check Safe Addresses” window.

 

Beckhoff TwinCAT setup_Figure 21 - Safe Addresses
Figure 21 – View safe addresses

 

4.4 Create Standard PLC Project

Right-click on the PLC icon in the navigator and select “Add New Item.” Then add a “Standard PLC Project.”

 

Beckhoff TwinCAT setup_Figure 22 - add new plc project
Figure 22 – Add new standard PLC project

Under “I/O,” open up the “EtherCAT Master” and go to the “EtherCAT” tab. Select “Sync Unit Assignment.”

 

Beckhoff TwinCAT setup_Figure 23 - Sync unit
Figure 23 – Open sync unit assignment

Assign each device the newly created PLC task by selecting the task in “Forced Sync Unit Tasks,” selecting the device, and clicking “Add.” Once all devices have been assigned the task, select “Apply” and then “OK.”

 

Beckhoff TwinCAT setup_Figure 24 - Assign PLC Task
Figure 24 – Assign PLC Task

 

4.5 Create Safety Program in TwinSAFE

Select “TwinSafeGroup1.sal” in the navigator and create a simple program that utilizes all of the alias devices. As an example, we can use a safeOr function block, and define variables for two inputs and one output. To assign IO to these variables, right-click on any defined variable and select “Go To Linked Element.” A “Variable Mapping” window will open where you can assign the IO to the variables.

 

Beckhoff TwinCAT setup_Figure 25 - Variable Mapping
Figure 25 – Variable mapping window

Once complete, under the TwinSAFE tab, select “Verify Complete Safety Project,” and address any errors that may occur.

 

Beckhoff TwinCAT setup_Figure 26 - Verify activate configuration and download safety
Figure 26 – Verify activate configuration and download safety

If no errors occur, “Verification Process succeeded” should appear in the lower left corner of the screen. Next, select the “Activate Configuration” button in the top left of the toolbar, and click “OK” on the following two windows. The PLC will now be in run mode.

 

4.6 Download a Safety Project Data

To download the safety project, select “Download Safety Project” under the TwinSAFE tab. A login screen will appear. Enter the username and password of the device chosen in the “target system” of the safety project. In our case, the target system is the EL6910. The default username is Administrator, and the default password is TwinSAFE. The serial number is located on the side of the physical device.

 

Figure 27 - Login for download
Figure 27 – Safety download login window

If successfully logged in, you will be prompted to select data being downloaded to the device. You can select “Complete Project Data” and click “next.”

 

Beckhoff TwinCAT setup Figure 28 - Select Project Data
Figure 28 – Select Project Data window

 

Beckhoff TwinCAT setup_29_download successful
Figure 29 – Download results window

 

Beckhoff TwinCAT setup_Figure 30_final varification to download project data
Figure 30 – Final verification to download project data

Re-enter the password to activate the safety project and click “Finish.”

 

Beckhoff TwinCAT setup_Figure 31 - Activation after download project data
Figure 31 – Activation after download project data

Now, you can login and download the application to the PLC. Once downloaded, click start.

 

Beckhoff TwinCAT setup_Figure 32 - Login and download online
Figure 32 – Login and download online

You can monitor the status of the safety project on the drive by observing the LEDS on the KEB drive. The “FS ST” (functional safety status) LED, the “VCC” (24V control card input supplied) LED, the “NET ST” (network status/EtherCAT connection) LED, and “DEV ST” (device status/no errors) LED should all be solid green.

 

Conclusion

By working through these steps your Beckhoff TwinSAFE setup for safety communication on TwinSAFE over EtherCAT FSoE using a CX5120 PLC and a KEB S6A drive should be complete. As a reminder, whenever you make a change to the program, go offline, or if EtherCAT communication is dropped, you will need to verify and re-download the safety program.

 

Contact Us

Let's Work Together

Connect with us today to learn more about our industrial automation solutions and how to commission them for your application.

"*" indicates required fields