Creating and handling safety projects

This chapter explains in detail how to create, access and handle safety projects. The following list contains all chapters of this article:

General information about safety projects

Opening existing safety projects

To open an existing safety project using Automation Interface, you must navigate to the safety node and then execute the CreateChild() method with the path of the corresponding safety project file as a parameter.

You can use three different values as SubType:

Basically, these values represent the functionalities (Yes, No, Cancel) of the following MessageBox in TwinCAT XAE:

Creating and handling safety projects 1:

You can either use the path to the safety project (or its *.splcproj file) that needs to be added or you can use the safety project archive file (*.tfzip).

Code snippet (C#):

ITcSmTreeItem safety = systemManager.LookupTreeItem("TISC");
ITcSmTreeItem newProject = safety.CreateChild("NameOfProject", 0, null, pathToProjectOrTfzipFile);

Code snippet (PowerShell):

$safety = $systemManager.LookupTreeItem("TISC")
$newProject = $safety.CreateChild("NameOfProject", 0, "", pathToProjectOrTfzipFile)