S7-1500 / Optimized block access

Hi all, I am trying to figure out how this optimized block access in S7-1500 (TIA Portal) working. Normally when I have communicated between S7 PLCs I have been using the "GET" function block. But I have understood that when Optimized block access for a certain DB is checked in the partner PLC this will no longer work, right? If I understand correct the only way to reach DBs with optimized block access is to use a OPC Client communicating with the partner PLC OPC server if any, is this right? If the partner PLC doesn´t have a OPC Server I will not be able to communicate with this certain DB, is this correct? Is there any other "internal S7 to S7" way to communicate with this DBs without using OPC UA Client function? I can absolutely manage to use the OPC Client way to communicate but I try to figure out if there is any options available.

I understand that I in theory can update the partner PLC, but the problem is that it is locked from editing by the supplier.

Many questions, sorry :)
 
So, you need to fetch data that is in an optimized DB, and the PLC is locked from editing.
The OPC UA Server is activated on the PLC.

Any other alternative to PUT/GET that I can think of either require program changes or configuration changes on the remote PLC.
My best suggestion would be to use BSEND/BRECV, but that would require both code and configuration changes on both PLCs.
So using an OPC Client on the other PLC seems to be the only way.
 
Thanks for fast response. So, then my conclusion was correct. In this case the OPC server is activated in the partner PLC so I will use that way to communicate.

But in cases the OPC server is not activated, or it doesn´t even have an OPC server, does that mean that DBs with optimized block access cannot be read externally at all?
 
An HMI can read an optimized DB address by means of the symbolic name, without anything having to be done on the remote PLC. Only thing is that in the DB the "accessible from HMI" must not be switched off.
But I am unaware of anything similar on a PLC.

If the OPC UA Server is not enabled on the remote PLC, it seems to me that the supplier really do not want you to read any variables from their PLC.

A hack could be to let an HMI read the remote PLC variables and copy them to your local PLC.
 
An HMI can read an optimized DB address by means of the symbolic name, without anything having to be done on the remote PLC.


Caveat: This works as long as the HMI has access to the PLC's project, either by being in the same project or by having an HMI proxy created.


If the HMI doesn't have a link to the PLC project, as far as I am aware, it cannot go grab an optimized tag by name. What it ACTUALLY requests is a long GUID that both projects know is the unique identifier for that tagname, because integer comparisons are so much faster in the chip than string comparisons.
 
Caveat: This works as long as the HMI has access to the PLC's project, either by being in the same project or by having an HMI proxy created.
Yes, I assumed that as otherwise how would nickegeson know what tags to access, no matter if absolute or symbolically addressed.
 
If the HMI doesn't have a link to the PLC project, as far as I am aware, it cannot go grab an optimized tag by name. What it ACTUALLY requests is a long GUID that both projects know is the unique identifier for that tagname, because integer comparisons are so much faster in the chip than string comparisons.

But you can browse the plc's symbolic database online and get the IDs from there, so you don't need the offline project. From Siemens this can be done with WinCC V7.3 and above. Many drivers or OPC servers even from third party vendors support this method, so you can create a kind of gateway application with these products.
 
But you can browse the plc's symbolic database online and get the IDs from there, so you don't need the offline project. From Siemens this can be done with WinCC V7.3 and above. Many drivers or OPC servers even from third party vendors support this method, so you can create a kind of gateway application with these products.


Fair, which is part of why it blows my mind that you can't do that with the Portal HMIs.


For a while, I was really grumpy that if the PLC changed, the connection in the Comfort Panel couldn't "auto repair" itself by pulling out the tags, and remapping everything that had the same tag name to the new UID. Eventually I gave up yelling/"aggressively suggesting" it to everyone I could.
 
For a while, I was really grumpy that if the PLC changed, the connection in the Comfort Panel couldn't "auto repair" itself by pulling out the tags, and remapping everything that had the same tag name to the new UID. Eventually I gave up yelling/"aggressively suggesting" it to everyone I could.

It's not that easy.

First, you get access to a variable not only by the ID, which is at least not a single ID but a sequence of IDs for each struct where a variable is inside of, but there is also a 32 bit CRC which is generated over the complete symbol path plus datatype.

Means if you change only the variable name in the PLC, the ID is still the same but the symbol CRC is different and accessing fails. There is an option to get access via CRC=0 which is ignored then, with this you can change the name and accessing the variable would still work.

But for example if you have a variable "TemperatureTop" which the PLC programmer renames to "TemperatureBotton", should it still show a value on your HMI? I would say no. I've seen some Non-Siemens drivers which read variables whith CRC=0, I would use the CRC by default, and let the user choose if he doesn't want it.

Then we can create a scenario for automatic reconnection of variables by the name: The PLC programmer deletes the variable "TemperatureTop", HMI access fails. He adds a new variable "TemperatureTop" which will get a new ID. Should the HMI just take this variable without any warnings?

A problem for small HMIs with low processing power / memory could be, that exploring the plc and recombining the symbols with IDs, CRCs and so on, may take a lot of network traffic which affects the other communication for this time, and takes a lot of ram and processing power, depending how big the program is.
 
It's not that easy.

First, you get access to a variable not only by the ID, which is at least not a single ID but a sequence of IDs for each struct where a variable is inside of, but there is also a 32 bit CRC which is generated over the complete symbol path plus datatype.

Means if you change only the variable name in the PLC, the ID is still the same but the symbol CRC is different and accessing fails. There is an option to get access via CRC=0 which is ignored then, with this you can change the name and accessing the variable would still work.

But for example if you have a variable "TemperatureTop" which the PLC programmer renames to "TemperatureBotton", should it still show a value on your HMI? I would say no. I've seen some Non-Siemens drivers which read variables whith CRC=0, I would use the CRC by default, and let the user choose if he doesn't want it.

Then we can create a scenario for automatic reconnection of variables by the name: The PLC programmer deletes the variable "TemperatureTop", HMI access fails. He adds a new variable "TemperatureTop" which will get a new ID. Should the HMI just take this variable without any warnings?

A problem for small HMIs with low processing power / memory could be, that exploring the plc and recombining the symbols with IDs, CRCs and so on, may take a lot of network traffic which affects the other communication for this time, and takes a lot of ram and processing power, depending how big the program is.


All excellent points; you know way more about those details than I do.


I was meaning more a scenario to swap PLC A with PLC B. I work with a lot of scenarios where I have PLCs that are virtually identical, but with different IP addresses (and presumably different GUIDs). You can use a system function to change the IP of a 300/400 connection (and also EIP) to point to a new PLC, but not 1200/1500.


I was definitely assuming there would be a fair bit of "we're thinking about this, please hang on", and that it wouldn't be a trivial switch.
 

Similar Topics

Is it possible to access data from a Siemens S7-1500 PLC by using Node-RED, Python, KEPServer, an OPC server or client, or any other method if the...
13
Replies
8,102
Views
On my SmartLine 360 Factory I/O simulation, clearing a gripper fault with the panel reset also reset shift OEE and availability to zero. The KPI...
1
Replies
146
Views
Hello all, I have a customer with the thread name setup on a machine, the PLC died and I am bench testing so when I ship everything to them I...
11
Replies
370
Views
Hi all! I am looking for a simple datalogger, that can connect to our Siemens ET200SP PLC and log 50-100 values, with a 10 second resolution, up...
9
Replies
453
Views
Hello everyone, I am working on a winder machine for extruded plastic film using an S7-1500 PLC and SINAMICS S120. I have a web accumulator...
17
Replies
634
Views
Top