This blog is the third part of DMC’s Getting Started with TwinSAFE series, aimed at helping users navigate the TwinSAFE programming environment with confidence.
Getting Started with TwinSAFE Series
In this post, we'll walk through the steps for downloading a safety project, troubleshooting common issues, and using diagnostic tools to ensure your system is operating reliably.
Downloading a Safety Project
Before downloading your safety project, you will need to select a target. Unlike a standard program where you establish a route and can dynamically select your target, you will need to select a specific device with a static safety address from the I/O Tree. See Creating a Program from Scratch for configuring the target.
Once each of your safety projects has a target, you can perform a download by selecting either “Download Safety Project” or “Multi-Download Safety Project(s)”. It is easiest to always use the “Multi-Download” option to make sure all safety projects are updated at the same time:

From the “Multi-Download” window, you will be able to select which projects you would like to download and diagnose which projects are already up to date.
The first window, “Select Valid Project(s)” will present you with a list of the Safety Projects in your solution:

If the checkbox is disabled, preventing you from selecting a project, you may have a compilation error within your safety project that needs to be resolved before the download can be initiated. See the error console to check for errors.
The next window, “General Download Settings”, will present you with input fields for the login credentials for the safety controllers and ask you to verify the serial number on each physical device so you can confirm you are connected to the correct hardware.
The default username and password are:
- User: “Administrator”
- Password: “TwinSAFE”

The third window, “Final Verification”, will present you with CRC information for each project and require one final checkbox to be selected before you can proceed. Use this page to double-check your settings:

The fourth window, “Activation”, will ask you to re-enter the login credentials and activate the project for each project you have selected. When you proceed from this screen, the Safety Projects will be loaded onto the controller:

The final window, “Multi-Download Result”, will display the result of each download request:

After Downloading
When you download updates to a safety project, always make sure to activate configuration on the PLC to ensure that all the project linkings and mappings have been updated as well.
Troubleshooting a Safety Project
After doing your initial download, you may discover issues that will prevent the Safety Project from operating as intended. Beckhoff has provided a number of diagnostic tools to help you resolve these issues.
TwinSAFE Live View (group states -> Run, Stop, Start, Error, Unknown)
Once you have performed the download, you can then monitor each safety group live. First, open the safety logic for the group you want to monitor (.sal file). Next, select the “Show Online Data” icon that looks like a pair of yellow glasses:

It may take a moment for the safety view to begin displaying online values. However, once it has, you should see a border around the window that is Red/Blue/Green/Purple and says Run/Stop/Start/Error/Unknown.
In most cases, you will want to see the safety group enter the Run state; however, there is often an unexpected issue that will require some resolution. If your program is not in the Run state, you may need to do some diagnostics. Consult the table below and the subsequent sections to diagnose your program issues:
State |
Color |
Resolution |
Run |
Green |
Safety Project is Running |
Error |
Red |
One of the function blocks or devices is in error. Consult the live view and search for function blocks with an error. Consult the Safety Project Online View to verify devices. |
Stop/Start |
Blue |
Check the group port configuration and status. |
Unknown |
Purple |
You likely have a communications issue. Double-check safe addresses. Consult with Safety Project Online View. |



Function Block States
In addition to the overall safety group state, each function block will have a state and visual indicator as well. Notice the state description at the bottom center of the function block, and the colored indicator at the bottom right:


Section 4.26.9 (page 169) of the TwinSAFE Logic FB manual on the Beckhoff website details the various states you can find for function blocks. Most of the time, you will only see states 0x01 through 0x06. During normal operation, you will see a lot of states 0x01-RUN and 0x03-SAFE. During the SAFE state, the function block’s input conditions are not satisfied, and the block will output safe values. If the block’s input conditions are satisfied, it will enter the RUN state and pass values other than fail-safe ones to its outputs.
If you are seeing 0x05-RESET or 0x06-STATE or 0x0F-WAIT-FOR-RESET, then the block is waiting for a reset signal. Consult the documentation for the specific function block to figure out how to send said reset signal.
If the state indicator is red, and you are seeing 0x02-STOP or 0x04-ERROR, then you may have an issue. 0x02-STOP tends to occur when the TwinSAFE group as a whole has entered the Error or Stop state and will be resolved when the TwinSAFE group changes state. The 0x04-ERROR state is caused by an error with the function block itself. Look for discrepancies in monitored channels or missing external device monitoring (EDM) signals.
Mapping Diagnostic and State Information
It is helpful to know that much of the state and diagnostic information about the safety devices can be mapped into the I/O tree for live monitoring and reference in the standard project. When you map state and diagnostic information, it will appear under the corresponding device in the I/O tree. Note that you may need to activate the configuration for this information to be usable.
Here are some helpful areas where you can find useful diagnostic information:
For the Safety Project, you can map the device serial number and project CRC from the Target System. The checkboxes to enable the options should appear midway down the left column:


For the TwinSAFE Group, you can map the state and diagnostic information from the properties window after double-clicking on the safety logic file (.sal). Look for the Info Data section and set the “Map” settings to true. After saving the changes, you should see the I/O tree update accordingly:



For each Alias Device, open the device settings by double-clicking, then navigate to the “Connection” tab. From here, you will be able to select what Info Data you want to map:


Check Safe Addresses
A quick way to verify that your safe addresses match all your dip switch configurations is to use the “Check Safe Addresses” window. From the TwinSAFE tab, select the “Check Safe Addresses” option. Not only does the safe addresses window allow you to view the safe addresses configured within the project, but it will also display the addresses physically configured by the hardware if you are online, and allow you to change the configured addresses to match. From the window, select the values you would like to update the project to have via the radio buttons, then select OK. If you do not want to update the addresses, select Cancel:


When working in this window, you may notice that the software addresses do not match the hardware addresses. You can resolve the differences in one of two ways. The first option is to change the dip switch configuration on the hardware. If you are working with a designed, detailed, or repeatable system, this is likely the option for you, as you want to make sure the physical dip switch configuration matches the schematics. If the hardware addresses already match the schematic, then you will want to follow the second method.
The second method is to update the configured addresses in the project. You can either do this from each Alias Device’s settings, or you can use the Check Safe Addresses window to select the software addresses you want in the software project and press “OK”.
Safety Project Online View
The Safety Project Online View shows color-coded diagnostic information about the state of each of the Alias Devices. From this window, you can quickly identify which devices are having issues and get information about what the issue might be.
To open the safety project online view, select the “Other Windows” option from the “View” tab at the top of the screen. Then, select “Safety Project Online View”:

For example, observe the following layout in the Safety Project Online View. In this example, we can see that “ChA_Safety_Logic” is highlighted red to indicate an issue. By expanding the display to get specific diagnostics, we can see that there is a connection error and that the alias device “Estop Input Terminal” is not in an operational state. This indicates that the connection issue is with the “Estop Input Terminal”:

If we resolve the issue (in this case, correcting mismatched FSoE IDs), redownload safety, activate configuration, and reopen the safety online view, “ChA_Safety_Logic” will no longer be highlighted red, as the system is in a healthy state:

I Still Cannot get the Device to Communicate
If you have tried matching up the FSoE IDs using the Check Safe Addresses window and you are still having issues trying to get the Alias Device to communicate, you may need to delete the object from the IO tree and/or the Alias Device from the Safety Project and re-add it. XAE Shell is performing many operations under the hood- sometimes linking/mapping issues can be most easily resolved by doing the IDE equivalent of a “turn it off and back on again”. Deleting the device from the IO tree and adding it back via “scan” has been recommended to me by Beckhoff support and has resolved unclear issues on several projects.
An indicator that you may need to do this would be that the Alias Device connection is not running, yet not in error, and you have no diagnostic information being reported. Double-check your IO tree matches the physical hardware via a “scan”, then try removing and re-adding the device:

Additionally, you may need to delete some cached safety information and update your TE9000 version to the most recent one. Whenever I encounter someone having strange TwinSAFE issues, this is the first thing I recommend. To do this, delete the directory “C:\ProgramData\TwinCAT Safety\AliasDeviceTemplates” (these cached files don’t get cleared on a reinstall for whatever reason) and reinstall TE9000 from the Beckhoff website.
Process Images
If you are having communication issues between two devices, but the safety addresses seem to match up, the issue may be caused by mismatched process images. The process image determines the format of information that will be communicated between two devices. You can view the process image for each Alias Device in the “Process Image” tab:

When comparing process images, you should see that corresponding aliases and devices should have matching message sizes for their inputs and outputs (input size from one should match output size from the other and vice versa). This will often be automatically configured by the program; however, if you are working with a Custom FSoE Connection, you may need to do some manual configuration.
If you do notice a difference in the process image sizes, it is possible you are using the wrong Alias Device. Some physical devices also require different Alias Devices depending on the firmware version. Take the EL1918, for example- later firmware versions require a different Alias Device. If you need to update your available Alias Devices, delete the Alias Device Templates folder (C:\ProgramData\TwinCAT Safety\AliasDeviceTemplates) and install the most recent version of TE9000. Deleting this folder will clear some cached templates and allow the installer to generate the most up-to-date versions:

Conclusion
Commissioning a TwinSAFE system can be a challenge. If you’re having trouble with your system, don’t struggle through it alone- reach out to our team of Automation and Safety experts. See Programming Basics for introductions to TwinSAFE programming.
Contact us today to learn more about our solutions and how we can help you achieve your goals.
Special thanks to Dominic Del’Olio and Hannah Gjovik for their contributions to this blog’s content.