<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ibhsoftec.com/en/index.php?action=history&amp;feed=atom&amp;title=IBH_OPC_UA%3AS7-1200%2F1500_optimized_data_blocks</id>
	<title>IBH OPC UA:S7-1200/1500 optimized data blocks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ibhsoftec.com/en/index.php?action=history&amp;feed=atom&amp;title=IBH_OPC_UA%3AS7-1200%2F1500_optimized_data_blocks"/>
	<link rel="alternate" type="text/html" href="https://wiki.ibhsoftec.com/en/index.php?title=IBH_OPC_UA:S7-1200/1500_optimized_data_blocks&amp;action=history"/>
	<updated>2026-09-27T04:04:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.ibhsoftec.com/en/index.php?title=IBH_OPC_UA:S7-1200/1500_optimized_data_blocks&amp;diff=2363&amp;oldid=prev</id>
		<title>Axel: Explained S7-1200/1500 access and optimized data blocks using the Web Configurator image</title>
		<link rel="alternate" type="text/html" href="https://wiki.ibhsoftec.com/en/index.php?title=IBH_OPC_UA:S7-1200/1500_optimized_data_blocks&amp;diff=2363&amp;oldid=prev"/>
		<updated>2026-08-05T15:12:44Z</updated>

		<summary type="html">&lt;p&gt;Explained S7-1200/1500 access and optimized data blocks using the Web Configurator image&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The IBH OPC UA Server/Client can read symbolic variables online from an S7-1200 or S7-1500. This also makes &amp;#039;&amp;#039;&amp;#039;optimized data blocks&amp;#039;&amp;#039;&amp;#039; available in the OPC UA address space without maintaining fixed absolute byte offsets.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* The S7-1200 or S7-1500 is reachable over Ethernet.&lt;br /&gt;
* The current TIA Portal project is fully compiled and downloaded to the CPU.&lt;br /&gt;
* Symbolic names and data blocks in the CPU match the project version.&lt;br /&gt;
* CPU protection and access settings permit authorized online access.&lt;br /&gt;
* Credentials are available when the CPU is protected.&lt;br /&gt;
* The IBH OPC UA Server/Client license is valid.&lt;br /&gt;
&lt;br /&gt;
== Web Configurator view ==&lt;br /&gt;
Open &amp;#039;&amp;#039;&amp;#039;S7-1200/1500&amp;#039;&amp;#039;&amp;#039; in the Web Configurator.&lt;br /&gt;
&lt;br /&gt;
[[File:IBH_OPC_UA_S7_1200_1500_Optimized_Data_Blocks.png|thumb|center|1000px|Symbolically read S7-1200 and S7-1500 variables. The example shows global and instance data blocks together with their OPC access attributes.]]&lt;br /&gt;
&lt;br /&gt;
The image shows two controllers read online. The detected CPU order number and firmware version are displayed below each controller.&lt;br /&gt;
&lt;br /&gt;
The variable tree is divided into the following areas:&lt;br /&gt;
&lt;br /&gt;
; GlobalVars&lt;br /&gt;
: Global CPU areas such as inputs, outputs, memory, timers and counters.&lt;br /&gt;
&lt;br /&gt;
; Programs&lt;br /&gt;
: Programs and data blocks available in the CPU.&lt;br /&gt;
&lt;br /&gt;
; DataBlocksGlobal&lt;br /&gt;
: Global data blocks containing scalar variables, arrays, structures and user-defined data types.&lt;br /&gt;
&lt;br /&gt;
; DataBlocksInstance&lt;br /&gt;
: Instance data blocks belonging to function blocks. They are shown separately from global DBs.&lt;br /&gt;
&lt;br /&gt;
The tree uses the symbolic names stored in the CPU. For optimized data blocks, the server uses this symbolic information; the application does not need to maintain absolute offsets.&lt;br /&gt;
&lt;br /&gt;
== Add a controller and read variables ==&lt;br /&gt;
# Select &amp;#039;&amp;#039;&amp;#039;Insert PLC&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Enter a unique PLC name.&lt;br /&gt;
# Enter the CPU&amp;#039;s Ethernet address.&lt;br /&gt;
# Select a timeout appropriate for the network.&lt;br /&gt;
# For a protected CPU, enter the required credentials.&lt;br /&gt;
# Confirm the dialog. The server connects and reads the online tags.&lt;br /&gt;
# Expand the CPU, &amp;#039;&amp;#039;&amp;#039;Programs&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;DataBlocksGlobal&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;DataBlocksInstance&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Verify that the expected blocks, structures and variables are present.&lt;br /&gt;
# Activate the configuration with &amp;#039;&amp;#039;&amp;#039;Apply&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Reading the online tags can take some time depending on the project size, CPU and network. Do not interrupt the CPU connection during this operation.&lt;br /&gt;
&lt;br /&gt;
== Meaning of the OPC columns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column !! Value 1 !! Value 0&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Visible in OPC&amp;#039;&amp;#039;&amp;#039; || The node is published in the OPC UA address space. || The node is hidden from the OPC UA address space.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Accessible in OPC&amp;#039;&amp;#039;&amp;#039; || An OPC UA client may access the value. || Access to the value is blocked at the OPC layer.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Write protection in OPC&amp;#039;&amp;#039;&amp;#039; || The value is exposed as read-only by the OPC UA server. || Writing is permitted at the OPC layer, provided that CPU protection and user permissions also allow it.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An empty field means that no separate value is displayed for the node. Check the setting of the parent data block or structure.&lt;br /&gt;
&lt;br /&gt;
In the image, &amp;#039;&amp;#039;&amp;#039;EvData1&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;EvData2&amp;#039;&amp;#039;&amp;#039; have:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Visible in OPC = 1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Accessible in OPC = 1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Write protection in OPC = 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Both variables therefore appear in the OPC UA address space and can be accessed. They are not write-protected at the OPC layer. Whether a write succeeds also depends on CPU protection levels, variable properties and OPC UA user permissions.&lt;br /&gt;
&lt;br /&gt;
== Configure visibility and access rights ==&lt;br /&gt;
Expose only the variables that OPC UA applications require.&lt;br /&gt;
&lt;br /&gt;
* Select a structure or data block to apply consistent settings where appropriate.&lt;br /&gt;
* Disable &amp;#039;&amp;#039;&amp;#039;Visible in OPC&amp;#039;&amp;#039;&amp;#039; when the node must not appear in the address space.&lt;br /&gt;
* Disable &amp;#039;&amp;#039;&amp;#039;Accessible in OPC&amp;#039;&amp;#039;&amp;#039; when the node belongs to the structure but its value must not be accessed.&lt;br /&gt;
* Enable &amp;#039;&amp;#039;&amp;#039;Write protection in OPC&amp;#039;&amp;#039;&amp;#039; when clients may only read the value.&lt;br /&gt;
* Select &amp;#039;&amp;#039;&amp;#039;Apply&amp;#039;&amp;#039;&amp;#039; to activate pending changes.&lt;br /&gt;
&lt;br /&gt;
Permissions on parent structures and data blocks can affect child elements. Review critical variables individually.&lt;br /&gt;
&lt;br /&gt;
== Changes to the TIA Portal project ==&lt;br /&gt;
After changing data blocks, structures, data types or symbolic names:&lt;br /&gt;
&lt;br /&gt;
# Compile the TIA Portal project completely.&lt;br /&gt;
# Download the changes to the correct CPU.&lt;br /&gt;
# Select the controller in the Web Configurator.&lt;br /&gt;
# Select &amp;#039;&amp;#039;&amp;#039;Refresh PLC&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Review the variable tree and OPC attributes.&lt;br /&gt;
# Select &amp;#039;&amp;#039;&amp;#039;Apply&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Browse again from OPC UA clients if the address space has changed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Refresh PLC&amp;#039;&amp;#039;&amp;#039; replaces the previously read online tags with the current CPU state. Pay particular attention to deleted or renamed variables.&lt;br /&gt;
&lt;br /&gt;
== Functional test with an OPC UA client ==&lt;br /&gt;
# Connect to the IBH OPC UA Server/Client endpoint.&lt;br /&gt;
# Verify the server certificate and security policy.&lt;br /&gt;
# Open the S7-1200 or S7-1500 station in the address space.&lt;br /&gt;
# Select a global or instance data block.&lt;br /&gt;
# Read test variables and check their status codes and timestamps.&lt;br /&gt;
# Write only to variables explicitly intended for writing.&lt;br /&gt;
# Verify the new value online in TIA Portal.&lt;br /&gt;
&lt;br /&gt;
== Buttons shown in the image ==&lt;br /&gt;
; Insert PLC&lt;br /&gt;
: Creates a new online connection to an S7-1200 or S7-1500.&lt;br /&gt;
&lt;br /&gt;
; Modify PLC&lt;br /&gt;
: Changes the connection parameters of the selected controller.&lt;br /&gt;
&lt;br /&gt;
; Remove PLC&lt;br /&gt;
: Removes the selected controller from the configuration.&lt;br /&gt;
&lt;br /&gt;
; Refresh PLC&lt;br /&gt;
: Reads the CPU, programs, data blocks and symbolic tags online again.&lt;br /&gt;
&lt;br /&gt;
; Apply&lt;br /&gt;
: Activates pending configuration changes.&lt;br /&gt;
&lt;br /&gt;
; Remove all&lt;br /&gt;
: Removes all configured S7-1200/1500 controllers. Create a backup before using this function.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
; Controller not reachable&lt;br /&gt;
: Check the IP address, subnet, CPU state, network path and firewall.&lt;br /&gt;
&lt;br /&gt;
; Access denied&lt;br /&gt;
: Check the CPU protection level, user or password, and permitted communication access.&lt;br /&gt;
&lt;br /&gt;
; Secure connection initialization failed&lt;br /&gt;
: Check the CPU certificate, system time, firmware and security settings.&lt;br /&gt;
&lt;br /&gt;
; A data block or variable is missing&lt;br /&gt;
: Compile and download the project, then select &amp;#039;&amp;#039;&amp;#039;Refresh PLC&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
; A variable is visible but cannot be read&lt;br /&gt;
: Check &amp;#039;&amp;#039;&amp;#039;Accessible in OPC&amp;#039;&amp;#039;&amp;#039;, CPU protection and OPC UA user permissions.&lt;br /&gt;
&lt;br /&gt;
; A write is rejected&lt;br /&gt;
: Check &amp;#039;&amp;#039;&amp;#039;Write protection in OPC&amp;#039;&amp;#039;&amp;#039;, CPU access protection, data type, variable properties and user permissions.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[IBH OPC UA:Startup operations|Startup and commissioning]]&lt;br /&gt;
* [[IBH OPC UA:TIA Portal examples|TIA Portal examples]]&lt;br /&gt;
* [[IBH OPC UA Editor]]&lt;br /&gt;
* [[IBH OPC UA:Consistent Reading/Writing arrays and structures|Consistent reading/writing of arrays and structures]]&lt;/div&gt;</summary>
		<author><name>Axel</name></author>
	</entry>
</feed>