The safety editor integrated in TwinCAT 3 allows the implementation of a safety application in a graphical environment. The desired logic is programmed according to a function block diagram (FBD). The application can be represented in the network infrastructures for increased clarity. The functions blocks known from the logic components can be used as logic elements (digital function blocks for KL6904 and EL69xx; additional analog function blocks for EL6910, EJ6910, EK1960, AX8xxx-x1xx, AX8xxx-x2xx etc.).
The safety editor offers increased flexibility and portability. This is achieved by initially programming independently of the actual hardware used. To this end, both the target system and all input and output devices are made available as so-called alias devices. At this level, all safety-relevant settings can be selected in advance. Before the project is finally transferred to the executing hardware, these alias devices must be assigned to the actually installed physical devices.
In addition to using pre-specified function blocks, there is also the possibility to create custom function blocks. These can be created by combining existing – pre-certified – function blocks or by using Safety C (this can only be done for the safety runtime). Safety C is an almost unrestricted derivative of standard C. This allows well-known control structures such as IF-THEN-ELSE, SWITCH CASE and the data types usual in C to be used for safety applications.
An important novelty in the programming of safety-relevant applications in TwinCAT 3 is the extended user management. In the so-called basic mode, the user can create an application exclusively from pre-specified – and thus certified – function blocks. These also include function blocks that the user has created on the basis of pre-certified function blocks. In the expert mode on the other hand, it is possible to create function blocks in Safety C and thus to create custom libraries. Before loading it into the safety controller, a check is made as to whether the programmed logic consists of already certified function blocks or whether the created application requires renewed examination.
In addition to programming, improved tools optimally support the debugging and test phase. Programs can be debugged as usual in the Visual Studio® environment: the online values of variables and states of the function blocks are displayed directly in the graphical environment, enabling fast and simple debugging of the application. Furthermore, the project can be simulated offline in order to considerably speed up and simplify commissioning.
The editor is equipped with an automatic verification mechanism which automatically checks whether the saved project corresponds to the one created in the editor. The previously required manual comparison by uploading the project back to the safety controller is no longer necessary.
In addition, the safety editor automatically generates documentation containing a detailed view of all relevant project data. From the representation of the hardware terminals with their safety-relevant settings through to an exact listing of the function blocks used and their interconnections, this documentation contains all important data required to facilitate the wiring of the plant, debugging and maintenance.