<?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>Siemens Open Library Archives | DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/tag/siemens-open-library/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Tue, 07 Jul 2026 18:51:11 +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>Siemens Open Library Archives | DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Getting Started with the Siemens Modbus Extended Library for TIA Portal</title>
		<link>https://static.dmcinfo.com/blog/44660/siemens-modbus-extended-library-for-tia-portal/</link>
		
		<dc:creator><![CDATA[Noam Ayalon]]></dc:creator>
		<pubDate>Thu, 28 May 2026 11:00:00 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[Siemens Open Library]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/?p=44660</guid>

					<description><![CDATA[<p>The rexhip Modbus library–part of the Siemens Open Library–is an open-source extension to the base Modbus functions included in TIA Portal. It provides user-friendly Modbus master function blocks (FBs) for both TCP and RTU applications, as well as a host of pre-configured device profiles called “station blocks” (SBs), which include all the necessary queries to [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/44660/siemens-modbus-extended-library-for-tia-portal/">Getting Started with the Siemens Modbus Extended Library for TIA Portal</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The rexhip Modbus library–part of the Siemens Open Library–is an open-source extension to the base Modbus functions included in TIA Portal. It provides user-friendly Modbus master function blocks (FBs) for both TCP and RTU applications, as well as a host of pre-configured device profiles called “station blocks” (SBs), which include all the necessary queries to communicate with various common hardware. This guide will cover how to set up Modbus communications in TIA Portal using this library and the tools it provides for troubleshooting.</p>



<p class="wp-block-paragraph">This guide focuses on using the rexhip library, not on general Modbus theory. Topics such as Modicon addressing details, data length inference, byte/word ordering, concurrency limits, and protocol-level RTU vs TCP differences are intentionally omitted where they are handled internally by the library or are covered in standard Modbus documentation.</p>



<h2 class="wp-block-heading" id="h-the-mb-query-function-block">The “mb_query” Function Block</h2>



<h3 class="wp-block-heading" id="h-concept">Concept</h3>



<p class="wp-block-paragraph">The mb_query FB defines a Modbus request that gets sent by a Modbus master FB. Each defined query gets passed into the master block, where it is automatically handled one at a time. Queries can be defined independent of Station Blocks (SBs), but are often defined within SBs because of their improved diagnostic and troubleshooting features. We will cover this more in-depth later.</p>



<h3 class="wp-block-heading" id="h-mb-query-fb-input-parameters">mb_query FB Input Parameters</h3>



<p class="wp-block-paragraph">The following parameters are passed into mb_query to define a query:</p>



<p class="wp-block-paragraph"><strong>mb_addr: </strong>Modbus device address (slave address/unit identifier)</p>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--40)"><strong>mode: </strong>This is the Modbus function code. The following are pre-defined tags in mb_query for the supported function codes:</p>



<p class="has-text-align-center wp-block-paragraph"><em>Table 1: mb_query Modes</em></p>



<figure class="wp-block-table aligncenter" style="padding-bottom:var(--wp--preset--spacing--40)"><table class="has-fixed-layout"><tbody><tr><td><strong>Struct</strong></td><td><strong>Tag(Mode)</strong></td><td><strong>Type</strong></td><td><strong>Modbus Function Code</strong></td></tr><tr><td>Read</td><td>“discrete_output”</td><td>Coil</td><td>01</td></tr><tr><td>Read</td><td>“discrete_input”</td><td>Discrete Input</td><td>02</td></tr><tr><td>Read</td><td>“holding_reg”</td><td>Register</td><td>03</td></tr><tr><td>Read</td><td>“input_reg”</td><td>Register</td><td>04</td></tr><tr><td>Write</td><td>“single_discrete_output”</td><td>Coil</td><td>05</td></tr><tr><td>Write</td><td>“single_holding_reg”</td><td>Register</td><td>06</td></tr><tr><td>Write</td><td>“discrete_output”</td><td>Coil</td><td>15</td></tr><tr><td>Write</td><td>“holding_reg”</td><td>Register</td><td>16</td></tr></tbody></table></figure>



<p class="wp-block-paragraph"><strong>data_addr:</strong> This is the starting address of the desired data within the Modbus data area. The rexhip library uses zero-based addressing.</p>



<p class="wp-block-paragraph"><strong>Note:</strong> Some Modbus devices display registers as one-based, so if values are off by one register, this is probably why.</p>



<p class="wp-block-paragraph" style="padding-top:0;padding-bottom:var(--wp--preset--spacing--40)">data_addr does not refer to values such as 40001, which are often found on datasheets.</p>



<p class="has-text-align-center wp-block-paragraph"><em>Table 2: data_addr Examples</em></p>



<figure style="padding-bottom:var(--wp--preset--spacing--40)" class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td><strong>Datasheet Notation</strong></td><td><strong>Operation and Data Type</strong></td><td><strong>Function Code (mode)</strong></td><td><strong>data_addr</strong></td></tr><tr><td>00001</td><td>Read Coil</td><td>01</td><td>0</td></tr><tr><td>00025</td><td>Write Multiple Coils</td><td>15</td><td>24</td></tr><tr><td>30020</td><td>Read Input Register</td><td>04</td><td>19</td></tr><tr><td>40005</td><td>Write Single Holding Register</td><td>06</td><td>4</td></tr><tr><td>40256</td><td>Write Multiple Holding Registers</td><td>16</td><td>255</td></tr></tbody></table></figure>



<p class="wp-block-paragraph"><strong>dara_ptr:</strong> This is an Input/Output where the data that will be sent or received is stored. It can be any data type, including arrays and UDTs.</p>



<p class="wp-block-paragraph"><span style="margin: 0px;padding: 0px"><strong>data_len:&nbsp;</strong>This is the length of the data in the query &#8211; the number of either bits or 16-bit registers for coils/holding registers, respectively, that will be read/written, starting at data_addr</span>.</p>



<p class="wp-block-paragraph">This is an optional, generally discouraged parameter to specify; it will be automatically calculated from the length of data_ptr by default.</p>



<p class="wp-block-paragraph">If you want to override the automatic calculation, assign data_len to the desired length, and then set it back to automatic after the mb_query function call using <code>#mb_query.data_len :=&nbsp; #mb_query.c.auto_len</code></p>



<h3 class="wp-block-heading" id="h-modicon-addressing-convention">Modicon Addressing Convention</h3>



<p class="wp-block-paragraph" style="padding-top:0;padding-bottom:var(--wp--preset--spacing--40)">The rexhip library supports the Modicon convention for data addressing with the following static tags in <strong>mb_query</strong> to be used when declaring the mode of the query:</p>



<p class="has-text-align-center wp-block-paragraph"><em>Table 3: Modicon Convention Modes</em></p>



<figure style="padding-bottom:var(--wp--preset--spacing--40)" class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td><strong>Struct</strong></td><td><strong>Tag (Mode)</strong></td><td><strong>Modbus Function Codes</strong></td></tr><tr><td>Mode</td><td>&#8220;read&#8221;</td><td>01, 02, 03, 04</td></tr><tr><td>Mode</td><td>&#8220;write_single&#8221;</td><td>05, 06</td></tr><tr><td>Mode</td><td>&#8220;write&#8221;</td><td>15, 16</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When using one of the above modes, data_addr declarations take the form found on datasheets (e.g., 40005).</p>



<h3 class="wp-block-heading" id="h-examples-of-mb-query-calls">Examples of mb_query Calls</h3>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--40)">The following is an example of&nbsp;mb_query&nbsp;function calls&nbsp;modified&nbsp;from one of the station blocks included in the&nbsp;rexhip&nbsp;library.&nbsp;In this scenario, three queries are being configured, two of which read input registers and one of which reads holding registers.&nbsp;</p>



<figure class="wp-block-image aligncenter size-full is-resized has-custom-border"><img fetchpriority="high" decoding="async" width="643" height="513" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-1.png" alt="Image showing a Siemens TIA Portal programming environment, specifically focusing on the interface and Structured Control Language (SCL) code for a Modbus TCP or RTU communication block." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44661" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;width:500px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-1.png 643w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-1-300x239.png 300w" sizes="(max-width: 643px) 100vw, 643px" /><figcaption class="wp-element-caption"><em>Figure 1: mb_query Function Call Example 1</em></figcaption></figure>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--30)">The following example shows an mb_query function call used to configure a request that writes multiple values to Modbus holding registers. The values are consolidated into an array, which is then passed to mb_query as a single data_ptr. The first array value will be written to the register at data_addr, the second value will be written to the register at data_addr + 1, and so on.</p>



<figure class="wp-block-image aligncenter size-full is-resized has-custom-border is-style-default"><img decoding="async" width="431" height="374" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-2.png" alt="Image showing a Siemens TIA Portal interface, specifically a Function Block (FB) or Function (FC) being programmed in Structured Control Language (SCL)." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44662" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;aspect-ratio:1.1524312077035448;object-fit:cover;width:500px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-2.png 431w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-2-300x260.png 300w" sizes="(max-width: 431px) 100vw, 431px" /><figcaption class="wp-element-caption"><em>Figure 2: mb_query Function Call Example 2</em></figcaption></figure>



<h3 class="wp-block-heading" id="h-the-mb-query-bits-function-block">The “mb_query_bits” Function Block</h3>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--30)">The mb_query FB is designed to process data in bytes, so any queried booleans must total to whole bytes. If the number of queried bits does not equal complete bytes, either query a Boolean array with a length divisible by 8 (leaving unused bits as needed) or use the mb_query_bits FB instead.</p>



<figure class="wp-block-image aligncenter size-full is-resized has-custom-border"><img decoding="async" width="393" height="86" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-3.png" alt="Image of a code snippet written in Structured Text (ST)." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44663" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;aspect-ratio:4.334309839738067;object-fit:cover;width:500px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-3.png 393w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-3-300x66.png 300w" sizes="(max-width: 393px) 100vw, 393px" /><figcaption class="wp-element-caption"><em>Figure 3: mb_query_bits Function Call Example</em></figcaption></figure>



<h2 class="wp-block-heading" id="h-station-blocks">Station Blocks</h2>



<h3 class="wp-block-heading" id="h-concept-0">Concept</h3>



<p class="wp-block-paragraph">SBs group queries together, so the master block treats them as belonging to the same Modbus device. Device-level execution context is helpful for both tracking device communication and handling query timeouts.</p>



<p class="wp-block-paragraph">If a device encounters communication errors, queries inside the SB can be skipped together with occasional retries, while other devices keep running.</p>



<p class="wp-block-paragraph">This prevents one problematic device from interfering with the entire bus. Also, it is easy to set up multiple devices of the same type by creating multiple instances of the SB.</p>



<h3 class="wp-block-heading" id="h-implementation">Implementation</h3>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--20)">SBs contain an SB header and footer, which are functions included in the rexhip library. The header marks the start of the SB, and all mb_query calls that follow it are tagged as belonging to that device. The footer closes the station context. Both the header and the footer take an mb_query instance and a tag of type mb_station_block_udt as arguments.</p>



<figure class="wp-block-image aligncenter size-full is-resized has-custom-border"><img decoding="async" width="532" height="523" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-4.png" alt="Image showing a Siemens TIA Portal environment with a Structured Control Language (SCL) block designed to control Auma actuators via Modbus RTU." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44664" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;width:500px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-4.png 532w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-4-300x295.png 300w" sizes="(max-width: 532px) 100vw, 532px" /><figcaption class="wp-element-caption"><em>Figure 4: Station Block Example</em></figcaption></figure>



<p class="wp-block-paragraph">As previously mentioned, there are many pre-configured SBs in the rexhip library, as well as the header and footer functions that allow the creation of custom SBs.</p>



<h3 class="wp-block-heading" id="h-the-station-block-udt">The Station Block UDT</h3>



<p class="wp-block-paragraph">The tag of type mb_station_block_udt in an SB provides useful information and configuration options for a device’s queries and is one of the primary reasons to use SBs.</p>



<figure class="wp-block-image aligncenter size-full has-custom-border"><img decoding="async" width="312" height="475" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-5.png" alt="Image displaying a User Defined Data Type (UDT) in Siemens TIA Portal." class="wp-image-44665" style="border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-5.png 312w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-5-197x300.png 197w" sizes="(max-width: 312px) 100vw, 312px" /><figcaption class="wp-element-caption"><em>Figure 5: Station Block UDT Contents</em></figcaption></figure>



<h3 class="wp-block-heading" id="h-configuration-conf">Configuration (conf):</h3>



<ul class="wp-block-list">
<li><strong>skip_code:</strong> Both the station block header and footer immediately return, preventing all query scheduling, execution, and result handling for that station.</li>



<li style="padding-bottom:var(--wp--preset--spacing--30)"><strong>disable:</strong> Soft stop for the SB handled by the footer, allowing the station to complete its normal end-of-cycle logic before it stops participating further.</li>
</ul>



<p class="has-text-align-center wp-block-paragraph"><em>Table 4: skip_code vs disable functionality</em></p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td></td><td><strong>skip_code</strong></td><td><strong>disable</strong></td></tr><tr><td><strong>Checked in header</strong></td><td>Yes</td><td>No</td></tr><tr><td><strong>Checked in footer</strong></td><td>Yes</td><td>Yes</td></tr><tr><td><strong>Stops header logic</strong></td><td>Yes</td><td>No</td></tr><tr><td><strong>Stops footer logic</strong></td><td>Yes</td><td>No</td></tr><tr><td><strong>Allows logging</strong></td><td>No</td><td>Yes</td></tr><tr><td><strong>Allows graceful finish</strong></td><td>No</td><td>Yes</td></tr><tr><td><strong>Typical intent</strong></td><td>Hard kill</td><td>Controlled stop</td></tr></tbody></table></figure>



<ul class="wp-block-list">
<li style="padding-top:var(--wp--preset--spacing--40)"><strong>read_only:</strong> Only allows read queries to be executed.</li>



<li><strong>max_comm_error</strong>: The number of consecutive communications faults that must occur before a communication error is thrown.</li>



<li><strong>exec_x_quries:</strong> The number of queries in the SB to be executed in each loop.</li>
</ul>



<p class="wp-block-paragraph">The “out” struct provides information about the station’s current operational status rather than historical data.</p>



<ul class="wp-block-list">
<li><span style="margin: 0px;padding: 0px"><strong>error:</strong>&nbsp;General error flag which stays true until all queries in the SB complete successfully&nbsp;in one cycle</span>.</li>



<li><strong>error_comm: </strong>True if consecutive communication errors exceed max_comm_error.</li>



<li><strong>finish:</strong> True for one scan when the SB passes execution to the next device.</li>
</ul>



<p class="wp-block-paragraph">The “log” struct provides historical, cumulative data about query execution and error conditions for diagnostics and analysis.</p>



<ul class="wp-block-list">
<li><strong>connected_time:</strong> Timestamp of when a device last regained communication.</li>



<li><strong>disconnected_time:</strong> Timestamp of when a device last lost communication.</li>



<li><strong>done_cnt:</strong> The number of successful queries.</li>



<li><strong>error_comm_cnt:</strong> The number of communication errors.</li>



<li><strong>error_exception_cnt:</strong> The number of non-communication-related errors.</li>



<li><strong>error_status:</strong> The error status code of the most recent failed query.</li>



<li><strong>error_data_addr:</strong> The data address associated with the most recent failed query.</li>
</ul>



<p class="wp-block-paragraph">The “z” struct is used for the internal workings of the rexhip functions and is not intended for logic, diagnostics, or configuration.</p>



<h3 class="wp-block-heading" id="h-station-block-troubleshooting-tools">Station Block Troubleshooting Tools</h3>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--30)">The&nbsp;mb_station_block_udt&nbsp;“log”&nbsp;struct&nbsp;allows engineers to quickly&nbsp;identify&nbsp;communication issues and respond appropriately. The following&nbsp;examples&nbsp;demonstrate&nbsp;how it&nbsp;could&nbsp;be used to&nbsp;troubleshoot&nbsp;faulty&nbsp;device communications.&nbsp;</p>



<p class="has-text-align-center wp-block-paragraph"><em>Table 5: Example &#8220;log&#8221; Struct Use Cases</em></p>



<figure style="padding-bottom:var(--wp--preset--spacing--30)" class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td><strong>Tag</strong></td><td><strong>Use Cases</strong></td></tr><tr><td><strong>connected_time</strong></td><td>Identifying if a device is repeatedly dropping and reconnecting.</td></tr><tr><td><strong>disconnected_time</strong></td><td>Identifying if a device is repeatedly dropping and reconnecting.<br>Correlating communication loss with external events, such as equipment being powered down.</td></tr><tr><td><strong>done_cnt</strong></td><td>Confirming the device is completing successful queries.<br>Estimating how quickly queries are being completed.</td></tr><tr><td><strong>error_comm_cnt</strong></td><td>Confirming the device is attempting to communicate.<br>Identifying errors as communication errors.</td></tr><tr><td><strong>error_exception_cnt</strong></td><td>Confirming the device is attempting to communicate.<br>Identifying errors as non-communication Modbus exceptions.</td></tr><tr><td><strong>error_status</strong></td><td>Identifying the specific type of error affecting a device.</td></tr><tr><td><strong>error_data_addr</strong></td><td>Identifying the exact misconfigured register/coil causing errors.</td></tr></tbody></table></figure>



<h2 class="wp-block-heading" id="h-modbus-rtu-setup" style="padding-top:var(--wp--preset--spacing--30)">Modbus RTU Setup</h2>



<h3 class="wp-block-heading" id="h-the-modbus-master-block">The Modbus Master Block</h3>



<p class="wp-block-paragraph">The rexhip library includes two RTU master function blocks, mb_master_1200_ctrl and mb_master_1500_ctrl, for Siemens 1200 and 1500 PLCs, respectively. This guide will use a 1200-series PLC as an example. The 1500-series master block includes an additional operating_mode input that is mapped to the operating mode of the underlying comm_load instruction.</p>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--30)">The master control block takes inputs for the hardware ID and baud rate, and an input/output of type mb_query. In the instance data of the master block, the static struct “conf” contains the parity, retries, timeout gain, and timeout offset parameters.</p>



<figure class="wp-block-image aligncenter size-full is-resized has-custom-border"><img decoding="async" width="513" height="550" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-6.png" alt="Image displaying a function block (FB) configuration for a Modbus master communication setup in Siemens TIA Portal." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44670" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;width:500px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-6.png 513w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-6-280x300.png 280w" sizes="(max-width: 513px) 100vw, 513px" /><figcaption class="wp-element-caption"><em>Figure 6: Modbus Master Block Call Example</em></figcaption></figure>



<h3 class="wp-block-heading" id="h-timeout">Timeout</h3>



<p class="wp-block-paragraph">The timeout is automatically calculated as follows:</p>



<p class="wp-block-paragraph"><em>Timeout = (total bits transmitted ÷ baud rate ) x timeout gain + timeout offset</em></p>



<p class="wp-block-paragraph">The result is clamped to 5 ms ≤ result ≤ 65 s.</p>



<p class="wp-block-paragraph">This calculation scales the timeout based on the amount of information being transmitted. Setting gain = 0 disables auto-calculation and uses the offset as a fixed timeout.</p>



<h3 class="wp-block-heading" id="h-integrating-queries-with-the-master-block">Integrating Queries with the Master Block</h3>



<p class="wp-block-paragraph">Below is an example of one way to load queries into a Modbus master block using station blocks.</p>



<p class="wp-block-paragraph">This example will use the fbModbus function block shown above, and its instance memory data block “instance_fbModbus.” It will also use two pre-configured station blocks from the rexhip library–AUMA Valve and ABB AquaMaster 3 flowmeter.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-0e47273b wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image aligncenter size-full is-resized has-custom-border"><img decoding="async" width="461" height="409" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-7.png" alt="Image displaying a function block (FB) configuration for a Modbus master communication setup in Siemens TIA Portal." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44672" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;aspect-ratio:1.1254528189076074;width:455px;height:auto" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-7.png 461w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-7-300x266.png 300w" sizes="(max-width: 461px) 100vw, 461px" /><figcaption class="wp-element-caption"><em>Figure 7: AUMA Valve Station Block</em></figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image alignleft size-full is-resized has-custom-border"><img decoding="async" width="476" height="374" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-8.png" alt="Image of a code snippet for a Siemens PLC (S7-1200/1500) using a custom library to interface with an ABB AquaMaster 3 Electromagnetic Flowmeter via Modbus RTU or TCP." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44673" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;aspect-ratio:1.2685827552031714;width:510px;height:auto" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-8.png 476w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-8-300x236.png 300w" sizes="(max-width: 476px) 100vw, 476px" /><figcaption class="wp-element-caption"><em>Figure 8: ABB AquaMaster 3 Station Block</em></figcaption></figure>
</div>
</div>



<p class="wp-block-paragraph">OB1 (Main) will call fbModbus, which holds the Modbus master block, and fbDevices, which holds the station blocks.</p>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--40)">This example system will have three valves and two flowmeters, so three valve station blocks and two flowmeter station blocks are called in fbDevices. Each one is given a unique Modbus address, and mb_query is set to “instance_fbModbus.mb_query” for all five devices.</p>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-0e47273b wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%">
<figure class="wp-block-image aligncenter size-full has-custom-border"><img decoding="async" width="278" height="491" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-9.png" alt="Image of two networks of Ladder Logic programming within the TIA Portal software environment" class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44674" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-9.png 278w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-9-170x300.png 170w" sizes="(max-width: 278px) 100vw, 278px" /><figcaption class="wp-element-caption"><em>Figure 9: FB Calls in OB1</em></figcaption></figure>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<figure class="wp-block-image aligncenter size-full has-custom-border"><img decoding="async" width="1166" height="725" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-10.png" alt="Screenshot showing the configuration of a Function Block (FB) in Siemens TIA Portal, specifically focusing on an array of device instances being called in a ladder logic program." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44675" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-10.png 1166w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-10-300x187.png 300w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-10-1024x637.png 1024w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-10-768x478.png 768w" sizes="(max-width: 1166px) 100vw, 1166px" /><figcaption class="wp-element-caption"><em>Figure 10: fbDevices</em></figcaption></figure>
</div>
</div>



<h3 class="wp-block-heading" id="h-the-path-of-the-query">The Path of the Query</h3>



<ol class="wp-block-list">
<li>The query starts in an SB where it is configured, and is then passed out of the SB.</li>



<li>It is then passed to fbModbus&#8217;s instance data block via fbDevices<em>.</em></li>



<li>It then gets loaded into the Modbus master block.</li>
</ol>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--30)">Each query loaded into the master block is automatically placed in a queue and handled one at a time by the master block.</p>



<div class="wp-block-columns are-vertically-aligned-bottom is-layout-flex wp-container-core-columns-is-layout-48049e16 wp-block-columns-is-layout-flex" style="padding-top:var(--wp--preset--spacing--30)">
<div class="wp-block-column is-vertically-aligned-bottom is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image aligncenter size-full is-resized has-custom-border"><img decoding="async" width="513" height="678" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-11.png" alt="Selected code snippet shows a Modbus write instruction being executed within a Siemens TIA Portal environment." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44676" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;aspect-ratio:0.7585678376555699;width:334px;height:auto" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-11.png 513w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-11-227x300.png 227w" sizes="(max-width: 513px) 100vw, 513px" /><figcaption class="wp-element-caption"><em>Figure 11: mb_query Definition in Station Block</em></figcaption></figure>
</div>



<div class="wp-block-column is-vertically-aligned-bottom is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image aligncenter size-full has-custom-border"><img decoding="async" width="757" height="484" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-12.png" alt="Image illustrates the mapping of a Static variable from a Function Block instance to an input parameter of another Function Block in a Siemens TIA Portal environment." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44677" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-12.png 757w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-12-300x192.png 300w" sizes="(max-width: 757px) 100vw, 757px" /><figcaption class="wp-element-caption"><em>Figure 12: mb_query Transferred to &#8220;instance_fbModbus&#8221;</em></figcaption></figure>
</div>



<div class="wp-block-column is-vertically-aligned-bottom is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image aligncenter size-full has-custom-border"><img decoding="async" width="513" height="559" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-13.png" alt="Siemens S7-1200 PLC function block showing the mb_master_1200_ctrl configured for Modbus RTU communication, with a static mb_query variable mapped to the control block and constants defining RS485 port and baud rate." class="has-border-color has-custom-light-gray-neutral-2-border-color wp-image-44678" style="border-width:2px;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-13.png 513w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-13-275x300.png 275w" sizes="(max-width: 513px) 100vw, 513px" /><figcaption class="wp-element-caption"><em>Figure 13: mb_query Arrives at Master Block</em></figcaption></figure>
</div>
</div>



<h3 class="wp-block-heading" id="h-modbus-tcp-client-setup">Modbus TCP Client Setup</h3>



<p class="wp-block-paragraph">The rexhip library provides a wrapper for the Modbus TCP client function native to TIA Portal, mb_tcp_ctrl (which may be called mb_client_ctrl depending on the library version). The library does not provide a wrapper for the Modbus TCP server function, so if configuring a server, use the native TIA Portal function MB_SERVER.</p>



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--30)">The mb_tcp_ctrl block takes inputs for the hardware interface, connection ID (should match the server connection ID), server IP address, TCP port, timeout, and an input/output of mb_query. Below is an example of an mb_tcp_ctrl block call.</p>



<figure class="wp-block-image aligncenter size-full is-resized has-custom-border" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"><img decoding="async" width="441" height="251" src="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-14.png" alt="The block shown is a Function Block (FB9) named &quot;mb_tcp_ctrl&quot;, which is designed to manage Modbus TCP client communications within a Siemens TIA Portal environment." class="has-border-color wp-image-44679" style="border-color:#eeeeee;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px;aspect-ratio:1.7391090024031055;object-fit:cover;width:500px" srcset="https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-14.png 441w, https://static.dmcinfo.com/wp-content/uploads/2026/05/siemens-modbus-extended-library-image-14-300x171.png 300w" sizes="(max-width: 441px) 100vw, 441px" /><figcaption class="wp-element-caption"><em>Figure 14: Modbus TCP Client Block Call Example</em></figcaption></figure>



<p class="wp-block-paragraph">Queries are loaded into the TCP control block in the exact same way as the RTU control blocks, and query statuses can similarly be monitored in the instance memory of SBs.</p>



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



<p class="wp-block-paragraph" style="padding-bottom:var(--wp--preset--spacing--40)">The rexhip Modbus library provides a structured, consistent way to set up and manage Modbus RTU and TCP communications in TIA Portal. Using standard function blocks and station blocks simplifies configuration, improves readability, and makes troubleshooting easier across a wide range of devices. This approach helps engineers spend less time dealing with protocol details and more time building reliable, maintainable automation systems.</p>



<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">Planning a new automation project or controls upgrade?</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">DMC delivers <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/">Manufacturing Automation</a> and <a href="https://static.dmcinfo.com/services/manufacturing-automation-and-intelligence/plc-programming/">PLC Programming</a> solutions that help reduce downtime and improve accuracy on the factory floor.</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 class="wp-block-paragraph"></p>
<p>The post <a href="https://static.dmcinfo.com/blog/44660/siemens-modbus-extended-library-for-tia-portal/">Getting Started with the Siemens Modbus Extended Library for TIA Portal</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dissecting the Siemens Open Library: A Deeper Dive into fbVFD_GSeries</title>
		<link>https://static.dmcinfo.com/blog/21311/dissecting-the-siemens-open-library-a-deeper-dive-into-fbvfd-gseries/</link>
		
		<dc:creator><![CDATA[DMC]]></dc:creator>
		<pubDate>Tue, 02 Jul 2019 13:33:18 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Siemens Open Library]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/21311/dissecting-the-siemens-open-library-a-deeper-dive-into-fbvfd_gseries/</guid>

					<description><![CDATA[<p>The world begs to be automated, but nothing more so than motors. Most automation projects will include at least one motor, whether it be a pump or conveyor, a mixer or a blower. Often, these motors require control through a variable frequency drive (VFD) to achieve a precise speed setpoint. Setting up the control interface [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/21311/dissecting-the-siemens-open-library-a-deeper-dive-into-fbvfd-gseries/">Dissecting the Siemens Open Library: A Deeper Dive into fbVFD_GSeries</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The world begs to be automated, but nothing more so than motors. Most automation projects will include at least one motor, whether it be a pump or conveyor, a mixer or a blower. Often, these motors require control through a variable frequency drive (VFD) to achieve a precise speed setpoint. Setting up the control interface for a VFD can sometimes be confusing or complicated. But fear not for&nbsp;the <a href="http://openplclibrary.com/" target="_blank">Siemens Open Library</a> has the perfect block for the job! <strong>Introducing fbVFD_GSeries.</strong></p>



<p class="wp-block-paragraph">In this blog, we will take a deeper dive into setting up a project that includes a Siemens G Series VFD. We will begin by adding the device to the project. We will then set up the data blocks to include the proper user-defined types (UDTs), configure the function block call, and configure HMI faceplates for manual control and to display status. This example uses a 1516-3 PLC, TP600 Comfort HMI, and a G120 CU240E. Whether&nbsp;you are using the same hardware or something similar,&nbsp;the same concepts will apply.</p>



<p class="wp-block-paragraph">Note that although this block is compatible with a 1200 PLC, some functionality such as PLC ramping and power/current monitoring is only available on a 1500 PLC. Also, many of the concepts detailed in this blog are applicable to other blocks in the Open Library.</p>



<h2 id="h-step-0" class="wp-block-heading">Step 0</h2>



<p class="wp-block-paragraph">Create your project and add the PLC, HMI, and VFD to the hardware config. Network them together with <strong>PN/IE_1</strong> in the Network View.</p>



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



<h2 id="h-step-1" class="wp-block-heading">Step 1</h2>



<p class="wp-block-paragraph">Set up the VFD with the commissioning wizard. Each application has different parameters, so set up your VFD to fit the particular system that it will be used in, unless specifically detailed here.<br> <strong>Setpoint Specification:</strong> The drive must be used to control the ramp-up and down control of the motor. Select the ‘Ramp-function inside the drive’ option.</p>



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



<p class="wp-block-paragraph">The function block we will be using requires <strong>Standard Telegram 1 for PLC-VFD</strong> communication. You may also set up the VFD’s local IO for hardwire control in this step. <a href="https://static.dmcinfo.com/blog/22210/using-digital-inputs-and-command-data-set-1-to-control-a-siemens-g120-cu240/">This blog</a> explains the details of hardware control.</p>



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



<p class="wp-block-paragraph">Once the drive has been set up with its proper motor parameters and the commissioning wizard is complete, note the hardware ID for the drive. This ID can be found in the system constants in the properties of the drive.</p>



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



<h2 id="h-step-2" class="wp-block-heading">Step 2</h2>



<p class="wp-block-paragraph">Add the <strong>udtError_VFD</strong> and <strong>udtHMI_VFD_Control</strong> data types to your data blocks. Per the open library standards, these are typically split into DBs specifically for HMI, and DBs specifically for errors.</p>



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



<h2 id="h-step-3" class="wp-block-heading">Step 3</h2>



<p class="wp-block-paragraph">Now we need to call the function block that is used to control. In our example, the VFD is used to control a pump in the water subsystem. The <strong>OB1</strong> calls <strong>fbMain</strong> which contains all of the calls for the individual subsystem, fbWaterSystem for example. <strong>fbWaterSystem</strong> then calls <strong>fbVFD_GSeries</strong> and controls the pump from there.</p>



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



<p class="wp-block-paragraph">Lets quickly look that the important details of the interface here:</p>


<table style="width: 100%; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; margin-bottom: 20px;">
<tbody>
<tr style="text-align: center;">
<th style="border-collapse: collapse; border-style: solid; border-width: medium; border-spacing: 20px; border: 1px solid black; height: 100px; font-size: 24px; border-right-style: solid; border-right-width: medium; border-left-style: solid; border-left-width: medium;"><strong>Parameter</strong></th>
<th style="border-collapse: collapse; border-style: solid; border-width: medium; border-spacing: 20px; border: 1px solid black; height: 100px; font-size: 24px; border-right-style: solid; border-right-width: medium; border-left-style: solid; border-left-width: medium;"><strong>Interface</strong></th>
<th style="border-collapse: collapse; border-style: solid; border-width: medium; border-spacing: 20px; border: 1px solid black; height: 100px; font-size: 24px; border-right-style: solid; border-right-width: medium; border-left-style: solid; border-left-width: medium;"><strong>Reason</strong></th>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">hwInTelegram</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">“WaterPump~Profinet_ Interface~Standard_Telegram_1”</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">This points to telegram specific to the VFD we want to control. This was noted in Step 1</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInSignalContactor</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">I_WaterPumpContactor</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">To ensure the VFD command triggers the contactor</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInEnableForward</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bWaterPumpInterlockOK</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">We don’t want the pump to run if any interlocks are active. This bit is controlled by PLC logic</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInEnableReverse</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">False</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">Pumps should never run in reverse so this is a hardcoded false</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">rInCommandSpeed</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">rPumpSpeedSP</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">Speed setpoint from the PLC. This is a 0-100% scale and is set by PLC logic</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInCommandForward</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bStartPumpCommand</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">Command forward motion. This bit is set and reset in the PLC logic to control the drive</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInCommandReverse</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">False</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">Pumps should never run in reverse so this is a hardcoded false</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInMotorProtector</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">I_WaterPumpMSP</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">IO for the drive to ensure motor protection is active. A low signal will prevent the drive from running</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInLocalDisconnect</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">I_WaterPumpDisconnect</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">IO for the drive to check the motor’s safety disconnect switch. A low signal will prevent the drive from running</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInClutch</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">True</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">No clutch is necessary for the pump. A hardcoded true is used instead of IO</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInCoolingFan</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">I_WaterPumpCoolingFan</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">IO for the drive to check the motor’s cooling fan is active. A low signal for 30s after starting will prevent the drive from running</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInUseCurrentAlarm</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">True</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">Activate alarm checks for current output</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bInUseMaxFequencyAlarm</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">True</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">Activate alarm checks for frequency output</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">HMI_VFD_Control</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">“dbWaterSystem”.VFD_WaterPump</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">udtHMI used to display information and control the drive from the HMI. This was set up in Step 2</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">rOutSpeed</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">rPumpActualSpeed</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">The actual speed of the pump. This can be used in PLC logic</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bOutContactor</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">Q_WaterPumpContactor</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">IO to control the pump contactor.</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">bOutForward/Reverse/ bOutAuto/bOutError</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">VFD_WaterPump instance memory</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">Indications of the pump status. These can be used in PLC logic, but aren’t in this example. Standard practice is to tie unused outputs to their own instance memory</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">ERROR_VFD</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">“dbErrors_WaterSystem”. VFD_WaterPump</td>
<td style="text-align: center; vertical-align: middle; border-collapse: collapse; border: 1px solid black; border-style: solid; border-width: medium; font-size: 24px;">udtError used to display faults on the HMI. This was set up in Step 2</td>
</tr>
</tbody>
</table>


<h2 id="h-step-4" class="wp-block-heading">Step 4</h2>



<p class="wp-block-paragraph">Now to link to the HMI. First, link an HMI tag to the udtHMI_VFD_Control that was created in Step 2 and used in Step 3.</p>



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



<p class="wp-block-paragraph">Add the appropriate faceplate to your screen and link the HMI tag.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/step-4-pump-fp.png" alt="pump faceplate"/></figure>



<p class="wp-block-paragraph">Then add a popup faceplate to a new popup screen. Link the HMI tag.</p>



<figure class="wp-block-image"><img decoding="async" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/step-4-popup-fb.png" alt="popup faceplate"/></figure>



<p class="wp-block-paragraph">Use a transparent button over the pump faceplate in order to show the pop-up. Link it to the <strong>‘ShowPopupScreen’</strong> event with the display mode set to <strong>‘On.’ </strong></p>



<p class="wp-block-paragraph">Also note there is an event attached to the close button in the popup faceplate, see above picture. Also, use the ‘ShowPopupScreen’ event with the display mode set to ‘Off’ as that button is used to close the popup screen.</p>



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



<p class="wp-block-paragraph">And congratulations, <strong>your G-Series motor is now ready for action!</strong></p>



<p class="wp-block-paragraph">Learn more about DMC&#8217;s <a href="/about/partners/siemens-solution-partner">partnership with Siemens</a> and our <a href="/services/manufacturing-automation-and-intelligence/plc-programming/siemens-s7-plc-programming">Siemens PLC Programming Services</a>. <a href="/contact">Contact us</a> for more information.</p>
<p>The post <a href="https://static.dmcinfo.com/blog/21311/dissecting-the-siemens-open-library-a-deeper-dive-into-fbvfd-gseries/">Dissecting the Siemens Open Library: A Deeper Dive into fbVFD_GSeries</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Siemens Open Library Version 4.0 Release</title>
		<link>https://static.dmcinfo.com/blog/21422/siemens-open-library-version-4-0-release/</link>
		
		<dc:creator><![CDATA[Jeff McCormick]]></dc:creator>
		<pubDate>Thu, 13 Jun 2019 08:35:32 +0000</pubDate>
				<category><![CDATA[Manufacturing Automation & Intelligence]]></category>
		<category><![CDATA[PLC]]></category>
		<category><![CDATA[Siemens PLC]]></category>
		<category><![CDATA[Siemens Open Library]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/blog/21422/siemens-open-library-version-4-0-release/</guid>

					<description><![CDATA[<p>The Siemens Open Library Version 4.0 is now live, and the website is up to date with the latest version and release notes.  Update Highlights Siemens Open Library Overview A free, open source library, the Siemens Open Library was developed&#160;by DMC in partnership with Siemens Industry as a resource for consistency, usability, and faster development for [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/21422/siemens-open-library-version-4-0-release/">Siemens Open Library Version 4.0 Release</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The <a href="https://openplclibrary.com/" target="_blank" rel="noreferrer noopener">Siemens Open Library</a> Version 4.0 is now live, and <a href="https://openplclibrary.com/#latest-versions">the website</a> is up to date with the latest version and release notes. </p>



<h2 class="wp-block-heading" id="h-update-highlights">Update Highlights</h2>



<ul class="wp-block-list">
<li>Siemens TIA Portal V15&nbsp;</li>



<li>Simulation mode for all devices</li>



<li>V15.1 version will be coming out in the next few months</li>
</ul>



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



<h2 class="wp-block-heading" id="h-siemens-open-library-overview">Siemens Open Library Overview</h2>



<p class="wp-block-paragraph">A free, open source library, the Siemens Open Library was developed&nbsp;by DMC in partnership with Siemens Industry as a resource for consistency, usability, and faster development for the ever-growing Siemens community. With over 1000 hours of time invested, this library is already being put to use in many different types of <a href="https://static.dmcinfo.com/latest-thinking/case-studies/view/id/465/plc5-and-wonderware-to-simatic-et200-cpu-and-labview-upgrade-for-hvac-test-chamber">projects</a>&nbsp;across multiple platforms.</p>



<p class="wp-block-paragraph"><img decoding="async" alt="Siemens Open Library sample project" src="https://static.dmcinfo.com/wp-content/uploads/2025/05/Siemens-Open-Library-Sample-Project.png"><br>
<em>Siemens Open Library sample project</em></p>



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



<h2 class="wp-block-heading" id="h-stay-up-to-date">Stay Up To Date</h2>



<p class="wp-block-paragraph"><a href="https://www.linkedin.com/groups/8547245/profile" target="_blank">Join our Siemens Open Library group on LinkedIn</a>&nbsp;and stay up to date on all the latest improvements or&nbsp;<a href="http://openplclibrary.com/#signup" target="_blank">sign up here to receive an email notification</a>&nbsp;each time the library is updated.</p>



<p class="wp-block-paragraph">You can submit&nbsp;custom objects to DMC by emailing them to&nbsp;<a href="mailto:Contribute@OpenPLCLibrary.com?subject=Contribution%20To%20Open%20PLC%20Library">Contribute@OpenPLCLibrary.com</a>.</p>



<p class="wp-block-paragraph">Are you attending the 2019 Siemens Automation Summit? Stop by <a href="https://static.dmcinfo.com/latest-thinking/blog/id/9846/dmc-to-present-at-the-2019-siemens-automation-summit">any of our presentations and say hello</a>!</p>
<p>The post <a href="https://static.dmcinfo.com/blog/21422/siemens-open-library-version-4-0-release/">Siemens Open Library Version 4.0 Release</a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
