Join us today!
[Solved] Creating a TwinSAFE Simulation Project
This tutorial will demonstrate the creation of ESTOP function variant 1 (category 3, PL d) safety simulation project.
Create a TwinCAT project, then right click on 'SAFETY', select 'Add New Item' to create a new safety project.
There will be 3 safety project options. The first option includes the ErrAck mappings, second option includes ErrAck mappings and Run mappings. Select the second option to create a project with ErrAck mappings and Run mappings. Give it a name and click OK.
You can change the name or the target system on this window if you'd like. Confirm the selections and click OK.
Now we need to select the target system. Double click on the target system open the settings. Using the dropdown menu, select the safety target system. In this project, we have used EL6910.
To select the simulation device, click on the icon shown below and select 'External Device'.
Leave the AMS Net ID as it is and click OK.
To add the safety input and output terminals, right click on Alias Devices and select 'Add', then 'New Item'.
Select the Beckhoff Automation on the left menu, choose the EL1904 4 channel digital inputs card. Click Add.
Now add the EL2904 4 channel digital outputs card as well.
Set the FSoE address of the EL1904 input card.
Set the FSoE address of the EL2904 output card.
We will now add the Estop circuit for the project. Double click on the TwinSafeGroup1.sal and click the toolbox. Select the safeEstop circuit and drag and drop it on the network section.
To add variables, you can either click on the desired input and type the variable name there or you can type name under the properties in the 'Assigned Variable Name' section. Add the input variables shown below:
To link the variables, go to the 'Variable Mapping' tab, then click on the three dot box and select input for the safety variable. Select the EL1904 'input channel 3' for Reset.
Select the EL1904 'input channel 1' for EStop1 and the EL1904 'input channel 2' for EStop2.
Add 'EStopOut' varible the EStop circuit.
Map the 'EStopOut' varible to EL2904 'output channel 1'.
Enable the 'Safety toolbar' by going go to View -> Toolbars -> TwinCAT Safety.
Save the project and you will see that 'Debug Safety Project' will become active. Click to start it.
Click Run to start running the logic.
Now we need to set the Group RUN signal. Select the 'GroupPort_RunStop' Signal in the variable mapping section and double click on the 'Online Value' to set it to TRUE.
We can see that Group goes in RUN state, but the EStop is active. Set the EStop signals to TRUE.
Reset is needed for the EStop block. Double click to set the Reset variable online value to TRUE.
EStop block state transition indicator becomes Red and Green which indicates that the block is waiting for 'Reset' signal to go low to turn on the EStop output. Double click to set the Reset variable online value to FALSE.
Now we can see that EStop is cleared and the safety output is on.
In case you want to say thank you !)
We'd be very grateful if you could share this community with your colleagues and friends. You can also buy us a coffee to keep us fueled 😊 This is the best way to say thank you to this project and support your community.
twinControls - https://twincontrols.com/
Hi @twinControls, thank you for the nice tutorial to simulate TwinSAFE safety logic. Is it possible to link PLC variables and run simulation locally?
Do not attempt to simulate safety for EL6900, it does not work, the debug project button never becomes active.
It has to be one of the newer modules such as EL6910
-
Creating a TwinSAFE Project
2 years ago
- 17 Forums
- 267 Topics
- 924 Posts
- 0 Online
- 737 Members