<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PROFINET Archives | DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/tag/profinet/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Thu, 23 Jul 2026 14:46:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://static.dmcinfo.com/wp-content/uploads/2025/04/site-icon-150x150.png</url>
	<title>PROFINET Archives | DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Advantages &#038; Disadvantages of Siemens&#8217; TIA Openness</title>
		<link>https://static.dmcinfo.com/blog/21661/advantages-disadvantages-of-siemens-tia-openness/</link>
		
		<dc:creator><![CDATA[Patrick Smith]]></dc:creator>
		<pubDate>Tue, 07 May 2019 14:04:06 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[Openness]]></category>
		<category><![CDATA[PROFINET]]></category>
		<category><![CDATA[TIA Portal]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/21661/advantages-disadvantages-of-siemens-tia-openness/</guid>

					<description><![CDATA[<p>Siemens’ TIA Openness is an API that allows you to interact with TIA Portal using a custom application. Although it is included with TIA Portal, Openness has not seen wide usage, as many programmers don’t see the use of learning a new programming language (C# .NET) on top of knowing PLC programming. However, Openness offers [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/21661/advantages-disadvantages-of-siemens-tia-openness/">Advantages &#038; Disadvantages of Siemens&#8217; TIA Openness</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Siemens’ TIA Openness is an API that allows you to interact with <a href="/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming/">TIA Portal</a> using a custom application. Although it is included with TIA Portal, Openness has not seen wide usage, as many programmers don’t see the use of learning a new programming language (<a href="/services/application-development/pc-application-development/c-net">C# .NET</a>) on top of knowing <a href="/services/manufacturing-automation-and-intelligence/plc-programming">PLC programming</a>.</p>



<p class="wp-block-paragraph">However, Openness offers many advantages that can lead to more efficient code creation. One of the best uses of Openness is for creating modular code that can be used across many devices, with application-specific changes being made automatically. By defining some base templates, you can allow users to generate entire projects without any knowledge of PLC and <a href="/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming">HMI programming</a>.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Openness-Demo-R.png" alt="TIA Openness"/></figure>



<h2 class="wp-block-heading" id="h-how-does-openness-work-nbsp">How does Openness Work?&nbsp;</h2>



<p class="wp-block-paragraph">There are <strong>two main parts</strong> of any Openness project:</p>



<ol class="wp-block-list">
<li>The C# .NET application that provides the interface to TIA Portal</li>



<li>The XML files that are used to create code in TIA Portal</li>
</ol>



<p class="wp-block-paragraph">I’ll cover the details of the XML files in a later blog post; for now, we’ll focus on the C# .NET application. All you need to get started is to add the two <strong>.dll files</strong> that Siemens provides as references to your C# .NET project. These files provide the variable types and methods needed to work with TIA Portal.</p>



<p class="wp-block-paragraph">The API provides a wide range of functions; from simple actions like compiling a project to creating and configuring technology objects on a PLC. While there are some functions that cannot be done through Openness, most common operations are available, and more are added with every new release.</p>



<p class="wp-block-paragraph">In order to see what functions are available and how to use them, open up the <strong>Help Viewer</strong> (shown below) within TIA Portal, and find the section titled <strong>“Automating projects with scripts”</strong>. This section contains documentation on the various methods available. Each entry also includes simple code examples. The <strong>“Public API” </strong>and <strong>“Export/Import” </strong>sections are where the majority of these examples are located.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Siemens-Help-R_1.png" alt="Openness Siemens"/></figure>



<h2 class="wp-block-heading" id="h-advantages-of-openness">Advantages of Openness</h2>



<p class="wp-block-paragraph">At this point, you might be thinking “That sounds pretty nice, but how is this more useful than just programming in TIA Portal?” The main answer is <strong>scalability</strong>. Using Openness allows a user to automate time-consuming and tedious processes when working on a project. For example, your company may require a standardized code architecture for PLC projects. If that standard is replicated in Openness, one click could create the project, set up the architecture, add standard blocks from custom libraries, and add all the necessary GSD files.</p>



<p class="wp-block-paragraph">If a project is being created for multiple, mostly identical machines, Openness can simplify creating each specific project. Openness can create a&nbsp;base project, and then only the individual differences need to be implemented. If the differences between the machines are well defined, Openness can further simplify development. A custom application can provide the user with a list of different modules that are assigned to a specific machine. Openness would then be able to create the base project and add in any extra modules that have been defined. With this custom application, any changes to the code are only made in one place and can be easily redeployed.</p>



<h2 class="wp-block-heading" id="h-disadvantages-of-openness">Disadvantages of Openness</h2>



<p class="wp-block-paragraph">Openness is a very powerful tool and opens up many possibilities for custom applications. However, there are some cases where it does not make sense to use Openness. Since Openness uses XML files to generate objects and code, it requires becoming familiar with the Openness XML tags and structures.</p>



<p class="wp-block-paragraph">As we will discuss later, these XML files quickly become very large and complicated and require extensive expertise to be able to create and read them. Creating the XML from scratch is a long and difficult process, so it is generally preferred to create your necessary elements in TIA Portal, export them to XML, and use that as a starting point.</p>



<h2 class="wp-block-heading" id="h-conclusion">Conclusion</h2>



<p class="wp-block-paragraph">As I explained, Openness is a great tool for creating scalable and module code for TIA Portal. While it has a steeper learning curve than working exclusively in TIA Portal, it offers a large amount of flexibility and customization. If you find yourself creating similar projects on a regular basis, it is worth taking a look at how Openness can help you automate your process. In my next blog post, we’ll look at how to make sense of Openness’s XML files.</p>



<p class="wp-block-paragraph">Learn more about DMC&#8217;s <a href="/services/manufacturing-automation-and-intelligence/plc-programming">PLC Programming Services</a> and <a href="/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming/">TIA Portal Development Services</a>. <a href="/contact">Contact</a> us for help with your next project. </p>
<p>The post <a href="https://static.dmcinfo.com/blog/21661/advantages-disadvantages-of-siemens-tia-openness/">Advantages &#038; Disadvantages of Siemens&#8217; TIA Openness</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>6 Things You Should Know When Commissioning a SIMATIC S7-400 PLC</title>
		<link>https://static.dmcinfo.com/blog/23075/6-things-you-should-know-when-commissioning-a-simatic-s7-400-plc/</link>
		
		<dc:creator><![CDATA[Frank May]]></dc:creator>
		<pubDate>Fri, 11 May 2018 11:06:00 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[PROFINET]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/23075/6-things-you-should-know-when-commissioning-a-simatic-s7-400-plc/</guid>

					<description><![CDATA[<p>Your code compiles, hardware config is all set, but you can&apos;t get rid of the red lights on the 400H system. Check the following before pulling out your soldering iron and green LEDs.&#160; &#160; 1. Are the rack switches correct? If you have no idea what I&apos;m talking about, good news, this might be it! [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/23075/6-things-you-should-know-when-commissioning-a-simatic-s7-400-plc/">6 Things You Should Know When Commissioning a SIMATIC S7-400 PLC</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">Your code compiles, hardware config is all set, but you can&apos;t get rid of the red lights on the 400H system. Check the following before pulling out your soldering iron and green LEDs.&nbsp;</p>

<p class="wp-block-paragraph">&nbsp;</p>

<h2 class="wp-block-heading">1. Are the rack switches correct?</h2>

<p class="wp-block-paragraph">If you have no idea what I&apos;m talking about, good news, this might be it! Take the second PLC off Rack 1&nbsp;and look for an exposed switch on the back. Change it so it says &quot;Rack 1&quot; instead of &quot;Rack 0&quot;. The default setting of the switch is &quot;Rack 0&quot;. Below is roughly where to look.&nbsp;</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/SwitchLocation_1.png"  /></figure>

<h2 class="wp-block-heading">2. Is your addressing correct?</h2>

<p class="wp-block-paragraph">Isolate each PLC from the network and make sure you can ping it, and assign the IP address if you can&apos;t ping them. Also check that the Profibus address settings are correct on IO devices. You will need to powercycle your IO if you changed the Profibus address.</p>

<h2 class="wp-block-heading">3. If you have Profibus connections,</h2>

<p class="wp-block-paragraph">make sure the terminating resistors are ON at the start and end of the communication line. If you&apos;re using &quot;daisychain&quot;/&quot;piggyback&quot; style connectors you have the &quot;IN&quot; slot filled with the wire for incoming communication and only use the &quot;OUT&quot; if you&apos;re connecting devices further down on the daisy chain.&nbsp;</p>

<h2 class="wp-block-heading">4. Check those part numbers again.</h2>

<p class="wp-block-paragraph">Not just the PLC, and IO rack info, but also the bus modules on your IO rack if you have one. It&apos;s under the DP Slave properties on your hardware config, &quot;Operating parameters&quot;. On your system, you&apos;ll have to remove the IO modules to see the bus modules behind them. Below shows the properties tab you&apos;re looking for.&nbsp;</p>

<p class="wp-block-paragraph"><br />
<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/400HET200MBusModules.png"  /></figure></p>

<h2 class="wp-block-heading">5. Is your load memory ok?</h2>

<p class="wp-block-paragraph">If you have too much on your program, the PLC might need a memory card. Check the load memory of your program by right clicking the blocks folder and looking at the User Program + Data Memory. Compare this to the PLC you have and the default load memory it has. Below shows how to check the block folder properties, and where the memory card would be if you have one.&nbsp;</p>

<p class="wp-block-paragraph"><br />
<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/400HBlockFolder.png"  /></figure><figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/MemoryCardLocationS7400H.png"  /></figure></p>

<h2 class="wp-block-heading">6. Check that the fiber connection between the PLCs is correct.</h2>

<p class="wp-block-paragraph">Top on PLC 1 to top on PLC 2, bottom on PLC 1 to bottom on PLC 2.</p>

<p class="wp-block-paragraph">If this still doesn&apos;t help your PLC switch to all green lights, go through the rest of the basics if you already have not which includes checking the diagnostic buffer for information, checking cables, making sure licensed blocks are licensed, waiting &gt;5 min after startup to be sure both are synchronized, etc.&nbsp;</p>

<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming">Learn more about DMC&apos;s </a><a href="/services/manufacturing-automation-and-intelligence/plc-programming">PLC programming expertise</a>.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/23075/6-things-you-should-know-when-commissioning-a-simatic-s7-400-plc/">6 Things You Should Know When Commissioning a SIMATIC S7-400 PLC</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DMC Engineers Serve up a Siemens S7 Powered DrinkBot</title>
		<link>https://static.dmcinfo.com/blog/23327/dmc-engineers-serve-up-a-siemens-s7-powered-drinkbot/</link>
		
		<dc:creator><![CDATA[John Sullivan]]></dc:creator>
		<pubDate>Fri, 16 Mar 2018 13:33:17 +0000</pubDate>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[PROFINET]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/23327/dmc-engineers-serve-up-a-siemens-s7-powered-drinkbot/</guid>

					<description><![CDATA[<p>Working together for over a year, a group of DMC engineers built our very own DrinkBot. We developed it during a FedEx Day and improved the DrinkBot over a second FedEx Day. DMC&#8217;s DrinkBot finally made its debut at the Siemens Automation Summit 2017. As happens in the development process, we slowly improved the DrinkBot over time. [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/23327/dmc-engineers-serve-up-a-siemens-s7-powered-drinkbot/">DMC Engineers Serve up a Siemens S7 Powered DrinkBot</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Working together for over a year, a group of DMC engineers built our very own DrinkBot. We developed it during a <a href="https://static.dmcinfo.com/blog/25667/fedex-day-2016/">FedEx Day</a> and improved the DrinkBot over a second FedEx Day. DMC&#8217;s DrinkBot finally made its debut at the <a href="https://static.dmcinfo.com/blog/24108/siemens-automation-summit-2017-highlights/">Siemens Automation Summit 2017</a>.</p>



<p class="wp-block-paragraph">As happens in the development process, we slowly improved the DrinkBot over time. We started displaying it at career fairs in Colorado to help grow the team. We also took it to events in New York, Houston, Seattle, and <a href="https://static.dmcinfo.com/blog/23384/dmc-to-attend-manufacturing-in-america-2018/">Manufacturing in America</a> in Detroit. For now, the DrinkBot&#8217;s home in DMC&#8217;s Denver office ready to entertain visitors as we give tours.</p>



<p class="wp-block-paragraph">The DrinkBot is an excellent tool for highlighting multiple factory automation technologies offered by DMC while serving a variety of drinks &#8211; anything from cocktails to Italian sodas. We could have simplified the DrinkBot, but its intention was to show off a bunch of cool capabilities and to demonstrate a lot of DMC and the Siemens S7-1200 platforms&#8217; potential uses and abilities.</p>



<p class="wp-block-paragraph">DMC&#8217;s DrinkBot utilizes a Siemens S7-1200 PLC, 7&#8243; Comfort Panel, Siemens G120, and Siemens 1FK7 Servo Motor with DRIVE-CLiQ encoder to control the operation. The DrinkBot provides eight different alcohols or syrups and six different mixers for a large variety of drink options. Without further ado, let me dig into each part!</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/dmc-drink-bot-2018.jpg" alt="DMC's DrinkBot features Siemens S7"/></figure>



<h2 class="wp-block-heading" id="h-the-brain">The Brain</h2>



<p class="wp-block-paragraph">The brain of our bot is a Siemens S7-1200 PLC (Programmable Logic Controller). Compact and inexpensive, the controller is capable enough to control all the motion axis, valves, and other organs. We used the Siemens S7-1215, which has more than enough onboard IO to manage the entire process. It controls six valves for drink mixers, a solenoid valve for alcohol dispensing, a variety of sensors to ensure everything is in the right place, PTO (Pulse Train Output) output to move the rotary access (which selects the alcohol), and ProfiNET Communication to the G120 to control the linear axis.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Siemens-PLC-Drink-Bot.jpg" alt="Siemens S7-1200 PLC inside the DrinkBot."/></figure>



<h2 class="wp-block-heading" id="h-the-body">The Body</h2>



<p class="wp-block-paragraph">The DrinkBot also has two limbs powered by servo motors. The spinney one with bottles is controlled with a PTO and is utilizing built-in IO on the S7-1200.</p>



<p class="wp-block-paragraph">It works like this: the PLC generates a precisely-timed sequence of high-speed step/direction pulses for the motor controller to get to an exact position at the right speed. Thanks to the accurate position control, our DrinkBot never spills your drinks or creates a mess.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Drink-bot-arms.jpg" alt="Siemens powered drink bot with bottles."/></figure>



<p class="wp-block-paragraph">The other limb is used to move your cup around. A VFD (Variable Frequency Drive) controls this limb. It talks to the bot&#8217;s brain over a standard protocol called PROFINET. VFDs are usually used to control simple AC motors, but the DrinkBot&#8217;s is better because it is using the Siemens G120 for full closed-loop position control! Rather than a standard AC motor, it controls a full servo motor with DRIVE-CLiQ encoder feedback!</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Siemens-G120-Drink-Bot.jpg" alt="Siemens G120 Servo."/></figure>



<h2 class="wp-block-heading" id="h-the-faces">The Faces</h2>



<p class="wp-block-paragraph">The only way you can tell that our DrinkBot isn&#8217;t human is by looking at its face &#8211; it has two of them!&nbsp;</p>



<p class="wp-block-paragraph">The one with lit buttons is a Siemens SIMATIC HMI&nbsp;key panel. It is an inexpensive device that provides ordering options utilizing PROFINET and is very convenient for ordering drinks with the single push of a button! It also has multi-color buttons that are used to create a light show. In an industrial environment, this HMI can look a lot more serious.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/John-Nikhil-and-Gina-prep-the-bot-for-an-event.jpg" alt="DMC Denver Manager John Sullivan preps Gina and Nikhil for the DMC DrinkBots inaugural showing."/></figure>



<p class="wp-block-paragraph">The other face with a fancy graphical screen is a 7&#8243; SIMATIC Comfort Panel. It stores the drink recipes and allows you to choose from a large variety of preselected options or to create your own with whatever ingredients you prefer.&nbsp;</p>



<p class="wp-block-paragraph">Additionally, it provides the ability to manually move all pieces of the DrinkBot so that we can fix and identify issues caused by shipping. It utilizes advanced scripting to allow for a wide variety of dynamic buttons, letting the most popular recipes be displayed first, enabling us to move the display location different drink recipes quickly.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Comfort-Panel-HMI-Screen.jpg" alt="DMC DrinkBot Comfort Panel Screen."/></figure>



<p class="wp-block-paragraph">Here it is in action:</p>



<p class="wp-block-paragraph"><iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/Lt64CD1nu0k" width="560"></iframe></p>



<h2 class="wp-block-heading" id="h-summary-of-technology">Summary of Technology</h2>



<ul class="wp-block-list">
<li>Siemens S7-1200 PLC</li>



<li>Siemens&nbsp;1FK7 Servo Motor</li>



<li>Siemens G120 VFD</li>



<li>SIMATIC Comfort Panel</li>



<li>TIA Portal</li>



<li>WinCC Comfort</li>



<li>Custom Panel built by Palmer DCS</li>
</ul>



<p class="wp-block-paragraph">To see how we can help you get started on a project, check out our <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming">Siemens PLC programming services</a> and <a href="https://static.dmcinfo.com/contact">contact</a>&nbsp;us today!</p>



<p class="wp-block-paragraph"><strong><a href="https://static.dmcinfo.com/about/partners/siemens-solution-partner">Learn more about DMC&#8217;s partnership with Siemens</a>.</strong></p>
<p>The post <a href="https://static.dmcinfo.com/blog/23327/dmc-engineers-serve-up-a-siemens-s7-powered-drinkbot/">DMC Engineers Serve up a Siemens S7 Powered DrinkBot</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Set Up an MRP-based Ring Network in TIA Portal</title>
		<link>https://static.dmcinfo.com/blog/24074/how-to-set-up-an-mrp-based-ring-network-in-tia-portal/</link>
		
		<dc:creator><![CDATA[Jason Mayes]]></dc:creator>
		<pubDate>Fri, 21 Jul 2017 08:55:03 +0000</pubDate>
				<category><![CDATA[Houston]]></category>
		<category><![CDATA[Motion Control]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[Oil and Gas]]></category>
		<category><![CDATA[PROFINET]]></category>
		<category><![CDATA[WinCC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/24074/how-to-set-up-an-mrp-based-ring-network-in-tia-portal/</guid>

					<description><![CDATA[<p>One of the great, and underused, features in TIA Portal is the Network Topology tab of &#8220;Devices and Networks.&#8221; It can enable you to accomplish a number of advanced tasks while simultaneously providing more in-depth network diagnostics. Today, I want to quickly show you how you can use Network Topology to configure a MRP-based Ring [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24074/how-to-set-up-an-mrp-based-ring-network-in-tia-portal/">How to Set Up an MRP-based Ring Network in TIA Portal</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">One of the great, and underused, features in <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming/">TIA Portal</a> is the Network Topology tab of &#8220;Devices and Networks.&#8221; It can enable you to accomplish a number of <a href="https://static.dmcinfo.com/latest-thinking/blog/id/9380/optional-hardware-configuration-control-in-tia-portal">advanced tasks</a> while simultaneously providing more in-depth network diagnostics. Today, I want to quickly show you how you can use Network Topology to configure a MRP-based Ring Network in TIA Portal.</p>



<h2 class="wp-block-heading" id="h-why-ring-topology">Why Ring Topology?</h2>



<p class="wp-block-paragraph">There are many reasons why one might consider using a ring topology for your network. The most common one is to provide a semi-fault tolerant network that can handle the break or loss of any one leg of your network by utilizing redundant physical connection paths between network nodes. For a controls network, this can provide an additional layer of security and safety where machine availability is important.&nbsp;</p>



<p class="wp-block-paragraph">MRP (Media Redundancy Protocol) is a redundancy protocol supported by all Profinet capable devices that will allow a network to be configured in a ring topology. Since Profinet is an open standard, this means that MRP is a manufacturer independent protocol and can be used to form a ring with devices from different manufacturers (so long as all devices are fully IEC 62439 compliant). If you&#8217;re interested in the details of how it works, <a href="https://en.wikipedia.org/wiki/Media_Redundancy_Protocol">Wikipedia </a>has a good and short overview.</p>



<p class="wp-block-paragraph">In the example below, we will use MRP and the Network Topology tab to configure a ring topology for an automation network. While the most common scenario would be to add a switch into the mix (such as a SCALENCE&nbsp;switch), I don&#8217;t have one available for testing so I&#8217;m just going to use an S7-1516F-3PN PLC, S7-1510SP-1PN PLC, an IM155-6 PN remote I/O rack, and a 7&#8243; Comfort Panel. All of these devices have at least 2 switched ports and support MRP which will allow us to configure a small ring.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/MRP-Ring.png" alt=""/></figure>



<h2 class="wp-block-heading" id="h-step-1-configure-the-network-interfaces-of-all-the-devices">Step 1: Configure the Network Interfaces of All the Devices</h2>



<p class="wp-block-paragraph">In my project, I&#8217;ve already added all of my devices to my project. The first step will be to open up &#8220;Devices and Networks&#8221; to the Network tab and configure all of their interfaces. For this example, I&#8217;ll use the default IP addressing scheme.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Network-Configuration.png" alt="Image of connected interfaces of all devices to create a common Profinet network"/></figure>



<p class="wp-block-paragraph">In your network view, connect the interfaces of all devices to create a common Profinet network. This will allow all of our devices to talk to one another. I&#8217;ve also added a DO card to my ET200SP I/O remote rack and created HMI connections for both PLCs to the TP700 Comfort Panel.</p>



<h2 class="wp-block-heading" id="h-step-2-configure-the-network-topology">Step 2: Configure the Network Topology</h2>



<p class="wp-block-paragraph">While it&#8217;s possible to configure MRP without using topology, I find it makes it much simpler and aids in troubleshooting in the event of a network fault. To do this, navigate to the Topology tab of the &#8220;Devices and Networks&#8221; view.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Topology-Configuration.png" alt="Image of configuring the topology to create a ring"/></figure>



<p class="wp-block-paragraph">Configure the topology to create a ring &#8211; I&#8217;ve used the port connections shown below, daisy chaining Port 2 from each device to Port 1 of the following and closing the loop back to the beginning.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Port-to-Port-Connections.png" alt="Image of module and partner port connections"/></figure>



<h2 class="wp-block-heading" id="h-step-3-configure-mrp-nbsp">Step 3: Configure MRP&nbsp;</h2>



<p class="wp-block-paragraph">Within an MRP ring, each device must be assigned a role. One device will be the MRP Manager and will be responsible for sending out test frames to detect for a network failure and for blocking network traffic on one port (except for the test frames) to prevent a network loop. The other devices must be assigned a Client role so they know how to handle the test frames.&nbsp;</p>



<p class="wp-block-paragraph">In this example, I will use the S7-1516F-3PN as my Manager, and will set all other devices to be Clients. You can assign roles in several ways &#8211; the easiest way for me is to go to the Device View for each device and look at the properties of the network interface. Under &#8220;Advanced Options,&#8221; look for Media Redundancy. Here you can select a role for the device (Manager or Client) and enable diagnostics interrupts. If you choose to enable diagnostic interrupts for all devices, note that you can now detect the status of your MRP ring within your program from OB82.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/MRP-Manager-Config.png" alt="MRP Manager Configuration"/></figure>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/MRP-Client-Configuration.png" alt="MRP Client Configuration"/></figure>



<h2 class="wp-block-heading" id="h-step-4-download-and-configure-all-of-the-devices">Step 4: Download and Configure All of the Devices</h2>



<p class="wp-block-paragraph">Start by first connecting all but one link of your network (don&#8217;t close off the ring just yet until all of the devices are configured to handle it). In my case, I daisy chained the S7-1516F, IM155-6, TP700 and S7-1510SP together without connecting the S7-1510SP back to the S7-1516F. Download to each PLC and the HMI, and set the Profinet name of the IM155-6. Now, you are ready to close the loop to create your MRP ring.</p>



<h2 class="wp-block-heading" id="h-step-5-test">Step 5: Test</h2>



<p class="wp-block-paragraph">As a simple test, I enabled the Clock Bytes on both PLCs and configured the 1510SP to function as an I-Device. In my shared data area, I passed over the 1Hz Clock bit from the 1510SP to the 1516F PLC. Now, on the 1516F I added two simple rungs of logic to OB1 to pulse two outputs on the IM155-6PN &#8211; one pulsing from the 1Hz Clock bit of the 1516F and the other pulsing from the clock of the 1510SP. Finally, I added a System Diagnostics View to the HMI so I could monitor my network.&nbsp;</p>



<p class="wp-block-paragraph">After going online with the two PLCs (I&#8217;m connected through the third port on my 1510SP), I can verify on the Topology tab of &#8220;Devices and Networks&#8221; that my MRP ring is connected as configured. I can also watch the outputs on the remote I/O rack to verify that both outputs are pulsing as expected.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Complete-Ring.png" alt="MRP Ring Topology in TIA Portal"/></figure>



<p class="wp-block-paragraph">Now let&#8217;s do some testing. Disconnect any one connection and verify that both outputs continue to function as expected. You can also note, from the integrated fault lights on the devices or from the Diagnostics Viewer on the HMI, that a downed network connection is detected and reported.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Broken-Links.png" alt="Network Topology Monitoring in TIA Portal"/></figure>



<p class="wp-block-paragraph"><br>
That&#8217;s about it &#8211; you now have a working MRP ring! I hope this is helpful! If you&#8217;re looking for help, please take a look at our <strong><a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming">Siemens PLC Programming Services</a></strong> or <strong><a href="https://static.dmcinfo.com/contact">Contact Us</a></strong>&nbsp;today!</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/24074/how-to-set-up-an-mrp-based-ring-network-in-tia-portal/">How to Set Up an MRP-based Ring Network in TIA Portal</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Update a Siemens PLC without TIA Portal using the SIMATIC Automation Tool</title>
		<link>https://static.dmcinfo.com/blog/24475/how-to-update-a-siemens-plc-without-tia-portal-using-the-simatic-automation-tool/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Fri, 31 Mar 2017 15:25:08 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[PROFINET]]></category>
		<category><![CDATA[Siemens]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/24475/how-to-update-a-siemens-plc-without-tia-portal-using-the-simatic-automation-tool/</guid>

					<description><![CDATA[<p>DMC recently provided remote support for one of our customers. We made critical updates to their PLC code as they were commissioning their machine internationally. Unfortunately, our client didn’t have TIA Portal software available at the time. They were afraid that this made it impossible to download the new version of the code to the [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24475/how-to-update-a-siemens-plc-without-tia-portal-using-the-simatic-automation-tool/">How to Update a Siemens PLC without TIA Portal using the SIMATIC Automation Tool</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">DMC recently provided remote support for one of our customers. We made critical updates to their PLC code as they were commissioning their machine internationally.</p>



<p class="wp-block-paragraph">Unfortunately, our client didn’t have <a href="https://www.siemens.com/global/en/home/products/automation/industry-software/automation-software/tia-portal.html" target="_blank" rel="noreferrer noopener">TIA Portal</a> software available at the time. They were afraid that this made it impossible to download the new version of the code to the PLC in the field.</p>



<p class="wp-block-paragraph">Fortunately, Siemens offers the SIMATIC Automation Tool as a <a href="https://support.industry.siemens.com/cs/document/98161300/simatic-automation-tool-the-commissioning-and-service-operation-tool-for-simatic-modules?dti=0&amp;lc=en-WW" target="_blank" rel="noreferrer noopener">free download</a> (just sign up for an account first) on their website. The SIMATIC Automation Tool was perfect for our client&#8217;s situation. It allowed them to seamlessly download the updated PLC code and commission the machine on schedule. </p>



<p class="wp-block-paragraph">This blog will walk you through the entire process of downloading a new PLC program to an S7-1200 or S7-1500 CPU using the SIMATIC&nbsp;Automation Tool.</p>



<p class="wp-block-paragraph">First, you will learn how to connect a computer to the same network as the PLC. I will then show you how to save the PLC program in a format that the SIMATIC Automation Tool can use. Next, I will walk through using the SIMATIC Automation Tool itself. Finally, I&#8217;ll review some of the other capabilities of the SIMATIC Automation Tool.&nbsp;</p>



<p class="wp-block-paragraph"><strong>0. Connect your computer to the same network as the PLC</strong></p>



<p class="wp-block-paragraph">Connect an Ethernet cable directly from the S7-1200 or S7-1500 PLC to your computer. Next, set your computer’s IP address to be on the same network as the PLC. In order to do this, click the Start button&nbsp;and search for <strong>Network and Sharing Center</strong>. Open the Network and Sharing Center. On the left, there should be an option that says <strong>Change Adapter Settings</strong>. Click that.</p>



<p class="wp-block-paragraph"><p style="margin-left: 0.25in;"></p></p>



<p class="wp-block-paragraph"><p style="margin-left: 0.25in;">Now you should see a connection that says <strong>Ethernet</strong>&nbsp;or <strong>Local Area Connection</strong>. Double click on it.</p></p>



<p class="wp-block-paragraph"><p style="margin-left: 0.25in;"></p></p>



<p class="wp-block-paragraph"><p style="margin-left: 0.25in;">In the dialog box that opens, click Properties</p></p>



<p class="wp-block-paragraph"><p style="margin-left: 0.25in;"></p></p>



<p class="wp-block-paragraph">In the next dialog box that comes up, there will be an option that says <strong>Internet Protocol Version 4 (TCP/IPv4)</strong>. Double click on this option.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/IPV4.png" alt="Screenshot of selecting Internet Protocol Version 4 (TCP/IPv4) option"/></figure>



<p class="wp-block-paragraph">In the next dialog box, select <strong>Use the Following IP Address</strong>. You need to enter an IP address that is on the same network as the PLC you are going to connect to.</p>



<p class="wp-block-paragraph">This means the first three numbers of your computer’s IP Address must be the same as the first three numbers of the PLC’s IP Address. In this case, our PLC IP Address is&nbsp;192.168.0.1, so we assign our computer to be 192.168.0.100. In the subnet mask field, 255.255.255.0 is typically used. Click ok.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/IP-Address.png" alt="Screenshot of IP Address and Subnet Mask field in internet protocol properties "/></figure>



<p class="wp-block-paragraph"><strong>1. Generate the S7S File using TIA Portal</strong></p>



<p class="wp-block-paragraph">In order to download to a PLC using the SIMATIC Automation Tool, you need the PLC program in an S7S File Format. Whoever wrote the PLC program should follow these steps using TIA Portal to generate the S7S File for you to use.</p>



<p class="wp-block-paragraph">First, map a file directory on the TIA Portal computer to a <strong>Card Reader/USB Memory</strong>&nbsp;location. To do this, open the PLC project in TIA Portal and click <strong>Project -&gt; Card Reader/USB Memory -&gt; Add user-defined Card Reader</strong>:</p>



<p class="wp-block-paragraph">&nbsp;</p>



<p class="wp-block-paragraph">Select your desired file location in the dialog box that follows.&nbsp;</p>



<p class="wp-block-paragraph">Once you have mapped the Card Reader/USB Location, select the PLC in the project tree.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/SelectPLC.png" alt="Screenshot of selecting PLC in project tree "/></figure>



<p class="wp-block-paragraph">Then click <strong>Project -&gt; Card Reader/USB memory -&gt; Write to memory card</strong>&#8230;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Write-to-Memory-Card.png" alt="Screenshot of selecting writing to memory card from card reader/ USB memory"/></figure>



<p class="wp-block-paragraph">Select the file location you mapped earlier and press the green check mark.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Select-Memory-Card.png" alt="Screenshot of selecting the file location that was mapped to"/></figure>



<p class="wp-block-paragraph">Click Load:&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Load.png" alt="Screenshot of clicking load in the portal"/></figure>



<p class="wp-block-paragraph">Send the resulting S7S File to the computer that is running SIMATIC Automation Tool.</p>



<p class="wp-block-paragraph"><strong>2. Using the SIMATIC Automation Tool&nbsp;</strong></p>



<p class="wp-block-paragraph">On the SIMATIC Automation Tool computer, save the S7S File in the following directory:&nbsp;</p>



<p class="wp-block-paragraph"><strong>C:\ProgramData\Siemens\SIMATIC Automation Tool\Programs</strong></p>



<p class="wp-block-paragraph">In our situation, DMC simply emailed the S7S file to our client and they saved it in the proper location on their computer.&nbsp;</p>



<p class="wp-block-paragraph">Now that your computer is connected to the same network as the PLC and the new program is saved in the correct location, launch the SIMATIC Automation Tool.</p>



<p class="wp-block-paragraph">Scan for the PLC by clicking <strong>Network -&gt; Scan</strong>:&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Scan.png" alt="Screenshot of performing a scan in the SIMATIC Automation tool "/></figure>



<p class="wp-block-paragraph">If everything is configured correctly, you will find the PLC and the SIMATIC Automation Tool should look like this:&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Found-PLC_1.png" alt="Screenshot of correctly configured PLC and SIMATIC Automation Tool  "/></figure>



<p class="wp-block-paragraph">Now select the Program Update Tab. In the Program Update area, open the dropdown and you should see the name of the folder that you saved the S7S File in. Select that:&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Program-Update.png" alt="Screenshot of selecting program update in SIMATIC Automation Tool "/></figure>



<p class="wp-block-paragraph">Now check the box next to the PLC, and then select <strong>Network -&gt; Download</strong>:&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Download.png" alt="Screenshot of selecting download under the network tab in the SIMATIC Automation Tool. "/></figure>



<p class="wp-block-paragraph">The program will take a minute or two to download to the PLC. Once it is done downloading, the PLC will be in STOP mode. To put the PLC back into RUN mode, select <strong>Network -&gt; RUN</strong>.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Run.png" alt="Screenshot of selecting run under network in SIMATIC Automation Tool "/></figure>



<p class="wp-block-paragraph">The PLC should now be running the newest version of the program!&nbsp;</p>



<p class="wp-block-paragraph"><strong>3. Other Functions of the SIMATIC Automation Tool</strong></p>



<p class="wp-block-paragraph">According to the <a href="https://support.industry.siemens.com/cs/document/98161300/simatic-automation-tool-the-commissioning-and-service-operation-tool-for-simatic-modules?dti=0&amp;lc=en-WW" target="_blank" rel="noreferrer noopener">Siemens website</a>, the SIMATIC Automation Tool can also perform the following functions: </p>



<ul class="wp-block-list">
<li>Assign addresses (IP, subnet, gateway) and station name (PROFINET device)</li>



<li>Set the time in a CPU to the current time in your PG/PC</li>



<li>Backup/Restore CPU data to/from a backup file (no failsafe)</li>



<li>Flash the lights on a CPU to help physically locate the CPU</li>



<li>Upload fault information from a CPU</li>



<li>Read the diagnostic log from a CPU</li>



<li>Reset a CPU to factory default settings</li>



<li>Update firmware in a CPU and attached modules</li>
</ul>



<p class="wp-block-paragraph">These functions make the SIMATIC Automation Tool a useful asset for any facility running an S7-1200 or S7-1500 PLC. It allows you to perform basic&nbsp;maintenance functions in a simple interface.&nbsp;</p>



<p class="wp-block-paragraph">Learn more about&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming">DMC&#8217;s PLC Programming services</a>&nbsp;and&nbsp;<a href="https://static.dmcinfo.com/contact">contact us</a>&nbsp;to get started on your next PLC Programming project.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24475/how-to-update-a-siemens-plc-without-tia-portal-using-the-simatic-automation-tool/">How to Update a Siemens PLC without TIA Portal using the SIMATIC Automation Tool</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Optional Hardware Configuration Control in TIA Portal</title>
		<link>https://static.dmcinfo.com/blog/24616/optional-hardware-configuration-control-in-tia-portal/</link>
		
		<dc:creator><![CDATA[Jason Mayes]]></dc:creator>
		<pubDate>Thu, 02 Mar 2017 11:10:57 +0000</pubDate>
				<category><![CDATA[Houston]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[Oil and Gas]]></category>
		<category><![CDATA[PROFINET]]></category>
		<category><![CDATA[WinCC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/24616/optional-hardware-configuration-control-in-tia-portal-2/</guid>

					<description><![CDATA[<p>Even after many years of TIA Portal development, every now and then I come across another cool feature that I either was not aware of or have never had a chance to try. Recently, I had an opportunity to use Configuration Control &#8211; a way to configure a single project to use multiple different hardware [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24616/optional-hardware-configuration-control-in-tia-portal/">Optional Hardware Configuration Control in TIA Portal</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Even after many years of TIA Portal development, every now and then I come across another cool feature that I either was not aware of or have never had a chance to try. Recently, I had an opportunity to use<a href="https://support.industry.siemens.com/cs/document/29430270/variants-management-with-simatic-s7?dti=0&amp;lc=en-WW"> Configuration Control</a> &#8211; a way to configure a single project to use multiple different hardware configurations.</p>



<p class="wp-block-paragraph">For OEM&#8217;s who produce and sell standard machines with a number of customer-selectable options, Configuration Control can allow a single project to be developed and maintained that is capable of supporting multiple options and configurations. The really cool part is that the hardware configuration can even be changed in the field without any program changes &#8211; even from an HMI.</p>



<p class="wp-block-paragraph">The ability to change hardware configuration in the field allows an OEM to use a single program for every machine&nbsp;built while only using&nbsp;the hardware required for the options selected, which can help to lower hardware costs while still allowing for expansion and upgrades. Hardware can be added in the field, and options can be turned on/off from either a configuration screen on the HMI or even a license key that can be provided and entered.</p>



<p class="wp-block-paragraph">If you haven&#8217;t worked with Configuration Control before, it&#8217;s worth noting that there are several different Configuration Control features available.</p>



<p class="wp-block-paragraph">I&#8217;m going to highlight two of them: Configuration Control at the Device Level and Configuration Control for IO Systems.</p>



<h2 class="wp-block-heading" id="h-configuration-control-at-the-device-level">Configuration Control at the Device Level</h2>



<p class="wp-block-paragraph">Within <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming/">TIA Portal</a>, Siemens provides the ability to configure, at run-time, the hardware modules used within an S7-1200, S7-1500, ET200SP Controller, or ET200SP (PN or DP) Remote I/O Rack. This means a single project can be created with a &#8220;Master Rack&#8221; configuration which defines a superset of all hardware that could be used and that a user can, at run-time, choose which modules to use and decide where in the rack they are located.</p>



<p class="wp-block-paragraph">As a simple example, imagine a machine designed to batch and mix ingredients in a system of tanks. As a machine builder, you provide an option to your customers to add a temperature monitoring function. Some customers may feel this feature is worth the extra cost, but it is not a standard feature on every machine built. With Configuration Control, you can add a Thermocouple module to your rack and define the module as &#8216;Optional.&#8217;</p>



<p class="wp-block-paragraph">Now, you can develop a single program which includes the temperature monitoring functionality and build the machine according to your customers&#8217; selected options. If they choose to add temperature monitoring, you can include the Thermocouple module in your hardware rack and activate that option. If not, you leave it out. Either way, the software (and hardware configuration defined in it) are identical.</p>



<p class="wp-block-paragraph"><span style="font-size:larger;"><em><strong>So how can you set up Configuration Control at the device level?</strong></em></span></p>



<p class="wp-block-paragraph">Let&#8217;s build a quick example. While we could use an S7-1200, S7-1500, or ET200SP I/O remote rack, I&#8217;m going to use an ET200SP Controller&nbsp; (S7-1510 1-PN) as I have one sitting on my desk. Additionally, I have one (1) DI 8x24VDC ST and one (1) DQ 8x24VDC/0.5A ST module. So, let&#8217;s assume I want to design a system with four possible configurations:</p>



<ul class="wp-block-list">
<li>Option A: Both DI (Slot 2) and DQ (Slot 3) Modules</li>



<li>Option B: DI Module Only (Slot 2)</li>



<li>Option C: DQ Module Only (Slot 2)</li>



<li>Option D: No Modules</li>
</ul>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Options-1.png" alt="Drawing of Option A: Both DI (Slot 2) and DQ (Slot 3) Modules, Option B: DI Module Only (Slot 2), Option C: DQ Module Only (Slot 2), and Option D: No Modules"/></figure>



<p class="wp-block-paragraph"><strong>Step 1 &#8211; Create a Master Rack</strong><br>
To start with, I&#8217;ve created a &#8220;Master Rack&#8221; in my hardware configuration containing all possible modules. The &#8220;Master Rack&#8221; should contain the maximum options available. In my case, it will include both the DI and DQ modules as shown below.</p>



<p class="wp-block-paragraph">After adding the modules, go to the properties of the PLC and, under Configuration Control, check the box for &#8220;<em>Allow to reconfigure the device via the user program</em>.&#8221;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Device-Configuration-1.png" alt="Configuration Control Setting in TIA Portal"/></figure>



<p class="wp-block-paragraph"><strong>Step 2 &#8211; Create a Configuration Control Record</strong><br>
Create a PLC Data Type (UDT) to define the hardware configuration. This UDT will be structured as follows:<br>
<br>
<em>Byte 1: Block Length</em> &#8211; the total number of bytes in the record. Header Length (4) + 2 * Number of Slots. In this example, there are four slots: Slot 1 is the CPU, Slot 2 is the DI module, Slot 3 is the DQ module, and Slot 4 is the server module. Note the default values I&#8217;ve given the UDT are the default positions assigned in the hardware configuration.<br>
<br>
<em>Byte 2: Block ID </em>&#8211; The data record number being written. For configuring hardware in a rack, it is 196.<br>
<br>
<em>Byte 3: Version</em> &#8211; This value is different depending on the type of hardware used. For the ET200SP, Version = 2. For an S7-1500, Version = 4. Additional documentation is available for both with help and online examples.<br>
<br>
<em>Byte 4: Subversion</em> &#8211; Zero for the ET200SP.<br>
<br>
<em>Byte 5: Slot 1</em> &#8211; For the ET200SP Controller, the CPU is always in slot 1 (where it is configured).<br>
<br>
<em>Byte 6: Additional Function for Slot 1</em> &#8211; Zero for the ET200SP CPU.<br>
<br>
<em>Byte 7: Slot 2</em> &#8211; The value of this specifies where the module configured in the hardware configuration is installed. If the module is used in the station option, this will be the slot in which it is installed. If a module is not used, put a 0 here. If the module is configured to be empty, enter the slot number of the module + 128.<br>
<br>
<em>Byte 8: Additional Function for Slot 2</em> &#8211; If you replace a dark colored base unit with a light colored base unit (new potential group), enter 1. Enter 0 if the base unit installed in this slot matches the hardware configuration.<br>
<br>
<em>Byte 9: Slot 3<br>
<br>
Byte 10: Additional Function for Slot 3<br>
<br>
Byte 11: Slot 4</em> &#8211; in this example, the Server Module<br>
<br>
<em>Byte 12: Additional Function for Slot 4</em></p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/CNTRL_REC-for-Device-Configuration-1.png" alt="Screenshot of the Control Record."/></figure>



<p class="wp-block-paragraph"><strong>Step 3 &#8211; Create Configuration Options</strong><br>
For this example, I&#8217;ve created a Global DB with an array of four (4) of the control records we just created and set values corresponding to the four possible configurations listed above.</p>



<p class="wp-block-paragraph">Note in the first that each module matches the configuration. The second removes the DQ module and moves the Server module up. The third option removes the DI module and moves the DQ and Server modules up. The final configuration eliminates both the DI and DQ modules and moves the Server module up to Slot 2.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/ConfigurationOptions-1.png" alt="Screenshot of the dbConfiguationControl selections."/></figure>



<p class="wp-block-paragraph"><strong>Step 4 &#8211; Add in OB100 (Start-up)</strong><br>
In the startup OB, you will need to write the configuration option record to define the hardware used.</p>



<p class="wp-block-paragraph">To do this, you can use the code below. Notice that I&#8217;ve created an &#8220;Index&#8221; tag to switch between the different options I&#8217;ve configured.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/OB100-WRREC-1.png" alt="OB100 Startup Code to Load the Selected Hardware Configuration"/></figure>



<p class="wp-block-paragraph"><strong>Step 5 &#8211; Configuration from HMI</strong><br>
There are many ways you could do this, but I&#8217;ve created a simple HMI screen to allow a user to select which hardware option to use.</p>



<p class="wp-block-paragraph">It&#8217;s very simple &#8211; a selection of a configuration sets the &#8220;Index,&#8221; or a retained tag on the PLC, of the hardware option to be used.</p>



<p class="wp-block-paragraph">Note that to switch hardware configurations, the PLC needs to be stopped and started so that OB100 is executed.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/OptionSelection-1.png" alt="HMI Selection of Hardware Configuration"/></figure>



<p class="wp-block-paragraph">If you&#8217;re interested in learning more, Siemens provides a <a href="https://cache.industry.siemens.com/dl/files/293/58649293/att_863460/v1/et200sp_system_manual_en-US_en-US.pdf">thorough system manual</a> for the ET200SP Controller.</p>



<h2 class="wp-block-heading" id="h-configuration-control-for-i-o-systems">Configuration Control for I/O Systems</h2>



<p class="wp-block-paragraph">In addition to controlling the configuration (location and existence) of modules within a PLC or Remote I/O Rack, TIA Portal also provides the ability to configure an I/O system dynamically. This means you can create a &#8220;Master Configuration&#8221; with multiple remote I/O racks. You can then programmatically (at run-time) define the use and configuration of those racks.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/IO-System-Configuration-1.png" alt="Optional I/O Network Configuration"/></figure>



<p class="wp-block-paragraph">As another simple example, consider a machine with modular components such as a multi-cell vacuum press. As a machine builder, you can create and offer a system capable of controlling, for example, anywhere from 2-8 cells. Each of those cells may have their own control panel and remote I/O rack.</p>



<p class="wp-block-paragraph">With Configuration Control, you can develop a single project capable of controlling, for example, eight cells and define at runtime how many (and which) cells are in use. Furthermore, because it&#8217;s at runtime, your customer could choose to add an additional cell at a later date.</p>



<p class="wp-block-paragraph">Because of Configuration Control, you could deliver the new cell, connect the I/O rack to the PLC, and then from the HMI activate the cell &#8211; all without making any software changes. By using a single project, the need for maintaining and supporting multiple versions of control code is eliminated allowing you to provide a flexible, modular, and scalable product without the need for troubleshooting and testing of each combination.</p>



<p class="wp-block-paragraph"><span style="font-size:larger;"><strong><em>So how&nbsp;can you set up&nbsp;Configuration Control for IO Systems?</em></strong></span></p>



<p class="wp-block-paragraph">Let&#8217;s look at how simple it can be.</p>



<p class="wp-block-paragraph">First of all, there are a number of ways in which we can set this up. The TIA Portal Help Files contain some excellent application examples.</p>



<p class="wp-block-paragraph">Siemens product support also has <a href="https://support.industry.siemens.com/cs/document/29430270/variants-management-with-simatic-s7?dti=0&amp;lc=en-WW">application examples</a> for the different options. But I&#8217;m going to configure an ET200SP Profinet I/O rack (IM155-6 PN HF) to be an optional I/O device. While simple to configure the hardware, it is slightly more complex from a programming perspective.</p>



<p class="wp-block-paragraph"><strong>Step 1: Add an IM155-6 Rack to the Network Configuration</strong><br>
I added an ET200SP I/O rack with a single DI module. Under the properties of the interface module, expand the Profinet interface options and look under Advanced Options. Select &#8220;Optional IO-Device. This will define this device as optional and will only be used if programmatically added to the Profinet network.</p>



<p class="wp-block-paragraph">Note that if booting a PLC without any special code to activate this network device, it will not be automatically added to the I/O network.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Optional-IO-Device-1.png" alt="Defining a Remote Rack to be Optional"/></figure>



<p class="wp-block-paragraph"><strong>Step 2: Configure Topology</strong><br>
While we could do this in other ways, I&#8217;ve used Topology to simplify management of the Profinet network configuration for our Configuration Control demonstration. If you haven&#8217;t used Topology in the past, it is similar to your network configuration, but it defines&nbsp;specific port-to-port connections between devices.</p>



<p class="wp-block-paragraph">These connections must match the exact ports used when the hardware is networked together. While adding some complexity,&nbsp;there are a lot of cool things you can do with Topology &#8211; including automatic assignment of Profinet name and IP Address. Here, it will allow us to create a simpler configuration record in the next few steps.</p>



<p class="wp-block-paragraph">In this demo, I&#8217;ve defined a connection&nbsp;between&nbsp;P2 on the PLC and P1 on the IM155-6. I&#8217;ve left the others undefined &#8211; meaning they can use any network connection available.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Topology-1.png" alt="Defining network topology"/></figure>



<p class="wp-block-paragraph"><strong>Step 3: Create Network Configuration Options</strong><br>
In this example, I only have one optional device. So I will define two options: One with the IM155-6 and one without. The Control Records needed to reconfigure the I/O network are structured as follows:</p>



<p class="wp-block-paragraph"><em>Word 1 &#8211; Version</em>: For reconfiguring the I/O system, this is 16#0100.<br>
<br>
<em>Word 2 &#8211; Number of Optional Devices to be used:</em> The total number of optional devices that will be used in this configuration option.<br>
<br>
<em>Word 3 &#8211; Optional Device to Activate:</em> the hardware identifier of the device to be activated (HW_DEVICE). You can find this in the system constants of the default tag table. For this example, it is 262.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/HW_Device-1.png" alt=""/></figure>



<p class="wp-block-paragraph"><em>Word 4 -&gt; Word N-1:</em> <em>Optional Devices to Activate</em><br>
<br>
<em>Word N &#8211; Number of port interconnections</em>: Since we already defined the network topology, this is 0.</p>



<p class="wp-block-paragraph">For the two options (with and without the rack), my configuration records are shown below.</p>



<p class="wp-block-paragraph">Note that I&#8217;ve used a generic struct to define the configurations. Also, note that I&#8217;ve added an empty word to the end of the second configuration (WithoutRack) even though it isn&#8217;t needed. It will be apparent why a little later.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Config-Record-1.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step 4: Write Logic to Reconfigure the I/O</strong><br>
The I/O network can be configured at any point without restarting the PLC, u<span style="background-color: rgb(245, 246, 245);">nlike the previous example of configuring hardware within a rack</span>. It just requires three steps:</p>



<p class="wp-block-paragraph"><br>
a) Call &#8220;ReconfigIOSystem&#8221; with Mode 1 to Deactivate all Optional I/O Devices.<br>
<br>
b) Call &#8220;ReconfigIOSystem&#8221; with Mode 2 (and the configuration record) to Reconfigure/Activate&nbsp;the used I/O Devices.<br>
<br>
c) Call &#8220;ReconfigIOSystem&#8221; with Mode 3 to Restart the I/O.</p>



<p class="wp-block-paragraph">For this demo, I wrote a simple state machine to sequence through the three steps off of a start command (from the HMI). The user can select a configuration and restart as needed.</p>



<h2 class="wp-block-heading" id="h-a-few-tricks-worth-nothing-nbsp">A Few Tricks Worth Nothing&#8230;&nbsp;</h2>



<p class="wp-block-paragraph">Then I&#8217;ll leave you with some demo code.</p>



<p class="wp-block-paragraph">First, the &#8220;ReconfigIOSystem&#8221; system function block requires writing the control record as an array of words.</p>



<p class="wp-block-paragraph">We could have defined our Configuration Records as an array, but I liked the Struct better. However, we do need to take the selected configuration and move it into an array.</p>



<p class="wp-block-paragraph">To do this, I created a static Array [0-3] of Words and a Struct CTRL_REC using an AT construct for the Array. Now I can move my Struct into CTRL_REC and still use the array of Words as the input to the block.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Array-of-Words-1.png" alt=""/></figure>



<p class="wp-block-paragraph">be foundSecond, the Logical Address used (LADDR) on the &#8220;ReconfigureIOSystem&#8221; call is the Hardware Identifier of the PROFINET interface of the IO controller. Again,&nbsp;<span style="background-color: rgb(245, 246, 245);">this can&nbsp;</span>be found<span style="background-color: rgb(245, 246, 245);">&nbsp;in&nbsp;</span>the system constants tab of the default tag list .</p>



<p class="wp-block-paragraph">Finally, I played around with a few options (defining port connections vs. configured topology) and found the topology method easier to demonstrate. The other cool thing about this is that because the topology is defined, the IM155-6 PN does not need to be commissioned (Profinet name, IP Address assignment) in advance.</p>



<p class="wp-block-paragraph">The PLC will automatically assign a Profinet name and IP Address and autoconfigure the rack w<span style="background-color: rgb(245, 246, 245);">When the I/O system configuration&nbsp;</span>is updated<span style="background-color: rgb(245, 246, 245);">&nbsp;with the rack activated</span>! You can test this be resetting the rack to factory default and then reconfiguring the network to activate it. You&#8217;ll notice that since the topology matches what was defined, the IP Address and Profinet Name will be automatically assigned and the rack will be auto commissioned and activated.</p>



<h2 class="wp-block-heading" id="h-the-code">The Code</h2>



<p class="wp-block-paragraph">Here&#8217;s the code I used for my quick test. I am running this FB from OB1 and have buttons on the HMI for Starting/Resetting and selecting which configuration to use. This allows a user to, while the system is running, add or remove the remote I/O rack from the Profinet network.</p>



<p class="wp-block-paragraph">I hope this is helpful! Thanks for reading!</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Reconfigure-IO-Function-Block-1.png" alt=""/></figure>



<p class="wp-block-paragraph">For those of you who made it this far, I&#8217;ve <a href="https://static.dmcinfo.com/wp-content/uploads/2025/06/HardwareConfigDemo_20170302_1146.zip" target="_blank" rel="noreferrer noopener">attached </a>a sample project for you if you&#8217;d like to try it yourself!</p>



<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming/">Learn more about DMC&#8217;s TIA Portal programming expertise</a>&nbsp;or <a href="https://static.dmcinfo.com/contact">Contact Us</a> to get started on a project today.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24616/optional-hardware-configuration-control-in-tia-portal/">Optional Hardware Configuration Control in TIA Portal</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automatic HMI Connection Fail-over in TIA Portal with the S7-400H</title>
		<link>https://static.dmcinfo.com/blog/24627/automatic-hmi-connection-fail-over-in-tia-portal-with-the-s7-400h/</link>
		
		<dc:creator><![CDATA[Jason Mayes]]></dc:creator>
		<pubDate>Tue, 28 Feb 2017 15:33:49 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Houston]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[Oil and Gas]]></category>
		<category><![CDATA[PROFINET]]></category>
		<category><![CDATA[WinCC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/24627/automatic-hmi-connection-fail-over-in-tia-portal-with-the-s7-400h/</guid>

					<description><![CDATA[<p>For anyone who has spent much time working with the SIMATIC S7-400H, it becomes quickly apparent that the devil is often in the details. You find that there are many small settings and &#8216;tricks&#8217; that you uncover while setting up redundancy, redundant Modbus communication, redundant communication interfaces for I/O, configuring hardware, etc., that you need [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24627/automatic-hmi-connection-fail-over-in-tia-portal-with-the-s7-400h/">Automatic HMI Connection Fail-over in TIA Portal with the S7-400H</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">For anyone who has spent much time working with the SIMATIC S7-400H, it becomes quickly apparent that the devil is often in the details. You find that there are many small settings and &#8216;tricks&#8217; that you uncover while setting up redundancy, redundant Modbus communication, redundant communication interfaces for I/O, configuring hardware, etc., that you need to get things running. Sometimes those small details are hard to catch. In the words of my wise colleague <a href="https://static.dmcinfo.com/about/employee-bios/lillian-walker">Lillian Walker</a>, &#8220;The redundant thing about redundancy is that I have to read all of the documentation twice.&#8221; Oh, so true.</p>



<p class="wp-block-paragraph">Oftentimes, I will find those settings and tricks in a great blog, application example or help file. Over the years, I&#8217;ve built up a personal library of links and documents that I reference whenever I come back to an issue that I know I&#8217;ve seen before and have forgotten how we fixed it in the past. Today I&#8217;d like to share one of these examples that I&#8217;ve relied upon several times when working with the S7-400H and programming HMI&#8217;s in WinCC Advanced or WinCC Comfort&nbsp;<a href="https://support.industry.siemens.com/cs/document/96837136/connecting-simatic-hmi-panels-with-simatic-s7-400h-(wincc-v13-and-step-7-v5-5)?dti=0&amp;lc=en-ZM">configuring&nbsp;automatic connection fail-over</a>.&nbsp;</p>



<p class="wp-block-paragraph">If you&#8217;ve worked with TIA Portal and the 400H CPUs in the past, you probably know that Portal does not have any automatic fail-over mechanisms built in for WinCC Advanced or WinCC Comfort. Hopefully, when the S7-1500H is released, this functionality will be added as well. But for now, programming of the 400H system is completed in Step 7 v5.5; the station must be imported into Portal as a Proxy, and any connection fail-over must be manually added. Luckily, Siemens provides a great <a href="https://support.industry.siemens.com/cs/document/96837136/connecting-simatic-hmi-panels-with-simatic-s7-400h-(wincc-v13-and-step-7-v5-5)?dti=0&amp;lc=en-ZM">Application Example</a> to make the process easier. Nothing I&#8217;m sharing below is secret; you can easily <a href="https://support.industry.siemens.com/cs/document/96837136/connecting-simatic-hmi-panels-with-a-simatic-s7-400h-(wincc-v16-and-step-7-v5-6)?dti=0&amp;lc=en-WW" type="link" id="https://support.industry.siemens.com/cs/document/96837136/connecting-simatic-hmi-panels-with-a-simatic-s7-400h-(wincc-v16-and-step-7-v5-6)?dti=0&amp;lc=en-WW">learn from this information</a>. Yet&nbsp;for anyone who has already found this blog, I&#8217;ll walk you through configuring WinCC Advanced or WinCC Comfort to work with a redundant pair of S7-400H CPUs and automatically handle connection failover.</p>



<h2 id="h-step-1-import-your-400h-system-into-tia-portal" class="wp-block-heading">Step 1: Import your 400H system into TIA Portal</h2>



<p class="wp-block-paragraph">TIA Portal does not support programming of the 400H inside the Portal, but you can easily import a station from a Step7 v5.5 project into the Portal to make things easier. To do so, choose &#8220;Add a New Device&#8221;, select the type as &#8220;Controller,&#8221; and pick &#8220;Device Proxy.&#8221;&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Step-1-import-proxy-station.png" alt=" Import a station from a Step7 v5.5 project into TIA Portal "/></figure>



<p class="wp-block-paragraph">After the new station has been added to the Project, right-click the station in the project tree (or from Device View) and choose &#8220;Initialize Device Proxy.&#8221; Navigate to and select your Step7 v5.5 project and it will open a new dialog to allow you to choose which source device and what data you would like to add to your Proxy Station.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Step1c-Import-400H.png" alt="Initialize TIA Portal Device Proxy"/></figure>



<h2 id="h-step-2-add-your-hmi" class="wp-block-heading">Step 2: Add your HMI</h2>



<p class="wp-block-paragraph">For the purpose of this demo, I will add a Comfort Panel to my project. But you can do the same with an Advanced Runtime application.</p>



<h3 id="h-step-3-create-a-connection-to-the-plc-station" class="wp-block-heading">Step 3: Create a Connection to the PLC Station</h3>



<p class="wp-block-paragraph">Open up the hardware configuration (network view) and add an HMI connection from your Proxy Station to the Comfort Panel. If you open up the Connections Editor from the HMI Project (in the Project Tree), you will see that a connection has automatically been created for you. I&#8217;ve renamed this Connection to &#8220;CPU_400H&#8221; and this will be the connection that we configure to switch been CPU&#8217;s (failover). This is the connection that will be used for all tags used for visualization and control on the HMI.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Step3-Create-a-connection.png" alt="Add an HMI connection from your Proxy Station to the Comfort Panel"/></figure>



<p class="wp-block-paragraph">What we will do, in order to provide automatic failover, is create three primary connections. The first will be a dynamic connection, capable of pointing to either processor in the redundant pair. We will use scripting and the control function &#8220;<em>ChangeConnection</em>&#8221; to switch the connection when a loss of communication is detected. All tags used for display on the HMI will use this connection. The other two connections will be static connections to each CPU for monitoring connection status.</p>



<h2 id="h-step-4-create-additional-connections-to-each-cpu" class="wp-block-heading">Step 4: Create Additional Connections to Each CPU</h2>



<p class="wp-block-paragraph">Next, we will create dedicated connections to each CPU. These connections will each be looking at a different CPU. Note that the two connections are configured for different CPU&#8217;s in the redundant pair (IP Address, Slot, Rack).&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Step4a-Create-direct-connection-to-CPU0.png" alt="Create dedicated connections to each CPU"/></figure>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Step4b-Create-direct-connection-to-CPU1.png" alt="Dedicated connections to each CPU"/></figure>



<h2 id="h-step-5-create-connection-monitoring-tags" class="wp-block-heading">Step 5: Create Connection Monitoring Tags</h2>



<p class="wp-block-paragraph">We will create two heartbeat tags, &#8216;<em>CPU_0_Trigger</em>&#8216; and &#8216;<em>CPU_1_Trigger</em>&#8216; &#8211; one for each CPU &#8211; and monitor them through the dedicated connections to the CPUs. Note that both trigger tags are looking at the same tag (in this case, at DB110.DBX429.3), but on different CPUs. That tag on the PLC is a heartbeat tied to the Clock Byte (1 Hz). Also, note that we&#8217;ve changed the tag acquisition mode to be Cyclic Continuous so that it will be constantly monitored for changes.</p>



<p class="wp-block-paragraph">Additionally, create three internal tags: &#8216;<em>CPU_0_ConnectionState</em>&#8216; and &#8216;<em>CPU_1_ConnectionState</em>&#8216; (both Integer tags used to keep and store an internal connection state) and &#8216;<em>CPU_ConnectedTo</em>&#8216; (a WString tag used to track which CPU we&#8217;re using for our active connection and can be displayed on the HMI).&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Step5-Create-connection-tags.png" alt="Connection tags to the redundant 500H redundant PLC"/></figure>



<h2 id="h-step-6-add-connection-monitoring-scripts" class="wp-block-heading">Step 6: Add Connection Monitoring Scripts</h2>



<p class="wp-block-paragraph">Create three new scrips: (1) <strong><em>CPU_O_Trigger</em></strong>, (2) <em><strong>CPU_1_Trigger</strong>,</em> and (3) <strong><em>CPU_Connection</em></strong>. You can grab the scripts from the <a href="https://support.industry.siemens.com/cs/document/96837136/connecting-simatic-hmi-panels-with-simatic-s7-400h-(wincc-v13-and-step-7-v5-5)?dti=0&amp;lc=en-ZM">Siemens application example</a> and edit as needed. But these scripts will do the following:</p>



<p class="wp-block-paragraph">1. <em><strong>CPU_0_Trigger</strong></em>: Will be triggered on a tag change of &#8216;<em>CPU_0_Trigger</em>.&#8217; On a heartbeat signal from CPU_0, it will reset &#8216;<em>CPU_0_ConnectionState</em>&#8216; to 1, and will increment &#8216;<em>CPU_1_ConnectionState</em>&#8216;. If &#8216;<em>CPU_1_ConnectionState</em>&#8216; ever exceeds our connection fault limit and our HMI Connection CPU_400H is currently assigned to connect to CPU_1, it will swap the connection to CPU_0.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">VB</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>Sub CPU_0_Trigger()

    Const IP_Address = "192.168.1.10"

    ' Initialize active connection
    If SmartTags("CPU_ConnectedTo") = "" Then
        SmartTags("CPU_ConnectedTo") = "CPU-0"
    End If

    ' Reset CPU-0 watchdog
    SmartTags("CPU_0_ConnectionState") = 1

    ' Increment CPU-1 watchdog counter
    If SmartTags("CPU_1_ConnectionState") &lt;= 10 Then
        SmartTags("CPU_1_ConnectionState") = _
            SmartTags("CPU_1_ConnectionState") + 1
    End If

    ' Switch to CPU-0 if CPU-1 has failed
    If SmartTags("CPU_1_ConnectionState") >= 11 Then

        If SmartTags("CPU_ConnectedTo") = "CPU-1" Then

            ChangeConnection "CPU_400H", IP_Address, 3, 0

            SmartTags("CPU_1_ConnectionState") = 100
            SmartTags("CPU_ConnectedTo") = "CPU-0"

        ElseIf SmartTags("CPU_ConnectedTo") = "CPU-0" Then

            SmartTags("CPU_1_ConnectionState") = 100

        End If

    End If

    ' Reintegrate after a complete communication loss
    If SmartTags("CPU_ConnectedTo") = "Connection Lost" Then

        ChangeConnection "CPU_400H", IP_Address, 3, 0

        SmartTags("CPU_1_ConnectionState") = 100
        SmartTags("CPU_ConnectedTo") = "CPU-0"

    End If

End Sub</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #569CD6">Sub</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">CPU_0_Trigger</span><span style="color: #D4D4D4">()</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">Const </span><span style="color: #9CDCFE">IP_Address</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;192.168.1.10&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; Initialize active connection</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-0&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; Reset CPU-0 watchdog</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">1</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; Increment CPU-1 watchdog counter</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) &lt;= </span><span style="color: #B5CEA8">10</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) =</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) + </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; Switch to CPU-0 if CPU-1 has failed</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) &gt;= </span><span style="color: #B5CEA8">11</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-1&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            ChangeConnection </span><span style="color: #CE9178">&quot;CPU_400H&quot;</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> IP_Address</span><span style="color: #D4D4D4">, </span><span style="color: #B5CEA8">3</span><span style="color: #D4D4D4">, </span><span style="color: #B5CEA8">0</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-0&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #C586C0">ElseIf</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-0&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; Reintegrate after a complete communication loss</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;Connection Lost&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        ChangeConnection </span><span style="color: #CE9178">&quot;CPU_400H&quot;</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> IP_Address</span><span style="color: #D4D4D4">, </span><span style="color: #B5CEA8">3</span><span style="color: #D4D4D4">, </span><span style="color: #B5CEA8">0</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-0&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #569CD6">End Sub</span></span></code></pre></div>



<p class="wp-block-paragraph">2. <em><strong>CPU_1_Trigger</strong></em>: Will be triggered on a tag change of &#8216;<em>CPU_1_Trigger</em>.&#8217; On a heartbeat signal from CPU_1, it will reset &#8216;<em>CPU_1_ConnectionState</em>&#8216; to 1, and will increment &#8216;<em>CPU_0_ConnectionState</em>&#8216;. If &#8216;<em>CPU_0_ConnectionState</em>&#8216; ever exceeds our connection fault limit and our HMI Connection CPU_400H is currently assigned to connect to CPU_0, it will swap the connection to CPU_1.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">VB</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>Sub CPU_1_Trigger()

    '***************************
    '**** Initialization ****
    '***************************

    Const IP_Address = "192.168.1.11"

    ' During initialization the default connection
    ' is stored in CPU_ConnectedTo.
    If SmartTags("CPU_ConnectedTo") = "" Then
        SmartTags("CPU_ConnectedTo") = "CPU-0"
    End If


    '*******************
    '**** Reset ****
    '*******************

    ' Reset CPU-1 connection watchdog
    SmartTags("CPU_1_ConnectionState") = 1


    '*****************************
    '**** Fault Detection ****
    '*****************************

    ' Increment CPU-0 watchdog
    If SmartTags("CPU_0_ConnectionState") &lt;= 10 Then
        SmartTags("CPU_0_ConnectionState") = _
            SmartTags("CPU_0_ConnectionState") + 1
    End If


    '**************************
    '**** Switch Over ****
    '**************************

    If SmartTags("CPU_0_ConnectionState") >= 11 Then

        If SmartTags("CPU_ConnectedTo") = "CPU-0" Then

            ChangeConnection "CPU_400H", _
                             IP_Address, _
                             3, _
                             1

            SmartTags("CPU_0_ConnectionState") = 100
            SmartTags("CPU_ConnectedTo") = "CPU-1"

        ElseIf SmartTags("CPU_ConnectedTo") = "CPU-1" Then

            SmartTags("CPU_0_ConnectionState") = 100

        End If

    End If


    '***************************
    '**** Reintegration ****
    '***************************

    If SmartTags("CPU_ConnectedTo") = "Connection Lost" Then

        ChangeConnection "CPU_400H", _
                         IP_Address, _
                         3, _
                         1

        SmartTags("CPU_0_ConnectionState") = 100
        SmartTags("CPU_ConnectedTo") = "CPU-1"

    End If

End Sub</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #569CD6">Sub</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">CPU_1_Trigger</span><span style="color: #D4D4D4">()</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;***************************</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**** Initialization ****</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;***************************</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #569CD6">Const </span><span style="color: #9CDCFE">IP_Address</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">&quot;192.168.1.11&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; During initialization the default connection</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; is stored in CPU_ConnectedTo.</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-0&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;*******************</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**** Reset ****</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;*******************</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; Reset CPU-1 connection watchdog</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">1</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;*****************************</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**** Fault Detection ****</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;*****************************</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; Increment CPU-0 watchdog</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) &lt;= </span><span style="color: #B5CEA8">10</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) =</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) + </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**************************</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**** Switch Over ****</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**************************</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) &gt;= </span><span style="color: #B5CEA8">11</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-0&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            ChangeConnection </span><span style="color: #CE9178">&quot;CPU_400H&quot;</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">                             IP_Address,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">                             </span><span style="color: #B5CEA8">3</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">                             </span><span style="color: #B5CEA8">1</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-1&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #C586C0">ElseIf</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-1&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;***************************</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**** Reintegration ****</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;***************************</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;Connection Lost&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        ChangeConnection </span><span style="color: #CE9178">&quot;CPU_400H&quot;</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">                         IP_Address,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">                         </span><span style="color: #B5CEA8">3</span><span style="color: #D4D4D4">,</span><span style="color: #9CDCFE"> _</span></span>
<span class="line"><span style="color: #D4D4D4">                         </span><span style="color: #B5CEA8">1</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;CPU-1&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #569CD6">End Sub</span></span></code></pre></div>



<p class="wp-block-paragraph">3. <em><strong>CPU_Connection</strong></em>: This script will be configured to run as a scheduled task. Its purpose is a backup of the heartbeat/triggers. If no heartbeat triggers have been received from a CPU, it will disable the connection. If both connections are disabled, it will set the Connected CPU to &#8220;Connection Lost.&#8221;</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">VB</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>Sub ConnectionCheck()

    '***************************
    '**** Deactivation ****
    '***************************

    ' If a connection has not reset its status tag
    ' back to 1, mark it as disabled.
    If SmartTags("CPU_0_ConnectionState") >= 5 Then
        SmartTags("CPU_0_ConnectionState") = 100
    End If

    If SmartTags("CPU_1_ConnectionState") >= 5 Then
        SmartTags("CPU_1_ConnectionState") = 100
    End If

    ' If both connections are disabled,
    ' indicate total communication loss.
    If SmartTags("CPU_0_ConnectionState") = 100 _
       And SmartTags("CPU_1_ConnectionState") = 100 Then

        SmartTags("CPU_ConnectedTo") = "Connection Lost"

    End If


    '********************************
    '**** Setting Fault Flag ****
    '********************************

    ' Every cycle, set the status tags to 5.
    ' The CPU trigger scripts must reset them to 1.
    If SmartTags("CPU_0_ConnectionState") &lt; 5 Then
        SmartTags("CPU_0_ConnectionState") = 5
    End If

    If SmartTags("CPU_1_ConnectionState") &lt; 5 Then
        SmartTags("CPU_1_ConnectionState") = 5
    End If

End Sub</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #569CD6">Sub</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">ConnectionCheck</span><span style="color: #D4D4D4">()</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;***************************</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**** Deactivation ****</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;***************************</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; If a connection has not reset its status tag</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; back to 1, mark it as disabled.</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) &gt;= </span><span style="color: #B5CEA8">5</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) &gt;= </span><span style="color: #B5CEA8">5</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; If both connections are disabled,</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; indicate total communication loss.</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span><span style="color: #D4D4D4"> _</span></span>
<span class="line"><span style="color: #D4D4D4">       And </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">100</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_ConnectedTo&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #CE9178">&quot;Connection Lost&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;********************************</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;**** Setting Fault Flag ****</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos;********************************</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; Every cycle, set the status tags to 5.</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&apos; The CPU trigger scripts must reset them to 1.</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) &lt; </span><span style="color: #B5CEA8">5</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_0_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">5</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">If</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) &lt; </span><span style="color: #B5CEA8">5</span><span style="color: #D4D4D4"> </span><span style="color: #C586C0">Then</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #DCDCAA">SmartTags</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;CPU_1_ConnectionState&quot;</span><span style="color: #D4D4D4">) = </span><span style="color: #B5CEA8">5</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">End If</span></span>
<span class="line"></span>
<span class="line"><span style="color: #569CD6">End Sub</span></span></code></pre></div>



<h2 id="h-step-7-configure-scripts-to-be-executed" class="wp-block-heading">Step 7: Configure Scripts to be Executed</h2>



<p class="wp-block-paragraph">The <em><strong>CPU_0_Trigger </strong></em>script will be executed off of a value change event of the tag &#8216;<em>CPU_0_Trigger</em>&#8216;. In the properties of the tag, configure a Value Change event to call the script <em><strong>CPU_0_Trigger</strong></em>. For the tag &#8216;<em>CPU_1_Trigger</em>,&#8217;&nbsp;add the same Value Change event to call the script <em><strong>CPU_1_Trigger</strong></em>.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Step7a-Configure-trigger-script-execution.png" alt="Script execution off of tag change"/></figure>



<p class="wp-block-paragraph">For the <em><strong>ConnectionTest </strong></em>script, add a new Scheduled Task to run once per minute.&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Step7b-Schedule-task-for-connection-check.png" alt="Configure task to call script periodically"/></figure>



<p class="wp-block-paragraph">That&#8217;s it. Now if a CPU goes down, the lost heartbeat will cause the connection to fail-over to a working connection. These scripts are fairly generic. If you need a faster response rate you can change the heartbeat speed, the tag acquisition cycle, and the limits allowed before fail-over. It&#8217;s not a hardware solution and it is not instantaneous, but it will allow a Comfort Panel or WinCC Advanced HMI to work with a redundant 400H PLC system!</p>



<p class="wp-block-paragraph">Thanks!</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24627/automatic-hmi-connection-fail-over-in-tia-portal-with-the-s7-400h/">Automatic HMI Connection Fail-over in TIA Portal with the S7-400H</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Commissioning a Siemens G120 VFD with Extended Safety using the Onboard Terminals</title>
		<link>https://static.dmcinfo.com/blog/24929/commissioning-a-siemens-g120-vfd-with-extended-safety-using-the-onboard-terminals/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Fri, 11 Nov 2016 11:40:02 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[PROFINET]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/24929/commissioning-a-siemens-g120-vfd-with-extended-safety-using-the-onboard-terminals/</guid>

					<description><![CDATA[<p>DMC recently discovered that there are some unique settings associated with configuring a Siemens G120 Variable Frequency Drive (VFD) with extended safety functionality using the onboard terminals. This blog is meant to be a guide for this type of configuration to avoid troublesome and difficult-to-diagnose issues.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24929/commissioning-a-siemens-g120-vfd-with-extended-safety-using-the-onboard-terminals/">Commissioning a Siemens G120 VFD with Extended Safety using the Onboard Terminals</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">DMC recently discovered that there are some unique settings associated with configuring a Siemens G120 Variable Frequency Drive (VFD) with extended safety functionality using the onboard terminals. This blog is meant to be a guide for this type of configuration to avoid troublesome and difficult-to-diagnose issues.</p>

<ol class="wp-block-list">
 <li><strong>Hardware Setup</strong>
   <p class="wp-block-paragraph">In this particular situation, we used an S7-400H PLC to control a CU240E-2 VFD. The S7-400H can be configured with two CPUs in a fully redundant PLC setup, but in this situation we only used one S7-400H CPU. The S7-400H is not available in TIA Portal, so we used Simatic Manager and Scout/Starter* to communicate with the PLC and VFD over ProfiNET.</p>

<p class="wp-block-paragraph"><em>*Note: Before you commission a drive in Scout or TIA Portal, make sure you have the latest Service Pack from Siemens. Some Siemens drives have new firmware versions and it is important that your software is up to date in order to interface properly with the new firmware.</em></p>

<p class="wp-block-paragraph">One important aspect of this particular configuration is that the drive was wired with 6 digital inputs. These inputs were to be used as signals from a separate safety PLC.</p>

<p class="wp-block-paragraph">Initially we walked through the standard commissioning Wizard process &ndash; entering the motor faceplate data and configuring the drive to use open loop speed control. After standard commissioning we were able to jog the motor from the control panel in Starter.</p></li>
 <li><strong>Safety Inputs/Outputs Configuration </strong>
   <p class="wp-block-paragraph">&nbsp;After completing the commissioning Wizard, we moved on to configure the integrated safety functions. Safety inputs to the onboard terminals of the G120 utilize pairs of wires: 6 individual digital input wires allow for 3 distinct safety inputs. We intended to use Safe Torque Off (STO) and Safely Limited Speed (SLS) &ndash; this left one unused pair of digital inputs from the safety PLC.</p>

<p class="wp-block-paragraph">Using the safety integrated screen in Scout we configured the Safety Inputs/Outputs as shown here. STO was mapped to digital input pair 0, and SLS was mapped to digital input pair 2. Note that you need to set any unused safety functions to &ldquo;[255] Static deselected&rdquo;.<figure class="wp-block-image"><img decoding="async" alt="extended safety inputs outputs configuration" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Safety-IO.jpg"  /></figure></p>

<p class="wp-block-paragraph">At this point we expected the VFD to be ready to go. We still had no problem jogging the motor from the control panel in Scout and everything appeared to be squared away.</p>

<p class="wp-block-paragraph">We attempted to control the VFD from the PLC using Standard Telegram 1. However, the VFD would not accept control from the PLC. The drive was receiving the control word and speed word from the PLC, but it was not obeying the commands. The status word and actual speed word the drive sent back to the PLC did not match the command words sent to it from the PLC.</p></li>
 <li><strong>Factory Default mapping of Digital Inputs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong>
   <p class="wp-block-paragraph">We discovered that this issue stems from the Factory Default mapping of the digital inputs to the VFD (shown below). The VFD saw these digital inputs as HIGH from the safety PLC and behaved as if p1055[1], p1056[1], p2103[1], and p810 were all true.</p>

<figure class="wp-block-image"><img decoding="async" alt="VFD factory default input output settings" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Default-IO-config-with-Safety.jpg"  /></figure>

<p class="wp-block-paragraph">These particular inputs are meant to place the PLC in local control (i.e. from a local hand switch near the drive). As you can see above, we had successfully configured F-DI 0 and F-DI 2 as safety inputs, but these digital inputs were ALSO mapped to other bits by default (Jog bit 0, Jog bit 1, etc.). When these bits are high the PLC is unable to control the drive.</p>

<p class="wp-block-paragraph">The first 4 digital inputs are mapped to these bits by default. If these digital inputs are always low, as they would be if the digital inputs were not connected to anything, then this default presents no issues. However, in this case we were attempting to use the digital inputs for other functionality.</p>

<p class="wp-block-paragraph">The resolution to this issue is to remove the default mapping. You do so by clicking the blue shape next to each Digital Input selection, clicking &ldquo;Further Interconnections&rdquo; and then deselecting the check box next to all bits.</p>

<p class="wp-block-paragraph"><figure class="wp-block-image"><img decoding="async" alt="clearing default bit mapping extended safety" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Deselect.jpg"  /></figure></li>
 <li><strong>Test Stop for Extended Safety Functionality </strong>
   <p class="wp-block-paragraph">Another important parameter to be aware of when configuring Extended Safety functionality is the &ldquo;Test stop selection of extended functions&rdquo;. This is available from the configuration button on the Safety Integrated page. This parameter needs to be mapped to any bit. Whichever bit it is mapped to must be toggled under the following circumstances:</p>

<ol class="wp-block-list">
 <li>The drive power cycles</li>
 <li>You perform RAM to ROM on the drive</li>
 <li>The timer (configured from this dialog box) runs out.</li>
</ol>

<p class="wp-block-paragraph">This bit is essentially meant to be a test of the extended safety functionality. When the drive is using basic safety, the test stop is simply the STO bit. To perform a test with basic functionality, you simply toggle the STO (usually just an Estop). However, for extended safety you need to configure a custom bit to be toggled.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Test-Stop.jpg"  /></figure>

<p class="wp-block-paragraph">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On the right side of this dialog box, you can also configure a bit that will get set when this extended safety test stop is required. This could allow you to convey this information to a PLC program or to an operator.</p></li>
 <li><strong>Safety Limited Speed (SLS) Setpoint Calculation</strong>
   <p class="wp-block-paragraph">One final issue we encountered when configuring SLS extended safety on the G120 drive is that the SLS speed was not running at the expected speed. As shown below, we configured n<sub>max </sub>to be 900 rpm, and the Set Velocity Limitation to be 20%. This should have caused the motor to run at 180 rpm when SLS was active. However, the drive ran at 45 rpm with SLS was active.</p>

<p class="wp-block-paragraph" style="margin-left: 0.5in;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<figure class="wp-block-image"><img decoding="async" alt="Safety limited speed setpoint calculation" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/SLS-Speed.jpg"  /></figure></p>

<p class="wp-block-paragraph">It turns out that the error was with how the drive calculated its SLS speed. In the Configuration -&gt; Mechanics configuration dialog box, there is a parameter &ldquo;Number of motor revolutions x pole pair number&rdquo;. This needs to be configured to 4. The default setting is 1. This caused the SLS speed calculation to be off by a factor of 4.</p>

<figure class="wp-block-image"><img decoding="async" alt="safely limited speed calculation" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/SLS-Speed-Calc.jpg"  /></figure></li>
</ol>

<p class="wp-block-paragraph">If you are configuring a G120 Drive using extended safety and/or onboard terminals, we hope this guide will help you avoid some of the issues and trouble spots that we encountered.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/24929/commissioning-a-siemens-g120-vfd-with-extended-safety-using-the-onboard-terminals/">Commissioning a Siemens G120 VFD with Extended Safety using the Onboard Terminals</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Schneider MDrive Motor Integration with Siemens Programming</title>
		<link>https://static.dmcinfo.com/blog/26805/schneider-mdrive-motor-integration-with-siemens-programming/</link>
		
		<dc:creator><![CDATA[Otto Gottlieb]]></dc:creator>
		<pubDate>Wed, 25 Feb 2015 14:17:30 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Motion Control]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[PROFINET]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/26805/schneider-mdrive-motor-integration-with-siemens-programming/</guid>

					<description><![CDATA[<p>I have found little information for commissioning a Schneider Electric Lexium MDrive Stepper Motor and integrating it into a Siemens solution, so I decided to write about how I did it. Commissioning the MDrive Stepper Motor with the Schneider TCP Configuration Utility The software required for commissioning the drive is available for download on the [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/26805/schneider-mdrive-motor-integration-with-siemens-programming/">Schneider MDrive Motor Integration with Siemens Programming</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I have found little information for commissioning a Schneider Electric Lexium MDrive Stepper Motor and integrating it into a Siemens solution, so I decided to write about how I did it.</p>



<p class="wp-block-paragraph"><strong>Commissioning the MDrive Stepper Motor with the Schneider TCP Configuration Utility</strong></p>



<p class="wp-block-paragraph">The software required for commissioning the drive is available for download on the Schneider Motion website. The software that I needed was the Lexium LMDxE TCP Configuration Utility Version 1.2.0.6 that includes the PROFINET configuration part.</p>



<p class="wp-block-paragraph">When you first open the Utility, you will see the Config screen. This is where you will need to select your computer’s adapter, and then you can read the MAC and IP Addresses from the drive. Once you connect to the drive, use this screen to set the drive’s IP Address as you wish to use it.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/1-Config-Screen-Lexium-MDrive.jpg" alt="Config screen in Lexium MDrive Utility"/></figure>



<p class="wp-block-paragraph">The PROFINET screen allows you to set up the input and output Registers for controller and drive communication.<br>
&nbsp;<br>
</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/3-Siemens-Profinet-Screen-2.jpg" alt="Siemens Profinet screen shows input and output registers"/></figure>



<p class="wp-block-paragraph">I used all the default parameters for the Inputs and all but two for the Outputs. My application called for an encoder, which enables stall detection. However, the Stall Flag and the Stall Factor parameters were not in the default parameters so I had to add them in place of unused parameters.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/4-Stall-Flag-Stall-Factor.jpg" alt="Adding Stall Flag and Stall Factor to Utility"/></figure>



<p class="wp-block-paragraph">The SEM Port screen allows you to send commands to the drive, read parameters from the drive, and set drive parameters. There are some drive parameters that cannot be set from the PLC (direction for example) or are cumbersome (configuring inputs and outputs), so this is the best screen to perform these tasks. Sending commands to the drive is a good way of verifying functionality of the motor before installing it into your application.</p>



<p class="wp-block-paragraph">IMPORTANT: Write “SAVE” to the drive after setting parameters so that you do not lose them when motor power is cycled.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/5-SEM-Port-Screen.jpg" alt="SEM Port Screen to send commands to MDrive"/></figure>



<p class="wp-block-paragraph"><strong style="line-height: 1.6;">Setting up the Siemens Project for Motion Control</strong></p>



<p class="wp-block-paragraph">Integration with Siemens requires installing the GSD file and adding it to your Hardware Configuration. The MDrive object allows for 128 bytes of both input and outputs, and you can see how I used them below.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/6-MDrive-Object.png" alt="128 bytes of inputs and outputs in MDrive object"/></figure>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/7-MDrive-Object-2.png" alt="128 bytes of inputs and outputs in MDrive object"/></figure>



<p class="wp-block-paragraph">I found that 128bytes of both inputs and outputs was more than I needed for motion control in my application. Schneider Motion has documented the parameters well, so I will discuss some aspects that are not explicitly explained by the documentation.</p>



<p class="wp-block-paragraph"><strong>Toggle Parameters</strong></p>



<p class="wp-block-paragraph">The parameters are usually sent to the Stepper motor when they are changed. For example, if you want to run the motor at a certain velocity, you send a speed to the Slew Register, and if you want it to stop, you send the Slew Register the value zero. If you are performing an Absolute Move and you want the motor to stop, you can again send a zero value to the Slew Register. However, if that register is already set to zero then the motor won’t stop, which is why you would need to use the Toggle Registers. In this case you would send a signal to Register 31 to toggle the Slew Register when the Slew Register is set to zero.</p>



<p class="wp-block-paragraph">I have found that the best way to reliably send commands to the motor is by using the Toggle Registers. In the SCL code below I have an example of using the Toggle Registers. You will see that I compare the acceleration I read from the drive to the acceleration that I sent to the drive. If they are different, I set the toggle bit for the acceleration Register. Once the accelerations match, I reset the toggle bit (without resetting the other toggle bits) so that I can trigger the change the next time the accelerations differ. The motor waits for the rising edge of a toggle bit.</p>



<p class="wp-block-paragraph">&nbsp;<br>
In my application it was necessary to change speeds and positions during moves, so I repeatedly toggled the motion commands (Move Absolute, Move Relative, and Slew) while my motor was in motion. In the example below, I check if I am running in position mode and I constantly send the position setpoint to the motor. The toggle bit automatically toggles until I am no longer running in position mode so I only have to worry about updating the position.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/9-Sending-position-setpoint.png" alt="Sending position to setpoint in MDrive"/></figure>



<p class="wp-block-paragraph"><strong>Resetting Errors and Faults</strong></p>



<p class="wp-block-paragraph">When the motor faults, the error is displayed with the Error Code parameter. Most faults can be cleared by sending “0” to the Error Code parameter. However, the Locked Rotor and Stall parameter faults require additional resetting. When the Locked Rotor fault occurs, it is necessary to send “1” to the Clear Locked Rotor parameter. When the Stall fault occurs, it is necessary to send “0” to the Stall parameter.</p>



<p class="wp-block-paragraph">Quick Tip: I found the Stall Factor parameter was set too low for my application so once I set it higher the erroneous stall faults stopped occurring.</p>



<p class="wp-block-paragraph">Learn more about DMC&#8217;s <a href="/services/manufacturing-automation-and-intelligence/motion-control-engineering-and-servo-systems">Motion</a>&nbsp;and <a href="/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming">Siemens PLC</a>&nbsp;services.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/26805/schneider-mdrive-motor-integration-with-siemens-programming/">Schneider MDrive Motor Integration with Siemens Programming</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Commissioning Siemens G120 Drives with Startdrive in TIA Portal</title>
		<link>https://static.dmcinfo.com/blog/26970/commissioning-siemens-g120-drives-with-startdrive-in-tia-portal/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Thu, 15 Jan 2015 13:02:23 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[PROFINET]]></category>
		<category><![CDATA[Siemens Drives]]></category>
		<category><![CDATA[TIA Portal]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/26970/commissioning-siemens-g120-drives-with-startdrive-in-tia-portal/</guid>

					<description><![CDATA[<p>The built-in drive commissioning features in TIA Portal make it very simple to commission a Siemens G120 drive with a Siemens S7 PLC without the need for any stand-alone software. Drives can be commissioned quickly and easily, and afterwards all drive parameters will be stored in Portal for future reference. I have described the general [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/26970/commissioning-siemens-g120-drives-with-startdrive-in-tia-portal/">Commissioning Siemens G120 Drives with Startdrive in TIA Portal</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The built-in drive commissioning features in <a href="http://www.industry.siemens.com/topics/global/en/tia-portal/pages/default.aspx" target="_blank">TIA Portal</a> make it very simple to commission a <a href="http://www.industry.usa.siemens.com/drives/us/en/electric-drives/ac-drives/standard-drives/sinamics-g120-vector-drive/Pages/sinamics-g120-vector-drive.aspx" target="_blank">Siemens G120 drive</a> with a <a href="/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming" target="_blank">Siemens S7 PLC</a> without the need for any stand-alone software. Drives can be commissioned quickly and easily, and afterwards all drive parameters will be stored in Portal for future reference. I have described the general process of setting up <a href="http://us.profinet.com/" target="_blank">Profinet</a> drives with safety in Portal step-by-step. Small details may vary with every situation, but the general process is as follows:</p>



<ol class="wp-block-list">
<li><strong>Add the drive </strong>to Devices &amp; Networks. If the drive has separate Control and Power Units, add the Power unit in the Device View of the Control Unit.</li>



<li><strong>Assign the IP address and Profinet Name </strong>in Devices &amp; Networks. This IP address must be unique and on the same subnet as the PLC.</li>



<li><strong>Setup Safety Telegrams </strong>in Devices &amp; Networks. Be sure to assign the Partner data area so that no tags are overlapping with tags used for logic.</li>



<li><strong>Assign Unique F-Addresses </strong>in Devices &amp; Networks. Profinet F-addresses are only assigned through Portal and do not have the physical jumpers Profibus drives have.</li>



<li><strong>Set IP address and Profinet Name in the drive</strong> to match the one assigned in Devices &amp; Networks. This is done through the Online Access &gt; Device Interface&gt; Online &amp; Diagnostics &gt; Functions. If the device has had a previous IP address assigned, make sure to reset the IP to factory default first. This will reset only the IP address and Name, not any previously assigned parameters or safety functionality. <em>If a factory reset is not done, the IP address may return to the original setting after a few power cycles.</em></li>



<li><strong>Commission drive parameters </strong>using the commissioning wizard built into Portal and the specifications found on the motor faceplate<strong>.</strong></li>



<li><strong>Commission drive safety </strong>through the functional view of the Parameter option. If commissioning multiple similar drives and copying the drives in the Device &amp; Networks, you must “Activate the Safety Commissioning Mode” while online with each drive individually, even if no settings need to be changed.</li>



<li><strong>Test the drive </strong>by manually moving it in Portal’s control panel.</li>



<li><strong>Upload from drive </strong>to save motor parameters in Portal for later reference.</li>
</ol>



<p class="wp-block-paragraph">Here is a more <a href="https://cache.industry.siemens.com/dl/files/823/109771823/att_999091/v1/S120_startdrive_getting_started_0619_en-US.pdf" type="link" id="https://cache.industry.siemens.com/dl/files/823/109771823/att_999091/v1/S120_startdrive_getting_started_0619_en-US.pdf">detailed description of the process</a> found on Siemen’s website.<img decoding="async" class="MobileImage" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Drive.png" alt=""></p>



<p class="wp-block-paragraph"><strong><a href="/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming">Learn more about DMC&#8217;s Siemens PLC programming services.</a>&nbsp;<a href="/contact">Contact us</a> for more information.</strong></p>
<p>The post <a href="https://static.dmcinfo.com/blog/26970/commissioning-siemens-g120-drives-with-startdrive-in-tia-portal/">Commissioning Siemens G120 Drives with Startdrive in TIA Portal</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
