<?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>Ben Clare, Author at DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/author/benc/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Fri, 04 Sep 2026 15:32:24 +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>Ben Clare, Author at DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>FactoryTalk Optix Series 3 &#8211; NetLogic Overview and Examples</title>
		<link>https://static.dmcinfo.com/blog/16280/factorytalk-optix-series-3-netlogic-overview-and-examples/</link>
		
		<dc:creator><![CDATA[Ben Clare]]></dc:creator>
		<pubDate>Tue, 14 May 2024 17:21:41 +0000</pubDate>
				<category><![CDATA[Allen Bradley PLC]]></category>
		<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[FactoryTalk]]></category>
		<category><![CDATA[FactoryTalk Optix]]></category>
		<category><![CDATA[FT Optix]]></category>
		<category><![CDATA[HMI]]></category>
		<category><![CDATA[Optix]]></category>
		<category><![CDATA[SCADA]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/16280/factorytalk-optix-series-3-netlogic-overview-and-examples/</guid>

					<description><![CDATA[<p>HMI Programming and SCADA Programming are essential for creating efficient and responsive automation systems. When working with Optix, leveraging NetLogic allows for seamless integration between C# code and the SCADA environment, enabling advanced control and data exchange.&#160; NetLogic is C# code&#160;that is linked to Optix. Optix can call methods with parameters, set private C# variables, [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/16280/factorytalk-optix-series-3-netlogic-overview-and-examples/">FactoryTalk Optix Series 3 &#8211; NetLogic Overview and Examples</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming"><strong>HMI Programming and SCADA Programming</strong></a> are essential for creating efficient and responsive automation systems. When working with Optix, leveraging NetLogic allows for seamless integration between C# code and the SCADA environment, enabling advanced control and data exchange.&nbsp;</p>



<p class="wp-block-paragraph">NetLogic is C# code&nbsp;that is linked to Optix. Optix can call methods with parameters, set private C# variables, and has numerous C# Libraries integrated by default to assist with passing data between Optix and your C# code. Optix also allows you to link the monitoring of C# code to an Optix runtime instance.</p>



<h2 id="h-linking-variables" class="wp-block-heading">Linking Variables</h2>



<p class="wp-block-paragraph">When creating NetLogic, you can define variables that interface with the C# code, and can be both written to and read from said C# code. You can also define variable categories to assist with organization.</p>



<ul class="wp-block-list">
<li>First, Variables are added onto the NetLogic object in Optix.</li>
</ul>



<p class="wp-block-paragraph"><p style="text-align: center;">&nbsp;<img decoding="async" alt="Linking Netlogic Variables" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/net-logic-linking-variables.png"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example of variables attached to a NetLogic object</em></p></p>



<p class="wp-block-paragraph">These variables can be referenced in the C# logic by utilizing the “GetVariable” method on our LogicObject.</p>



<ul class="wp-block-list">
<li>For any variables at the top-most level, simply call: LogicObject.GetVariable(“YourVariable”).</li>



<li>For nested variables (such as variables under “Table” in the example above), define a new IUAVariable for the nested name (Tables in this case), and then reference the individual elements of that new variable.</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">C#</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>
private void ParametersSetup()

{
	DB_SERVER_IP = LogicObject.GetVariable("Server IP").Value;
	DB_SERVER_PORT = uint.Parse(LogicObject.GetVariable("Server port").Value);
	SERVICE_NAME = LogicObject.GetVariable("Service name").Value;
	DB_USERNAME = LogicObject.GetVariable("Username").Value;
	DB_PASSWORD = LogicObject.GetVariable("Password").Value;
	DB_QUERIES_FEEDBACK = LogicObject.GetVariable("Queries feedback");
	TABLES = LogicObject.GetVariable("Tables");

	TABLE_DESTINATION = TABLES.GetVariable("Destination").Value;
	TABLE_DISTANCE = TABLES.GetVariable("Distance").Value;
	TABLE_LOCATIONCHANGE = TABLES.GetVariable("LocationChange").Value;
	TABLE_EQUIPMENTSTATUS = TABLES.GetVariable("EquipmentStatus").Value;
	NUMBER_OF_DEVICES = LogicObject.GetVariable("Number of devices").Value;
	NUMBER_OF_EQUIPMENT_AREAS = LogicObject.GetVariable("Number of equipment areas").Value;
	CONNECTIONSTRING = $"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={DB_SERVER_IP})(PORT={(int)DB_SERVER_PORT})))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME={SERVICE_NAME})));User Id={DB_USERNAME};Password={DB_PASSWORD};";
}
</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>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">void</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">ParametersSetup</span><span style="color: #D4D4D4">()</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">DB_SERVER_IP</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Server IP&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">DB_SERVER_PORT</span><span style="color: #D4D4D4"> = </span><span style="color: #569CD6">uint</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Parse</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Server port&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">SERVICE_NAME</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Service name&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">DB_USERNAME</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Username&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">DB_PASSWORD</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Password&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">DB_QUERIES_FEEDBACK</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Queries feedback&quot;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">TABLES</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Tables&quot;</span><span style="color: #D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">TABLE_DESTINATION</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">TABLES</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Destination&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">TABLE_DISTANCE</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">TABLES</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Distance&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">TABLE_LOCATIONCHANGE</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">TABLES</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;LocationChange&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">TABLE_EQUIPMENTSTATUS</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">TABLES</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;EquipmentStatus&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">NUMBER_OF_DEVICES</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Number of devices&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">NUMBER_OF_EQUIPMENT_AREAS</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">LogicObject</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetVariable</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;Number of equipment areas&quot;</span><span style="color: #D4D4D4">).</span><span style="color: #9CDCFE">Value</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">CONNECTIONSTRING</span><span style="color: #D4D4D4"> = </span><span style="color: #CE9178">$&quot;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={</span><span style="color: #9CDCFE">DB_SERVER_IP</span><span style="color: #CE9178">})(PORT={(</span><span style="color: #569CD6">int</span><span style="color: #CE9178">)</span><span style="color: #9CDCFE">DB_SERVER_PORT</span><span style="color: #CE9178">})))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME={</span><span style="color: #9CDCFE">SERVICE_NAME</span><span style="color: #CE9178">})));User Id={</span><span style="color: #9CDCFE">DB_USERNAME</span><span style="color: #CE9178">};Password={</span><span style="color: #9CDCFE">DB_PASSWORD</span><span style="color: #CE9178">};&quot;</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span></code></pre></div>



<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">C#</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>
private IUAVariable DB_QUERIES_FEEDBACK;
private string DB_SERVER_IP;
private uint DB_SERVER_PORT;
private string SERVICE_NAME;
private string DB_USERNAME;
private string DB_PASSWORD;
public IUAVariable TABLES;
private string TABLE_DESTINATION;
private string TABLE_DISTANCE;
private string TABLE_LOCATIONCHANGE;
private string TABLE_EQUIPMENTSTATUS;
private Int32 NUMBER_OF_DEVICES;
private Int32 NUMBER_OF_EQUIPMENT_AREAS;

</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>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">IUAVariable</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">DB_QUERIES_FEEDBACK</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">DB_SERVER_IP</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">uint</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">DB_SERVER_PORT</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">SERVICE_NAME</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">DB_USERNAME</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">DB_PASSWORD</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">public</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">IUAVariable</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">TABLES</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">TABLE_DESTINATION</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">TABLE_DISTANCE</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">TABLE_LOCATIONCHANGE</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">string</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">TABLE_EQUIPMENTSTATUS</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">Int32</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">NUMBER_OF_DEVICES</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #569CD6">private</span><span style="color: #D4D4D4"> </span><span style="color: #4EC9B0">Int32</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">NUMBER_OF_EQUIPMENT_AREAS</span><span style="color: #D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<h2 id="h-calling-methods" class="wp-block-heading">Calling Methods</h2>



<p class="wp-block-paragraph">C# Methods can be called directly from Optix when the [ExportMethod] Line is added above said method. Any parameters associated with the Method will also be exposed, allowing you to set them dynamically from Optix, using a MethodInvocation or by linking them to events.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Invoking C# Methods from Optix" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/method-invocation.png"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example method invocation that shows all the [ExportMethod] methods from the Netlogic C# code</em></p></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">C#</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>
&#91;ExportMethod&#93;

public void SelectAllDevicesDestination()

{

…

</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>
<span class="line"><span style="color: #D4D4D4">&#91;</span><span style="color: #4EC9B0">ExportMethod</span><span style="color: #D4D4D4">&#93;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #569CD6">public</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">void</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">SelectAllDevicesDestination</span><span style="color: #D4D4D4">()</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">…</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<h2 id="h-monitoring-code" class="wp-block-heading">Monitoring Code</h2>



<p class="wp-block-paragraph">When NetLogic is created, Optix automatically configures the codespace (if utilizing VSCode) to attach to the Optix runtime instance, allowing you to monitor your C# card while the Optix application is running.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Monitoring an Optix Project in Visual Code" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/visual-code-monitoring.png"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>Visual Code is attached to the Optix Runtime when monitoring</em></p></p>



<h2 id="h-logging-and-error-handling" class="wp-block-heading">Logging and Error Handling</h2>



<p class="wp-block-paragraph">Optix has a C# library for logging code that should be utilized, as it will output to the console in FT Optix Studio, as well as to the log file for the Optix application.</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">C#</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>
catch (System.Exception ex)
{
	Log.Error(MethodBase.GetCurrentMethod().Name, ex.Message);
}
</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>
<span class="line"><span style="color: #C586C0">catch</span><span style="color: #D4D4D4"> (</span><span style="color: #4EC9B0">System</span><span style="color: #D4D4D4">.</span><span style="color: #4EC9B0">Exception</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">ex</span><span style="color: #D4D4D4">)</span></span>
<span class="line"><span style="color: #D4D4D4">{</span></span>
<span class="line"><span style="color: #D4D4D4">	</span><span style="color: #9CDCFE">Log</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Error</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">MethodBase</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">GetCurrentMethod</span><span style="color: #D4D4D4">().</span><span style="color: #9CDCFE">Name</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">ex</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Message</span><span style="color: #D4D4D4">);</span></span>
<span class="line"><span style="color: #D4D4D4">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph"><p style="text-align: center;">&nbsp;<img decoding="async" alt="Location of Optix Log Files" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/optix-runtime-logs.png"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>The location&nbsp;of Optix log files for an emulated project</em></p></p>



<h2 id="h-read-the-other-articles-in-this-series" class="wp-block-heading">Read the Other Articles in this Series</h2>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10576/factorytalk-optix-series-1--getting-started-with-factorytalk-optix">FactoryTalk Optix Series 1 &#8211; Getting Started with FactoryTalk Optix</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10609/factorytalk-optix-series-2--variables-attributes-dynamic-links-and-converters">FactoryTalk Optix Series 2 &#8211; Variables, Attributes, Dynamic Links, and Converters</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>Extend FactoryTalk Optix with C# NetLogic</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 integrating C# methods, variables, runtime monitoring, and error handling into <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/rockwell-factorytalk-programming/factorytalk-optix-programming/" data-type="page" data-id="44850">FactoryTalk Optix</a> applications.</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/16280/factorytalk-optix-series-3-netlogic-overview-and-examples/">FactoryTalk Optix Series 3 &#8211; NetLogic Overview and Examples</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>FactoryTalk Optix Series 2 &#8211; Variables, Attributes, Dynamic Links, and Converters</title>
		<link>https://static.dmcinfo.com/blog/16293/factorytalk-optix-series-2-variables-attributes-dynamic-links-and-converters/</link>
		
		<dc:creator><![CDATA[Ben Clare]]></dc:creator>
		<pubDate>Tue, 14 May 2024 17:15:21 +0000</pubDate>
				<category><![CDATA[Allen Bradley PLC]]></category>
		<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[FactoryTalk]]></category>
		<category><![CDATA[FactoryTalk Optix]]></category>
		<category><![CDATA[FT Optix]]></category>
		<category><![CDATA[HMI]]></category>
		<category><![CDATA[Optix]]></category>
		<category><![CDATA[SCADA]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/16293/factorytalk-optix-series-2-variables-attributes-dynamic-links-and-converters/</guid>

					<description><![CDATA[<p>Overview Variables, Attributes, Dynamic Links, and converters are the building blocks of Optix UI design. Each variable has a number of attributes associated with it, and Dynamic links and Converters can be used to define a relationship between two or more variables/attributes. A map of the relationships between Variables, Attributes, Dynamic Links, and Converters Variables [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/16293/factorytalk-optix-series-2-variables-attributes-dynamic-links-and-converters/">FactoryTalk Optix Series 2 &#8211; Variables, Attributes, Dynamic Links, and Converters</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 id="h-overview" class="wp-block-heading">Overview</h2>



<p class="wp-block-paragraph">Variables, Attributes, Dynamic Links, and converters are the building blocks of Optix UI design. Each variable has a number of attributes associated with it, and Dynamic links and Converters can be used to define a relationship between two or more variables/attributes.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Variables, Attributes, Converters, and Dynamic Link Relationships" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/variables-attributes-converters-dynamic-links.png"></p></p>



<p class="has-text-align-center wp-block-paragraph"><em>A map of the relationships between Variables, Attributes, Dynamic Links, and Converters</em></p>



<h2 id="h-variables-and-scope" class="wp-block-heading">Variables and Scope</h2>



<p class="wp-block-paragraph">Variable scope is influenced by the containers they are in. All variables with a given container (screen or panel) can access each other. Variables in nested panels have access to the variables in other nested panels and parent/children panels, and vice versa.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Nested Variables in Scope" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/nested-variable-scope.png"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example of variable scope extending to variables nested in other related panels</em></p></p>



<p class="wp-block-paragraph">However, scope is limited when variables are not contained within a shared container, which happens most commonly with panels utilized in popups and panel loaders. However, the scope of panel loaders is unrestricted, so variables can be added to panel loaders and modified/updated anywhere in the Optix application, and the panels being loaded by said panel loader can then reference its variables to dynamically display information.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Out of Scope for the Selected Variable" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/variable-out-of-scope.png"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example showing the limitations of scope when creation relationships between variables</em></p></p>



<p class="wp-block-paragraph">To see an example of a panel loader utilizing variables to allow the Main UI to interact with individual panels being loaded by a panel loader, stay tuned for our upcoming&nbsp;Optix Series – Device Sidebar Example blog.</p>



<h2 id="h-attributes" class="wp-block-heading">Attributes</h2>



<p class="wp-block-paragraph">Understanding attributes and their relationship to their parent variable is necessary to form complex Dynamic Links for UI functionality. Below is a list of the most common variable attributes.</p>


<table border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width:168px;">


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


</td>
<td style="width:456px;">


<p class="wp-block-paragraph">Name of the variable in the project.</p>



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


</td>
<td style="width:456px;">


<p class="wp-block-paragraph">Data type of the variable.</p>



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


</td>
<td style="width:456px;">


<p class="wp-block-paragraph">Name of the DataType of the variable.</p>



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


</td>
<td style="width:456px;">


<p class="wp-block-paragraph">Description of the variable (as set in FT Optix).</p>



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


</td>
<td style="width:456px;">


<p class="wp-block-paragraph">Translatable variable name that can appear on the interface at runtime.</p>



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


</td>
<td style="width:456px;">


<p class="wp-block-paragraph">Automatically assigned unique identifier.</p>



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


</td>
<td style="width:456px;">


<p class="wp-block-paragraph">Value of the variable.</p>


</td>
</tr>
</tbody>
</table>


<p class="wp-block-paragraph">To see an example of different attributes being used to create a clean, complex solution, stay tuned for our upcoming Optix Series – Device Sidebar Example blog, which utilizes NodeId, BrowseName, and DataType BrowseName attributes.</p>



<h2 id="h-converters" class="wp-block-heading">Converters</h2>



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

<li>Sets the output variable&rsquo;s value based on a true/false evaluation of the input.</li>

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



<p class="wp-block-paragraph"><p style="margin-left:1.0in;"><img decoding="async" alt="Conditional Converter" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/conditional-converter.png"></p></p>



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

<li>Scales the output linearly based on the input.</li>

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



<p class="wp-block-paragraph"><p style="margin-left:1.0in;"><img decoding="async" alt="Engineering Unit Converter" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/engineering-unit-converter.png"></p></p>



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

<li>Scale the output based on a defined slope and intercept.</li>

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



<p class="wp-block-paragraph"><p style="margin-left:1.0in;"><img decoding="async" alt="Linear Converter" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/linear-converter.png"></p></p>



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

<li>Matches an output value to the input &ldquo;Key&rdquo;.</li>

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



<p class="wp-block-paragraph"><p style="margin-left:1.0in;"><img decoding="async" alt="Key-Value Converter" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/key-value-converter.png"></p></p>



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

<li>Evaluates an expression consisting of one or more input variables.</li>


  

<li>To see all of the valid operators that can be used in an expression, see <a href="https://www.rockwellautomation.com/docs/en/factorytalk-optix/1-03/contents-ditamap/using-the-software/converters/expression-evaluator.html">Rockwell&rsquo;s documentation</a>.</li>

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



<p class="wp-block-paragraph"><p style="margin-left:1.0in;"><img decoding="async" alt="Expression Evaulator" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/expression-evaluator.png"></p></p>



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

<li>Outputs a string that can be defined using variables and various formatting options.</li>

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



<p class="wp-block-paragraph"><p style="margin-left:1.0in;"><img decoding="async" alt="String Formatter" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/string-formatter.png"></p></p>



<h3 id="h-dynamic-links" class="wp-block-heading">Dynamic Links</h3>



<p class="wp-block-paragraph">Dynamic links are defined relationships between two or more variables. Dynamic links can implement converters to create complex relationships and can be pointed at both variables and attributes.</p>



<h3 id="h-aliases" class="wp-block-heading">Aliases</h3>



<p class="wp-block-paragraph">Aliases are a unique property type that allows you to specify the structure of a variable.&nbsp; This is useful when creating panels that should be referencing a specific Data Types, such as a motor or valve Data Type. An alias allows you to reference all the elements of the defined Data Type, while still allowing the alias variable to be linked dynamically, allowing graphics to be updated in real time, such as being able to swap which motor a panel is pointing to.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Aliases" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/aliases.png"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example of an alias to a Motor Data Type</em></p></p>



<p class="wp-block-paragraph">An example use case of aliases is for a device sidebar that utilizes a panel loader to swap in faceplates panels for different types of devices. The panel loader would have a NodeId variable (Let’s call it “Device Tag”) that would be updated at runtime to point to a desired device tag. For each device type, one panel would be created with a tag alias with the “Kind” attribute bound to the UDT of said device and the “NodeID” attribute bound to the “Device Tag” Attribute on the panel loader. Typically, you cannot create property bindings between variables that are not within the same window or screen (or the same panel for panels that are not directly placed on windows or screens), but panel loaders can be referenced regardless of project scope, allowing us to make use of the “Device Tag” variable we attached to ours.</p>



<p class="wp-block-paragraph">For an in-depth example, Stay tuned for our upcoming Optix Series – Device Sidebar Example blog.</p>



<h2 id="h-read-the-other-articles-in-this-series" class="wp-block-heading">Read the Other Articles in this Series</h2>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10576/factorytalk-optix-series-1--getting-started-with-factorytalk-optix">FactoryTalk Optix Series 1 &#8211; Getting Started with FactoryTalk Optix</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10610/factorytalk-optix-series-3--netlogic-overview-and-examples">FactoryTalk Optix Series 3 &#8211; NetLogic Overview and Examples</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>Build More Dynamic FactoryTalk Optix Interfaces</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 <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/rockwell-factorytalk-programming/factorytalk-optix-programming/" data-type="page" data-id="44850">FactoryTalk Optix</a> variables, attributes, dynamic links, aliases, and converters for creating flexible <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/" data-type="page" data-id="497">HMI and SCADA</a> applications.</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/16293/factorytalk-optix-series-2-variables-attributes-dynamic-links-and-converters/">FactoryTalk Optix Series 2 &#8211; Variables, Attributes, Dynamic Links, and Converters</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>FactoryTalk Optix Series 1 &#8211; Getting Started with FactoryTalk Optix</title>
		<link>https://static.dmcinfo.com/blog/16514/factorytalk-optix-series-1-getting-started-with-factorytalk-optix/</link>
		
		<dc:creator><![CDATA[Ben Clare]]></dc:creator>
		<pubDate>Mon, 25 Mar 2024 08:56:32 +0000</pubDate>
				<category><![CDATA[Allen Bradley PLC]]></category>
		<category><![CDATA[HMI and SCADA]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# Integration]]></category>
		<category><![CDATA[Data Stores]]></category>
		<category><![CDATA[FactoryTalk]]></category>
		<category><![CDATA[FactoryTalk Optix]]></category>
		<category><![CDATA[FT Optix]]></category>
		<category><![CDATA[HMI]]></category>
		<category><![CDATA[NetLogic]]></category>
		<category><![CDATA[Optix]]></category>
		<category><![CDATA[Presentation Engines]]></category>
		<category><![CDATA[Property Bindings]]></category>
		<category><![CDATA[SCADA]]></category>
		<category><![CDATA[Style Sheets]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/16514/factorytalk-optix-series-1-getting-started-with-factorytalk-optix/</guid>

					<description><![CDATA[<p>FactoryTalk Optix is the next generation of visualization software from Rockwell Automation, meant to provide a higher degree of customized development with its integrated C# support and flexibility for HMI and SCADA applications. This blog series covers the essentials to creating your own HMI and SCADA applications using Optix as well as some helpful examples [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/16514/factorytalk-optix-series-1-getting-started-with-factorytalk-optix/">FactoryTalk Optix Series 1 &#8211; Getting Started with FactoryTalk Optix</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">FactoryTalk Optix is the next generation of visualization software from <a href="https://www.rockwellautomation.com/en-us.html" target="_blank">Rockwell Automation</a>, meant to provide a higher degree of customized development with its integrated C# support and flexibility for HMI and SCADA applications.</p>



<p class="wp-block-paragraph">This blog series covers the essentials to creating your own HMI and SCADA applications using Optix as well as some helpful examples for common applications.</p>



<h2 id="h-installation" class="wp-block-heading">Installation</h2>



<p class="wp-block-paragraph">FactoryTalk Optix Studio is installed via <a href="https://home.cloud.rockwellautomation.com/sign-in?returnTo=%2Fdashboard" target="_blank">FactoryTalk Hub</a>, and it is the IDE used to program Optix projects. You can either download the IDE application&nbsp;or utilize a web-based IDE if your license supports it.</p>



<p class="wp-block-paragraph">The Optix Runtime tools are also installed via FactoryTalk Hub, and they are required on any machine that is going to run an Optix application.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="FactoryTalk Optix Hub" height="437px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/1-ft-optix-hub.png" width="900px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>FactoryTalk Hub:&nbsp;which hosts a number of FT applications (including FactoryTalk Design Studio for Optix)</em></p></p>



<h2 id="h-licensing-and-pricing" class="wp-block-heading">Licensing and Pricing</h2>



<p class="wp-block-paragraph">Optix licensing is done on a token-based system, with more features requiring more tokens, and, therefore, a larger license. Generally speaking, the largest contributors to token usage are multiple concurrent web clients, OPC-UA connections, or database connections.</p>



<p class="wp-block-paragraph">Examples of features that affect the sizing of your application include the following:</p>



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



<li>Multiple web clients</li>



<li>Alarming</li>



<li>Recipes</li>



<li>PDF reports</li>



<li>Data logging</li>



<li>Database connectivity</li>



<li>OPC UA connectivity</li>
</ul>



<p class="wp-block-paragraph">For more information on tokens and licensing, please see <a href="https://literature.rockwellautomation.com/idc/groups/literature/documents/at/optix-at001_-en-p.pdf" target="_blank">Rockwell’s documentation</a>.</p>



<h2 id="h-presentation-engines" class="wp-block-heading">Presentation Engines</h2>



<p class="wp-block-paragraph">Presentation engines are responsible for rendering and displaying UI elements during runtime. There are two available presentation engines that can be used simultaneously – the native presentation engine and the web presentation engine.</p>



<p class="wp-block-paragraph">The native presentation engine launches the project in its own window as an application.</p>



<p class="wp-block-paragraph">The web presentation engine hosts the application on a web server, accessible via the defined web page. Multiple concurrent web clients can access the application (if multiple connections are defined in the web presentation engine), but more concurrent clients require more tokens.</p>



<p class="wp-block-paragraph">Optix can make use of session-specific tools to allow concurrent clients to have different screens/panels open, have different users logged in, and display different information, provided that the Optix project was designed with multiple clients in mind.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Optix Presentation Engine" height="680px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/2-optix-presentation-engine.png" width="449px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example configured Web Presentation Engine</em></p></p>



<h2 id="h-style-sheets" class="wp-block-heading">Style Sheets</h2>



<p class="wp-block-paragraph">Style sheets allow the definition of default colors, shapes, sizes, and other UI element configurations. A project’s style sheet can be swapped during runtime. Some properties can be defined both in the style sheet and in an individual UI element. In the case that a property is explicitly defined for an individual element, it will override the style sheet.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Style Sheet Example" height="506px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/3-style-sheet-example.png" width="585px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example Style Sheet</em></p></p>



<h2 id="h-screens-and-panels" class="wp-block-heading">Screens and Panels</h2>



<p class="wp-block-paragraph">FT Optix uses screens, panels, and popups as the main methods for displaying UI elements. Screens and popups can both contain multiple panel loaders, which can be used to dynamically change displayed content when a defined action is performed, such as hitting a button.</p>



<p class="wp-block-paragraph">To see panel loaders being implemented to create a dynamic device sidebar that changes what device it controls (and the associated UI elements) at the push of a button, stay tuned for our upcoming&nbsp;<em>F</em><em>actoryTalk Optix &#8211;&nbsp;Dynamic Device Faceplate</em> blog post.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Panel Loader" height="398px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/4-panel-loader.png" width="900px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>A panel loader that is a part of the main overlay of an application. It has the ability to load either a Motor or a GroundRack panel into the panel loader.</em></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Motor Panel Loaded" height="392px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/5-motor-panel-loaded.png" width="900px">&nbsp;</p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>A runtime instance with the &#8220;Motor&#8221; panel loaded into the panel loader</em></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Rack Panel Loaded" height="391px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/6-rack-panel-loaded.png" width="900px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>A runtime instance with the &#8220;Ground Rack&#8221; panel loaded into the panel loader</em></p></p>



<h2 id="h-converters" class="wp-block-heading">Converters</h2>



<p class="wp-block-paragraph">Converters allow you to modify variables dynamically based on other variables. For instance, a key-value converter could change the text displayed in a string variable when a different integer variable’s value changes, and an engineering unit converter can be used to scale variable values differently.</p>



<p class="wp-block-paragraph">There are more converter types and use cases that were not mentioned above. For more information on converters, stay tuned for our upcoming&nbsp;<em>FactoryTalk Optix &#8211; Variables, Attributes, Dynamic Links, and Converters</em> blog post.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Converter" height="346px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/7-converter.png" width="900px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>A Key-Value converter that parses an integer out into valve status strings</em></p></p>



<h2 id="h-dynamic-links" class="wp-block-heading">Dynamic Links</h2>



<p class="wp-block-paragraph">Dynamic links are used to define relationships between two or more variables or attributes&nbsp;within the FT Optix project. Complex dynamic links&nbsp;allow the&nbsp;use of built-in converters, allowing further customization of UI elements.</p>



<p class="wp-block-paragraph">For further information on Property Bindings, stay tuned for our upcoming<em>&nbsp;FactoryTalk Optix &#8211; Variables, Attributes, Dynamic Links, and Converters</em>&nbsp;blog post.</p>



<p class="wp-block-paragraph">For an example of leveraging complex dynamic links, stay tuned for our upcoming <em>F</em><em>actoryTalk Optix &#8211;&nbsp;Dynamic Device Faceplate</em> blog post.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Dynamic Link" height="532px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/8-dynamic-link.png" width="580px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>A dynamic link that performs mathematical operations on several variables to return an adjusted distance</em></p></p>



<h2 id="h-events" class="wp-block-heading">Events</h2>



<p class="wp-block-paragraph">Events call methods when a specific trigger happens, such as a button being pressed or a variable&#8217;s value changing. Events can be added onto most UI elements, and they can trigger multiple methods.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Example Event" height="645px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/9-example-event.png" width="609px"></p></p>



<h2 id="h-methods" class="wp-block-heading">Methods</h2>



<p class="wp-block-paragraph">Methods are called by events. FT Optix has a number of built-in methods, but custom methods can be defined through NetLogic as well.</p>



<p class="wp-block-paragraph">You can also create pre-defined method invocations, which allow the calling of methods with pre-defined parameters.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Methods" height="511px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/10-methods.png" width="500px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>A list of common methods available in FT Optix</em></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Method Invocation" height="137px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/11-method-invocation.png" width="450px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>A custom method invocation for renaming a MySQL Database table</em></p></p>



<h2 id="h-netlogic" class="wp-block-heading">NetLogic</h2>



<p class="wp-block-paragraph">NetLogic allows C# code to be integrated and run in an FT Optix project. FT Optix can call parameterized methods, and they can send and receive variables with the C# project.</p>



<p class="wp-block-paragraph">For further information on NetLogic, stay tuned for our upcoming&nbsp;<em>FactoryTalk Optix &#8211; NetLogic Overview and Examples</em> blog post.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Net Logic" height="766px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/12-net-logic.png" width="900px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example NetLogic snippet that returns a localized time</em></p></p>



<h2 id="h-data-stores" class="wp-block-heading">Data Stores</h2>



<p class="wp-block-paragraph">Data stores are databases used to store values from different loggers and NetLogic (if you so choose). You can either use an embedded database, which is a simple SQLite database created with minimal overhead, or you can choose to create a connection to a database (SQL Server or MySQL). Other database types may be supported through ODBC connections, but they have not been tested or confirmed yet.</p>



<p class="wp-block-paragraph">Loggers can be linked directly to a data store and will automatically configure tables for themselves on said database.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Data Store Table" height="644px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/13-datastore-table.png" width="504px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>An example data store with an &#8220;Alarm Logger&#8221; linked to it, auto generating the necessary tables</em></p></p>



<h2 id="h-communication-drivers" class="wp-block-heading">Communication Drivers</h2>



<p class="wp-block-paragraph">Communication Drivers allow defining communication paths to PLCs and other devices, as well as the importing of tags and other information to be used in the Optix project. A list of the currently available communication drivers is available below.</p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Available Comm Drivers" height="640px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/14-available-comm-drivers.png" width="400px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>All available communication drivers in Optix</em></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Comm Driver" height="456px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/15-comm-driver.png" width="900px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><em>The tag importer display from an example Rockwell Ethernet Driver linked to a PLC</em></p></p>



<h2 id="h-template-library" class="wp-block-heading">Template Library</h2>



<p class="wp-block-paragraph"><p style="text-align: center;"><img decoding="async" alt="Template Library" height="888px" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/16-template-library.png" width="819px"></p></p>



<p class="wp-block-paragraph"><p style="text-align: center;"><i>Optix&#8217;s Template Library</i></p></p>



<p class="wp-block-paragraph">The template library stores templates created by Rockwell and allows you to create/import your own libraries as well. Some examples of useful templates that are included with Optix are:</p>



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



<li>Alam History</li>



<li>Alarm Banner</li>



<li>User Login Popup</li>



<li>Confirmation Dialog</li>



<li>Date and Time Display</li>



<li>File Selector</li>



<li>File System Browser</li>



<li>Alarm Importer and Exporter</li>



<li>Alarm Logger</li>
</ul>



<h2 id="h-read-the-other-articles-in-this-series" class="wp-block-heading">Read the Other Articles in this Series</h2>



<ul class="wp-block-list">
<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10609/factorytalk-optix-series-2--variables-attributes-dynamic-links-and-converters">FactoryTalk Optix Series 2 &#8211; Variables, Attributes, Dynamic Links, and Converters</a></li>



<li><a href="https://static.dmcinfo.com/latest-thinking/blog/id/10610/factorytalk-optix-series-3--netlogic-overview-and-examples">FactoryTalk Optix Series 3 &#8211; NetLogic Overview and Examples</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>Build Modern HMI and SCADA Applications with FactoryTalk Optix</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 <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/hmi-and-scada-programming/rockwell-factorytalk-programming/factorytalk-optix-programming/" data-type="page" data-id="44850">FactoryTalk Optix</a> for flexible visualization, web-based HMIs, C# NetLogic, and industrial data integration.</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/16514/factorytalk-optix-series-1-getting-started-with-factorytalk-optix/">FactoryTalk Optix Series 1 &#8211; Getting Started with FactoryTalk Optix</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Importing and Customizing a Library with Application Code Manager</title>
		<link>https://static.dmcinfo.com/blog/20684/importing-and-customizing-a-library-with-application-code-manager/</link>
		
		<dc:creator><![CDATA[Ben Clare]]></dc:creator>
		<pubDate>Wed, 23 Oct 2019 09:47:38 +0000</pubDate>
				<category><![CDATA[Allen Bradley PLC]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/20684/importing-and-customizing-a-library-with-application-code-manager/</guid>

					<description><![CDATA[<p>Rockwell Automation&#8217;s&#160;Application Code Manager&#160;enables users to customize and import libraries into new or existing projects. Based on how you create the library, several different options will be available when importing that help structure the library to fit its needed application. In part two of this blog series, I will walk you through importing and customizing [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/20684/importing-and-customizing-a-library-with-application-code-manager/">Importing and Customizing a Library with Application Code Manager</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Rockwell Automation&#8217;s&nbsp;<a href="https://www.rockwellautomation.com/rockwellsoftware/products/studio5000_application_code_manager.page" target="_blank">Application Code Manager</a>&nbsp;enables users to customize and import libraries into new or existing projects. Based on how you create the library, several different options will be available when importing that help structure the library to fit its needed application.</p>



<p class="wp-block-paragraph">In part two of this blog series, I will walk you through importing and customizing a library with <strong>Application Code Manager</strong>.</p>



<p class="wp-block-paragraph">For more on creating a library, check our part one of this blog series:&nbsp;<a href="https://static.dmcinfo.com/latest-thinking/blog/id/10010/rockwell-library-designer-creating-customizing-and-publishing-a-library">Rockwell Library Designer: Creating, Customizing, and Publishing a Library</a>.</p>



<h2 id="h-create-a-project-in-application-code-manager" class="wp-block-heading">Create a Project in Application Code Manager</h2>



<p class="wp-block-paragraph">Now that we have our own Library let’s try to import its contents into a project.</p>



<p class="wp-block-paragraph">To do this, let’s create a second project, but use a different controller and I/O modules. For this example, our new project was set up with:</p>



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


<table style="width: 70%; border: 2px solid gray; border-collapse: collapse;">
<tbody>
<tr>
<td style="padding: 0px 0px 0px 10px; border: 2px solid gray; height: 60px;"><span style="font-size:130%;"><strong>Controller</strong></span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">1756-L83E</span></td>
</tr>
<tr>
<td style="padding: 0px 0px 0px 10px; border: 2px solid gray; height: 60px;"><span style="font-size:130%;"><strong>Revision</strong></span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">Rev 28</span></td>
</tr>
<tr>
<td style="padding: 0px 0px 0px 10px; border: 2px solid gray; height: 60px;"><span style="font-size:130%;"><strong>Chassis</strong></span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">10 slot chassis</span></td>
</tr>
<tr>
<td style="padding: 0px 0px 0px 10px; border: 2px solid gray; height: 60px;"><span style="font-size:130%;"><strong>Slot</strong></span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">Slot 0</span></td>
</tr>
</tbody>
</table>


<p class="wp-block-paragraph"><br>
<strong>I/O Module Selection</strong></p>


<table style="width: 70%; border: 2px solid gray; border-collapse: collapse;">
<tbody>
<tr>
<td style="padding: 0px 10px 0px 10px;  border: 2px solid gray; height: 80px;"><span style="font-size:130%;"><strong>Module</strong></span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">1756-OF4 Analog Output</span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">1756-OF4 Analog Output</span></td>
</tr>
<tr>
<td style="padding: 0px 10px 0px 10px; border: 2px solid gray; height: 80px;"><span style="font-size:130%;"><strong>Slot</strong></span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">Slot 1</span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">Slot 2</span></td>
</tr>
<tr>
<td style="padding: 0px 10px 0px 10px; border: 2px solid gray; height: 80px;"><span style="font-size:130%;"><strong>Data</strong></span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">Valve Actual Position output on Ch3Data</span></td>
<td style="border: 2px solid gray; text-align: center;"><span style="font-size:130%;">Valve Position Signal on Ch3Data</span></td>
</tr>
</tbody>
</table>


<p class="wp-block-paragraph"><br>
Instead of creating a new project in Logix Designer, let’s open the Application Code Manager.</p>



<p class="wp-block-paragraph"><strong>Step One:</strong> To create a new project in ACM, right-click on <strong>Controllers</strong>, and click <strong>Add New</strong>,&nbsp;and select your controller type.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Application-Code-Manager-Step-One-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Two:&nbsp;</strong>Select your controller type from the list, and then customize it on the next screen. We are using the 1756-L83E with a 10-slot chassis for this example.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Application-Code-Manager-Step-Two-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Three:</strong> The <strong>Controller Preview</strong>&nbsp;and <strong>Class view</strong>&nbsp;will then be populated. Let’s add our I/O now by right-clicking the Backplane and selecting <strong>Add New</strong>.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Application-Code-Manager-Step-Three-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Four:&nbsp;</strong>Find the Analog Input and Output modules in the list (1756-OF4 in slot 1 and 1756-IF16 in slot 2 for this example) and add them to the project.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Application-Code-Manager-Step-Four-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Five:&nbsp;</strong>Right-click on <strong>Tasks</strong>&nbsp;and create a new continuous MainTask.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Application-Code-Manager-Step-Five-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Six:&nbsp;</strong>Right-click on <strong>MainTask</strong>&nbsp;and add a new MainProgram.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Application-Code-Manager-Step-Six-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph">Now that we have our Controller, I/O, Task, and Program, we can import our Valve object from the library.</p>



<h2 id="h-use-a-library-in-acm" class="wp-block-heading">Use a Library in ACM</h2>



<p class="wp-block-paragraph"><strong>Step One:&nbsp;</strong>To Import our library routine, right-click on <strong>MainProgram,</strong>&nbsp;and select <strong>Add New</strong>.&nbsp;Doing so will bring up a list of libraries that you can sort in whatever way you want. Find the library you just created, then hit next.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Use-a-Library-in-ACM-Step-One-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Two:&nbsp;</strong>This will bring you to the configuration wizard for the object.</p>



<ul class="wp-block-list">
<li><strong>Name:</strong>&nbsp;The name of the object. Since we configured the library to use {ObjectName} as the valve tag name and the routine name, whatever you enter here will also become the valve tag name, as well as the routine name. This one will be named “Shutdown_Valve.”</li>



<li><strong>Description:</strong>&nbsp;Becomes the {ObjectDescription} substitution in the library. We did not use this anywhere, so it will not have any effect on the project.</li>



<li><strong>Parameters:</strong>&nbsp;These are the parameters we defined when creating the library. As shown, the user can enter their own tag names for the Estop and ResetErrors tags, can specify if the valve is in simulation or not, and can select their input and outputs from the I/O list.</li>
</ul>



<p class="wp-block-paragraph"><strong>Step Three:</strong>&nbsp;When selecting AI/AO slots, you must select a <strong>SubObject Reference</strong>&nbsp;to get the I/O tag correctly. See the image below.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Use-a-Library-in-ACM-Step-Three-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph">Once you have finished configuring the Library, hit <strong>Finish, </strong>and it will import into your project.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Use-a-Library-in-ACM-Step-Three-Image-Two.png" alt=""/></figure>



<h2 id="h-transfer-from-acm-to-logix-design" class="wp-block-heading">Transfer from ACM to Logix Design</h2>



<p class="wp-block-paragraph"><strong>Step One:&nbsp;</strong>Now that our project is complete, we can import it to Logix Designer. To do this, right-click your controller (in this example, Plant_Valves_Example), and select <strong>Generate Controller</strong>.&nbsp;We will create the ACM Project Data, which is the L5X file.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Transfer-from-ACM-to-Logix-Designer-Step-One-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Two:&nbsp;</strong>After the code generates, hit <strong>Open Folder </strong>to find your .L5X file.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Transfer-from-ACM-to-Logix-Designer-Step-Two-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Three:&nbsp;</strong>To import this into Logix Designer, open Logix Designer, go to <strong>File &gt; Open</strong>, and select the generated L5X file.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Transfer-from-ACM-to-Logix-Designer-Step-Three-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph">And now, we have a fully created project, including our Library Valve!</p>



<p class="wp-block-paragraph">Note the routine name – Shutdown_Valve, which was the Objectname we specified in ACM.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Transfer-from-ACM-to-Logix-Designer-Step-Three-Image-Two.png" alt=""/></figure>



<p class="wp-block-paragraph">Our valve controller tag is also named Shutdown_Valve as well.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Transfer-from-ACM-to-Logix-Designer-Step-Three-Image-Three.png" alt=""/></figure>



<p class="wp-block-paragraph">The Local Estop and ResetErrors tags also match what we specified when importing the library in ACM.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Transfer-from-ACM-to-Logix-Designer-Step-Three-Image-Four.png" alt=""/></figure>



<p class="wp-block-paragraph">And finally, the routine logic also matches up with what we specified. The input and outputs match what you specified in the configuration of ACM, and the bCfgSimulationActive tag is set to true as well!</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Transfer-from-ACM-to-Logix-Designer-Step-Three-Image-five.png" alt=""/></figure>



<h2 id="h-importing-a-second-valve" class="wp-block-heading">Importing a Second Valve</h2>



<p class="wp-block-paragraph">We have imported an entire project from ACM, but what if we only want to import a second valve into our existing project?</p>



<p class="wp-block-paragraph"><strong>Step One:&nbsp;</strong>Start by going back to ACM, and import our Valve library a second time (right-click MainProgram, add new, then select our valve library again).</p>



<p class="wp-block-paragraph"><strong>Step Two: C</strong>all this second valve <strong>Gas_Valve</strong>.&nbsp;It will use the same Estop and ResetErrors tags and will also be in simulation mode, but it will be a CH1Data for the Analog Input and Analog Output.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Importing-a-Second-Valve-Image-One.png" alt=""/></figure>



<p class="wp-block-paragraph">Once it has been imported, you will see a new routine in the controller preview.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Importing-a-Second-Valve-Image-Two.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Three:&nbsp;</strong>Now, in order to export just the routine, right-click <strong>Gas_Valve</strong>,&nbsp;and select <strong>Generate partial Routine</strong>. This will only export the data needed for the Routine<em>.</em></p>



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



<p class="wp-block-paragraph"><strong>Step Four:&nbsp;</strong>Once the code has finished generating, return to our Logix Designer Project, right-click <strong>MainProgram</strong>,&nbsp;Add, then Import Routine.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Importing-a-Second-Valve-Image-Four.png" alt=""/></figure>



<p class="wp-block-paragraph"><strong>Step Five:&nbsp;</strong>Select the Gas_Valve L5X to import.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Importing-a-Second-Valve-Image-Five.png" alt=""/></figure>



<p class="wp-block-paragraph">Note in the tags section, that a new <strong>Gas_Valve</strong>&nbsp;tag will be created, but the Estop, ResetErrors, and I/O tags do not need to be modified.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Importing-a-Second-Valve-Image-Six.png" alt=""/></figure>



<p class="wp-block-paragraph">Add-On instructions and Data types should also be kept as <strong>Use Existing</strong>&nbsp;as they will not have changed.</p>



<p class="wp-block-paragraph"><strong>Step Six:&nbsp;</strong>Once you have verified the import settings, hit ok, and a new <strong>Gas_Valve</strong>&nbsp;routine will be created.</p>



<p class="wp-block-paragraph">This routine also matches the configuration we chose: Ch1Data for input and output, simulation mode active, and the same two local tags for the Estop and Reset Errors.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Importing-a-Second-Valve-Image-Seven.png" alt=""/></figure>



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



<p class="wp-block-paragraph">The Library Designer and Application code manager allow the creation of customizable and re-usable code without too much . Understanding their capabilities could be the next step in quickly creating modular and configurable solutions for Allen-Bradley PLCs. Being able to quickly pull in programs, routines, tags, and other elements for common devices such as valves and VFDs could greatly reduce programming time projects in many different industries.</p>



<p class="wp-block-paragraph">Learn more about&nbsp;<a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming/allen-bradley-plc-programming">DMC&#8217;s Allen Bradley PLC Programming services</a>.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/20684/importing-and-customizing-a-library-with-application-code-manager/">Importing and Customizing a Library with Application Code Manager</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Rockwell Library Designer: Creating, Customizing, and Publishing a Library</title>
		<link>https://static.dmcinfo.com/blog/20724/rockwell-library-designer-creating-customizing-and-publishing-a-library/</link>
		
		<dc:creator><![CDATA[Ben Clare]]></dc:creator>
		<pubDate>Tue, 22 Oct 2019 09:09:23 +0000</pubDate>
				<category><![CDATA[Allen Bradley PLC]]></category>
		<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[ACM]]></category>
		<category><![CDATA[Application Code Manager]]></category>
		<category><![CDATA[Library Designer]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/20724/rockwell-library-designer-creating-customizing-and-publishing-a-library/</guid>

					<description><![CDATA[<p>Rockwell&apos;s Library Designer allows the creation of libraries that can contain tasks, programs, routines, AOIs, tags, hardware, and everything else a typical project would include. These libraries can be customized to allow an end-user to select their own configurations, tags, hardware, and other options. In this part one of this two-part blog series, I will [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/20724/rockwell-library-designer-creating-customizing-and-publishing-a-library/">Rockwell Library Designer: Creating, Customizing, and Publishing a Library</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">Rockwell&apos;s Library Designer allows the creation of libraries that can contain tasks, programs, routines, AOIs, tags, hardware, and everything else a typical project would include. These libraries can be customized to allow an end-user to select their own configurations, tags, hardware, and other options.</p>

<p class="wp-block-paragraph">In this part one of this two-part blog series, I will walk through how to create, customize, and publish a library with Rockwell&apos;s Library Designer.</p>

<h2 class="wp-block-heading">Create an Example Project</h2>

<p class="wp-block-paragraph">This section covers the creation of an example project to serve as the basis for our library. This example will focus on creating some sample logic and tags for the DMC analog valve AOI.</p>

<p class="wp-block-paragraph"><strong>Step One</strong>: Create a new project with a controller of your choosing. This example will use a <strong>1756-L7</strong>3 on v28. You can choose to include a controller in your library, but we will not for this example.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-and-Example-Project-Step-One.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Two</strong>: Add some I/O for the analog valve. Use the <strong>1756-IF8 Input</strong> and the <strong>1756-OF8 Output</strong> modules. You can choose to add I/O to your library as well, but we will not for this example.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Creat-an-Example-Project-Step-Two.png"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-an-Example-Project-Step-Two-Picture-Two.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Three</strong>: Import <strong>aoiDvc_AnalogValve.L5X</strong> by right-clicking add-on instructions and selecting <strong>Import Add-on Instruction</strong>.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-an-Example-Project-Step-Three-Picture-One.png"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-an-Example-Project-Step-Three-Picture-Two.png"  /></figure>

<p class="wp-block-paragraph">Note that importing this add-on also imports data types and another AOI needed for aoiDvc_AnalogValve to function.</p>

<p class="wp-block-paragraph"><em><figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-an-Example-Project-Step-Three-Picture-Three.png"  /></figure></em></p>

<p class="wp-block-paragraph"><strong>Step Four</strong>: Create a new routine <strong>DMC_Analog_Valve</strong>&nbsp;and use a JSR in MainRoutine to jump to it.</p>

<p class="wp-block-paragraph">Note that for this example, we will not be including <strong>MainRoutine</strong>&nbsp;in our library, but it is possible to add full Programs and Tasks to libraries as well.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-an-Example-Project-Step-Four-Picture-1.png"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-and-Example-Project-Step-Four-b.jpg"  /></figure>

<p class="wp-block-paragraph"><strong>Step Five</strong>: Create a controller-level analog valve tag, and two local tags for an <strong>emergency stop</strong>&nbsp;boolean and a <strong>reset errors</strong>&nbsp;boolean.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-an-Example-Project-Step-Five-Image-One.png"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-an-Example-Project-Step-Five-Image-Two.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Six</strong>: Now, create the valve logic inside of the DMC_Analog_Valve Routine. Use the Ch0Data from our analog input as the rInSignalPosition of our Valve. Send the rStsPositionActual value from the valve to the Ch0Data of our analog output. Also, use the local Estop and Reset error tags in the AOI as well.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-an-Example-Project-Step-Six-Image-One.png"  /></figure>

<h2 class="wp-block-heading">Create the Library</h2>

<p class="wp-block-paragraph"><strong>Step One</strong>: Right-click on the controller in your Logix Designer project, go to plug-ins, and select <strong>Library Designer</strong>.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-the-Library-Step-One-Image-One.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Two</strong>: The Library Designer screen will open automatically. To create a new library, right-click on <strong>Libraries</strong>,&nbsp;and select <strong>Add &gt; Library</strong>.&nbsp;</p>

<p class="wp-block-paragraph">Note: <strong>Add Project Library</strong>&nbsp;and <strong>Add Controller Library</strong>&nbsp;will auto-create a blank library either with or without a controller.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-the-Library-Step-Two-Image-One.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Three</strong>: Match the configuration of our new library to the image below.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-the-Library-Step-Three-Image-One.png"  /></figure>

<ul class="wp-block-list">
 <li><strong>Catalog Number:</strong> This is the name of your library that will appear in the ACM library database. For this example,&nbsp;use <strong>DMC_Analog_Valve</strong>.</li>
 <li><strong>Description:</strong>&nbsp;It will also appear in the ACM library database.</li>
 <li><strong>Library Type:</strong> A mid-level <strong>category</strong>&nbsp;that appears in the ACM library database. We will use <strong>ControlModule</strong>&nbsp;in this example.</li>
 <li><strong>Content-Type:</strong> Defines what level of content this library is at (Task, Program, or Routine). For our example, we will create a Routine-level library, since we don&rsquo;t have any necessary code outside of our single routine (besides the JSR in Main).</li>
 <li><strong>Solution:</strong> This is essentially a high-level <strong>category</strong>&nbsp;that appears in the ACM library database. Use <strong>DMC Library</strong>&nbsp;for this example.</li>
 <li><strong>Category:</strong> A low-level <strong>category</strong>&nbsp;that appears in the ACM library database. Use <strong>Valves</strong>&nbsp;for this example.</li>
 <li><strong>Instantiation:</strong> Allows you to give a default name and description for the object when importing it to a project. Leave them blank as we want to specify the name and description for each of our valves manually.</li>
 <li><strong>Substitutions:</strong> This is where you define the replacement of text with either the instantiated object&rsquo;s name or description. So {ObjectName} will replace DMC_Analog_Valve anywhere in the library that you find it. This is the name given to a library object when importing it through Application Code Manager. The same is true for the description text as well.</li>
</ul>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-the-Library-Step-Three-Image-Two.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Four</strong>: Before moving objects from our program into the library, define the importing of these objects through the <strong>INCLUSIONS</strong>&nbsp;options. In this example, we will check all four options.</p>

<ul class="wp-block-list">
 <li><strong>Add Children</strong>: Adds the Children of your current selection to the library as well (ex. If you add MainTask to the Library, it will also add MainProgram, Parameters and Local Tags, MainRoutine, and the Dvc_Valve Routine.</li>
 <li><strong>Add Dependencies</strong>: Adds the dependencies of your current selection to the library as well (ex. Our Dvc_Valve routine calls aoiDvc_AnalogValve) for importing. Likewise, any global tags referenced in this routine will also be imported.</li>
 <li><strong>Allow Shared Ownership</strong>: Allows Logix content to be shared among different library object definitions if checked. Otherwise, no other library will be able to use the items that exist in this library.</li>
 <li><strong>Container Mode</strong>: Allows you to group objects within a container. Doing so means any changes such as additions or deletions made within Studio 5000 to an object which forms part of a library would automatically be included to be part of the library. You can set container mode for task, program, and routine objects residing within a library. When this command is active, all program tags and routines are added to the library object automatically. If it is inactive, the user must manually add the content to the library object.</li>
</ul>

<p class="wp-block-paragraph"><strong>Step Five</strong>: Import parts of the project into the library by dragging and dropping.</p>

<p class="wp-block-paragraph">For this example, import the <strong>Dvc_Valve</strong>&nbsp;Routine, which brings with it the Analog Valve and Error Scroller AOIs, the associated Data Types, the Local Estop and Error Reset tags, and the Analog Valve Controller tag.</p>

<p class="wp-block-paragraph">Since we chose <strong>routine</strong>&nbsp;as our library type, we exclude the task and program. After importing, the content now in the library displays in green.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-the-Library-Step-Five-Image-One.png"  /></figure>

<p class="wp-block-paragraph">Click on the <strong>DMC_Analog_Valve</strong>&nbsp;Controller tag and note the replacement of the name with {ObjectName}. We used this substitution when creating the project.&nbsp;</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-the-Library-Step-Five-Image-Two.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Six</strong>: Click on the <strong>DMC_Analog_Valve</strong>&nbsp;Routine. The name here is also {ObjectName} as well, now that the substitution is complete. Also, note the Routine preview in the bottom right &ndash; the Analog Valve tag inside the AOI is also {ObjectName} as well.</p>

<p class="wp-block-paragraph">As we defined, we will replace <strong>DMC_Analog_Valve </strong>with {ObjectName}. {ObjectName} will be defined by the user importing this library into their own project.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Create-the-Library-Six-Image-One.png"  /></figure>

<h2 class="wp-block-heading">Configuring the Library</h2>

<p class="wp-block-paragraph">Now, let&rsquo;s say that we want the local Estop and Reset Error tags to be configurable as a tag that is entered when importing this library so that they can be renamed or entered as already-existing tags. To do this, we need to replace the tag names with <strong>parameters</strong>.</p>

<p class="wp-block-paragraph"><strong>Step One</strong>: Select the bEstop tag, then click the <strong>ellipses</strong>&nbsp;<strong>&hellip;</strong>&nbsp;on the right-hand side of the <strong>Name</strong>.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-One-Image-One.png"  /></figure>

<p class="wp-block-paragraph">The <strong>substitution builder</strong>&nbsp;window will appear automatically.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-One-Image-Two.png"  /></figure>

<ul class="wp-block-list">
 <li><strong>Selected Element</strong>: Shows the current element you are configuring to be substituted.</li>
 <li><strong>Result</strong>: Shows what the new element name is after substitution.</li>
 <li><strong>Scope</strong>: Specifies how far the new substitution will check.&nbsp;<strong>Name&nbsp;</strong>will only check your current selection, while <strong>Library</strong>&nbsp;would replace all <strong>bEstop</strong>&nbsp;elements throughout the library.</li>
 <li><strong>Search For</strong>: Specifies what part of your selection will be substituted. For example, you could enter only a part of your selection, like Estop rather than bEstop to be replaced).</li>
 <li><strong>Replace With</strong>: Specifies the replacement of your selection. Use the <strong>ellipses</strong> <strong>&hellip;</strong>&nbsp;to choose.</li>
</ul>

<p class="wp-block-paragraph"><strong>Step Two</strong>: Create a substitution for our bEstop tag so that the user can enter their own tag name. To do this, enter <strong>bEstop</strong>&nbsp;in the Search for box, and then click the <strong>ellipses &hellip;</strong>&nbsp;on the right side.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Two-Image-One.png"  /></figure>

<p class="wp-block-paragraph">Doing so will bring up the <strong>member selector</strong>.&nbsp;</p>

<p class="wp-block-paragraph">To allow them to enter their own tag name, we first need to create a parameter.</p>

<p class="wp-block-paragraph"><strong>Step Three</strong>: Right-click on <strong>DMC_Analog_Valve</strong>,&nbsp;and select <strong>Add new parameter</strong>,&nbsp;which opens a new window.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Three-Image-One.png"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Three-Image-Two.png"  /></figure>

<ul class="wp-block-list">
 <li><strong>Name</strong>: The name of the parameter that appears in the Application Code Manager.</li>
 <li><strong>Parameter help</strong>: A help box for the parameter, shown in the Application Code Manager.</li>
 <li><strong>Data Type</strong>: Type of data entered into this parameter.</li>
 <li><strong>Reference Type</strong>: Immediate means the user will enter a direct value/string. Referenced means that the user will be able to choose a reference tag/element of the same Data type as the parameter. Calculated means that the value is set to the name or description of the selected Parameter.</li>
</ul>

<p class="wp-block-paragraph"><strong>Step Four</strong>: For this example, we will configure our <strong>bEstop&nbsp;</strong>tag to be a simple string that the user will enter, the configuration shown below.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Four-Image-One.png"  /></figure>

<p class="wp-block-paragraph">Now we can select this new parameter and use it as the substitution for our Emergency stop tag.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Four-Image-Two.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Five</strong>: Now, let&rsquo;s repeat the process, but for the <strong>bResetErrors</strong>&nbsp;tag.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Five-Image-One.png"  /></figure>

<p class="wp-block-paragraph">Now we can check the Routine to see how our substitutions have changed it.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Five-Image-Two.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Six</strong>: Even though we added a substitution, the tags in the routine did not change. This is because we never specified the scope of our tag replacements to be for the entire library, so it never checked this routine.</p>

<p class="wp-block-paragraph">To fix this, we need to go back and change the scope of both of our local tag substitutions to be <strong>library</strong>&nbsp;rather than name. Doing so results in the correct updating of the routine.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Six-Image-One.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Seven</strong>: Now, let&rsquo;s say we want the user to be able to specify whether their valve is in simulation mode or not.</p>

<p class="wp-block-paragraph">To do this, go to the controller-level <strong>DMC_Analog_Valve</strong>&nbsp;tag, right-click the <strong>bCfgSimulationActive</strong>&nbsp;tag and select <strong>Add as Parameter</strong>.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Seven-Image-One.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Eight</strong>: We will configure this parameter to be a Bool that the user can enter. See below.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Eight-Image-One.png"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Eight-Image-Two.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Nine</strong>: Let&rsquo;s make the Input that signals a position, and the output that reports the valve&rsquo;s position both configurable.</p>

<p class="wp-block-paragraph">Switch over to the routine, and then select the <strong>Local:1:I:Ch0Data</strong>&nbsp;inside of the MOV block, and select the <strong>ellipses &hellip; </strong>to the right of the Name.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Nine-Image-One.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Ten</strong>: Again, create a new parameter. This time, we want the user to be able to select from a list of Analog Inputs currently in the existing project.</p>

<p class="wp-block-paragraph">To do this, enter the configuration below. The Filter restricts the selection to be only Analog Inputs.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Ten-Image-One.png"  /></figure>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Ten-Image-Two.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Eleven</strong>: Next, do the same for the Analog Output, but use the filter for AO instead of AI.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-the-library-Step-Eleven-Image-One.png"  /></figure>

<p class="wp-block-paragraph">To summarize what we have configured in this library:</p>

<ul class="wp-block-list">
 <li>Controller-level Valve tag and Routine name will match the name given when a user imports the library.</li>
 <li>bEstop and bResetError tags will be manually entered by the user when importing.</li>
 <li>The &ldquo;bCfgSimulationActive&rdquo; parameter of the valve AOI will be configurable by the user.</li>
 <li>The I/O addresses used in the routine will be selectable from the existing hardware by the user.</li>
</ul>

<p class="wp-block-paragraph"><strong>Step Twelve</strong>: Now, Publish the library by hitting <strong>Apply</strong>&nbsp;(this essentially saves your current library), then right-click&nbsp;<strong>Libraries</strong>,&nbsp;and select&nbsp;<strong>Publish Library</strong>.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-The-Library-Step-Twelve_1.png"  /></figure>

<p class="wp-block-paragraph"><strong>Step Thirteen</strong>: Select <strong>Current ACM Database</strong>&nbsp;and hit ok. Then, enter a Revision Description, and apply.</p>

<figure class="wp-block-image"><img decoding="async" alt="" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Configuring-The-Library-Step-Thirteen.jpg"  /></figure>

<h2 class="wp-block-heading">Conclusion</h2>

<p class="wp-block-paragraph">In the next part of this series, you will learn to&nbsp;import and customize a library with Rockwell&apos;s Application Code Manager. Learn more about <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming/allen-bradley-plc-programming">DMC&apos;s Allen Bradley PLC Programming services</a>.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/20724/rockwell-library-designer-creating-customizing-and-publishing-a-library/">Rockwell Library Designer: Creating, Customizing, and Publishing a Library</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
