<?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>Nick Leisle, Author at DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/author/nicholasl/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Fri, 04 Sep 2026 21:42: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>Nick Leisle, Author at DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Configure NextGen Archiving in WinCC OA to use a Microsoft SQL Server</title>
		<link>https://static.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Fri, 05 Jan 2024 10:47:21 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/</guid>

					<description><![CDATA[<p>This two-part blog series is intended to be a step-by-step overview on how to set up and utilize an MS SQL Server and WinCC OA’s NextGen Archive (NGA). Information for a general setup exists via the WinCC OA Documentation (see Further Reading/Links), but this walkthrough aims to be more detailed and explicit in the necessary [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/">How to Configure NextGen Archiving in WinCC OA to use a Microsoft SQL Server</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This two-part blog series is intended to be a step-by-step overview on how to set up and utilize an MS SQL Server and WinCC OA’s NextGen Archive (NGA). Information for a general setup exists via the WinCC OA Documentation (see Further Reading/Links), but this walkthrough aims to be more detailed and explicit in the necessary steps.</p>



<ol class="wp-block-list">
<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10546/wincc-oa--how-to-create-a-microsoft-sql-server-for-nextgen-archiving">How To Create a Microsoft SQL Server Install for NextGen Archiving</a></li>



<li>How to Configure NextGen Archiving in WinCC OA to use Microsoft SQL Server</li>
</ol>



<p class="wp-block-paragraph"><u><a id="Table of Contents" name="Table of Contents"></a>Table of Contents:</u></p>



<ol class="wp-block-list">
<li><a href="#h-1-notes-prerequisites">Notes/Prerequisites</a></li>



<li><a href="#h-3-wincc-oa">WinCC OA</a>
<ul class="wp-block-list">
<li><a href="#h-3-1-project-setup" type="internal" id="#h-3-1-project-setup">3.1 Project Setup<span id="cke_bm_559C" style="display: none;">&nbsp;</span></a></li>



<li><a href="#h-3-2-nga-configuration" type="internal" id="#h-3-2-nga-configuration">3.2 NGA Configuration<span id="cke_bm_559C" style="display: none;">&nbsp;</span></a></li>



<li><a href="#h-3-3-archive-group-configuration" type="internal" id="#h-3-3-archive-group-configuration">3.3 Archive Group Configuration<span id="cke_bm_559C" style="display: none;">&nbsp;</span></a></li>



<li><a href="#h-3-4-dpe-archive-configuration" type="internal" id="#h-3-4-dpe-archive-configuration">3.4 DPE Archive Configuration<span id="cke_bm_559C" style="display: none;">&nbsp;</span></a></li>



<li><a href="#h-3-5-data-retrieval" type="internal" id="#h-3-5-data-retrieval">3.5 Data Retrieval<span id="cke_bm_559C" style="display: none;">&nbsp;</span></a></li>
</ul>
</li>



<li><a href="#h-3-further-reading-references" type="internal" id="#h-3-further-reading-references">Further Reading/References</a><span id="cke_bm_559C" style="display: none;">&nbsp;</span></li>
</ol>



<h2 id="h-1-notes-prerequisites" class="wp-block-heading"><u>1. Notes/Prerequisites</u></h2>



<p class="wp-block-paragraph">Required Programs:</p>



<ul class="wp-block-list">
<li><a href="https://www.microsoft.com/en-us/sql-server/sql-server-downloads" target="_blank">Microsoft SQL Server</a> (installation instructions in <a href="https://static.dmcinfo.com/latest-thinking/blog/id/10546/wincc-oa--how-to-create-a-microsoft-sql-server-for-nextgen-archiving">part 2a</a>)</li>



<li><a href="https://www.microsoft.com/en-us/sql-server/sql-server-downloads" target="_blank">Microsoft SQL Server Management Studio</a></li>



<li>Microsoft SQL Server Configuration Manager (installed alongside Microsoft SQL Server)</li>
</ul>



<p class="wp-block-paragraph">This demo was implemented using:</p>



<ul class="wp-block-list">
<li>WinCC OA 3.18 P006</li>



<li>Microsoft SQL Server 2022 Express
 
 
<ul class="wp-block-list">
<li>NOTE: Other versions of MS SQL may work with NGA, but it has not yet been verified by DMC.</li>
</ul>
</li>



<li>Microsoft SQL Server Management Studio 18</li>



<li>Windows 11</li>
</ul>



<p class="wp-block-paragraph">Assumptions:</p>



<ul class="wp-block-list">
<li>Proper licensing for NGA is configured.</li>



<li>The OS user has Windows administrator privileges.</li>
</ul>



<h2 id="h-3-wincc-oa" class="wp-block-heading">3. WinCC OA</h2>



<h3 id="h-3-1-project-setup" class="wp-block-heading">3.1 Project Setup</h3>



<ul class="wp-block-list">
<li>Create a new project with NGA configured
<ul class="wp-block-list">
<li>When creating a new project, proceed with the project setup as normal</li>



<li>Under the “General Settings” step, ensure that the <strong>Use NextGenArchiver</strong> option is selected</li>



<li>For this demo, I’m creating a project titled <strong>NGA_Demo</strong> located in the “C:/WinCC_OA_Proj” directory</li>
</ul>
</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img fetchpriority="high" decoding="async" width="572" height="344" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/new-project-next-gen-archiver.png" alt="" class="wp-image-41861" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/new-project-next-gen-archiver.png 572w, https://static.dmcinfo.com/wp-content/uploads/2024/01/new-project-next-gen-archiver-300x180.png 300w" sizes="(max-width: 572px) 100vw, 572px" /></figure>



<p class="wp-block-paragraph">If converting an existing project from HDB/RDB to NGA, then follow these steps in the “Converting existing project to NextGen Archiver Project” section: <a href="https://www.winccoa.com/documentation/WinCCOA/3.18/en_US/NGA/topics/nga_notes.html" target="_blank" rel="noreferrer noopener">NGA Notes and Restrictions</a></p>



<h3 id="h-3-2-nga-configuration" class="wp-block-heading">3.2 NGA Configuration</h3>



<p class="wp-block-paragraph">It’s time to fire up OA and open GEDI</p>



<ol class="wp-block-list">
<li>Create new back-end</li>
</ol>



<ul class="wp-block-list">
<li>Navigate to the “Database Engineering” window via “SysMgm/Database/Database Engineering”</li>



<li>Under the “Backend list”, click the <strong>+</strong> icon (<strong>Add new backend</strong>)</li>



<li>Name the Backend a user-friendly name
<ul class="wp-block-list">
<li>I used the title <strong>MSSQLEXPRESS</strong></li>



<li>NOTE: The Backend name does not need to match the server name, so use a name that makes most sense for your application</li>
</ul>
</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="459" height="291" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/nga-configuration-database-engineering.png" alt="NGA configuration database engineering" class="wp-image-41862" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/nga-configuration-database-engineering.png 459w, https://static.dmcinfo.com/wp-content/uploads/2024/01/nga-configuration-database-engineering-300x190.png 300w" sizes="(max-width: 459px) 100vw, 459px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="366" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering.png" alt="Database engineering" class="wp-image-41863" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering-300x176.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">2. Configure the MS SQL Backend “General Settings – Basic Configuration”</p>



<ul class="wp-block-list">
<li>Specify the following parameters</li>
</ul>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td><strong>Parameter</strong></td><td><strong>Value</strong></td></tr><tr><td>Name</td><td>&lt;User-friendly backend name&gt;</td></tr><tr><td>Profile</td><td>MSSQL_nonRedundant</td></tr><tr><td>Database Connection</td><td>&lt;host&gt;/&lt;SERVER NAME&gt;</td></tr><tr><td>Database Username</td><td>&lt;winccoaUsername from <strong>db.windows.config</strong>&gt;</td></tr></tbody></table></figure>



<ul class="wp-block-list">
<li>Notes:
<ul class="wp-block-list">
<li>The <strong>Profile </strong>option cannot be changed later</li>



<li>If using a redundant server, use the <strong>MSSQL</strong> option for <strong>Profile</strong></li>



<li>Don’t worry about specifying the Password, the field will clear upon initial configuration saving</li>
</ul>
</li>
</ul>



<ul class="wp-block-list">
<li>Click the <strong>Password</strong> field, enter the <strong>winccoaPassword</strong> from <strong>db.windows.config</strong>, and click <strong>OK</strong></li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="366" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering-backend.png" alt="Database Engineering Backend" class="wp-image-41864" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering-backend.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering-backend-300x176.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="285" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-password.png" alt="database password" class="wp-image-41865" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-password.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/database-password-300x137.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">3. Configure the MS SQL Backend &#8220;Extended Settings&#8221;</p>



<ul class="wp-block-list">
<li>Specify the following parameters</li>
</ul>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td><strong>Parameter</strong></td><td><strong>Value</strong></td></tr><tr><td>Database Control/ Execution File</td><td>NGAMSSQLServerBackend</td></tr><tr><td>Database specific configuration/db.database</td><td>&lt; dbName from <strong>db.windows.config</strong>&gt;</td></tr></tbody></table></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="366" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engeering-extended-settings.png" alt="database engineering extended settings" class="wp-image-41866" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engeering-extended-settings.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engeering-extended-settings-300x176.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">4. Finish MS SQL Backend setup</p>



<ul class="wp-block-list">
<li>Select the <strong>Active</strong> option</li>



<li>Click <strong>Save</strong></li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="366" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering-active.png" alt="database engineering active" class="wp-image-41867" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering-active.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/database-engineering-active-300x176.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<h3 id="h-3-3-archive-group-configuration" class="wp-block-heading">3.3 Archive Group Configuration</h3>



<p class="wp-block-paragraph">Now that the database connection has been established, we can set up Archive Groups</p>



<ol class="wp-block-list">
<li>Create new archive group
<ul class="wp-block-list">
<li>Navigate to the “Runtime Engineering” window via “SysMgm/Database/Runtime Engineering”</li>



<li>Under the “Archive Groups”, click the <strong>+</strong> icon (<strong>Add a new group</strong>)</li>



<li>Name the Archive Group
<ul class="wp-block-list">
<li>I used the title <strong>DEMO</strong></li>



<li>Ensure the <strong>Active</strong> option is selected</li>



<li>Configure the “Storage Settings” section as desired</li>



<li>Click <strong>Save</strong></li>
</ul>
</li>
</ul>
</li>
</ol>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="511" height="306" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-runtime-engineering.png" alt="database runtime engineering" class="wp-image-41868" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/database-runtime-engineering.png 511w, https://static.dmcinfo.com/wp-content/uploads/2024/01/database-runtime-engineering-300x180.png 300w" sizes="(max-width: 511px) 100vw, 511px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="366" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering-group-settings.png" alt="runtime engineering group settings" class="wp-image-41869" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering-group-settings.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering-group-settings-300x176.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="366" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering.png" alt="" class="wp-image-41870" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering-300x176.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="366" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering-sql-archive-group.png" alt="runtime engineering sql archive group" class="wp-image-41871" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering-sql-archive-group.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/runtime-engineering-sql-archive-group-300x176.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">2. Verify SQL Archive Group Creation</p>



<ul class="wp-block-list">
<li>Open Microsoft SQL Server Management Studio,</li>



<li>Right-click <strong>dbo.archive_groups</strong> and select the <strong>Select Top 1000 Rows</strong> option
<ul class="wp-block-list">
<li>The new archive group should be visible in the “Results” section</li>
</ul>
</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="362" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/microsoft-sql-server-management-studio-2.png" alt="Microsoft SQL server management studio" class="wp-image-41872" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/microsoft-sql-server-management-studio-2.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/microsoft-sql-server-management-studio-2-300x174.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<h3 id="h-3-4-dpe-archive-configuration" class="wp-block-heading">3.4 DPE Archive Configuration</h3>



<p class="wp-block-paragraph">Now that we’ve created an archive group, we can apply the archive group to a DPE so that its historical data can be logged and tracked.</p>



<ol class="wp-block-list">
<li>Insert_archive config
<ul class="wp-block-list">
<li>Within PARA, right-click the target DP or DPE and select the <strong>Insert config</strong> option</li>



<li>Select <strong>Archive settings</strong></li>



<li>Click <strong>OK</strong></li>
</ul>
</li>
</ol>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="426" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/datapoint-parameterization.png" alt="datapoint parameterization" class="wp-image-41873" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/datapoint-parameterization.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/datapoint-parameterization-300x205.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="301" height="402" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/archive-settings-config.png" alt="" class="wp-image-41874" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/archive-settings-config.png 301w, https://static.dmcinfo.com/wp-content/uploads/2024/01/archive-settings-config-225x300.png 225w" sizes="(max-width: 301px) 100vw, 301px" /></figure>



<p class="wp-block-paragraph">2. Select archive group</p>



<ul class="wp-block-list">
<li>Underneath the target DP/DPE, select the new <strong>_archive</strong> option</li>



<li>Select the desired archive group in the “Archive Group” drop-down</li>



<li>Ensure the <strong>Active</strong> option is selected</li>



<li>Click <strong>OK</strong></li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="426" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/datapoint-parameterization-active-demo.png" alt="datapoint parameterization active demo" class="wp-image-41875" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/datapoint-parameterization-active-demo.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/datapoint-parameterization-active-demo-300x205.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">3. Verify SQL Archive Group Application</p>



<ul class="wp-block-list">
<li>Open Microsoft SQL Server Management Studio</li>



<li>Right-click <strong>dbo.elements</strong> and select the <strong>Select Top 1000 Rows</strong> option
<ul class="wp-block-list">
<li>The newly-configured DPE(s) should be visible in the “Results” section</li>
</ul>
</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="370" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/verify-sql-archive-group-application.png" alt="Verify SQL archive group application" class="wp-image-41876" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/verify-sql-archive-group-application.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/verify-sql-archive-group-application-300x178.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<h3 id="h-3-5-data-retrieval" class="wp-block-heading">3.5 Data Retrieval</h3>



<p class="wp-block-paragraph">Now that DPEs have been configured with archiving capabilities, we can now retrieve DPEs’ historical data</p>



<ol class="wp-block-list">
<li>Verify SQL DPE Archiving
<ul class="wp-block-list">
<li>Open Micorosft SQL Server Management Studio</li>



<li>Right click <strong>dbo.event_&lt;segment_id&gt;_a</strong> and select <strong>Select Top 1000 Rows</strong>
<ul class="wp-block-list">
<li>The <strong>segment_id</strong> for each archive group can be found in the <strong>dbo.segments</strong> table</li>
</ul>
</li>



<li>If values have been changed since archiving was configured, entries should be visible in the “Results” section</li>
</ul>
</li>
</ol>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="336" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/verify-sql-dpe-archiving.png" alt="verifying sql dpe archiving" class="wp-image-41877" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/verify-sql-dpe-archiving.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/verify-sql-dpe-archiving-300x162.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">2. Retrieve historical data</p>



<ul class="wp-block-list">
<li>The WinCC OA functions <strong>dpGetPeriod()</strong> and <strong>dpQuery()</strong> can be used to retrieve historical data
<ul class="wp-block-list">
<li>The two examples below demonstrate a test panel running each of the two aforementioned functions and printing the results to the Log Viewer</li>



<li>The returned data should reflect that viewed in the Micorosft SQL Server Management Studio tables</li>
</ul>
</li>



<li>Be sure to understand your server’s backup and retention policy to determine what data and how much historical information can be accessed</li>
</ul>



<p class="wp-block-paragraph">NOTE: For help writing SQL queries, use the <strong>SQL Panel</strong> found in <strong>SysMgm/Reports/SQL-Query</strong></p>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="336" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/retrieve-historical-data.png" alt="retrieve historical data" class="wp-image-41878" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/retrieve-historical-data.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/retrieve-historical-data-300x162.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="271" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/test-panel.png" alt="test panel" class="wp-image-41879" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/test-panel.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/test-panel-300x130.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="366" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/log-viewer-nga-demo.png" alt="Log viewer NGA Demo" class="wp-image-41880" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/log-viewer-nga-demo.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/log-viewer-nga-demo-300x176.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<h2 id="h-3-further-reading-references" class="wp-block-heading"><u>3. Further Reading/References</u></h2>



<ul class="wp-block-list">
<li><a href="https://www.winccoa.com/documentation/WinCCOA/3.18/en_US/NGA/topics/nga_mssql_server_install.html" target="_blank">MS SQL® Server Installation guide</a></li>



<li><a href="https://www.winccoa.com/documentation/WinCCOA/3.18/en_US/WCCOA_Voraussetzungen/Voraussetzungen-03.html#Voraussetzungen-03__MSSQL" target="_blank">Software requirements</a></li>



<li><a href="https://learn.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access?view=sql-server-ver15#use-the-windows-firewall-with-advanced-security-snap-in" target="_blank">Configure the Windows Firewall to allow SQL Server access</a></li>
</ul>



<div class="wp-block-group alignwide has-custom-light-blue-background-color has-background is-layout-flow wp-container-core-group-is-layout-dbd34961 wp-block-group-is-layout-flow" style="border-radius:20px;margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50);padding-top:var(--wp--preset--spacing--50);padding-right:0;padding-bottom:var(--wp--preset--spacing--50);padding-left:0">
<div class="wp-block-columns alignwide are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-43efaee5 wp-block-columns-is-layout-flex" style="padding-right:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--60)">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:85%">
<h3 class="wp-block-heading has-text-align-left" id="h-have-an-upcoming-project-dmc-can-help-you-take-the-next-step"><strong>Connect WinCC OA NextGen Archiving to SQL Server</strong>.</h3>



<p class="has-text-align-left wp-block-paragraph" id="h-need-help-turning-ideas-into-outcomes-automation-project-to-the-next-level-contact-us-today-to-learn-more-about-our-solutions-and-how-we-can-help-you-achieve-your-goals">Explore our <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/" data-type="page" data-id="420">Automation</a> expertise in configuring WinCC OA NextGen Archiver for reliable historical data storage and retrieval with Microsoft SQL Server.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:15%">
<div class="wp-block-buttons is-horizontal is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-2236275c wp-block-buttons-is-layout-flex">
<div class="wp-block-button is-style-fill"><a class="wp-block-button__link has-base-contrast-color has-text-color has-link-color wp-element-button" href="https://static.dmcinfo.com/contact/">Contact Us</a></div>
</div>
</div>
</div>
</div>
<p>The post <a href="https://static.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/">How to Configure NextGen Archiving in WinCC OA to use a Microsoft SQL Server</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WinCC OA &#8211; How to Create a Microsoft SQL Server Install for NextGen Archiving</title>
		<link>https://static.dmcinfo.com/blog/16879/wincc-oa-how-to-create-a-microsoft-sql-server-install-for-nextgen-archiving/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Thu, 04 Jan 2024 11:44:14 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/16879/wincc-oa-how-to-create-a-microsoft-sql-server-install-for-nextgen-archiving/</guid>

					<description><![CDATA[<p>This two-part blog series is intended as a step-by-step overview of how to set up and utilize an MS SQL Server and WinCC OA&#8217;s NextGen Archive (NGA). Information on a general setup is available in the WinCC OA Documentation (see Further Reading/Links), but this walkthrough aims to be more detailed and explicit in the necessary [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/16879/wincc-oa-how-to-create-a-microsoft-sql-server-install-for-nextgen-archiving/">WinCC OA &#8211; How to Create a Microsoft SQL Server Install for NextGen Archiving</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This two-part blog series is intended as a step-by-step overview of how to set up and utilize an MS SQL Server and WinCC OA&#8217;s NextGen Archive (NGA). Information on a general setup is available in the WinCC OA Documentation (see Further Reading/Links), but this walkthrough aims to be more detailed and explicit in the necessary steps.&nbsp;</p>



<ol class="wp-block-list">
<li>How to Create a Microsoft SQL Server Install for NextGen Archiving</li>



<li><a href="https://static.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/">How to Configure NextGen Archiving in WinCC OA to use a Microsoft SQL Server</a></li>
</ol>



<p class="wp-block-paragraph"><u><a id="Table of Contents" name="Table of Contents"></a>Table of Contents:</u></p>



<ol class="wp-block-list wincc-oa-toc">
<li><a href="#h-1-notes-prerequisites" type="internal" id="#h-1-notes-prerequisites">Notes/Prerequisites</a></li>



<li><a href="#h-2-ms-sql-server-and-database" type="internal" id="#h-2-ms-sql-server-and-database">MS SQL Server and Database</a>
<ol class="wp-block-list">
<li><a href="#h-2-1-ms-sql-server-and-installation">2.1 MS SQL Server and Installation</a><span id="cke_bm_559C" style="display: none;">&nbsp;</span>
<ul class="wp-block-list">
<li>Basic Installation</li>



<li>Custom Installation</li>
</ul>
</li>



<li><a href="#h-2-2-ms-sql-server-configuration" type="internal" id="#h-2-2-ms-sql-server-configuration">2.2 MS SQL Server Configuration</a>
<ul class="wp-block-list">
<li>SQL Server Configuration Manager</li>



<li>Microsoft SQL Server Management Studio</li>
</ul>
</li>



<li><a href="#h-2-3-database-creation" type="internal" id="#h-2-3-database-creation">Database Creation</a></li>
</ol>
</li>



<li><a href="#h-3-further-reading-references" type="internal" id="#h-3-further-reading-references">Further Reading/References</a></li>
</ol>



<h2 id="h-1-notes-prerequisites" class="wp-block-heading"><u>1. Notes/Prerequisites</u></h2>



<p class="wp-block-paragraph">Required Programs:</p>



<ul class="wp-block-list">
<li><a href="https://www.microsoft.com/en-us/sql-server/sql-server-downloads" target="_blank" rel="noreferrer noopener">Microsoft SQL Serve</a>r (Installation instructions in part 2a)</li>



<li><a href="https://learn.microsoft.com/en-us/ssms/install/install?redirectedfrom=MSDN&amp;view=sql-server-ver16" target="_blank" rel="noreferrer noopener">Microsoft SQL Server Management Studio</a></li>



<li>Microsoft SQL Server Configuration Manager (installed alongside Microsoft SQL Server)</li>
</ul>



<p class="wp-block-paragraph">This demo was implemented using:</p>



<ul class="wp-block-list">
<li>WinCC OA 3.18 P006</li>



<li>Microsoft SQL Server 2022 Express
 
 
<ul class="wp-block-list">
<li>NOTE: Other versions of MS SQL may work with NGA, but it has not yet been verified by DMC.</li>
</ul>
</li>



<li>Microsoft SQL Server Management Studio 18</li>



<li>Windows 11</li>
</ul>



<p class="wp-block-paragraph">Assumptions:</p>



<ul class="wp-block-list">
<li>Proper licensing for NGA is configured</li>



<li>The OS user has Windows administrator privileges</li>
</ul>



<h2 id="h-2-ms-sql-server-and-database" class="wp-block-heading"><u>2. MS SQL Server and Database</u></h2>



<h3 id="h-2-1-ms-sql-server-and-installation" class="wp-block-heading">2.1 MS SQL Server and Installation</h3>



<p class="wp-block-paragraph"><em><a href="#Table of Contents">Back to Table of Contents</a></em></p>



<ol class="wp-block-list">
<li>Begin the SQL server installation
 
 
<ul class="wp-block-list">
<li>Download <u>Microsoft SQL Server</u> setup application from Microsoft&#8217;s <a href="https://www.microsoft.com/en-us/sql-server/sql-server-downloads" target="_blank">SQL Server Downloads</a> page</li>



<li>Run the application and proceed with the <strong>Basic</strong> or <strong>Custom</strong> installation.&nbsp;<span id="cke_bm_263E" style="display: none;">&nbsp;</span></li>
</ul>
</li>
</ol>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="495" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-2022-express-edition.png" alt="SQL Server 2022 Express Edition" class="wp-image-41721" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-2022-express-edition.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-2022-express-edition-300x238.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph"><strong>Basic Installation</strong></p>



<p class="wp-block-paragraph">If implementing the basic installation:</p>



<p class="wp-block-paragraph">2. On the installation confirmation screen, select the <strong>Customize</strong> option</p>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="495" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-2022-customize.png" alt="SQL Server 2022 Customize" class="wp-image-41722" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-2022-customize.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-2022-customize-300x238.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">3. Configure the &#8220;Installation Type&#8221; Window properties</p>



<ul class="wp-block-list">
<li>Select the <strong>Add features to an existing instance of SQL Server &lt;Year&gt; </strong>option</li>



<li>Select the server you wish to use for NGA connection</li>
</ul>



<p class="wp-block-paragraph">NOTE: If a specific server setup window is not specified, feel free to use the default options</p>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="548" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-express-installation-type.png" alt="SQL Express installation type" class="wp-image-41723" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-express-installation-type.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-express-installation-type-300x263.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">4. Configure the &#8220;Azure Extension for SQL Server&#8221; Window properties</p>



<ul class="wp-block-list">
<li>Un-check the <strong>Azure extension for SQL Server</strong> option</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="548" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/azure-extension-for-sql-server.png" alt="Azure extension for SQL server" class="wp-image-41724" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/azure-extension-for-sql-server.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/azure-extension-for-sql-server-300x263.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">5. Configure the &#8220;Feature Selection&#8221; Window properties</p>



<ul class="wp-block-list">
<li>Select the <strong>SQL Server Replication</strong> option
<ul class="wp-block-list">
<li>NOTE: Installing this option is the primary purpose of customizing the server</li>
</ul>
</li>



<li>Click <strong>Next</strong> to begin installation</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="548" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-feature-selection.png" alt="SQL Server feature selection" class="wp-image-41725" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-feature-selection.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-feature-selection-300x263.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">NOTE: If implementing the basic installation, a Mixed Authentication Mode will need to be specified for the server. This will be handled in the <strong><a href="#h-2-2-ms-sql-server-configuration">2.2 MS SQL Server Configuration</a></strong> section.</p>



<p class="wp-block-paragraph"><strong>Custom Installation</strong></p>



<p class="wp-block-paragraph">If implementing the custom installation, follow the steps outlined in the <a href="https://www.winccoa.com/documentation/WinCCOA/3.18/en_US/NGA/topics/nga_mssql_server_install.html" target="_blank">WinCC OA MS SQL® Server Installation</a> documentation.</p>



<h2 id="h-2-2-ms-sql-server-configuration" class="wp-block-heading">2.2 MS SQL Server Configuration</h2>



<p class="wp-block-paragraph"><em><a href="#Table of Contents">Back to Table of Contents</a></em></p>



<p class="wp-block-paragraph">Steps for configuring the SQL server will take place in both the <u>SQL Server Configuration Manager</u> and <u>Microsoft SQL Server Management Studio</u> programs (installed in <a href="#h-2-1-ms-sql-server-and-installation" type="internal" id="#h-2-1-ms-sql-server-and-installation">2.1 MS SQL Server Installation</a>)</p>



<p class="wp-block-paragraph"><u><strong>SQL Server Configuration Manager</strong></u></p>



<p class="wp-block-paragraph">Within the <strong>SQL Server Configuration Manager</strong>&#8230;</p>



<ol class="wp-block-list">
<li>Configure the Server’s TCP/IP Properties
 
 
<ul class="wp-block-list">
<li>Navigate to “SQL Server Network Configuration/Protocols for &lt;SERVER NAME&gt;”</li>



<li>Double-click the <strong>TCP/IP</strong> item in the “Protocol Name” column to open the “TCP/IP Properties” window</li>



<li>In the “Protocol” tab, toggle the <strong>Enabled</strong> option to <strong>Yes</strong></li>



<li>In the “IP Addresses” tab, specify <strong>1433</strong> for the <strong>IPAll/TCP Port</strong> option</li>



<li>Click <strong>OK</strong> to apply and close the window
<ul class="wp-block-list">
<li>NOTE: A warning will appear indicating that changes will be applied only after the server is restarted</li>
</ul>
</li>
</ul>
</li>
</ol>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="472" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-configuration-manager.png" alt="SQL Server configuration manager" class="wp-image-41726" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-configuration-manager.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-configuration-manager-300x227.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="412" height="473" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/tcp-ip-properties-enabled.png" alt="Enabled TCP/IP Properties " class="wp-image-41727" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/tcp-ip-properties-enabled.png 412w, https://static.dmcinfo.com/wp-content/uploads/2024/01/tcp-ip-properties-enabled-261x300.png 261w" sizes="(max-width: 412px) 100vw, 412px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="412" height="473" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/tcp-ip-properties-tcp-port.png" alt="TCP Port" class="wp-image-41728" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/tcp-ip-properties-tcp-port.png 412w, https://static.dmcinfo.com/wp-content/uploads/2024/01/tcp-ip-properties-tcp-port-261x300.png 261w" sizes="(max-width: 412px) 100vw, 412px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="407" height="152" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/warning-sign.png" alt="" class="wp-image-41729" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/warning-sign.png 407w, https://static.dmcinfo.com/wp-content/uploads/2024/01/warning-sign-300x112.png 300w" sizes="(max-width: 407px) 100vw, 407px" /></figure>



<p class="wp-block-paragraph">2. Restart the SQL Server</p>



<ul class="wp-block-list">
<li>Navigate to “SQL Server<span id="cke_bm_614C" style="display: none;">&nbsp;</span> Services”</li>



<li>Right-click the “SQL Server (&lt;SERVER NAME&gt;)” row and click <strong>Restart</strong></li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="472" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-services-configuration-manager.png" alt="SQL Server configuration manager" class="wp-image-41730" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-services-configuration-manager.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-services-configuration-manager-300x227.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<h3 id="h-microsoft-sql-server-management-studio" class="wp-block-heading">Microsoft SQL Server Management Studio</h3>



<p class="wp-block-paragraph">Within <u>Microsoft SQL Server Management Studio</u>…</p>



<ol class="wp-block-list">
<li>Connect to the SQL Server</li>
</ol>



<ul class="wp-block-list">
<li>Click the “Connect Object Explorer” icon within the “Object Explorer”</li>



<li>Specify the following parameters in the “Connect to Server” window and click <strong>Connect</strong></li>
</ul>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td class="has-text-align-center" data-align="center"><strong>Parameter</strong></td><td class="has-text-align-center" data-align="center"><strong>Value</strong></td></tr><tr><td class="has-text-align-center" data-align="center">Server Type</td><td class="has-text-align-center" data-align="center">Database Engine</td></tr><tr><td class="has-text-align-center" data-align="center">Server Name</td><td class="has-text-align-center" data-align="center">&lt;host&gt;/&lt;SERVER NAME&gt;</td></tr><tr><td class="has-text-align-center" data-align="center">Authentication</td><td class="has-text-align-center" data-align="center">Windows Authentication</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">NOTE: If the &#8220;Custom&#8221; SQL Server installation was implemented, then a connection can be made using the &#8220;SQL Server Authentication&#8221; method and the specified credentials</p>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="465" height="234" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/Microsoft-sql-server-management-studio.png" alt="Microsoft SQL server management studio" class="wp-image-41733" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/Microsoft-sql-server-management-studio.png 465w, https://static.dmcinfo.com/wp-content/uploads/2024/01/Microsoft-sql-server-management-studio-300x151.png 300w" sizes="(max-width: 465px) 100vw, 465px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="477" height="315" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-connect-to-server.png" alt="SQL Server connection to server" class="wp-image-41734" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-connect-to-server.png 477w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-connect-to-server-300x198.png 300w" sizes="(max-width: 477px) 100vw, 477px" /></figure>



<p class="wp-block-paragraph">2. Enable dual authentication mode</p>



<ol class="wp-block-list">
<li>Right-click the server name in the “Object Explorer” and select <strong>Properties</strong></li>



<li>Navigate to the “Security” page in the “Select a Page” menu</li>



<li>Under the “Server Authentication” section, select <strong>SQL Server and Windows Authentication Mode</strong> option</li>



<li>Click <strong>OK</strong> to apply changes</li>



<li>NOTE: A warning will appear indicating that changes will be applied only after the server is restarted</li>



<li>Restart the SQL Server via the SQL Server Configuration Manager using the steps outlined in Step 2 of the <strong>SQL Server Configuration Manager</strong> instructions</li>
</ol>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="455" height="487" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-object-explore.png" alt="SQL Server object explore" class="wp-image-41735" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-object-explore.png 455w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-object-explore-280x300.png 280w" sizes="(max-width: 455px) 100vw, 455px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="590" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-properties-sql-express.png" alt="SQL Server properties SQL express" class="wp-image-41736" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-properties-sql-express.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-server-properties-sql-express-300x284.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="607" height="131" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/microsoft-sql-server-management-studio-1.png" alt="Microsoft SQL Server management studio" class="wp-image-41737" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/microsoft-sql-server-management-studio-1.png 607w, https://static.dmcinfo.com/wp-content/uploads/2024/01/microsoft-sql-server-management-studio-1-300x65.png 300w" sizes="(max-width: 607px) 100vw, 607px" /></figure>



<p class="wp-block-paragraph">3. Configure the System Administrator Credentials</p>



<ul class="wp-block-list">
<li>Under the “Object Explorer”, navigate to “&lt;Database Name&gt;/Security/Logins”</li>



<li>Right-click the sa (System Administrator) option and select the Properties option</li>



<li>Under the “General” page of the Login Properties window, specify a password in the<strong> Password:</strong> and <strong>Confirm password: </strong>fields
<ul class="wp-block-list">
<li>For this demonstration, I’ll use the password <strong>$martPeople3xpertSolutions</strong></li>
</ul>
</li>



<li>Optional: Toggle the other general properties as needed or deemed necessary by your security need</li>



<li>Click <strong>OK</strong> to apply changes</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="456" height="555" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer.png" alt="Object Explorer" class="wp-image-41738" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer.png 456w, https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-246x300.png 246w" sizes="(max-width: 456px) 100vw, 456px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="590" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-sa.png" alt="login properties - sa" class="wp-image-41847" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-sa.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-sa-300x284.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">4. If a red “X” appears next to the sa user in the “Object Explorer” <img decoding="async" width="42" height="21" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAVCAYAAAAw73wjAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUATWljcm9zb2Z0IE9mZmljZX/tNXEAAAbgSURBVEhL1VZrbFTVFv7Oc86cmc60hVIrpSItIk/FB4UBG0ExokS0JqBYjcFHNOZeja9EfxgSjf4ymqjxXkPUBKNJfTRB0bZpYoBSo6ilQg20WKqUsS2t7UzbeZ6Ha+3ptFNa6b3+cyUn65x99j7n22t961tbjcViLv4BpjLGb/r7oUSjgCRNgTz1afLVrDuTZKipGBJtjWjuGcWaIgXfDzq4Zo6MH8hfVSijdcjBlQUy2sivIn+c/LJ8CW2DFrasXITY4iq4dhpWMIhQUREEUHloCEYyCVVVCeskPNd1oSiKuNj42bKsWeOvqBqiw8P4oK4Zv/nX4kzYgzNjNn41ZZyJOThN/iz5LvJh8qfI95Lv8Ono7DkN5/cWVJevRzpNQFMp8b8MUFmGruvw+XwCLANicxwHhw4dQldXl7gvop1t3LgRgUBgYs5MqGUC6nPHsGmRH/+VQ/hR8sLjc3DUATQ/0EafZz+Q41V67nENLLkkgKrSI8ijSNoE0skPTgLlO46kpmkwTVOAtW0bjY2NaGhoQD9Rg8H7/X4BuLq6Gvn5+eJ+JlM1HcOJCJq7o4gspGzoGiyX5tKtiA8l7XyfpGFb1dE9YKM1HMc1BflIJpJwCDCFNhPRXMuC5RS3tLQgHA7DMAwxZWxsDAcPHhRAg/SBv6KBQhtW4ibWlzrYr5hISz4okj0rZeIwsdTUUFnqiuzqtGGXMzwTUMEHesl0GB0dFTxhWmSpEIlExDjzlufMaJQd25VQf7wXA1epsGQdkjs7UEs1cGY4jZaOcwjRN7L/TWQ5OiPPCERhYaEAwzRgarAvLi6G1+sVS3ILb1pmdAWr5xuo5fVM+TgBFdSnvHtog7zHJI0J9tCYRhdRw2sqWFri4RExnLVpqc++YIA7duzAMFXvsWPHBMgFCxagpqYGZWVls6Yxbbk4eY6YONehQtJx+03zcMccCW7CQn1LHz6M6qi+cT6qi0lJUhZ+bBvCq50uYklShcH0tO9PA8q849SzrVu3TnDlxIkTgo8McMOGDRMfYVpk554fYZWis7CAilJTUFoewNNlEj79JQXTsXGOcLi2g76BOFpGJFxc4sVd1wdx4GwMA5qM+UHtwkCzqdy7dy/6+vqECoRCIWzfvl0sPNXZiTfefBMr11QiSFVfUXIR8vLykN0/by+bLUoAzkZIcxdI8AQMLMtL4632frzfTi/yaKZm43C/hZuv8KKEngsLPFjnjeOTlIPekelaPSWiDJRTXl9fj9bWVng8Hhw5cgS7d+8W3Hxnzx7ERqJYNRCGTEClR58AfzK+vw5OnGp2yzbolAE2hTg4z69CJQkLnxzCUz4PqqpKsWZ1Al989we+9wXw5OYgVvQkcDqeRs+wgxhJoE5cnevLNJhcm5GjnG7WSa667u5u1NXVCZE/3t6ORx7YhasbP4O1vxZ28TyMeQwkXnoeUvli6BtvmgDqUOFEiG9U7hgNR/CfTgsfrS3BB5vy8XAsjiEtgPvUESx/7xyilcXYf4dBEibBosqL8rr/BWhuQTHYpqYmUeHMyQPNh1FUsQKLfukEXnlBFLJUOAfGPbuo21B7GTfuxKZKP2b1WFmEl5crSMv0DSuB490W/ggm0b86iLceM6AVGVikWyDVpExI8LIC/D9As3OTdA5g4+50oLkZK55+BpdWLAGav6M2R42n5lro23aAcE0Yd+G00CVeR52ILtly8FNHFO92pNAbGMYLpAI3BFzETw3hYzqs/ByXwJngqP4toMxbBimRyF+/4TosbWmC+3UD5PL5lC4F1uGvEX/9ZSiPPAHNa078w6HSYo4OnRzEv38aLxCKGLxEYOrj+776HftESmiMddUMYCHdjh81Zucodx7Wz6yw8wru6wrR4OorV6Gidg9c4qb23IuQyMeJo8l9tfDUPDgBlP/tyYaYJAesV7kmuHH+GAWDhvXc1IyvmVJMHDUGtHXrVlRWVk7RSH4nU0QrLlsC5aHHqYm40G65HQofDXUP3BQdE81MxWdpEkmSmIMOFUY+kGCOcCSpUHJ9mo9UNM7eCGLQMhHjORfiaPZ4t3PnzmkTcwcsVGbAcHPgDdyyTTznxsemXF6u9mJn5DV89q2N25aa+PzEKG5d4seXHaPYcpkfDZ1j2FxhoulUDJvKTRzosvBw2WmYcqYmck1ENF1QAIsiaZMkKXQqYgGf3hsml02kYbyDzaRxqXmXoL/qcby92kbo6AjupQrfe9TAPVcE8FGbgbvI1x6L4s7leahrH8G2ZX58QRvZXF6Jd/sXzww0NHfu5AsSbqb97Of4CwYdAXr9/KP/EpN2rc3M3ZVJBO4ff75v3NeEMuN3r8/4Z+mKE45c+xN9LrbJ1peWJAAAAABJRU5ErkJggg==" alt="Graphical user interface

Description automatically generated">, then enable sa (System Administrator) login</p>



<ul class="wp-block-list">
<li>Within the “Login Properties” window from step 3, navigate to the “Status” page</li>



<li>Under the <strong>Settings/Login</strong>: option, select <strong>Enabled</strong></li>



<li>Click <strong>OK</strong> to apply changes</li>
</ul>



<p class="wp-block-paragraph">NOTE: You may need to refresh the Object Explorer to see the red “X” disappear</p>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="590" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-status-enabled.png" alt="login properties status enabled" class="wp-image-41848" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-status-enabled.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-status-enabled-300x284.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="464" height="85" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-refresh.png" alt="Object explorer refresh" class="wp-image-41849" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-refresh.png 464w, https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-refresh-300x55.png 300w" sizes="(max-width: 464px) 100vw, 464px" /></figure>



<p class="wp-block-paragraph">5. Optional: Create a WinCC OA user account<br>NOTE: This step can be done now, or the user can be automatically created upon database generation (recommended)</p>



<ul class="wp-block-list">
<li>Under the “Object Explorer”, navigate to “&lt;Database Name&gt;/Security/Logins”</li>



<li>Right-click the “Logins” folder or any of its elements and select the <strong>New Login</strong>… option</li>



<li>Within the “General” page
 
 
<ul class="wp-block-list">
<li>Click the <strong>SQL Server authentication</strong> radio button</li>



<li>Specify the user’s name in the <strong>Login name</strong>: field
  
  
<ol class="wp-block-list">
<li>For this demonstration, I’ll use the username <strong>winccoa</strong></li>
</ol>
</li>



<li>Specify the user’s password in the <strong>Password</strong>: and <strong>Confirm password</strong>: fields
  
  
<ol class="wp-block-list">
<li>For this demonstration, I’ll use the password <strong>$martPeople3xpertSolutions</strong></li>
</ol>
</li>
</ul>
</li>



<li>Within the “Server Roles” page
 
 
<ul class="wp-block-list">
<li>Check the <strong>public</strong> server role</li>



<li>Click <strong>OK</strong> to apply changes</li>
</ul>
</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="459" height="472" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-new-login.png" alt="object explorer new login" class="wp-image-41850" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-new-login.png 459w, https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-new-login-292x300.png 292w" sizes="(max-width: 459px) 100vw, 459px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="590" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/login-new.png" alt="login new" class="wp-image-41851" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/login-new.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/login-new-300x284.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="597" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-winccoa.png" alt="login properties winccoa" class="wp-image-41852" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-winccoa.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/login-properties-winccoa-300x287.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="faq-question-sub-header wp-block-paragraph"></p>



<h2 id="h-2-3-database-creation" class="wp-block-heading">2.3 Database Creation</h2>



<p class="wp-block-paragraph">The database used for NGA will be auto-generated using files that can be found in OA’s base project</p>



<ol class="wp-block-list">
<li>Locate and copy the required database generation files</li>
</ol>



<ul class="wp-block-list">
<li>Navigate to the “&lt;winccoa&gt;/data/NGA/MSSQLServer/sql folder” within Windows Explorer
 
 
<ul class="wp-block-list">
<li>Where &lt;winccoa&gt; is the base WinCC OA project</li>



<li>The default install location of the base project is typically “C:\Siemens\Automation\WinCC_OA\3.18”</li>



<li>Therefore, the path I’m using is “C:\Siemens\Automation\WinCC_OA\3.18\data\NGA\MSSQLServer\sql”</li>
</ul>
</li>



<li>Copy the relevant files
 
 
<ul class="wp-block-list">
<li><strong>schema.sql</strong></li>



<li><strong>db.windows.config</strong></li>



<li><strong>create_database_windows.bat</strong></li>
</ul>
</li>



<li>If your NGA project already exists, copy the relevant files into the same directory in your project
 
 
<ul class="wp-block-list">
<li>You may need to manually create the relevant folders for “&lt;project&gt;/data/NGA/MSSQLServer/sql”</li>



<li>It should be noted that the files can be copied anywhere, but it’s organizationally preferable to use the location specified above</li>



<li>If you haven’t created a project yet, copy the files into a temporary location and move said files into your project upon project creation (outlined in the <strong>2a. Project Setup instructions</strong>)</li>
</ul>
</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="227" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql.png" alt="SQL" class="wp-image-41853" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-300x109.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="245" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/winccoa-sql.png" alt="WinCC OA SQL" class="wp-image-41854" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/winccoa-sql.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/winccoa-sql-300x118.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">2. Modify the config file parameters<br>NOTE: The <strong>db.windows.config</strong> file will be used to specify the parameters needed to auto-generate the appropriate database</p>



<ul class="wp-block-list">
<li>Open the <strong>db.windows.config</strong> file and with your favorite text-editing tool like <u>Notepad</u> or <u>Notepad++</u></li>



<li>Modify the parameters as needed.</li>
</ul>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td class="has-text-align-left" data-align="left"><strong>Parameter</strong></td><td><strong>Modify?</strong></td><td class="has-text-align-left" data-align="left"><strong>Description/Notes</strong></td></tr><tr><td class="has-text-align-left" data-align="left">dbServer</td><td>YES</td><td class="has-text-align-left" data-align="left">This should match the name of the server as specified in the MSSMS’s “Connect to Server” window and the Object Explorer.</td></tr><tr><td class="has-text-align-left" data-align="left">Port</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">The default MS SQL server port is 1433. If you specified a different port during the MS SQL Server Configuration (step 1d), then use that value here</td></tr><tr><td class="has-text-align-left" data-align="left">adminUsername</td><td></td><td class="has-text-align-left" data-align="left">If using the “sa” user as the system administrator, this field should not change</td></tr><tr><td class="has-text-align-left" data-align="left">adminPassword</td><td>YES</td><td class="has-text-align-left" data-align="left">Modify this field using the System Administrator password specified during the MS SQL Server Configuration (step 3c)</td></tr><tr><td class="has-text-align-left" data-align="left">winccoaLogin</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">If desired, modify the winccoa login/username. If already configured, then specify the name here. If not yet configured, then a user will be auto-generated.</td></tr><tr><td class="has-text-align-left" data-align="left">winccoaUsername</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">If desired, modify the winccoa password. If already configured, then specify the password here. If not yet configured, then a user will be auto-generated.<br>&nbsp;<br>For security purposes, it’s advised to encrypt all active passwords and avoid storing them in plain-text formatting. After database creation, it’s recommended to delete is entry from the config file or change the database’s winccoa user password.</td></tr><tr><td class="has-text-align-left" data-align="left">dbName</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">This will be the name of the to-be-generated database. You can use the default name or specify something a bit more descriptive.</td></tr><tr><td class="has-text-align-left" data-align="left"></td><td></td><td class="has-text-align-left" data-align="left"></td></tr><tr><td class="has-text-align-left" data-align="left">sqlscriptpath</td><td>YES</td><td class="has-text-align-left" data-align="left">This will be the file path of the schema.sql file duplicated in steps 1b and 1c. If the file was not duplicated, you may reference the corresponding file in the base OA project (i.e. &lt;winccoa&gt;/data/NGA/MSSQLServer/sql/schema.sql)</td></tr><tr><td class="has-text-align-left" data-align="left">numberType</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">Can be left as default. Change if desired.</td></tr><tr><td class="has-text-align-left" data-align="left">dbInitSize</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">Can be left as default. Change if desired.</td></tr><tr><td class="has-text-align-left" data-align="left">dbFileGrowth</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">Can be left as default. Change if desired.</td></tr><tr><td class="has-text-align-left" data-align="left">logInitSize</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">Can be left as default. Change if desired.</td></tr><tr><td class="has-text-align-left" data-align="left">logFileGrowth</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">Can be left as default. Change if desired.</td></tr><tr><td class="has-text-align-left" data-align="left">logMaxSize</td><td>MAYBE</td><td class="has-text-align-left" data-align="left">Can be left as default. Change if desired.</td></tr><tr><td class="has-text-align-left" data-align="left"></td><td></td><td class="has-text-align-left" data-align="left"></td></tr><tr><td class="has-text-align-left" data-align="left">dbPath</td><td>YES</td><td class="has-text-align-left" data-align="left">This will be the physical location that the database is stored. The folder location specified must be created if it is not so already. You may opt to use the standard SQL database storage location or locate it in a more accessible location.</td></tr><tr><td class="has-text-align-left" data-align="left">dbBackupPath</td><td>YES</td><td class="has-text-align-left" data-align="left">This will be the physical location that the database backup is stored. The folder location specified must be created if it is not so already. You may opt to use the standard SQL database storage location or locate it in a more accessible location.<br>&nbsp;<br>It should be noted that, according to the db.windows.config file comments, “The backup folder must be accessible for users under which the WinCC OA is running.”</td></tr></tbody></table></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="161" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-database.png" alt="SQL Database" class="wp-image-41855" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-database.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/sql-database-300x77.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">3. Generate the SQL database</p>



<ul class="wp-block-list">
<li>Run the <u>Windows Command Prompt</u> as administrator
<ul class="wp-block-list">
<li>In the Windows search bar, search “Cmd”</li>



<li>Right-click the Command Prompt application and select “Run as administrator”</li>
</ul>
</li>



<li>Navigate to the location of the <strong>create_database_windows.bat</strong> file (in the “&lt;project&gt;/data/NGA/MSSQLServer/sql” folder)
 
 
<ul class="wp-block-list">
<li>Use <strong>cd &lt;folder&gt;</strong> in the command prompt to navigate to the appropriate directory</li>
</ul>
</li>



<li>Run the <strong>create_database_windows.bat</strong> file
 
 
<ul class="wp-block-list">
<li>Run the <strong>create_database_windows</strong> prompt to generate the appropriate database</li>
</ul>
</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="584" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/command-prompt.png" alt="command prompt" class="wp-image-41858" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/command-prompt.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/command-prompt-300x281.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="326" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/administrator-command-prompt.png" alt="Administrator Command Prompt" class="wp-image-41859" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/administrator-command-prompt.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/administrator-command-prompt-300x157.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="624" height="394" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/administrator-command-prompt2.png" alt="Administrator  Command Prompt 2" class="wp-image-41885" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/administrator-command-prompt2.png 624w, https://static.dmcinfo.com/wp-content/uploads/2024/01/administrator-command-prompt2-300x189.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">4. Verify that the appropriate database and users were created </p>



<ul class="wp-block-list">
<li>Within <u>Microsoft SQL Server Management Studio</u>, you should see:

 
 
<ul class="wp-block-list">
<li>The newly created database</li>



<li>The generated server-level <strong>winccoa</strong> user (if it did not already exist)</li>



<li>The generated/mapped database-level <strong>winccoa</strong> user</li>
</ul>
</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="405" height="864" src="https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-nga-demo-winccoa.png" alt="object explorer nga demo winccoa" class="wp-image-41860" srcset="https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-nga-demo-winccoa.png 405w, https://static.dmcinfo.com/wp-content/uploads/2024/01/object-explorer-nga-demo-winccoa-141x300.png 141w" sizes="(max-width: 405px) 100vw, 405px" /></figure>



<h2 id="h-explore-part-2-for-more-information" class="wp-block-heading">Explore part 2 for more information:</h2>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/" type="link" id="https://static.dmcinfo.com/blog/16847/how-to-configure-nextgen-archiving-in-wincc-oa-to-use-a-microsoft-sql-server/" target="_blank" rel="noreferrer noopener">How to Configure NextGen Archiving in WinCC OA to use a Microsoft SQL Server</a></li>
</ul>



<div class="wp-block-group alignwide has-custom-light-blue-background-color has-background is-layout-flow wp-container-core-group-is-layout-dbd34961 wp-block-group-is-layout-flow" style="border-radius:20px;margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50);padding-top:var(--wp--preset--spacing--50);padding-right:0;padding-bottom:var(--wp--preset--spacing--50);padding-left:0">
<div class="wp-block-columns alignwide are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-43efaee5 wp-block-columns-is-layout-flex" style="padding-right:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--60)">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:85%">
<h3 class="wp-block-heading has-text-align-left" id="h-have-an-upcoming-project-dmc-can-help-you-take-the-next-step"><strong>Prepare SQL Server for WinCC OA NextGen Archiving</strong>.</h3>



<p class="has-text-align-left wp-block-paragraph" id="h-need-help-turning-ideas-into-outcomes-automation-project-to-the-next-level-contact-us-today-to-learn-more-about-our-solutions-and-how-we-can-help-you-achieve-your-goals">Discover our <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/" data-type="page" data-id="420">Automation</a> expertise in configuring Microsoft SQL Server for reliable <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/wincc-7-programming/" data-type="page" data-id="518">WinCC</a> OA NextGen Archive data storage.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:15%">
<div class="wp-block-buttons is-horizontal is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-2236275c wp-block-buttons-is-layout-flex">
<div class="wp-block-button is-style-fill"><a class="wp-block-button__link has-base-contrast-color has-text-color has-link-color wp-element-button" href="https://static.dmcinfo.com/contact/">Contact Us</a></div>
</div>
</div>
</div>
</div>
<p>The post <a href="https://static.dmcinfo.com/blog/16879/wincc-oa-how-to-create-a-microsoft-sql-server-install-for-nextgen-archiving/">WinCC OA &#8211; How to Create a Microsoft SQL Server Install for NextGen Archiving</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DMC San Diego Takes to the Skies</title>
		<link>https://static.dmcinfo.com/blog/18126/dmc-san-diego-takes-to-the-skies/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Mon, 07 Nov 2022 16:12:33 +0000</pubDate>
				<category><![CDATA[Activities]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[San Diego]]></category>
		<category><![CDATA[activity fund event]]></category>
		<category><![CDATA[DMC San Diego]]></category>
		<category><![CDATA[new office]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/18126/dmc-san-diego-takes-to-the-skies/</guid>

					<description><![CDATA[<p>San Diego &#8212; home to beautiful beaches, sunny skies, and one of DMC&#8217;s newest offices. Over the past few months, those of us in &#8220;America&#8217;s Finest City&#8221; have taken the time to explore all the amazing opportunities that San Diego and its surroundings have to offer &#8211; from taking on surf and summit to dancing [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/18126/dmc-san-diego-takes-to-the-skies/">DMC San Diego Takes to the Skies</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">San Diego &mdash; home to beautiful beaches, sunny skies, and one of <a href="https://static.dmcinfo.com/latest-thinking/blog/id/10256/dmc-to-open-five-new-offices-in-2022">DMC&rsquo;s newest offices</a>. Over the past few months, those of us in &ldquo;America&rsquo;s Finest City&rdquo; have taken the time to explore all the amazing opportunities that San Diego and its surroundings have to offer &ndash; from <a href="https://static.dmcinfo.com/latest-thinking/blog/id/10331/dmc-san-diego-takes-on-surf-and-summit">taking on surf and summit</a> to dancing the night away (blog coming soon). Recently, DMC San Diego reached new heights by taking a leap of faith.</p>

<p class="wp-block-paragraph" style="text-align: center;"><img decoding="async" alt="Pre-flight sandwich lunch from Green Bowl Cafe in La Jolla" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/1_pre_flight_lunch.jpeg"  /></p>

<p class="wp-block-paragraph" style="text-align: center;"><em>The group had a pre-flight sandwich lunch from Green Bowl Cafe in La Jolla.</em></p>

<p class="wp-block-paragraph">Perched upon the cliffs overlooking Blacks Beach rests the <a href="https://www.flytorrey.com/">Torrey Pines Gliderport</a>: &ldquo;the most historic aviation site in North America and Southern California&rsquo;s premiere location for paragliding, hang gliding, remote control models and sailplanes.&rdquo; It was here that, on one sunny Saturday afternoon, DMC San Diego took to the skies.</p>

<p class="wp-block-paragraph">After checking in with our friend Rae &ndash; who works at the gliderport &ndash; we met our instructor pilots on a grassy field with their paragliders. Before long, we were airborne. With the beach below and the cliffs and ocean on either side, we soared, dipped, and glided through the air.</p>

<p class="wp-block-paragraph" style="text-align: center;"><img decoding="async" alt="Nicoli checking in with Rae" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/2_Nicoli_checking_in_with_Rae.jpeg"  /></p>

<p class="wp-block-paragraph" style="text-align: center;"><em>Nicoli checking in with Rae</em></p>

<p class="wp-block-paragraph" style="text-align: center;"><img decoding="async" alt="Nicoli and his instructor pilot preparing for flight" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/3_Nicoli_and_instructor_pilot_preparing_for_flight.jpg"  /></p>

<p class="wp-block-paragraph" style="text-align: center;"><em>Nicoli and his instructor pilot preparing for flight</em></p>

<p class="wp-block-paragraph" style="text-align: center;"><img decoding="async" alt="Nicoli just hanging out" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/4_Nicoli_hanging_out.jpg"  /></p>

<p class="wp-block-paragraph" style="text-align: center;"><em>Nicoli just hanging out</em></p>

<p class="wp-block-paragraph" style="text-align: center;"><img decoding="async" alt="Nick pretending to be a bird" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/5_Nick_being_a_bird.jpg"  /></p>

<p class="wp-block-paragraph" style="text-align: center;"><em>Nick pretending to be a bird</em></p>

<p class="wp-block-paragraph" style="text-align: center;"><img decoding="async" alt="Nick and Nicoli’s post-flight smiles" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/6_post_flight_smiles.jpg"  /></p>

<p class="wp-block-paragraph" style="text-align: center;"><em>Nick and Nicoli&rsquo;s post-flight smiles</em></p>

<p class="wp-block-paragraph" style="text-align: center;"><img decoding="async" alt="Nick and Rae with dog" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/7_Nick_and_Rae_with_dog.jpeg"  /></p>

<p class="wp-block-paragraph" style="text-align: center;"><i>Good news! Nick and Rae found a dog. </i></p>

<p class="wp-block-paragraph"><strong>Learn more about DMC&apos;s corporate&nbsp;<a href="https://static.dmcinfo.com/latest-thinking/blog/articletype/categoryview/categoryid/13/culture">culture</a>&nbsp;and explore our&nbsp;<a href="https://static.dmcinfo.com/careers#openpositions">open positions</a>!</strong></p>
<p>The post <a href="https://static.dmcinfo.com/blog/18126/dmc-san-diego-takes-to-the-skies/">DMC San Diego Takes to the Skies</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DMC San Diego Takes on Surf and Summit</title>
		<link>https://static.dmcinfo.com/blog/18497/dmc-san-diego-takes-on-surf-and-summit/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Tue, 17 May 2022 18:31:45 +0000</pubDate>
				<category><![CDATA[Activities]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[San Diego]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/18497/dmc-san-diego-takes-on-surf-and-summit/</guid>

					<description><![CDATA[<p>In case you weren&#8217;t aware, DMC is expanding to 5 new locations in 2022! Among the list of new DMCities is San Diego, also known as &#8220;America&#8217;s Finest City.&#8221; With the ocean and mountains dominating the area around San Diego, it only made sense that those of us in &#8220;DMC&#8217;s Finest Office&#8221; should take advantage [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/18497/dmc-san-diego-takes-on-surf-and-summit/">DMC San Diego Takes on Surf and Summit</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">In case you weren&rsquo;t aware, DMC is <a href="https://static.dmcinfo.com/latest-thinking/blog/id/10256/dmc-to-open-five-new-offices-in-2022">expanding to 5 new locations in 2022</a>! Among the list of new DMCities is <a href="https://static.dmcinfo.com/contact/dmc-san-diego">San Diego</a>, also known as &ldquo;America&rsquo;s Finest City.&rdquo;</p>

<p class="wp-block-paragraph">With the ocean and mountains dominating the area around San Diego, it only made sense that those of us in &ldquo;DMC&rsquo;s Finest Office&rdquo; should take advantage of these two amazing natural features. That&rsquo;s just what we did; one beautiful April weekend, we took on both surf and summit.</p>

<h2 class="wp-block-heading">Saturday &#8211; Surf</h2>

<p class="wp-block-paragraph">The California coast boasts some of the most epic surf spots in the world, and we aimed to take advantage of them. With dreams of hanging ten and crushing barrels dancing in our heads, we took to the beach, donned some tight wet suits, and grabbed our boards.</p>

<figure class="wp-block-image"><img decoding="async" alt="A group of surfers walk across the water" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/DMC-san-diego-goes-surfing_1.jpg" /></figure>

<p class="wp-block-paragraph"><em>Squad goals &#8211; Pictured from left to right: <a href="https://static.dmcinfo.com/about/employee-bios/nikhil-holay">Nikhil</a>&nbsp;(San Diego), <a href="https://static.dmcinfo.com/about/employee-bios/nick-leisle">Nick</a> (San Diego), <a href="https://static.dmcinfo.com/about/employee-bios/nicoli-liedtke">Nicoli</a> (San Diego), <a href="https://static.dmcinfo.com/about/employee-bios/eli-whitmire">Eli</a> (Dallas), and Greg (our instructor)</em></p>

<p class="wp-block-paragraph">Although we lacked&nbsp;prior surfing experience, Greg from <a href="https://www.pacificsurf.com/">Pacific Surf</a> had us covered. A quick land-based surf lesson featured the basics of paddling, standing up on the board, and walking through shallow water in a manner known as the sting ray shuffle.</p>

<p class="wp-block-paragraph">Once we were deemed prepared and worthy, we hit the waves. In no time, Greg had us up on our feet and surfing like pros (correction: surfing like beginners).</p>

<figure class="wp-block-image"><img decoding="async" alt="DMC Surfing " src="https://static.dmcinfo.com/wp-content/uploads/2025/05/DMC-san-diego-goes-surfing-2.jpg" /></figure>

<p class="wp-block-paragraph" style="color: rgb(170, 170, 170); font-style: italic;"><em>Hanging ten and high fiving &#8211; Pictured from left to right: <a href="https://static.dmcinfo.com/about/employee-bios/nick-leisle">Nick</a>&nbsp;(San Diego) and <a href="https://static.dmcinfo.com/about/employee-bios/nikhil-holay">Nikhil</a> (San Diego)</em></p>

<h2 class="wp-block-heading">Sunday &#8211;&nbsp;Summit</h2>

<figure class="wp-block-image"><img decoding="async" alt="dmc san diego at san jacinto" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/dmc-san-diego-at-san-jacinto.jpg"  /></figure>

<p class="wp-block-paragraph">In addition to beautiful beaches and stellar surf, Southern California is home to rolling hills and towering mountains that are perfect for hiking. Just a day after our surfing adventure, the DMC crew arose in the wee hours of the morning and set off towards Palm Springs and Coachella Valley with one goal in mind: conquering San Jacinto Mountain.</p>

<figure class="wp-block-image"><img decoding="async" alt="DMC San Diego ready to hike at San Jacinto state park" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Image-from-iOS-18.jpg"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="Views from san jacinto " src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Image-from-iOS-23.jpg"  /></figure>

<p class="wp-block-paragraph">Upon arriving to San Jacinto State Park, we laced up our hiking boots and boarded the Palm Springs Aerial Tramway. The large cable car featured a rotating floor that offered a stunning 360-degree view of the mountains and valley floor below. We eventually reached the Mountain station (8,516&rsquo; above sea level) and began our hike.</p>

<figure class="wp-block-image"><img decoding="async" alt="climbing san jacinto" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/thumbnail_IMG_4259.jpg"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="DMC San Diego hiking at San Jacinto state park" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/thumbnail_IMG_4248.jpg"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="DMC San Diego hiking at San Jacinto state park" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/thumbnail_IMG_4268.jpg"  /></figure>

<p class="wp-block-paragraph">Through snow and ice, the DMC crew trekked 6 miles and roughly 2,600 ft of elevation gain to reach the San Jacinto summit. Though the hike was tough and the trails a bit sketchy at times, the views were well worth the effort.</p>

<figure class="wp-block-image"><img decoding="async" alt="DMC San Diego hiking at San Jacinto state park" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Image-from-iOS-20.jpg"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="dmc san diego reaches the peak at san jacinto state park" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Image-from-iOS-9.jpg"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="Views from san jacinto " src="https://static.dmcinfo.com/wp-content/uploads/2025/05/thumbnail_IMG_4257.jpg"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="Views from san jacinto " src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Image-from-iOS-22_1.jpg"  /></figure>

<p class="wp-block-paragraph"><strong>Learn more about DMC&apos;s <a href="https://static.dmcinfo.com/latest-thinking/blog/articletype/categoryview/categoryid/13/culture">corporate culture</a>.&nbsp;</strong></p>
<p>The post <a href="https://static.dmcinfo.com/blog/18497/dmc-san-diego-takes-on-surf-and-summit/">DMC San Diego Takes on Surf and Summit</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Getting Started with WinCC OA: Part 12 &#8211; Modules and Embedded Modules</title>
		<link>https://static.dmcinfo.com/blog/18628/getting-started-with-wincc-oa-part-12-modules-and-embedded-modules/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Fri, 25 Mar 2022 09:49:21 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[getting started]]></category>
		<category><![CDATA[ModuleName]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[WinCC OA]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/18628/getting-started-with-wincc-oa-part-12-modules-and-embedded-modules/</guid>

					<description><![CDATA[<p>Welcome back to “Getting Started with WinCC OA!” If you aren’t familiar with the series’ previous topics, it’s recommended that you read the respective installments before proceeding: What is a Module? As noted in Part 11 of “Getting Started with WinCC OA”: “Modules represent their own program window, meaning that the child panel is disjointed [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/18628/getting-started-with-wincc-oa-part-12-modules-and-embedded-modules/">Getting Started with WinCC OA: Part 12 &#8211; Modules and Embedded Modules</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Welcome back to “Getting Started with WinCC OA!” If you aren’t familiar with the series’ previous topics, it’s recommended that you read the respective installments before proceeding:</p>



<ul class="wp-block-list">
<li><a href="/latest-thinking/blog/id/9870/getting-started-with-wincc-oa-part-1--creating-opening-a-project" target="_blank">Part 1: Creating and Opening a Project</a></li>



<li><a href="/latest-thinking/blog/id/9871/getting-started-with-wincc-oa-part-2--folder-structure-gedi-layout" target="_blank">Part 2: Folder Structure and Gedi Layout</a></li>



<li><a href="/latest-thinking/blog/id/9884/getting-started-with-wincc-oa-part-3--panels-the-basics" target="_blank">Part 3: Panels | The Basics</a></li>



<li><a href="/latest-thinking/blog/id/9893/getting-started-with-wincc-oa-part-4--panel-scripting-environments-and-quicktest" target="_blank">Part 4: Panel Scripting Environments and QuickTest</a></li>



<li><a href="/latest-thinking/blog/id/9906/getting-started-with-wincc-oa-part-5--scripting-syntax" target="_blank">Part 5: Scripting Syntax</a></li>



<li><a href="/latest-thinking/blog/id/9921/getting-started-with-wincc-oa-part-6--para-overview-and-datapoint-creation" target="_blank">Part 6: Para Overview and Datapoint Creation</a></li>



<li><a href="/latest-thinking/blog/id/9944/getting-started-with-wincc-oa-part-7--interacting-with-datapoints-via-scripting" target="_blank">Part 7: Interacting with Datapoints via Scripting</a></li>



<li><a href="/latest-thinking/blog/id/10014/getting-started-with-wincc-oa-part-8--libraries" target="_blank">Part 8: Libraries</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10093/getting-started-with-wincc-oa-part-9--color-database-and-high-performance-best-practices" target="_blank">Part 9: Color Database &amp; High-Performance Best Practices</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10138/getting-started-with-wincc-oa-part-10--panel-nesting-and-parameters" target="_blank">Part 10: Panels | Panel Nesting and $-Parameters</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10184/getting-started-with-wincc-oa-part-11--panels-child-panels-popups" target="_blank">Part 11: Panels | Child Panels (Popups)</a></li>
</ul>



<h2 id="h-what-is-a-module" class="wp-block-heading">What is a Module?</h2>



<p class="wp-block-paragraph">As noted in <a href="https://static.dmcinfo.com/latest-thinking/blog/id/10184/getting-started-with-wincc-oa-part-11--panels-child-panels-popups">Part 11</a> of “Getting Started with WinCC OA”:</p>



<p class="wp-block-paragraph">“Modules represent their own program window, meaning that the child panel is disjointed from the calling panel and its respective calling module. If the calling panel is changed/closed, the child panel/module will remain opened.”</p>



<p class="wp-block-paragraph">Modules can be hidden, minimized, maximized, zoomed, and much more. While these topics aren’t pertinent to get started with WinCC OA, they’re still helpful to note. With that said, we’ll now focus on embedded modules and their applications.</p>



<h2 id="h-embedded-modules" class="wp-block-heading">Embedded Modules</h2>



<p class="wp-block-paragraph">Like child panels, embedded modules are used to display sub-panels in conjunction with a main panel. On the contrary, while&nbsp;a child panel opens in front of the calling panel, an embedded module exists within an allocated space on the main panel itself.</p>



<p class="wp-block-paragraph">These embedded modules are helpful for presenting dashboards, portioning out screen real estate, displaying alarm buffers, and more.</p>



<p class="wp-block-paragraph">For example, one of the default templates located in the <u>base</u>&nbsp;project (Panels/para/PanelTopology/templates/TEMPLATE3/basePanel_1024_768) uses embedded modules to divide the screen into three functional areas. The template contains three primary embedded modules with names that dictate their general purposes:</p>



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



<p class="wp-block-paragraph">While we won’t go into too much detail on templates here, it’s important to note that&nbsp;when implemented during runtime, the embedded modules allocate a certain quantity of real estate and present certain sub-panels on the overall display.</p>



<ul class="wp-block-list">
<li><strong>mainModule:&nbsp;</strong>Displays the general user-defined screens</li>



<li><strong>naviModule:&nbsp;</strong>Displays the UI&#8217;s navigation controls</li>



<li><strong>infoModule:&nbsp;</strong>Displays pertinent information (alarms buffer, date/time, user, etc.)</li>
</ul>



<p class="wp-block-paragraph">During runtime, the naviModule and infoModule continuously display their respective content while the mainModule displays the main panels, as defined in the project’s Panel Topology (Panel Topology will be discussed in a later blog installment).</p>



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



<h2 id="h-embedded-module-functions" class="wp-block-heading">Embedded Module Functions</h2>



<p class="wp-block-paragraph">The most relevant embedded module functions are as follows:</p>



<ul class="wp-block-list">
<li><strong>RootPanelOnModule()</strong>

 
 
<ul class="wp-block-list">
<li>Opens a panel in a specified module.</li>



<li>Arguments include:
  
  
<ul class="wp-block-list">
<li>FileName – File within the “panels” folder to open.</li>



<li>PanelName – Name given to panel.</li>



<li>ModuleName
   
   
<ul class="wp-block-list">
<li>Name of module in which the panel will open.</li>
</ul>
</li>



<li>Parameters
   
   
<ul class="wp-block-list">
<li>Panel $-Parameters; see <a href="https://static.dmcinfo.com/latest-thinking/blog/id/10138/getting-started-with-wincc-oa-part-10--panel-nesting-and-parameters">Part 10</a> for information on $-Parameters and <a href="https://static.dmcinfo.com/latest-thinking/blog/id/10184/getting-started-with-wincc-oa-part-11--panels-child-panels-popups">Part 11</a> for how to pass them into panels from calling functions.</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>



<li><strong>PanelOffModule()</strong>
 
 
<ul class="wp-block-list">
<li>Closes the&nbsp;panel in a specified module.</li>



<li>Arguments include:
  
  
<ul class="wp-block-list">
<li>PanelName – Name of panel to close.</li>



<li>ModuleName – Name of module in which the specified panel is open.</li>
</ul>
</li>
</ul>
</li>



<li><strong>rootPanel()</strong>
 
 
<ul class="wp-block-list">
<li>Returns the name of the panel open in the given module.</li>



<li>Arguments include:
  
  
<ul class="wp-block-list">
<li>ModuleName – Name of the root panel open in the specified module.</li>
</ul>
</li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Fortunately, embedded modules are relatively straightforward to work with. One item to note, however, is that the argument “ModuleName” for relevant functions pertains to the “ModuleName” property (located under the “Extended” properties tab) rather than the embedded module object’s “Name” (located under the “Standard” properties tab).</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Picture1_Edited.jpg" alt="Embedded Modules located under the Standard properties tab"/></figure>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Picture2-_Edited.png" alt="Embedded Modules located under the Standard properties tab"/></figure>



<p class="wp-block-paragraph">In addition to its explicit string value, the “ModuleName” can be referenced in scripting using the notation:</p>



<pre class="wp-block-code"><code>
&lt;object name&gt;.ModuleName
</code></pre>



<h2 id="h-example" class="wp-block-heading">Example</h2>



<p class="wp-block-paragraph">We’ll continue working with our evolving example from prior blogs to create a dashboard using embedded modules.</p>



<p class="wp-block-paragraph"><u>Better Naming Practices</u></p>



<p class="wp-block-paragraph">First, we’ll do a brief rename of our current panels/DPTs, since names like “TestPanel” and “ChildPanel” are not very descriptive. Please make the following panel changes:</p>



<ul class="wp-block-list">
<li><strong>Rename:</strong> ChildPanel.pnl → SetSpeedLimitPopup.pnl</li>



<li><strong>Rename: </strong>TestPanel.pnl → MotorInfoPanel.pnl</li>



<li><strong>Delete:</strong> ParentPanel.pnl (it will not be needed anymore)&nbsp;</li>
</ul>



<p class="wp-block-paragraph"><strong>Note:</strong> the “ChildPanel.pnl” string in the MotorInfoPanel’s “settingsButtonClicked()” function will need to be changed as well.</p>



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



<p class="wp-block-paragraph">In addition, we’ll change the DPT name “myDatapointType” to “Motor” by right-clicking on the DPT in Para and selecting “Edit Datapoint Type.”</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Picture4_Edited-900X1300.png" alt="Changing DPT name to Motor"/></figure>



<p class="wp-block-paragraph"><u>Dashboard</u></p>



<p class="wp-block-paragraph">Create a new panel called “main.pnl.” This will represent a main/home screen on a SCADA system. Please adjust your panel dimensions according to your screen resolution:</p>


<table style="width:100%">
<tbody>
<tr>
<th>Resolution</th>
<th>main.pnl size (x, y)</th>
</tr>
<tr>
<td>1024 x 768</td>
<td>856 x 604</td>
</tr>
<tr>
<td>1280 x 1024</td>
<td>1110 x 860</td>
</tr>
<tr>
<td>1600 x 1200</td>
<td>1430 x 1036</td>
</tr>
<tr>
<td>1680 x 1050</td>
<td>1510 x 918</td>
</tr>
<tr>
<td>1920 x 1200</td>
<td>1760 x 1036</td>
</tr>
</tbody>
</table>


<p class="wp-block-paragraph">At the top of the panel, we’ll add three objects with the following specified properties:</p>



<ul class="wp-block-list">
<li>A simple border for our “dashboard”:
 
 
<ul class="wp-block-list">
<li><strong>Object:</strong> Rectangle</li>



<li><strong>Name:</strong>&nbsp;“dashboardBackground”</li>
</ul>
</li>



<li>An embedded module frame for one of our dashboard items:
 
 
<ul class="wp-block-list">
<li><strong>Object:</strong>&nbsp;Embedded module</li>



<li><strong>Name:&nbsp;</strong>“motorInfoDashboard”</li>



<li><strong>ModuleName:&nbsp;</strong>“motorInfoEmbeddedModule”</li>



<li><strong>Size:&nbsp;</strong>Make identical to the “MotorInfoPanel.pnl” panel size</li>
</ul>
</li>



<li>An object to use in embedded module interaction:
 
 
<ul class="wp-block-list">
<li><strong>Object:&nbsp;</strong>Button</li>



<li><strong>Name:&nbsp;</strong>&#8220;nextMotorButton&#8221;</li>



<li><strong>Button text:&nbsp;</strong>&#8220;Next Motor&#8221;</li>
</ul>
</li>
</ul>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Picture5_Edited.png" alt="WinnCC OA Tutorial Panels"/></figure>



<p class="wp-block-paragraph">Within our panel’s scopeLib, we’ll have a few constants and variables defined.</p>



<p class="wp-block-paragraph"><strong>Constants:</strong></p>



<ul class="wp-block-list">
<li>MOTOR_INFO_PANEL = name of the motor info panel to open.</li>



<li>DP_MOTOR_LIST = list of all DPs of type “Motor”.</li>



<li>NUM_MOTORS = number of motor DPs.</li>
</ul>



<p class="wp-block-paragraph"><strong>Variables:</strong></p>



<ul class="wp-block-list">
<li>_dpCurrentMotorInfo – panel-scoped variable keeps track of the currently displayed motor DP.</li>
</ul>



<p class="wp-block-paragraph"><strong>Functions:</strong></p>



<ul class="wp-block-list">
<li>motorInfoDashboardInitialized() – called by the panel’s “Initialize” event; establishes the first motor displayed by calling “displayNextMorotInfoPanel()”.</li>



<li>nextMotorButtonClicked() – &nbsp;called by the “nextMotorButton” button’s “Ckicked” event; calls the “displayNextMotorInfoPanel()”.</li>



<li>displayNextMotorInfoPanel() – Displays the next motor DP defined in the DP_MOTOR_LIST into the motor info panel.</li>
</ul>



<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">HTML</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>// Display the next motor in the Motor Info Dashboard
displayNextMotorInfoPanel()
{
    // Only attempt to display a dashboard if motors exist
    if (NUM_MOTORS > 0)
    {
        // Determine the next motor in the motor list
        int iNextMotorIndex =
            (dynContains(DP_MOTOR_LIST, _dpCurrentMotorInfo) % NUM_MOTORS) + 1;

        _dpCurrentMotorInfo = DP_MOTOR_LIST&#91;iNextMotorIndex&#93;;

        // Open the Motor Info panel for the selected motor
        RootPanelOnModule(
            MOTOR_INFO_PANEL,
            "MotorInfoPanel" + _dpCurrentMotorInfo,
            motorInfoDashboard.ModuleName,
            "$motorDpe:" + dpSubStr(_dpCurrentMotorInfo, DPSUB_DP)
        );
    }
}</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: #D4D4D4">// Display the next motor in the Motor Info Dashboard</span></span>
<span class="line"><span style="color: #D4D4D4">displayNextMotorInfoPanel()</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">    // Only attempt to display a dashboard if motors exist</span></span>
<span class="line"><span style="color: #D4D4D4">    if (NUM_MOTORS &gt; 0)</span></span>
<span class="line"><span style="color: #D4D4D4">    {</span></span>
<span class="line"><span style="color: #D4D4D4">        // Determine the next motor in the motor list</span></span>
<span class="line"><span style="color: #D4D4D4">        int iNextMotorIndex =</span></span>
<span class="line"><span style="color: #D4D4D4">            (dynContains(DP_MOTOR_LIST, _dpCurrentMotorInfo) % NUM_MOTORS) + 1;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        _dpCurrentMotorInfo = DP_MOTOR_LIST&#91;iNextMotorIndex&#93;;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">        // Open the Motor Info panel for the selected motor</span></span>
<span class="line"><span style="color: #D4D4D4">        RootPanelOnModule(</span></span>
<span class="line"><span style="color: #D4D4D4">            MOTOR_INFO_PANEL,</span></span>
<span class="line"><span style="color: #D4D4D4">            &quot;MotorInfoPanel&quot; + _dpCurrentMotorInfo,</span></span>
<span class="line"><span style="color: #D4D4D4">            motorInfoDashboard.ModuleName,</span></span>
<span class="line"><span style="color: #D4D4D4">            &quot;$motorDpe:&quot; + dpSubStr(_dpCurrentMotorInfo, DPSUB_DP)</span></span>
<span class="line"><span style="color: #D4D4D4">        );</span></span>
<span class="line"><span style="color: #D4D4D4">    }</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph">When running the main.pnl panel in QuickTest, we can iterate through the relevant motor DPs by clicking the “Next Motor” button.</p>



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



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



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



<p class="wp-block-paragraph">So far, we’ve worked&nbsp;with panels of static widths and heights; however, developers can adjust panel reference dimensions, and users can sometimes resize a given window.&nbsp;OA provides functionality to accommodate for the positioning of objects within a panel when the overall panel dimensions shift.</p>



<p class="wp-block-paragraph">In the next edition of “Getting Started with WinCC OA,” we’ll take a brief look at panel layouts and how we can use them to dictate the real estate of a panel.</p>



<p class="wp-block-paragraph"><strong>Topics to look forward to in this series:&nbsp;</strong></p>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10313/getting-started-with-wincc-oa-part-12--modules-and-embedded-modules">Part 12: Modules &amp; Embedded Modules</a></li>
</ul>



<p class="wp-block-paragraph"><strong><a href="https://static.dmcinfo.com/contact">Contact</a>&nbsp;DMC to get started on your next WinCC project and learn more about our&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/siemens-simatic-wincc-programming">Siemens SIMATIC WinCC Programming</a>as well as our&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/wincc-open-architecture-development">WinCC Open Architecture Development.</a></strong></p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/18628/getting-started-with-wincc-oa-part-12-modules-and-embedded-modules/">Getting Started with WinCC OA: Part 12 &#8211; Modules and Embedded Modules</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Getting Started With WinCC OA: Part 11 &#8211; Panels &#124; Child Panels (Popups)</title>
		<link>https://static.dmcinfo.com/blog/19540/getting-started-with-wincc-oa-part-11-panels-child-panels-popups/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Sat, 02 Jan 2021 11:44:43 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/19540/getting-started-with-wincc-oa-part-11-panels-child-panels-popups/</guid>

					<description><![CDATA[<p>Welcome back to &#8220;Getting Started with WinCC OA&#8221;! If you aren&#8217;t familiar with the series&#8217; previous topics, it&#8217;s recommended that you read the prior installments before proceeding: In Part 10 of this series, we&#8217;ll be exploring popups. Known as &#8220;Child Panels&#8221; in WinCC OA, popups are an extremely useful aspect of any SCADA system. They [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/19540/getting-started-with-wincc-oa-part-11-panels-child-panels-popups/">Getting Started With WinCC OA: Part 11 &#8211; Panels | Child Panels (Popups)</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Welcome back to &#8220;Getting Started with WinCC OA&#8221;! If you aren&#8217;t familiar with the series&#8217; previous topics, it&#8217;s recommended that you read the prior installments before proceeding:</p>



<ul class="wp-block-list">
<li><a href="/latest-thinking/blog/id/9870/getting-started-with-wincc-oa-part-1--creating-opening-a-project">Part 1: Creating and Opening a Project</a></li>



<li><a href="/latest-thinking/blog/id/9871/getting-started-with-wincc-oa-part-2--folder-structure-gedi-layout">Part 2: Folder Structure and Gedi Layout</a></li>



<li><a href="/latest-thinking/blog/id/9884/getting-started-with-wincc-oa-part-3--panels-the-basics">Part 3: Panels | The Basics</a></li>



<li><a href="/latest-thinking/blog/id/9893/getting-started-with-wincc-oa-part-4--panel-scripting-environments-and-quicktest">Part 4: Panel Scripting Environments and QuickTest</a></li>



<li><a href="/latest-thinking/blog/id/9906/getting-started-with-wincc-oa-part-5--scripting-syntax">Part 5: Scripting Syntax</a></li>



<li><a href="/latest-thinking/blog/id/9921/getting-started-with-wincc-oa-part-6--para-overview-and-datapoint-creation">Part 6: Para Overview and Datapoint Creation</a></li>



<li><a href="/latest-thinking/blog/id/9944/getting-started-with-wincc-oa-part-7--interacting-with-datapoints-via-scripting">Part 7: Interacting with Datapoints via Scripting</a></li>



<li><a href="https://static.dmcinfo.com/blog/20658/getting-started-with-wincc-oa-part-8-libraries/">Part 8: Libraries</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10093/getting-started-with-wincc-oa-part-9--color-database-and-high-performance-best-practices">Part 9: Color Database &amp; High-Performance Best Practices</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10138/getting-started-with-wincc-oa-part-10--panel-nesting-and-parameters">Part 10: Panels | Panel Nesting and $-Parameters</a></li>
</ul>



<p class="wp-block-paragraph">In Part 10 of this series, we&#8217;ll be exploring popups. Known as &#8220;Child Panels&#8221; in WinCC OA, popups are an extremely useful aspect of any SCADA system. They can be used for displaying critical alarm information, configuring settings, receiving secondary confirmation — and so much more.</p>



<h2 class="wp-block-heading" id="h-types-of-child-panels">Types of Child Panels</h2>



<p class="wp-block-paragraph">Before we start creating child panels, let&#8217;s familiarize ourselves with the different types of popups we have at our disposal. The base keyword of all child panel/popup calling functions is &#8220;ChildPanelOn.&#8221; With a quick search of &#8220;ChildPanelOn&#8221; in the documentation&#8217;s index tab, we can see there are a variety of child panel functions available.</p>



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



<p class="wp-block-paragraph">There are seven main keywords that a &#8220;ChildPanelOn&#8221; function may implement:</p>



<ul class="wp-block-list">
<li>Central</li>



<li>Modal</li>



<li>Return</li>



<li>Module</li>



<li>CheckPos</li>



<li>Parent</li>



<li>Relative</li>
</ul>



<p class="wp-block-paragraph"><u>Central</u></p>



<p class="wp-block-paragraph">The &#8220;Central&#8221; keyword simply indicates that a child panel will be opened and centered in the calling parent panel. In this case, no panel coordinates need to be specified.</p>



<p class="wp-block-paragraph"><u>Modal</u></p>



<p class="wp-block-paragraph">When a &#8220;Modal&#8221; child panel is opened, the user becomes physically unable to interact with objects outside of the child panel. The child panel must first be closed before continuing operation. This can be helpful for displaying essential warning messages that the user must acknowledge before continuing operation.</p>



<p class="wp-block-paragraph"><u>Return</u></p>



<p class="wp-block-paragraph">A &#8220;Return&#8221;-designated child panel can return values to the calling script in the form of in/out arguments. We will investigate &#8220;Return&#8221; panels later in the example.</p>



<p class="wp-block-paragraph"><u>Module</u></p>



<p class="wp-block-paragraph">The &#8220;Module&#8221; keyword indicates that instead of opening within the calling panel, the child panel will open in its own module.</p>



<p class="wp-block-paragraph">Modules represent their own program window, meaning that the child panel is disjointed from the calling panel and its respective calling module. If the calling panel is changed/closed, the child panel/module will remain open.</p>



<p class="wp-block-paragraph">If you would like to know more about modules, they will be discussed at length in the next installment of this series, &#8220;Getting Started with WinCC OA.&#8221;</p>



<p class="wp-block-paragraph"><u>CheckPos</u></p>



<p class="wp-block-paragraph">This &#8220;CheckPos&#8221; keyword is exclusively used with the &#8220;ChildPanelOnModuleCheckPos()&#8221; function. In this case, the &#8220;CheckPos&#8221; indicates that the opened module will be checked for valid positioning and size. This keyword is very specific and not applicable in many situations, especially when you&#8217;re just getting started with WinCC OA, so we won&#8217;t dig too deep into it.</p>



<p class="wp-block-paragraph"><u>Parent</u></p>



<p class="wp-block-paragraph">A &#8220;Parent&#8221; keyword indicates that the child panel is opened within a specified panel. The panel can either be the calling panel or another opened panel.</p>



<p class="wp-block-paragraph"><u>Relativ</u>e</p>



<p class="wp-block-paragraph">The &#8220;Relative&#8221; keyword dictates that the child panel&#8217;s specified coordinates will not be an absolute location, but rather a relative position based on the calling panel.</p>



<h2 class="wp-block-heading" id="h-calling-opening-child-panels-function-parameters">Calling/Opening Child Panels – Function Parameters</h2>



<p class="wp-block-paragraph">Depending on which of the aforementioned &#8220;ChildPanelOn&#8221; functions are used, the user will have the opportunity to pass in a variety of parameters. These parameters, amongst other &#8220;ChildPanelOn&#8221; function properties, are outlined in the WinCC OA Documentation. The more common parameters include:</p>



<ul class="wp-block-list">
<li>FileName
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>File path of the panel to be used as the child</li>


 </ul>
</li>



<li>PanelName
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Name of the child panel that is to be opened</li>


 </ul>
</li>



<li>ModuleName
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Name of the module that is to be created for the child panel</li>


  

<li>Used in &quot;Module&quot; &quot;ChildPanelOn&quot; functions</li>


 </ul>
</li>



<li>ParentName
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Name of the parent panel on which the child opens</li>


  

<li>Used in &quot;Parent&quot; &quot;ChildPanelOn&quot; functions</li>


 </ul>
</li>



<li>Parameters
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Items passed into the child panel as $-parameters</li>


  

<li>Can be an empty dyn_string</li>


  

<li>Each item in the dyn_string parameter list uses the format &quot;$&lt;parameter&gt;:&lt;value&gt;&quot;</li>


 </ul>
</li>



<li>x, y
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Position on the parent panel where the child panel is opened</li>


  

<li>Not relevant for &quot;Central&quot; &quot;ChildPanelOn&quot; functions</li>


 </ul>
</li>



<li>resultFloat, resultText
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Retuned values from child panels called by &quot;Return&quot; &quot;ChildPanelOn&quot; functions</li>


  

<li>Child panels must write their return values to the following DPEs before the child panel is closed:
  

<ul class="wp-block-list">
   

<li>&quot;_Ui_&lt;UiNumber&gt;.ReturnValue.Float&quot;</li>


   

<li>&quot;_Ui_&lt;UiNumber&gt;.ReturnValue.Text&quot;</li>


  </ul>


  </li>


  

<li>&lt;UiNumber&gt; is a number unique to the active user interface (Gedi or Vision) that can be determined by the function myUiNumber().</li>


  

<li>Alternatively, the &quot;_Ui_&lt;UiNumber&gt;&quot; DP can be provided using the myUiDpName() function</li>


  

<li>Lastly, the function &quot;PanelOffReturn()&quot; can be used to both close the child panel and write the return values to the correct DPEs.</li>


 </ul>
</li>
</ul>



<h2 class="wp-block-heading" id="h-closing-child-panels">Closing Child Panels</h2>



<p class="wp-block-paragraph">Almost as important as opening a child panel is closing it once the panel&#8217;s purpose has been served. To close a child panel, there are two main functions:</p>



<ul class="wp-block-list">
<li>&#8220;PanelOff&#8221;
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Closes the opened panel/module from which the function is called</li>


 </ul>
</li>



<li>&#8220;PanelOffReturn&#8221;
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Closes the opened panel/module while also providing a return values (dyn_float and dyn_string) to the child panel&apos;s calling &quot;Return&quot;-designated &quot;ChildPanelOn&quot; function.</li>


 </ul>
</li>
</ul>



<h2 class="wp-block-heading" id="h-example">Example</h2>



<p class="wp-block-paragraph">Let&#8217;s revisit our example from prior blogs. Instead of entering our &#8220;Motor Speed Limit&#8221; directly into the corresponding text field, we&#8217;ll call a popup and enter the value in there. Before calling a child panel, though, there must first be a child panel to call!</p>



<p class="wp-block-paragraph">I&#8217;ll let you use your creative freedom to make a panel at your artistic discretion. Give it hot-rod flames and bunnies, make it monochromatic, or do something in between. Whatever you choose, make sure the panel has a button labeled &#8220;Cancel,&#8221; a button labeled &#8220;OK,&#8221; and a text field to enter the speed limit. I named my panel &#8220;ChildPanel.pnl&#8221; and it looks like this:</p>



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



<p class="wp-block-paragraph">If this was a panel I was working on myself and not just using as an example, the logic approach I&#8217;d probably take would be to:</p>



<ul class="wp-block-list">
<li>Pass in the appropriate DPE path as a dollar parameter</li>



<li>Initialize the speed limit text field with said DPE value (using dpGet)</li>



<li>Upon pressing &#8220;OK&#8221; button, set the DPE value to the text field&#8217;s value using dpSet() and then close the panel</li>



<li>Upon pressing the &#8220;Cancel&#8221; button, close the panel</li>
</ul>



<p class="wp-block-paragraph">However, we&#8217;ll be utilizing a &#8220;Return&#8221;-designated child panel in this example. This means that a value(s) will be returned to the calling function. As such, the approach we&#8217;ll take for the example is:</p>



<ul class="wp-block-list">
<li>Pass in the current DPE value as a dollar parameter</li>



<li>Initialize the speed limit text field with said DPE value</li>



<li>Upon pressing the &#8220;OK&#8221; button, return the text field&#8217;s value in the return dyn_string and TRUE in the return dyn_float to the calling function</li>



<li>Upon pressing the &#8220;Cancel&#8221; button, return FALSE in the return dyn_float to the calling function</li>



<li>If the child panel returns TRUE (&#8220;OK&#8221; clicked) within the calling function, use dpSet() to set the returned string to the appropriate DPE speed-limit value. If the child panel returns FALSE (&#8220;Cancel&#8221; clicked), do nothing.</li>
</ul>



<p class="wp-block-paragraph">In our child panel&#8217;s ScopeLib, we have three functions defined:</p>



<ul class="wp-block-list">
<li>&#8220;initializePanel()&#8221; – called by the panel&#8217;s &#8220;Initialize&#8221; event; populates the text field with the passed-in dollar parameter</li>



<li>&#8220;okButtonClicked()&#8221; – called by the &#8220;OK&#8221; button&#8217;s &#8220;Clicked&#8221; event; returns the text field&#8217;s value and a TRUE to the calling function</li>



<li>&#8220;cancelButtonClicked()&#8221; – called by the &#8220;Cancel&#8221; button&#8217;s &#8220;Clicked&#8221; event; returns a FALSE to the calling function</li>
</ul>



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


<pre class="”brush:xml”">
//Initial speed limit
string sInitialSpeedLimit = $initialSpeedLimit;

void initializePanel()
{
  titleBar(FALSE);

  //Initializes text field with passed-in $-parameter
  maxSpeedTextbox.text(sInitialSpeedLimit);
}


void okButtonClicked()
{
  //Returns TRUE and max speed, closes panel
  PanelOffReturn(
      makeDynFloat(TRUE),
      makeDynString(maxSpeedTextbox.text));
}

void cancelButtonClicked()
{
  //Returns FALSE, closes panel
  PanelOffReturn(
      makeDynFloat(FALSE),
      makeDynString());
}
</pre>


<p class="wp-block-paragraph">Note: The &#8220;titleBar()&#8221; function used within &#8220;initializePanel()&#8221; determines whether a called child panel will have a title bar or not.</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"><em><span style="font-size:12px;">Child panel with title bar vs. without title bar</span></em></p>



<p class="wp-block-paragraph">In the calling panel (TestPanel.pnl), we&#8217;ll make the following modifications to the &#8220;maxSpeedTextBox&#8221;:</p>



<ul class="wp-block-list">
<li>Remove the scripting from the &#8220;Command&#8221; event</li>



<li>Update the following properties:
 
 
<ul class="wp-block-list" style="list-style-type:circle;">
  

<li>Background Color -&gt; &quot;lightgrey&quot;</li>


  

<li>Editable -&gt; FALSE</li>


 </ul>
</li>
</ul>



<p class="wp-block-paragraph">Note: I also swapped out the &#8220;speedTextbox&#8221; label shape with a text-field shape so that my &#8220;Motor Speed&#8221; and &#8220;Motor Speed Limit&#8221; text fields were visually consistent.</p>



<p class="wp-block-paragraph">Next, we&#8217;ll add a simple button that will be used to call our child panel. I gave mine a fun gear icon (via the &#8220;Button Label&#8221; property; image path of C:\Siemens\Automation\WinCC_OA\3.16\pictures/test_en.gif)</p>



<ul class="wp-block-list">
<li>Add the &#8220;settingsButtonClicked()&#8221; function call to the button&#8217;s &#8220;Clicked&#8221; event</li>
</ul>



<p class="wp-block-paragraph">My TestPanel.pnl now looks like this:</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/6-test-panel-motor-dpe.png" alt=""/></figure>



<p class="wp-block-paragraph">In ScopeLib, we&#8217;ll make the following modifications:</p>



<ul class="wp-block-list">
<li>Remove the &#8220;textboxCmd()&#8221; function</li>



<li>Add the following &#8220;settingsButtonClicked()&#8221; function:</li>
</ul>



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


<pre class="”brush:xml”">
//=============================== Button Clicks =========================================
void settingsButtonClicked()
{
  //Acquire the current max speed
  float maxSpeedValue;
  dpGet(motorDpe + &quot;.rMaxSpeed&quot;, maxSpeedValue);

  //Call the child panel &quot;ChildPanel.pnl&quot;
  dyn_float resultFloat;
  dyn_string resultText;
  ChildPanelOnCentralModalReturn(
      &quot;ChildPanel.pnl&quot;, &quot;SettingsPanel&quot;,
      makeDynString(&quot;$initialSpeedLimit:&quot; + maxSpeedValue),
      resultFloat, resultText);

  //Determine the returned values of the child panel
  bool returnOk;
  float returnMaxSpeed;

  //If the returnFloat/Text has items populate the returnOk and returnMaxSpeed appropriately,
  if(dynlen(resultFloat) &gt; 0) returnOk = resultFloat[1];
  if(dynlen(resultText) &gt; 0)  returnMaxSpeed = resultText[1];

  //If the child panel returned TRUE (i.e. &quot;OK&quot; button pressed, then set max speed to returned string value
  if(returnOk == TRUE)
    dpSet(motorDpe + &quot;.rMaxSpeed&quot;, returnMaxSpeed);
}
</pre>


<p class="wp-block-paragraph">This new function:</p>



<ol class="wp-block-list">
<li>Acquires the motor&#8217;s maximum speed</li>



<li>Opens a child panel (of types &#8220;Central&#8221;, &#8220;Modal&#8221;, and &#8220;Return&#8221;) with the motor&#8217;s current maximum speed passed in as a $-parameter. Recall that:
 
 
<ol class="wp-block-list" style="list-style-type:lower-alpha;">
  

<li>Central = Child panel will be centered on calling panel</li>


  

<li>Modal = The user may only interact with the opened child panel</li>


  

<li>Return = The child panel returns a set of value that may be used by the parent panel</li>


 </ol>
</li>



<li>Interprets the child panel&#8217;s returned dyn_string and dyn_float data
 
 
<ol class="wp-block-list" style="list-style-type:lower-alpha;">
  

<li>If the popup&apos;s &quot;OK&quot; button was clicked (&quot;returnOk&quot;)</li>


  

<li>The returned user-entered max speed (&quot;returnedMaxSpeed&quot;)</li>


 </ol>
</li>



<li>If the child panel returned TRUE, sets the max speed DPE to the &#8220;returnedMaxSpeed&#8221; value</li>
</ol>



<p class="wp-block-paragraph">Running ParentPanel.pnl in Quick Test, we can modify the motor speed limit of &#8220;myMotor3&#8221; (or any of our other motors) using the gear icon and the corresponding child panel.</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">Child panels are extremely useful for using popups to display additional information, notify users of certain warnings, receive secondary confirmation from the user, and so on. However, we may want to display additional information or panel references in a similar way, but without overlaying additional popup panels on top of the current ones. For this, we&#8217;ll use embedded modules.</p>



<p class="wp-block-paragraph"><strong>Topics to look forward to in this series:&nbsp;</strong></p>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10313/getting-started-with-wincc-oa-part-12--modules-and-embedded-modules">Part 12: Modules &amp; Embedded Modules</a></li>
</ul>



<p class="wp-block-paragraph">In the next edition of &#8220;Getting Started with WinCC OA&#8221;, we&#8217;ll explore the concept of modules and learn how to utilize embedded modules to dynamically open and close reference panels.</p>



<p class="wp-block-paragraph"><strong><a href="https://static.dmcinfo.com/contact">Contact</a> DMC to get started on your next WinCC project and learn more about our <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/siemens-simatic-wincc-programming">Siemens SIMATIC WinCC Programming</a>as well as our <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/wincc-open-architecture-development">WinCC Open Architecture Development.</a></strong></p>
<p>The post <a href="https://static.dmcinfo.com/blog/19540/getting-started-with-wincc-oa-part-11-panels-child-panels-popups/">Getting Started With WinCC OA: Part 11 &#8211; Panels | Child Panels (Popups)</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Getting Started with WinCC OA: Part 10 &#8211; Panel Nesting and $-Parameters</title>
		<link>https://static.dmcinfo.com/blog/19860/getting-started-with-wincc-oa-part-10-panel-nesting-and-parameters/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Mon, 22 Jun 2020 17:09:40 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[WinCC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/19860/getting-started-with-wincc-oa-part-10-panel-nesting-and-parameters/</guid>

					<description><![CDATA[<p>Welcome back to “Getting Started with WinCC OA”! If you aren’t familiar with the series’ previous topics, it’s recommended that you read the prior installments before proceeding: Way back in Part 3 of “Getting Started with WinCC OA”, we investigated the basics of panel creation and development by adding objects and configuring their properties. In [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/19860/getting-started-with-wincc-oa-part-10-panel-nesting-and-parameters/">Getting Started with WinCC OA: Part 10 &#8211; Panel Nesting and $-Parameters</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Welcome back to “Getting Started with WinCC OA”! If you aren’t familiar with the series’ previous topics, it’s recommended that you read the prior installments before proceeding:</p>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/blog/21725/getting-started-with-wincc-oa-part-1-creating-opening-a-project/">Part 1: Creating and Opening a Project</a></li>



<li><a href="https://static.dmcinfo.com/blog/21697/getting-started-with-wincc-oa-part-2-folder-structure-gedi-layout/">Part 2: Folder Structure and Gedi Layout</a></li>



<li><a href="https://static.dmcinfo.com/blog/21531/getting-started-with-wincc-oa-part-3-panels-the-basics/">Part 3: Panels | The Basics</a></li>



<li><a href="https://static.dmcinfo.com/blog/21450/getting-started-with-wincc-oa-part-4-panel-scripting-environments-and-quicktest/">Part 4: Panel Scripting Environments and QuickTest</a></li>



<li><a href="https://static.dmcinfo.com/blog/21377/getting-started-with-wincc-oa-part-5-scripting-syntax/">Part 5: Scripting Syntax</a></li>



<li><a href="https://static.dmcinfo.com/blog/21256/getting-started-with-wincc-oa-part-6-para-overview-and-datapoint-creation/">Part 6: Para Overview and Datapoint Creation</a></li>



<li><a href="https://static.dmcinfo.com/blog/21113/getting-started-with-wincc-oa-part-7-interacting-with-datapoints-via-scripting/">Part 7: Interacting with Datapoints via Scripting</a></li>



<li><a href="https://static.dmcinfo.com/blog/20658/getting-started-with-wincc-oa-part-8-libraries/">Part 8: Libraries</a></li>



<li><a href="https://static.dmcinfo.com/blog/20143/getting-started-with-wincc-oa-part-9-color-database-and-high-performance-best-practices/">Part 9: Color Database &amp; High Performance Best Practices</a></li>
</ul>



<p class="wp-block-paragraph">Way back in <a href="https://static.dmcinfo.com/blog/21531/getting-started-with-wincc-oa-part-3-panels-the-basics/">Part 3 of “Getting Started with WinCC OA”</a>, we investigated the basics of panel creation and development by adding objects and configuring their properties. In Part 10, we&#8217;ll dive back into the world of panels by looking at panel nesting and the mechanism with which we pass information from one panel to its nested counterpart: $-Parameters.</p>



<h2 class="wp-block-heading" id="h-panel-references-embedded-panels">Panel References/Embedded Panels</h2>



<p class="wp-block-paragraph">Panel references are used to insert or nest existing panels (reference panels) into other panels (parent panels). This is useful for creating commonly repeated objects like valves or motors and utilizing them in larger systems. If changes are made to the original panel, all references will similarly update within their parent panel.</p>



<p class="wp-block-paragraph">To create a panel reference, simply drag a panel from the Project View tree onto the working space of another panel.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="278" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/1-embedded-panels.png" alt="1 embedded panels" class="wp-image-19837" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/1-embedded-panels.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/1-embedded-panels-300x93.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/1-embedded-panels-768x237.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<h2 class="wp-block-heading" id="h-parameters">$-Parameters</h2>



<p class="wp-block-paragraph">Often, developers will want a reference panel to receive specific properties from its parent panel (including, but not limited to, colors, types, and text); This is done via $-Parameters(dollar parameters). <strong>$-Parameters</strong> are defined in reference panel scripting simply by placing a “$” in front of a variable name. Whenever a reference panel is added to a parent panel, a <strong>“Reference Defining”</strong> popup will appear and the user can configure $-Parameters as they choose. $-Parameters can be later changed by either:</p>



<ol class="wp-block-list">
<li>Double-clicking the panel reference to bring up the “Reference Defining” popup</li>



<li>Changing the $-Parameters directly in the panel properties</li>
</ol>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="625" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/2-motor-panel.png" alt="2 motor panel" class="wp-image-19838" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/2-motor-panel.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/2-motor-panel-300x208.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/2-motor-panel-768x533.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<h2 class="wp-block-heading" id="h-example">Example</h2>



<p class="wp-block-paragraph">To continue with our evolving example panel from prior “Getting Started with WinCC OA” installments, let’s now assume that we now have three motors that we want to use with our TestPanel. With two additional motors, we must first add additional datapoints in Para to represent the new motors’ PLC tags. Simply add two new datapoints (“myMotor2” and “myMotor3”) underneath our “myDatapointType” datapoint type.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="642" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/3-motor-datatype.png" alt="3 motor datatype" class="wp-image-19839" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/3-motor-datatype.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/3-motor-datatype-300x214.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/3-motor-datatype-768x548.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="wp-block-paragraph">Now that we have our additional motors configured in Para, we’ll want to create three references of TestPanel in another parent panel. However, our current TestPanel is configured to work only with the<strong> “myMotor”</strong> datapoint.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="256" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/4-motor-speed-script.png" alt="4 motor speed script" class="wp-image-19840" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/4-motor-speed-script.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/4-motor-speed-script-300x85.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/4-motor-speed-script-768x218.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="wp-block-paragraph">To utilize our TestPanel as a re-usable reference, we must first incorporate flexibility and allow the panel to use a variety of datapoints, not just “myMotor”. How might we do this? With $-Parameters.</p>



<p class="wp-block-paragraph">To implement a $-Parameter within our TestPanel script, we’ll assign the $-Parameter <strong>“$motorDpe”</strong> to the internal string variable <strong>“motorDpe”</strong> and then replace every occurrence of the text “myMotor” with the variable “motorDpe.” With this modification, we may pass in “myMotor”, “myMotor2”, and “myMotor3” into the TestPanel to substitute for the string “motorDpe.”</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="320" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/5-motor-dep.png" alt="5 motor dep" class="wp-image-19841" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/5-motor-dep.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/5-motor-dep-300x107.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/5-motor-dep-768x273.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<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">CTRL Script (WinCC OA)</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>#uses "OpenLibrary/Enums/MotorStatusType"
#uses "ColorConst"

string motorDpe = $motorDpe;

//=============================== Panel initialization =========================================
initializePanel()
{
  //Whenever rSpeed or rMaxSpeed changes, call the function "onSpeedChange"
  dpConnect("onSpeedChange", motorDpe + ".rSpeed", motorDpe + ".rMaxSpeed");

  //Whenever iStatus changes, call the function "onStatusChange"
  dpConnect("onStatusChange", motorDpe + ".iStatus");

  //Set rectangle's label text to its motor dpe
  setValue("motorLabel", "text", motorDpe);
}


//=============================== Text Field Command =========================================
//Textbox is selected and user keys "Enter"
void textboxCmd()
{
  //Assign the textbox's text value to rMaxSpeed
  dpSet(motorDpe + ".rMaxSpeed", maxSpeedTextbox.text);
}


//=============================== On Speed / Max Speed Value Change =================================
void onSpeedChange(string speedDp, float speedValue, string maxSpeedDp, float maxSpeedValue)
{
  //Define the variable whose value will be assigned to iStatus
  int iStatusValue;

  //Determine what value to assign iStatusValue (and subsequently "myMotor.iStatus")
  switch (speedValue)
  {
    //If "myMotor.rSpeed" is 0, set iStatusValue to 0
    case 0:
      iStatusValue = (int)MotorStatusType::Stopped;
      break;

    //Otherwise, if "myMotor.rSpeed" > "myMotor.rMaxSpeed", set iStatusValue to Estop status int
    //           if not, set iStatusValue to Forward status int
    default:
      iStatusValue = ((speedValue >= maxSpeedValue) ? (int)MotorStatusType::Estop : (int)MotorStatusType::Forward);
      break;
  }

  //Assign iStatusValue's value to "myMotor.iStatus"
  dpSet(motorDpe + ".iStatus", iStatusValue);

  //Set the maxSpeedTextbox and speedTextbox's test to their respective values
  //NOTE: dpValToString ensures the units we assigned earlier in the series are displayed.
  //      Simply using &lt;Textbox>.text = &lt;speedValue> will work, but will not display appropriate units
  maxSpeedTextbox.text = dpValToString(motorDpe + ".rMaxSpeed", maxSpeedValue, true);
  speedTextbox.text = dpValToString(motorDpe + ".rSpeed", speedValue, true);
}

//=============================== On Status Change =========================================
void onStatusChange(string statusDp, int statusValue)
{
  //Define the variable whose value will be assigned to the rectangle's color property
  string rectangleColor;

  //Determine color to assign to rectangle based off iStatus
  if (statusValue == (int)MotorStatusType::Stopped)
  {
    rectangleColor = STOPPED_COLOR;
  }

  if (statusValue == (int)MotorStatusType::Estop)
  {
    rectangleColor = ESTOPPED_COLOR;
  }

  if (statusValue == (int)MotorStatusType::Forward)
  {
    rectangleColor = FORWARD_COLOR;
  }

  //Assign selected color to rectangle
  setValue("rectangle", "backCol", rectangleColor);
}</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: #9CDCFE">#uses</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;OpenLibrary/Enums/MotorStatusType&quot;</span></span>
<span class="line"><span style="color: #9CDCFE">#uses</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;ColorConst&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">string motorDpe = $motorDpe;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">//=============================== Panel initialization =========================================</span></span>
<span class="line"><span style="color: #DCDCAA">initializePanel</span><span style="color: #D4D4D4">()</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #6A9955">  //Whenever rSpeed or rMaxSpeed changes, call the function &quot;onSpeedChange&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #DCDCAA">dpConnect</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;onSpeedChange&quot;</span><span style="color: #D4D4D4">, motorDpe + </span><span style="color: #CE9178">&quot;.rSpeed&quot;</span><span style="color: #D4D4D4">, motorDpe + </span><span style="color: #CE9178">&quot;.rMaxSpeed&quot;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">  //Whenever iStatus changes, call the function &quot;onStatusChange&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #DCDCAA">dpConnect</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;onStatusChange&quot;</span><span style="color: #D4D4D4">, motorDpe + </span><span style="color: #CE9178">&quot;.iStatus&quot;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">  //Set rectangle&apos;s label text to its motor dpe</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #DCDCAA">setValue</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;motorLabel&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #CE9178">&quot;text&quot;</span><span style="color: #D4D4D4">, motorDpe);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">//=============================== Text Field Command =========================================</span></span>
<span class="line"><span style="color: #6A9955">//Textbox is selected and user keys &quot;Enter&quot;</span></span>
<span class="line"><span style="color: #569CD6">void</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">textboxCmd</span><span style="color: #D4D4D4">()</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #6A9955">  //Assign the textbox&apos;s text value to rMaxSpeed</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #DCDCAA">dpSet</span><span style="color: #D4D4D4">(motorDpe + </span><span style="color: #CE9178">&quot;.rMaxSpeed&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">maxSpeedTextbox</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">text</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">//=============================== On Speed / Max Speed Value Change =================================</span></span>
<span class="line"><span style="color: #569CD6">void</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">onSpeedChange</span><span style="color: #D4D4D4">(</span><span style="color: #4EC9B0">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">speedDp</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">float</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">speedValue</span><span style="color: #D4D4D4">, </span><span style="color: #4EC9B0">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">maxSpeedDp</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">float</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">maxSpeedValue</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #6A9955">  //Define the variable whose value will be assigned to iStatus</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #569CD6">int</span><span style="color: #D4D4D4"> iStatusValue;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">  //Determine what value to assign iStatusValue (and subsequently &quot;myMotor.iStatus&quot;)</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">switch</span><span style="color: #D4D4D4"> (speedValue)</span></span>
<span class="line"><span style="color: #D4D4D4">  {</span></span>
<span class="line"><span style="color: #6A9955">    //If &quot;myMotor.rSpeed&quot; is 0, set iStatusValue to 0</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">case</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">      iStatusValue = (</span><span style="color: #569CD6">int</span><span style="color: #D4D4D4">)</span><span style="color: #4EC9B0">MotorStatusType</span><span style="color: #D4D4D4">::Stopped;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #C586C0">break</span><span style="color: #D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">    //Otherwise, if &quot;myMotor.rSpeed&quot; &gt; &quot;myMotor.rMaxSpeed&quot;, set iStatusValue to Estop status int</span></span>
<span class="line"><span style="color: #6A9955">    //           if not, set iStatusValue to Forward status int</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #C586C0">default</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">      iStatusValue = ((speedValue &gt;= maxSpeedValue) ? (</span><span style="color: #569CD6">int</span><span style="color: #D4D4D4">)</span><span style="color: #4EC9B0">MotorStatusType</span><span style="color: #D4D4D4">::Estop : (</span><span style="color: #569CD6">int</span><span style="color: #D4D4D4">)</span><span style="color: #4EC9B0">MotorStatusType</span><span style="color: #D4D4D4">::Forward);</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #C586C0">break</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">  //Assign iStatusValue&apos;s value to &quot;myMotor.iStatus&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #DCDCAA">dpSet</span><span style="color: #D4D4D4">(motorDpe + </span><span style="color: #CE9178">&quot;.iStatus&quot;</span><span style="color: #D4D4D4">, iStatusValue);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">  //Set the maxSpeedTextbox and speedTextbox&apos;s test to their respective values</span></span>
<span class="line"><span style="color: #6A9955">  //NOTE: dpValToString ensures the units we assigned earlier in the series are displayed.</span></span>
<span class="line"><span style="color: #6A9955">  //      Simply using &lt;Textbox&gt;.text = &lt;speedValue&gt; will work, but will not display appropriate units</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">maxSpeedTextbox</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">text</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">dpValToString</span><span style="color: #D4D4D4">(motorDpe + </span><span style="color: #CE9178">&quot;.rMaxSpeed&quot;</span><span style="color: #D4D4D4">, maxSpeedValue, </span><span style="color: #569CD6">true</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #9CDCFE">speedTextbox</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">text</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">dpValToString</span><span style="color: #D4D4D4">(motorDpe + </span><span style="color: #CE9178">&quot;.rSpeed&quot;</span><span style="color: #D4D4D4">, speedValue, </span><span style="color: #569CD6">true</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">//=============================== On Status Change =========================================</span></span>
<span class="line"><span style="color: #569CD6">void</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">onStatusChange</span><span style="color: #D4D4D4">(</span><span style="color: #4EC9B0">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">statusDp</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">int</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">statusValue</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #6A9955">  //Define the variable whose value will be assigned to the rectangle&apos;s color property</span></span>
<span class="line"><span style="color: #D4D4D4">  string rectangleColor;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">  //Determine color to assign to rectangle based off iStatus</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (statusValue == (</span><span style="color: #569CD6">int</span><span style="color: #D4D4D4">)</span><span style="color: #4EC9B0">MotorStatusType</span><span style="color: #D4D4D4">::Stopped)</span></span>
<span class="line"><span style="color: #D4D4D4">  {</span></span>
<span class="line"><span style="color: #D4D4D4">    rectangleColor = STOPPED_COLOR;</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (statusValue == (</span><span style="color: #569CD6">int</span><span style="color: #D4D4D4">)</span><span style="color: #4EC9B0">MotorStatusType</span><span style="color: #D4D4D4">::Estop)</span></span>
<span class="line"><span style="color: #D4D4D4">  {</span></span>
<span class="line"><span style="color: #D4D4D4">    rectangleColor = ESTOPPED_COLOR;</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (statusValue == (</span><span style="color: #569CD6">int</span><span style="color: #D4D4D4">)</span><span style="color: #4EC9B0">MotorStatusType</span><span style="color: #D4D4D4">::Forward)</span></span>
<span class="line"><span style="color: #D4D4D4">  {</span></span>
<span class="line"><span style="color: #D4D4D4">    rectangleColor = FORWARD_COLOR;</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">  //Assign selected color to rectangle</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #DCDCAA">setValue</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;rectangle&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #CE9178">&quot;backCol&quot;</span><span style="color: #D4D4D4">, rectangleColor);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>NOTE:</strong> $-Parameters can be interspersed throughout our code; wherever a $-Parameter is referenced, the value passed in from the parent panel will take its place. DMC’s best practices, however, entail using a $-Parameter only once by assigning an internal variable to the $-Parameter and then using said variable within the panel’s script. In the case a $-Parameter needs to have its name changed, the modification only needs to be made once in the panel code.</p>



<p class="wp-block-paragraph">Now that our TestPanel is configured to accept a variety of datapoints (of type “myDatapointType”), we may now begin creating panel references.</p>



<ol class="wp-block-list">
<li>Create a parent panel called <strong>“ParentPanel.”</strong></li>



<li>Drag a <strong>“TestPanel”</strong> into the “ParentPanel” working space</li>



<li>Add the datapoint <strong>“myMotor”</strong> to the <strong>“$motorDpe”</strong> value field
<ul class="wp-block-list">
<li>This can be done in the reference panel&#8217;s &#8220;Reference defining&#8221; popup</li>



<li>Or in the reference panel&#8217;s Property editor</li>
</ul>
</li>



<li>Repeat steps 2 and 3 for the datapoints <strong>“myMotor2”</strong> and <strong>“myMotor3.”</strong></li>
</ol>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="329" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/7-parent-panel.png" alt="7 parent panel" class="wp-image-19842" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/7-parent-panel.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/7-parent-panel-300x110.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/7-parent-panel-768x281.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="has-text-align-center wp-block-paragraph"><strong>Or</strong></p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="508" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/8-property-editor.png" alt="8 property editor" class="wp-image-19843" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/8-property-editor.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/8-property-editor-300x169.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/8-property-editor-768x433.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="wp-block-paragraph">Congratulations! You’ve created a parent panel with three reference panels. If any changes are made to TestPanel, those changes would propagate into the parent panels’ references. Let’s test this.</p>



<p class="wp-block-paragraph">Since it’s not evident which panel reference refers to which motor, we’ll make a couple of modifications within TestPanel. We’ll first add a primitive text object over our rectangle (name ‘motorLabel’, set Foreground Color to ‘Base_White’, change the text to ‘Motor Dpe’, and center the text over the ‘rectangle’ object) to serve as a label.</p>



<p class="wp-block-paragraph">Additionally, we’ll add a <strong>setValue</strong> command to the panel initialization in Scope Lib to populate the label with the correct motor dpe.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="401" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/9-motor-test-panel.png" alt="9 motor test panel" class="wp-image-19844" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/9-motor-test-panel.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/9-motor-test-panel-300x134.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/9-motor-test-panel-768x342.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="546" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/10-test-panel-props.png" alt="10 test panel props" class="wp-image-19845" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/10-test-panel-props.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/10-test-panel-props-300x182.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/10-test-panel-props-768x466.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="609" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/11-test-panel-script.png" alt="11 test panel script" class="wp-image-19846" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/11-test-panel-script.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/11-test-panel-script-300x203.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/11-test-panel-script-768x520.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="wp-block-paragraph">Upon opening ParentPanel (if ParentPanel is already open, close it so that the working space’s reference panels can be updated) and running QuickTest, you’ll notice the new panel titles are now labeled “myMotor”, “myMotor2”, and “myMotor3.”</p>



<p class="wp-block-paragraph">Furthermore, you’ll notice that changing rSpeed and rMaxSpeed in each of the datapoints (myMotor, myMotor2, and myMotor3) all reflect on their appropriate panels.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="704" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/12-all-motors.png" alt="12 all motors" class="wp-image-19847" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/12-all-motors.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/12-all-motors-300x235.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/12-all-motors-768x601.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<h2 class="wp-block-heading" id="h-additional-parameter-features">Additional $-Parameter Features</h2>



<p class="wp-block-paragraph"><u><strong>Optional parameters</strong></u></p>



<p class="wp-block-paragraph">By default, $-Parameters are required to be passed down from parent panel to reference panel. When a reference panel is created, its dollar parameters will, by default, be self-defined.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="450" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/13-panel-parameter.png" alt="13 panel parameter" class="wp-image-19848" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/13-panel-parameter.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/13-panel-parameter-300x150.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/13-panel-parameter-768x384.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="670" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/14-motor-properties.png" alt="14 motor properties" class="wp-image-19849" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/14-motor-properties.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/14-motor-properties-300x223.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/14-motor-properties-768x572.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="wp-block-paragraph">If no alternative $-Parameter is provided, the panel in runtime will generate an error (assuming the parent panel does not become a reference panel itself).</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="151" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/15-parameter-script.png" alt="15 parameter script" class="wp-image-19850" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/15-parameter-script.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/15-parameter-script-300x50.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/15-parameter-script-768x129.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="wp-block-paragraph">However, if an underscore is placed directly after the “$”, the parameter then becomes optional. When a reference panel is created, its optional dollar parameters are not automatically defined.</p>



<p class="wp-block-paragraph">Optional parameters are accessible in the “Reference defining” popup under the “optional” tab or along with other $-Parameters in the Property Editor.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="400" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/16-blank-parameter.png" alt="16 blank parameter" class="wp-image-19851" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/16-blank-parameter.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/16-blank-parameter-300x133.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/16-blank-parameter-768x341.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="wp-block-paragraph"><u><strong>Specifying $-Parameter Data Types</strong></u></p>



<p class="wp-block-paragraph">$-Parameters can be designated to have specific data types according to their names’ prefixes:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="584" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/17-character-types_1.png" alt="17 character types 1" class="wp-image-19852" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/17-character-types_1.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/17-character-types_1-300x195.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/17-character-types_1-768x498.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="900" height="453" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/18-data-types.png" alt="18 data types" class="wp-image-19853" srcset="https://static.dmcinfo.com/wp-content/uploads/2025/05/18-data-types.png 900w, https://static.dmcinfo.com/wp-content/uploads/2025/05/18-data-types-300x151.png 300w, https://static.dmcinfo.com/wp-content/uploads/2025/05/18-data-types-768x387.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p class="wp-block-paragraph"><u><strong>Specifying $-Parameter Parameter Types</strong></u></p>



<p class="wp-block-paragraph">Fun Fact of the Day: Clicking the ellipsis in the reference defining panel calls a popup that assists the user in a $-Parameter selection. This is only done, however, if a $-Parameter does not adhere to a data-type-specifying convention (and is therefore labeled as “[unknown]”). From this<strong> “Menu” </strong>popup, one can choose to open the <strong>“DP-Selector”</strong>, <strong>“DPE-Selector”</strong>, <strong>“Color-Selector”</strong>, <strong>“Panel-Selector”</strong>, <strong>“Font-Selector”</strong>, or <strong>“Keyword-Selector”</strong> (if applicable).</p>



<p class="wp-block-paragraph"><strong>NOTE:</strong> The “DP-Selector” only allows the user to select the highest level of a datapoint structure while the “DPE-Selector” allows the user to select the datapoint or any of its respective elements.</p>



<p class="wp-block-paragraph"><br>
<em>Reference Defining Panel</em></p>



<p class="wp-block-paragraph"><br>
<em>DP-Selector</em></p>



<p class="wp-block-paragraph"><br>
<em>DPE-Selector</em></p>



<p class="wp-block-paragraph"><br>
<em>Color-Selector</em></p>



<p class="wp-block-paragraph"><br>
<em>Panel-Selector</em></p>



<p class="wp-block-paragraph"><br>
<em>Font-Selector</em></p>



<p class="wp-block-paragraph">Similar to how the naming convention allows $-Parameters to be defined as specific datatypes, the naming convention also allows users to specify $-Parameters’ parameter types. If a $-Parameter contains the name “dp”, “dpe”, &#8220;color”, &#8220;panel&#8221;, or “font”, the ellipses click will bypass the “Menu” panel and navigate directly to the appropriate selector.</p>



<p class="wp-block-paragraph"><strong>NOTE:</strong> If a user were to specify a data type and a parameter type for a specific $-Parameter, the parameter type would take precedence and the $-Parameter would be considered an “[unknown]” data type.</p>



<p class="wp-block-paragraph">For example, “$sMyDpe” would be considered an unknown (as opposed to a string) and open the DPE-Selector.</p>



<p class="wp-block-paragraph"><strong>NOTE 2:</strong> If a user has a lack of foresight and includes multiple parameter types in their $-Parameter name, then a selector will open in the following priority:<br>
<strong>Dpe &gt; dp &gt; panel &gt;&nbsp;color &gt; font</strong></p>



<p class="wp-block-paragraph">For example, “$myColorDpe” would open the DPE-Selector as opposed to the Color-Selector.</p>



<p class="wp-block-paragraph">Now that we’ve reviewed the wonders of panel embedding and started learning the magic of $-Parameters, it’s time to further our knowledge of panels. In the next edition of “Getting Started with WinCC OA”, we’ll dive into another form of panel references, Child Panels (i.e. Popups), and how $-Parameters are used in that context.</p>



<p class="wp-block-paragraph"><strong>Topics to look forward to in this series:&nbsp;</strong></p>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/blog/19540/getting-started-with-wincc-oa-part-11-panels-child-panels-popups/">Part 11:&nbsp;Panels | Child Panels (Popups)</a></li>



<li><a href="https://static.dmcinfo.com/blog/18628/getting-started-with-wincc-oa-part-12-modules-and-embedded-modules/">Part 12: Modules &amp; Embedded Modules</a></li>
</ul>



<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/contact">Contact</a>&nbsp;DMC to get started on your next WinCC project and learn more about our&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/siemens-simatic-wincc-programming">Siemens SIMATIC WinCC Programming</a>&nbsp;as well as our&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/wincc-open-architecture-development">WinCC Open Architecture Development.</a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/19860/getting-started-with-wincc-oa-part-10-panel-nesting-and-parameters/">Getting Started with WinCC OA: Part 10 &#8211; Panel Nesting and $-Parameters</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Getting Started with WinCC OA: Part 9 &#8211; Color Database and High Performance Best Practices</title>
		<link>https://static.dmcinfo.com/blog/20143/getting-started-with-wincc-oa-part-9-color-database-and-high-performance-best-practices/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Fri, 06 Mar 2020 15:31:57 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[WinCC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/20143/getting-started-with-wincc-oa-part-9-color-database-and-high-performance-best-practices/</guid>

					<description><![CDATA[<p>Welcome back to “Getting Started with WinCC OA”! If you aren’t familiar with the series’ previous topics, it’s recommended that you read the respective installments before proceeding: In Part 9 of “Getting Started with WinCC OA,” we’ll look at the Color Database and the implementation of color-based concepts presented in “The High Performance HMI Handbook” [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/20143/getting-started-with-wincc-oa-part-9-color-database-and-high-performance-best-practices/">Getting Started with WinCC OA: Part 9 &#8211; Color Database and High Performance Best Practices</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Welcome back to “Getting Started with WinCC OA”! If you aren’t familiar with the series’ previous topics, it’s recommended that you read the respective installments before proceeding:</p>



<ul class="wp-block-list">
<li><a href="/latest-thinking/blog/id/9870/getting-started-with-wincc-oa-part-1--creating-opening-a-project">Part 1: Creating and Opening a Project</a></li>



<li><a href="/latest-thinking/blog/id/9871/getting-started-with-wincc-oa-part-2--folder-structure-gedi-layout">Part 2: Folder Structure and Gedi Layout</a></li>



<li><a href="/latest-thinking/blog/id/9884/getting-started-with-wincc-oa-part-3--panels-the-basics">Part 3: Panels | The Basics</a></li>



<li><a href="/latest-thinking/blog/id/9893/getting-started-with-wincc-oa-part-4--panel-scripting-environments-and-quicktest">Part 4: Panel Scripting Environments and QuickTest</a></li>



<li><a href="/latest-thinking/blog/id/9906/getting-started-with-wincc-oa-part-5--scripting-syntax">Part 5: Scripting Syntax</a></li>



<li><a href="/latest-thinking/blog/id/9921/getting-started-with-wincc-oa-part-6--para-overview-and-datapoint-creation">Part 6: Para Overview and Datapoint Creation</a></li>



<li><a href="/latest-thinking/blog/id/9944/getting-started-with-wincc-oa-part-7--interacting-with-datapoints-via-scripting">Part 7: Interacting with Datapoints via Scripting</a></li>



<li><a href="https://static.dmcinfo.com/blog/20658/getting-started-with-wincc-oa-part-8-libraries/">Part 8: Libraries</a></li>
</ul>



<p class="wp-block-paragraph">In Part 9 of “Getting Started with WinCC OA,” we’ll look at the Color Database and the implementation of color-based concepts presented in “The High Performance HMI Handbook” by Bill R. Hollifield, Dana Oliver, Eddie Habibi, and Ian Nimmo.</p>



<h2 id="h-what-is-a-color-database" class="wp-block-heading">What is a Color Database?</h2>



<p class="wp-block-paragraph">The color database is where project colors are defined and stored. Project colors can be separated into and organized via different databases. Recall the OA folder structure and panel view tree outlined in <a href="/latest-thinking/blog/id/9871/getting-started-with-wincc-oa-part-2--folder-structure-gedi-layout">Part 2: Folder Structure and Gedi Layout</a>,&nbsp;color databases are stored within the ColorDB folder and can be accessed in Gedi via the Color Database element in the Project View tree.</p>



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



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/2-projectview-color.png" alt="color project view"/></figure>



<h2 id="h-creating-a-database" class="wp-block-heading">Creating a Database</h2>



<p class="wp-block-paragraph">To create a color database, simply right click the <strong>“Color Database”</strong> Project View tree element and select<strong> “Add New Color Database.”</strong> For our example, we’ll call this color database <strong>“Project Base.”</strong></p>



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



<h2 id="h-creating-a-color-database-color" class="wp-block-heading">Creating a Color Database Color</h2>



<p class="wp-block-paragraph">To add a color, right-click the color database that will house said color and select <strong>“Add New Color.”</strong> For our example, we’ll create the following colors within the “Project Base” database:</p>


<table style="width:100%; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; margin-bottom:40px;">
<tbody>
<tr style="text-align:center;">
<th style="border-collapse:collapse; border-style:solid; border-width:medium; border-spacing: 20px; border:1px solid black; height:100px; font-size:24px; border-right-style:solid; border-right-width:medium; border-left-style:solid; border-left-width:medium;"><strong>Name</strong></th>
<th style="border-collapse:collapse; border-style:solid; border-width:medium; border-spacing: 20px; border:1px solid black; height:100px; font-size:24px; border-right-style:solid; border-right-width:medium; border-left-style:solid; border-left-width:medium;"><strong>RGB</strong></th>
</tr>
<tr>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">Base_Red</td>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">166, 20, 3</td>
</tr>
<tr>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">Base_Blue</td>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">46, 56, 255</td>
</tr>
<tr>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">Base_Green</td>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">82, 197, 33</td>
</tr>
<tr>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">Base_DarkGrey</td>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">93, 93, 93</td>
</tr>
<tr>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">Base_White</td>
<td style="text-align:center; vertical-align:middle; border-collapse:collapse; border:1px solid black; border-style:solid; border-width:medium; font-size:24px;">247, 247, 247</td>
</tr>
</tbody>
</table>


<p class="wp-block-paragraph">If following along, feel free to adjust the colors’ RGB values as you see fit.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/4-addnewcolor.png" alt="add new color"/></figure>



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



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



<h2 id="h-creating-color-database-aliases" class="wp-block-heading">Creating Color Database Aliases</h2>



<p class="wp-block-paragraph">Programmers use aliases to identify color database colors under different names. Using aliases helps maintain color consistency throughout a project, makes code more readable, and prevents cluttering within color databases</p>



<p class="wp-block-paragraph">DMC’s best practices involve creating a color database of base colors to serve as a project color foundation. All other color databases will consist of aliases of these base colors.</p>



<p class="wp-block-paragraph">Before creating an alias, we’ll first create a new color database called <strong>“Device Status.”</strong> Within the “Devices Status” color database, we’ll create an alias called <em><strong>DeviceStatus_Estopped</strong></em>&nbsp;and assign it <strong><em>Base_Red</em>.</strong></p>



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



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/8-9newcolor.png" alt="new color saving"/></figure>



<p class="wp-block-paragraph">In addition, we’ll create<strong> <em>DeviceStatus_Stopped</em></strong>&nbsp;as<strong> <em>Base_Blue</em></strong>&nbsp;and <strong><em>DeviceStatus_Running</em>&nbsp;</strong>as <strong><em>Base_Green</em>.</strong></p>



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



<p class="wp-block-paragraph">Now that we’ve created new device status colors let’s apply them to our example from Parts 7 and 8. In <a href="/latest-thinking/blog/id/9944/getting-started-with-wincc-oa-part-7--interacting-with-datapoints-via-scripting">Part 7 &#8211; Interacting with Datapoints via Scripting</a>, we created a simple rectangle (represents a motor device) and assigned it a “Red” background-color within its project properties. Now that we have designated status colors, let’s give it a <em><strong>DeviceStatus_Stopped</strong></em>&nbsp;default color.</p>



<p class="wp-block-paragraph">In reality, this color will only be visible while editing in Gedi as the example code automatically assigns the rectangle a new color in runtime. Regardless, we’ll still apply the color.</p>



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



<p class="wp-block-paragraph">Recall that in <a href="/latest-thinking/blog/id/10014/getting-started-with-wincc-oa-part-8--libraries">Part 08 – Libraries</a>, we created a control file that defined a variety of color constants. Instead of defining the constants as primary OA colors “red,” “blue,” and “green,” we can re-define them as our newly created aliases in the “ColorConst.ctl” file.</p>



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



<h2 id="h-the-high-performance-hmi" class="wp-block-heading">The High Performance HMI</h2>



<p class="wp-block-paragraph">The High Performance HMI is a concept presented in “The High Performance HMI Handbook” by Bill R. Hollifield, Dana Oliver, Eddie Habibi, and Ian Nimmo. The book focuses on developing human-machine interfaces in a way that maximizes operators’ situational awareness and increases HMI functionality and efficiency. Though topics in the book stretch from ideal screen topology to control room distractions, I found it worthwhile to highlight some basic ideas on color selection in this blog post.</p>



<p class="wp-block-paragraph">According to “The High Performance HMI Handbook”</p>



<ul class="wp-block-list">
<li>Color should be used to draw the operators’ attention and highlight abnormal situations</li>



<li>Color blindness is a prevalent condition that must be taken into account when selecting colors. For those that are color blind, color combinations such as green + red and blue + purple are often hard to differentiate.</li>
</ul>



<p class="wp-block-paragraph">For example, consider the following color schemes in device objects in DMC’s WinCC OA Open Library:</p>



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



<p class="wp-block-paragraph">The standard color scheme is generally what those unfamiliar with High Performance HMI concepts might consider ideal and preferable. However, note what the same layout looks like when passed through a color-blind simulator application:</p>



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



<p class="wp-block-paragraph">Note that the standard<strong> “Active” </strong>and <strong>“Fault” </strong>states are nearly indistinguishable to those with deuteranopia (green-blindness). All High Performance HMI colors are easily differentiable. Also, the High Performance scheme uses color to draw an operator’s attention to a faulted state and leaves normal operation in greyscale colors.</p>



<h2 id="h-creating-alternative-color-schemes" class="wp-block-heading">Creating Alternative Color Schemes</h2>



<p class="wp-block-paragraph">Color schemes allow users to overwrite color definitions and allows for color transitioning. This can be helpful when shifting between “day” and “night” modes, for example. For the purposes of this tutorial, we’ll create a High Performance color scheme that that overwrites our <em><strong>DeviceStatus_Stopped</strong></em> and <strong><em>DeviceStatus_Forward</em></strong> aliases with alternative high performance colors.</p>



<p class="wp-block-paragraph">To create a <strong>color scheme</strong>, right-click the Color Databases element and select<strong> “Add New Color Scheme Folder.”</strong> We’ll name this color scheme, “High Performance Colors.”</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/15-add-new-scheme-folder.png" alt="new folder"/></figure>



<p class="wp-block-paragraph">Within a color scheme folder, you can define colors and their respective color databases. Within the “High Performance Colors” color scheme folder, we’ll create a color database titled <strong>“DeviceStatus”</strong> and define aliases <em><strong>DeviceStatus_Stopped</strong></em> as <em><strong>Base_DarkGrey</strong></em> and <strong><em>DeviceStatus_Forward</em> </strong>as<strong> <em>Base_White</em>.</strong></p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/16-highperformance-colors.png" alt="high performance colors"/></figure>



<p class="wp-block-paragraph">Everything under the Color Databases element and not in a color scheme folder is considered the default color/database. <strong>When a color scheme is “Active,” any conflicting colors within the color scheme folder will overwrite its default color counterpart.</strong></p>



<p class="wp-block-paragraph">Since DeviceStatus_Running and DeviceStatus_Stopped are defined within the High Performance Colors, the&nbsp;<strong><em>Base_White</em></strong> and <strong><em>Base_DarkGrey</em></strong> will represent those color aliases respectively when the “High Performance Colors” are active. <strong><em>Base_Red</em></strong> will continue to represent the <strong><em>Device_Status_Estopped</em></strong> since there is no definition within the “High Performance Colors” scheme.</p>



<h2 id="h-activating-color-schemes" class="wp-block-heading">Activating Color Schemes</h2>



<p class="wp-block-paragraph">There are several ways of activating color schemes within a project:</p>



<p class="wp-block-paragraph"><u><strong>Activate in Gedi</strong></u><br>
To activate a color scheme in Gedi, simply right click its respective folder and select “<strong>Activate Color Scheme.</strong>” To activate the default scheme, simply perform the same action but right-clicking on a default color. This is a good way of testing different color schemes during development.</p>



<p class="wp-block-paragraph"><u><strong>Activate via Scripting</strong></u><br><br>Color schemes can be altered during runtime by using the function</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(1 * 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">Plaintext</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>colorSetActiveScheme(&lt;Color Scheme>)Show more lines</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: #D4D4D4">colorSetActiveScheme(&lt;Color Scheme&gt;)Show more lines</span></span></code></pre></div>



<p class="wp-block-paragraph">Where &lt;Color Scheme&gt; is a string of the folder name. To activate the default color scheme, simply use empty quotes. Enabling color schemes via scripting is ideal for switching between color schemes during runtime.</p>



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



<p class="wp-block-paragraph"><u><strong>Activate via Config File</strong></u><br><br>The config file will be covered more in-depth in subsequent “Getting Started with WinCC OA” installments. However, it’s important to note that a color scheme can be activated by implementing the following line within the [ui] section of the config file:</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(1 * 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">Plaintext</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>activeColorScheme = &lt;Color Scheme></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: #D4D4D4">activeColorScheme = &lt;Color Scheme&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">Where &lt;Color Scheme&gt; is a string of the folder name. Like activating color schemes via scripting, the default color scheme is represented with empty quotes. With that said, it is not necessary to activate the default color scheme via the config file since, as the default, it’s already active upon startup.</p>



<p class="wp-block-paragraph">Activating color schemes via the config file is ideal if a project will use only one non-default color scheme.</p>



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



<h2 id="h-example-project-colors" class="wp-block-heading">Example Project Colors</h2>



<p class="wp-block-paragraph">Going back to the example project, we can run a quick test of our panel to view our new default colors. Since we’re working primarily in Gedi, we can activate the High Performance color scheme by right-clicking the “High Performance Colors” folder and activating the color scheme. Here’s how our rectangle’s color has changed over time:</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/19-all-colors.png" alt="OA blue green and red"/></figure>



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



<p class="wp-block-paragraph">WinCC OA comes with an array of accessible and usable colors that can be found within the base OA project. While most colors aren’t important enough to know, the “_dpdoesnotexist” color bears heavy significance in the development and debugging. In default OA objects (and ideally any other user-generated content like DMC’s WinCC OA Open Library), the “_dpdoesnotexist” color will display if the object’s user-specified datapoint or datapoint element does not exist within the project.</p>



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



<p class="wp-block-paragraph"><br>
<span style="font-size:20px;"><span style="margin-left: 150px;">Native OA Object in GEDI</span><span style="margin-left: 90px;">Native OA Object with Invalid DPE in QuickTest</span></span></p>


<div class="clear:both">&nbsp;</div>


<p class="wp-block-paragraph">Now that we’ve covered colors and color databases, let’s jump back to panel development. In the next edition of “Getting Started with WinCC OA,” we’ll cover panel nesting and passing parameters from panel to reference panel using $-parameters.</p>



<p class="wp-block-paragraph"><strong>Topics to look forward to in this series:&nbsp;</strong></p>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10138/getting-started-with-wincc-oa-part-10--panel-nesting-and-parameters">Part 10: Panels | Panel Nesting and $-Parameters</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10184/getting-started-with-wincc-oa-part-11--panels-child-panels-popups">Part 11:&nbsp;Panels | Child Panels (Popups)</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10313/getting-started-with-wincc-oa-part-12--modules-and-embedded-modules">Part 12: Modules &amp; Embedded Modules</a></li>
</ul>



<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/contact">Contact</a>&nbsp;DMC to get started on your next WinCC project and learn more about our&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/siemens-simatic-wincc-programming">Siemens SIMATIC WinCC Programming</a>&nbsp;as well as our&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/wincc-open-architecture-development">WinCC Open Architecture Development.</a></p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/20143/getting-started-with-wincc-oa-part-9-color-database-and-high-performance-best-practices/">Getting Started with WinCC OA: Part 9 &#8211; Color Database and High Performance Best Practices</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DMC Chicago Hangs Out at the Rock Walls</title>
		<link>https://static.dmcinfo.com/blog/20515/dmc-chicago-hangs-out-at-the-rock-walls/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Tue, 26 Nov 2019 15:32:17 +0000</pubDate>
				<category><![CDATA[Activities]]></category>
		<category><![CDATA[Chicago]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Locations]]></category>
		<category><![CDATA[Activity Fund]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/20515/dmc-chicago-hangs-out-at-the-rock-walls/</guid>

					<description><![CDATA[<p>This past fall, those of us at the DMC Chicago office decided to put our willpower, endurance, and grip strength to the test by hitting up First Ascent Chicago rock climbing gym. With the help of the month’s activity fund budget, we gained admission, velcroed-up our shoes, strapped on our harnesses, and took to the [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/20515/dmc-chicago-hangs-out-at-the-rock-walls/">DMC Chicago Hangs Out at the Rock Walls</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This past fall, those of us at the DMC Chicago office decided to put our willpower, endurance, and grip strength to the test by hitting up <a href="https://faclimbing.com/" target="_blank" rel="noreferrer noopener">First Ascent Chicago</a> rock climbing gym. With the help of the month’s activity fund budget, we gained admission, velcroed-up our shoes, strapped on our harnesses, and took to the walls.</p>



<p class="wp-block-paragraph">For some, this trip marked their ~32,767<sup>th</sup> time rock climbing. For others, this DMC expedition served as the first opportunity to put their chalky hands to the rock walls and a chance to try something new.</p>



<p class="wp-block-paragraph"><em>“I had never done rock climbing as an adult before, but I have a lot of friends that love it and have it as a hobby. I took their word for it and gave it a shot. Despite having some sore arms the next day, it was such a cool, new experience for me! 10/10 would do it again!”</em> – Elisha Harris</p>



<p class="wp-block-paragraph">Throughout the evening, we partook in:</p>



<p class="wp-block-paragraph"><strong>Bouldering:</strong></p>



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



<p class="wp-block-paragraph"><strong>Top-Roping:</strong></p>



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



<p class="wp-block-paragraph"><strong>Belaying </strong>(how’s that for trusting your coworkers?):</p>



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



<p class="wp-block-paragraph"><strong>And having fun!</strong></p>



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



<p class="wp-block-paragraph">All-in-all, we had a blast and look forward to our next DMClimbing adventure!</p>



<h2 class="wp-block-heading" id="h-dmc-rockers-testimony-nbsp">DMC Rockers&#8217; Testimony:&nbsp;</h2>



<p class="wp-block-paragraph"><em>&nbsp;“This was my first activity fund event. Being new to the company, it was a cool way to meet some of my coworkers. I love climbing, and doing it with fun people makes it even better.” – Andrew Williams</em></p>



<p class="wp-block-paragraph"><em>“Jumping off the top of the wall is going against years of human survival instinct!” – Corey Zheng</em></p>



<p class="wp-block-paragraph"><em></em></p>



<p class="wp-block-paragraph">Learn more about <a href="/about">DMC&#8217;s Company Culture</a>.&nbsp;</p>
<p>The post <a href="https://static.dmcinfo.com/blog/20515/dmc-chicago-hangs-out-at-the-rock-walls/">DMC Chicago Hangs Out at the Rock Walls</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Getting Started with WinCC OA: Part 8 &#8211; Libraries</title>
		<link>https://static.dmcinfo.com/blog/20658/getting-started-with-wincc-oa-part-8-libraries/</link>
		
		<dc:creator><![CDATA[Nick Leisle]]></dc:creator>
		<pubDate>Wed, 23 Oct 2019 11:47:40 +0000</pubDate>
				<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[WinCC]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/20658/getting-started-with-wincc-oa-part-8-libraries/</guid>

					<description><![CDATA[<p>Welcome back to “Getting Started with WinCC OA”! If you aren’t familiar with the series’ previous topics, I recommend that you read the respective installments before proceeding: Now that we have a basic understanding of scripting and how to interact with datapoints, we’re ready to move beyond panel scripting environments and create globally accessible code. [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/20658/getting-started-with-wincc-oa-part-8-libraries/">Getting Started with WinCC OA: Part 8 &#8211; Libraries</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Welcome back to “Getting Started with WinCC OA”! If you aren’t familiar with the series’ previous topics, I recommend that you read the respective installments before proceeding:</p>



<ul class="wp-block-list">
<li><a href="/latest-thinking/blog/id/9870/getting-started-with-wincc-oa-part-1--creating-opening-a-project">Part 1: Creating and Opening a Project</a></li>



<li><a href="/latest-thinking/blog/id/9871/getting-started-with-wincc-oa-part-2--folder-structure-gedi-layout">Part 2: Folder Structure and Gedi Layout</a></li>



<li><a href="/latest-thinking/blog/id/9884/getting-started-with-wincc-oa-part-3--panels-the-basics">Part 3: Panels | The Basics</a></li>



<li><a href="/latest-thinking/blog/id/9893/getting-started-with-wincc-oa-part-4--panel-scripting-environments-and-quicktest">Part 4: Panel Scripting Environments and QuickTest</a></li>



<li><a href="/latest-thinking/blog/id/9906/getting-started-with-wincc-oa-part-5--scripting-syntax">Part 5: Scripting Syntax</a></li>



<li><a href="/latest-thinking/blog/id/9921/getting-started-with-wincc-oa-part-6--para-overview-and-datapoint-creation">Part 6: Para Overview and Datapoint Creation</a></li>



<li><a href="/latest-thinking/blog/id/9944/getting-started-with-wincc-oa-part-7--interacting-with-datapoints-via-scripting">Part 7: Interacting with Datapoints via Scripting</a></li>
</ul>



<p class="wp-block-paragraph">Now that we have a basic understanding of scripting and how to interact with datapoints, we’re ready to move beyond panel scripting environments and create globally accessible code. In Part 8 of “Getting Started with WinCC OA,” we’ll explore how we can use libraries to create globally accessible functions, enumerations, constants, etc.</p>



<h2 class="wp-block-heading" id="h-what-are-libraries">What are Libraries?</h2>



<p class="wp-block-paragraph">Control libraries are files that hold code that may be accessed by other scripts within a project. Simply put, they hold globally usable code. One may ask, “Why would we want to use libraries?”</p>



<p class="wp-block-paragraph">Libraries prevent developers from having to rewrite or copy/paste existing code, allow changes to be made quickly and efficiently, and ensure consistency within a project. Let’s jump back quickly to the example used in “Part 7: Interacting with Datapoints via Scripting.” Say we used the same enumeration “StatusType” in several panels in addition to the one we created.</p>



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



<p class="wp-block-paragraph">Without libraries, we’d need to copy and paste this enumeration in all of our panels’ ScopeLibs for further use. If we wanted to alter the enumeration to:</p>



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



<p class="wp-block-paragraph">We’d need to remember every instance of where this function was used, go back in the code, and modify StatusType appropriately. When the number of places we use StatusType increases, the more re-work would be needed to make the change.</p>



<h2 class="wp-block-heading" id="h-how-are-libraries-made">How are Libraries Made?</h2>



<p class="wp-block-paragraph">To create a control library, simply right click “Libraries” in the project view tree and select “Add New CTRL Library.”</p>



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



<p class="wp-block-paragraph">Anything created in the resulting .ctl file can be appropriately referenced throughout the program. To continue from Part 7&#8217;s example, we’ll generate two .ctl files: one for a global<strong> StatusType</strong> and another for <strong>device colors.</strong></p>



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



<p class="wp-block-paragraph"><strong>StatusType.ctl should contain:</strong></p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/statustype-ctl.png" alt="status type stl"/></figure>



<p class="wp-block-paragraph"><strong>ColorConst.ctl should have:</strong></p>



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



<p class="wp-block-paragraph">None of these libraries do anything, however, if they’re not implemented within a program.</p>



<h2 class="wp-block-heading" id="h-how-is-library-content-implemented">How is Library Content Implemented?</h2>



<p class="wp-block-paragraph">Libraries are not initially accessible from a program’s script. The control library file must first be loaded into a project for it to be usable. To do so, you must implement the following line:</p>



<pre class="wp-block-code"><code>
	#uses &lt;.ctl file&gt;
</code></pre>



<p class="wp-block-paragraph">Once a control file is specified, a script may use any and all items within said .ctl file. To implement our control libraries within our example, we’ll modify our ScopeLib’s code as follows:</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">Python</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>#uses "StatusType"
#uses "ColorConst"

//=============================== Panel initialization =========================================
initializePanel()
{
  //Whenever rSpeed or rMaxSpeed changes, call the function "onSpeedChange"
  dpConnect("onSpeedChange", "myMotor.rSpeed", "myMotor.rMaxSpeed");

  //Whenever iStatus changes, call the function "onStatusChange"
  dpConnect("onStatusChange", "myMotor.iStatus");
}


//=============================== Text Field Command =========================================
//Textbox is selected and user keys "Enter"
void textboxCmd()
{
  //Assign the textbox's text value to rMaxSpeed
  dpSet("myMotor.rMaxSpeed", maxSpeedTextbox.text);
}


//=============================== On Speed / Max Speed Value Change =================================
void onSpeedChange(string speedDp, float speedValue, string maxSpeedDp, float maxSpeedValue)
{
  //Define the variable whose value will be assigned to iStatus
  int iStatusValue;

  //Determine what value to assign iStatusValue (and subsequently "myMotor.iStatus")
  switch (speedValue)
  {
    //If "myMotor.rSpeed" is 0, set iStatusValue to 0
    case 0:
      iStatusValue = (int)StatusType::Stopped;
      break;

    //Otherwise, if "myMotor.rSpeed" > "myMotor.rMaxSpeed", set iStatusValue to Estop status int
    //           if not, set iStatusValue to Forward status int
    default:
      iStatusValue = (speedValue >= maxSpeedValue) ? (int)StatusType::Estop : (int)StatusType::Forward;
      break;
  }

  //Assign iStatusValue's value to "myMotor.iStatus"
  dpSet("myMotor.iStatus", iStatusValue);

  //Set the maxSpeedTextbox and speedTextbox's test to their respective values
  //NOTE: dpValToString ensures the units we assigned earlier in the series are displayed.
  //      Simply using &lt;Textbox>.text = &lt;speedValue> will work, but will not display appropriate units
  maxSpeedTextbox.text = dpValToString("myMotor.rMaxSpeed", maxSpeedValue, true);
  speedTextbox.text = dpValToString("myMotor.rSpeed", speedValue, true);
}

//=============================== On Status Change =========================================
void onStatusChange(string statusDp, int statusValue)
{
  //Define the variable whose value will be assigned to the rectangle's color property
  string rectangleColor;

  //Determine color to assign to rectangle based off iStatus
  if (statusValue == (int)StatusType::Stopped)
  {
    rectangleColor = STOPPED_COLOR;
  }

  if (statusValue == (int)StatusType::Estop)
  {
    rectangleColor = ESTOPPED_COLOR;
  }

  if (statusValue == (int)StatusType::Forward)
  {
    rectangleColor = FORWARD_COLOR;
  }

  //Assign selected color to rectangle
  setValue("rectangle", "backCol", rectangleColor);
}</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: #6A9955">#uses &quot;StatusType&quot;</span></span>
<span class="line"><span style="color: #6A9955">#uses &quot;ColorConst&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">//=============================== Panel initialization =========================================</span></span>
<span class="line"><span style="color: #D4D4D4">initializePanel()</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">  //Whenever rSpeed </span><span style="color: #569CD6">or</span><span style="color: #D4D4D4"> rMaxSpeed changes, call the function </span><span style="color: #CE9178">&quot;onSpeedChange&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">  dpConnect(</span><span style="color: #CE9178">&quot;onSpeedChange&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #CE9178">&quot;myMotor.rSpeed&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #CE9178">&quot;myMotor.rMaxSpeed&quot;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  //Whenever iStatus changes, call the function </span><span style="color: #CE9178">&quot;onStatusChange&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">  dpConnect(</span><span style="color: #CE9178">&quot;onStatusChange&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #CE9178">&quot;myMotor.iStatus&quot;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">//=============================== Text Field Command =========================================</span></span>
<span class="line"><span style="color: #D4D4D4">//Textbox </span><span style="color: #569CD6">is</span><span style="color: #D4D4D4"> selected </span><span style="color: #569CD6">and</span><span style="color: #D4D4D4"> user keys </span><span style="color: #CE9178">&quot;Enter&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">void textboxCmd()</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">  //Assign the textbox</span><span style="color: #CE9178">&apos;s text value to rMaxSpeed</span></span>
<span class="line"><span style="color: #D4D4D4">  dpSet(</span><span style="color: #CE9178">&quot;myMotor.rMaxSpeed&quot;</span><span style="color: #D4D4D4">, maxSpeedTextbox.text);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">//=============================== On Speed / Max Speed Value Change =================================</span></span>
<span class="line"><span style="color: #D4D4D4">void onSpeedChange(string speedDp, </span><span style="color: #4EC9B0">float</span><span style="color: #D4D4D4"> speedValue, string maxSpeedDp, </span><span style="color: #4EC9B0">float</span><span style="color: #D4D4D4"> maxSpeedValue)</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">  //Define the variable whose value will be assigned to iStatus</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #4EC9B0">int</span><span style="color: #D4D4D4"> iStatusValue;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  //Determine what value to assign iStatusValue (</span><span style="color: #C586C0">and</span><span style="color: #D4D4D4"> subsequently </span><span style="color: #CE9178">&quot;myMotor.iStatus&quot;</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4">  switch (speedValue)</span></span>
<span class="line"><span style="color: #D4D4D4">  {</span></span>
<span class="line"><span style="color: #D4D4D4">    //If </span><span style="color: #CE9178">&quot;myMotor.rSpeed&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">is</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">, </span><span style="color: #4EC9B0">set</span><span style="color: #D4D4D4"> iStatusValue to </span><span style="color: #B5CEA8">0</span></span>
<span class="line"><span style="color: #D4D4D4">    case </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">      iStatusValue = (</span><span style="color: #4EC9B0">int</span><span style="color: #D4D4D4">)StatusType::Stopped;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #C586C0">break</span><span style="color: #D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">    //Otherwise, </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;myMotor.rSpeed&quot;</span><span style="color: #D4D4D4"> &gt; </span><span style="color: #CE9178">&quot;myMotor.rMaxSpeed&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #4EC9B0">set</span><span style="color: #D4D4D4"> iStatusValue to Estop status </span><span style="color: #4EC9B0">int</span></span>
<span class="line"><span style="color: #D4D4D4">    //           </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">not</span><span style="color: #D4D4D4">, </span><span style="color: #4EC9B0">set</span><span style="color: #D4D4D4"> iStatusValue to Forward status </span><span style="color: #4EC9B0">int</span></span>
<span class="line"><span style="color: #D4D4D4">    default:</span></span>
<span class="line"><span style="color: #D4D4D4">      iStatusValue = (speedValue &gt;= maxSpeedValue) </span><span style="color: #F44747">?</span><span style="color: #D4D4D4"> (</span><span style="color: #4EC9B0">int</span><span style="color: #D4D4D4">)StatusType::Estop : (</span><span style="color: #4EC9B0">int</span><span style="color: #D4D4D4">)StatusType::Forward;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #C586C0">break</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  //Assign iStatusValue</span><span style="color: #CE9178">&apos;s value to &quot;myMotor.iStatus&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">  dpSet(</span><span style="color: #CE9178">&quot;myMotor.iStatus&quot;</span><span style="color: #D4D4D4">, iStatusValue);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  //Set the maxSpeedTextbox </span><span style="color: #569CD6">and</span><span style="color: #D4D4D4"> speedTextbox</span><span style="color: #CE9178">&apos;s test to their respective values</span></span>
<span class="line"><span style="color: #D4D4D4">  //NOTE: dpValToString ensures the units we assigned earlier </span><span style="color: #569CD6">in</span><span style="color: #D4D4D4"> the series are displayed.</span></span>
<span class="line"><span style="color: #D4D4D4">  //      Simply using &lt;Textbox&gt;.text = &lt;speedValue&gt; will work, but will </span><span style="color: #569CD6">not</span><span style="color: #D4D4D4"> display appropriate units</span></span>
<span class="line"><span style="color: #D4D4D4">  maxSpeedTextbox.text = dpValToString(</span><span style="color: #CE9178">&quot;myMotor.rMaxSpeed&quot;</span><span style="color: #D4D4D4">, maxSpeedValue, true);</span></span>
<span class="line"><span style="color: #D4D4D4">  speedTextbox.text = dpValToString(</span><span style="color: #CE9178">&quot;myMotor.rSpeed&quot;</span><span style="color: #D4D4D4">, speedValue, true);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">//=============================== On Status Change =========================================</span></span>
<span class="line"><span style="color: #D4D4D4">void onStatusChange(string statusDp, </span><span style="color: #4EC9B0">int</span><span style="color: #D4D4D4"> statusValue)</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">  //Define the variable whose value will be assigned to the rectangle</span><span style="color: #CE9178">&apos;s color property</span></span>
<span class="line"><span style="color: #D4D4D4">  string rectangleColor;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  //Determine color to assign to rectangle based off iStatus</span></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (statusValue == (</span><span style="color: #4EC9B0">int</span><span style="color: #D4D4D4">)StatusType::Stopped)</span></span>
<span class="line"><span style="color: #D4D4D4">  {</span></span>
<span class="line"><span style="color: #D4D4D4">    rectangleColor = STOPPED_COLOR;</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (statusValue == (</span><span style="color: #4EC9B0">int</span><span style="color: #D4D4D4">)StatusType::Estop)</span></span>
<span class="line"><span style="color: #D4D4D4">  {</span></span>
<span class="line"><span style="color: #D4D4D4">    rectangleColor = ESTOPPED_COLOR;</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (statusValue == (</span><span style="color: #4EC9B0">int</span><span style="color: #D4D4D4">)StatusType::Forward)</span></span>
<span class="line"><span style="color: #D4D4D4">  {</span></span>
<span class="line"><span style="color: #D4D4D4">    rectangleColor = FORWARD_COLOR;</span></span>
<span class="line"><span style="color: #D4D4D4">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">  //Assign selected color to rectangle</span></span>
<span class="line"><span style="color: #D4D4D4">  setValue(</span><span style="color: #CE9178">&quot;rectangle&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #CE9178">&quot;backCol&quot;</span><span style="color: #D4D4D4">, rectangleColor);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span></code></pre></div>



<p class="wp-block-paragraph"><strong>Note that:</strong></p>



<ul class="wp-block-list">
<li>I added the #uses prompts</li>



<li>I removed StatusType enum definition from ScopeLib (since it’s applied via library)</li>



<li>I added color constants (also applied via library)</li>
</ul>



<p class="wp-block-paragraph">With the color constants and StatusType enum defined in libraries, other panels and scripts may use them at will.</p>



<p class="wp-block-paragraph">Now that we have a solid understanding of how to make and implement control libraries, we’ll continue in our OA exploration by investigating color databases and learning how we can use them to create and use custom colors.</p>



<p class="wp-block-paragraph"><strong>Topics to look forward to in this series:&nbsp;</strong></p>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10093/getting-started-with-wincc-oa-part-9--color-database-and-high-performance-best-practices">Part 9: Color Database &amp; High-Performance Best Practices</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10138/getting-started-with-wincc-oa-part-10--panel-nesting-and-parameters">Part 10: Panels | Panel Nesting and $-Parameters</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10184/getting-started-with-wincc-oa-part-11--panels-child-panels-popups">Part 11:&nbsp;Panels | Child Panels (Popups)</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10313/getting-started-with-wincc-oa-part-12--modules-and-embedded-modules">Part 12: Modules &amp; Embedded Modules</a></li>
</ul>



<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/contact">Contact</a>&nbsp;DMC to get started on your next WinCC project and learn more about our&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/siemens-simatic-wincc-programming">Siemens SIMATIC WinCC Programming</a>&nbsp;as well as our&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/wincc-open-architecture-development">WinCC Open Architecture Development.</a></p>
<p>The post <a href="https://static.dmcinfo.com/blog/20658/getting-started-with-wincc-oa-part-8-libraries/">Getting Started with WinCC OA: Part 8 &#8211; Libraries</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
