<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Knowledge Base - twinControls Forum				            </title>
            <link>https://twincontrols.com/community/twinsafe-knowledgebase/</link>
            <description>twinControls  Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 22 Apr 2026 23:35:34 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Creating a TwinSAFE Simulation Project</title>
                        <link>https://twincontrols.com/community/twinsafe-knowledgebase/creating-a-twinsafe-simulation-project/</link>
                        <pubDate>Fri, 07 Oct 2022 17:44:45 +0000</pubDate>
                        <description><![CDATA[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 &#039;SAFETY&#039;, select &#039;Add Ne...]]></description>
                        <content:encoded><![CDATA[<p><span>This tutorial will demonstrate the creation of ESTOP function variant 1 (category 3, PL d) safety <strong>simulation</strong> project. </span></p>
<p><span>Create a TwinCAT project, then right click on 'SAFETY', select 'Add New Item' to create a new safety project. </span></p>
461
<p> </p>
<p><span>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.</span></p>
462
<p> </p>
<p><span>You can change the name or the target system on this window if you'd like. Confirm the selections and click OK. </span></p>
463
<p> </p>
<p><span>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.</span></p>
464
<p> </p>
<p><span>To select the simulation device, click on the icon shown below and select 'External Device'. </span></p>
465
<p> </p>
<p>Leave the AMS Net ID as it is and click OK. </p>
466
<p> </p>
<p>To add the safety input and output terminals, right click on Alias Devices and select 'Add', then 'New Item'. </p>
467
<p> </p>
<p>Select the Beckhoff Automation on the left menu, choose the EL1904 4 channel digital inputs card. Click Add. </p>
468
<p> </p>
<p>Now add the EL2904 4 channel digital outputs card as well. </p>
469
<p> </p>
<p>Set the FSoE address of the EL1904 input card. </p>
487
<p> </p>
<p>Set the FSoE address of the EL2904 output card.</p>
488
<p> </p>
<p><span>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. </span></p>
470
<p> </p>
<p><span>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:</span></p>
471
<p> </p>
<p><span>To link the variables, go to </span>the 'Variable Mapping' tab, then <span> click on the three dot box and select input for the safety variable. Select the EL1904 'input channel 3' for Reset. </span></p>
472
<p> </p>
<p><span>Select the EL1904 'input channel 1' for EStop1 and the EL1904 'input channel 2' for EStop2.</span></p>
473
<p> </p>
<p>Add 'EStopOut' varible the EStop circuit. </p>
474
<p> </p>
<p>Map the 'EStopOut' varible to EL2904 'output channel 1'. </p>
475
<p> </p>
<p>Enable the 'Safety toolbar' by going go to View -&gt; Toolbars -&gt; TwinCAT Safety. </p>
476
<p> </p>
<p>Save the project and you will see that 'Debug Safety Project' will become active. Click to start it. </p>
477
<p> </p>
<p>Click Run to start running the logic. </p>
478
<p> </p>
<p>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. </p>
479
<p> </p>
<p>We can see that Group goes in RUN state, but the EStop is active. Set the EStop signals to TRUE. </p>
480
<p> </p>
<p>Reset is needed for the EStop block. Double click to set the Reset variable online value to TRUE. </p>
481
<p> </p>
<p>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. </p>
482
<p> </p>
<p>Now we can see that EStop is cleared and the safety output is on. </p>
483
<p> </p>]]></content:encoded>
						                            <category domain="https://twincontrols.com/community/twinsafe-knowledgebase/">Knowledge Base</category>                        <dc:creator>twinControls</dc:creator>
                        <guid isPermaLink="true">https://twincontrols.com/community/twinsafe-knowledgebase/creating-a-twinsafe-simulation-project/</guid>
                    </item>
				                    <item>
                        <title>Creating a TwinSAFE Project</title>
                        <link>https://twincontrols.com/community/twinsafe-knowledgebase/creating-a-twinsafe-project/</link>
                        <pubDate>Wed, 07 Sep 2022 20:35:37 +0000</pubDate>
                        <description><![CDATA[This tutorial will demonstrate the creation of ESTOP function variant 1 (category 3, PL d) safety project. You can access to &#039;Application Guide TwinSAFE&#039; document from this link. 
Create a ...]]></description>
                        <content:encoded><![CDATA[<p>This tutorial will demonstrate the creation of ESTOP function variant 1 (category 3, PL d) safety project. You can access to 'Application Guide TwinSAFE' document from this <a href="https://download.beckhoff.com/download/document/automation/twinsafe/applicationguidetwinsafeen.pdf" target="_blank" rel="noopener">link</a>. </p>
<p>Create a TwinCAT project and add an EtherCAT Master, EK1100 bus coupler, EL1004, EL6900, EL1904, EL2904, EL9011 safety terminals. Then right click on 'SAFETY', select 'Add New Item' to create a new safety project. </p>
106
<p> </p>
<p>There will be 3 safety project options. The first option includes the ErrAck mappings, second option includes ErrAck mappings and Run mappings. Select the third option to create an empty project. Give it a name and click OK.</p>
107
<p> </p>
<p>You can change the name or the target system on this window if you'd like. Confirm the selections and click OK. </p>
109
<p> </p>
<p>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 EL6900.</p>
110
<p> </p>
<p>To select the psychical device, click on the icon shown below and select Term 3 (EL6900). </p>
111
<p> </p>
<p>If you have actually have the physical device, you can refresh the hardware address or transfer hardware address to the safe address. Hardware address is the dip switch addresses located on the safety terminal. </p>
112
<p> </p>
<p>To add the ErrAck and Run mappings, right click on the TwinSAFE project, select 'Add', then New Item. </p>
113
<p> </p>
<p>Select the second option to add both ErrAck and Run mappings. </p>
114
<p> </p>
<p>We need to add more alias devices to link our variables from plc project to safety project. Right click on the 'Alias Devices' , select 'Add', then New Item. </p>
115
<p> </p>
<p>Select '1 Digital Input (Standard)' for the <span>External Device Monitoring (</span>EDM) signal. This signal is <span>used to ensure that external contactors controlled by the safety module outputs are able to interrupt the safety circuit. Add 'Reset' alias as well applying to same steps. </span></p>
116
<p> </p>
<p>We can import alias devices into the project by right clicking the 'Alias Devices' and selecting 'Import Alias Devices' option. </p>
117
<p> </p>
<p>On the open window, Click 'select all' to import EL1904 and EL2904 alias devices into the safety project. </p>
118
<p>Double click on the EL1904 and EL2904 alias devices and check the FSoE and dip switch addresses if the terminals are physically present. </p>
119
<p> </p>
<p>We will now link the variables in the PLC program to the safety project. Add the code below in MAIN program and build the solution. </p>
<p> </p>
<pre contenteditable="false">PROGRAM MAIN
VAR
	//To safety alias devices
	QbSafetyErrAck  AT%Q* : BOOL := FALSE;
	QbEStopReset    AT%Q* : BOOL;
	bQSafetyRun     AT%Q* : BOOL;
	bQEStopEDM      AT%Q* : BOOL;
	
	//from safety terminal
	IbEStopReset    AT%I* : BOOL;
	IbEStopEDM      AT%I* : BOOL;
	
	fbDelay 		  	  : TON;
END_VAR


bQEStopEDM := IbEStopEDM;
QbEStopReset := IbEStopReset;

IF bQSafetyRun THEN
	QbSafetyErrAck := TRUE;
	fbDelay(IN:=TRUE , PT:=T#75MS , Q=&gt; , ET=&gt; );
	IF fbDelay.Q THEN
		QbSafetyErrAck := FALSE;
	END_IF
END_IF</pre>
<p> </p>
120
<p> </p>
<p>After the build, you can see the plc project inputs and outputs. </p>
121
<p> </p>
<p>Go to Twinsafe project section again and double click on the EDM1.sds alias. Click on the icon shown below to open the link options. Select the EDM signal from the list. This will link the EDM signal in the PLC to the EDM1 alias device. Repeat this process for Reset, Run and ErrorAcknowledgement alias devices as well. </p>
122
123
<p> </p>
<p>Reset and EDM signals in the PLC project are controlled through EL1004 terminal in this project. Go to PlcTask Inputs and double click on the reset input, click to 'Linked to' button and select first input of EL1004 terminal. </p>
124
<p>Link the EDM input as well. </p>
125
<p>To comply with category 3, PL d standard, safety parameters of EL1904 and EL2904 terminals must meet the conditions below: </p>
126
<p> </p>
<p>You can check these parameters under the 'safety parameters' tab and modify them if necessary. </p>
127
128
<p> </p>
<p>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. </p>
129
<p> </p>
<p>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 variables shown below: </p>
130
<p> </p>
<p>You can also rename the Network name. Rename the network as 'ESTOP' and click on 'Variable Mapping' . </p>
131
<p> </p>
<p>To link the variables, click on the three dot box and select the corresponding alias device. </p>
<p>Reset:</p>
132
<p>Estop signal is coming from the channel 1 and 2 of the EL1904 terminal: </p>
133
<p>Estop output will be linked to channel 1 of EL2904: </p>
134
<p> </p>
<p>After the all the linking, we can verify and download the safety project. If the safety toolbar is not visible, you can enable it from the view menu. </p>
135
<p>Click on the multi download button and select the safety project.</p>
136
<p> </p>
137
<p> </p>
<p>Type the username 'Administrator' and the password 'TwinSAFE', select the project and click Next. </p>
138
<p> </p>
<p>Confirm the final verification. </p>
139
<p> </p>
<p>Type the password again.</p>
140
<p> </p>
<p>Multi Download result will be shown. </p>
141
<p> </p>
<p>You can click on the 'show online data' to see the status of the signals. </p>
142
<p> </p>
<p>Log in the PLC and set the bQSafetyRun signal to TRUE In the MAIN program and then toggle the reset signal from the EL1004 terminal. You will see the Group Run status afterwards. </p>
143
<p> </p>]]></content:encoded>
						                            <category domain="https://twincontrols.com/community/twinsafe-knowledgebase/">Knowledge Base</category>                        <dc:creator>TwinControls</dc:creator>
                        <guid isPermaLink="true">https://twincontrols.com/community/twinsafe-knowledgebase/creating-a-twinsafe-project/</guid>
                    </item>
							        </channel>
        </rss>
		