# Siemens Datablocks

**URL:** <https://forum.inductiveautomation.com/t/siemens-datablocks/46292>\
**Category:** Ignition\
**Created:** [May 4, 2021, 3:09am UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292 "2021-05-04T03:09:15Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![EduardoChega](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@EduardoChega](https://forum.inductiveautomation.com/u/EduardoChega)\
**Post date:** [May 4, 2021, 3:09am UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/1 "2021-05-04T03:09:15Z")

</div>

Hello,

I got an S7-1200 Siemens PLC connected to my Ignition, I’m able to access its coils, MDs, M’s, etc etc. I unchecked the “Optimized block access”, I’ve been trying to access the data blocks like in the Ignition website says ([Siemens - Ignition User Manual 7.9 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC79/Siemens#Siemens-ConfiguringSiemensAddressing)) by doing DBn10,R50 but nothing, is there a way to access these data blocks?

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [May 4, 2021, 12:53pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/2 "2021-05-04T12:53:35Z")

</div>

> [@EduardoChega](#):
>
> DBn10,R50

Where did you find that syntax? According to the manual that should be `DB10,REAL50`

---

<div class="post-metadata">

**Author:** ![EduardoChega](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@EduardoChega](https://forum.inductiveautomation.com/u/EduardoChega)\
**Post date:** [May 4, 2021, 2:16pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/3 "2021-05-04T14:16:59Z")

</div>

I found it here: ([Siemens - Ignition User Manual 7.9 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC79/Siemens#Siemens-ConfiguringSiemensAddressing)), I just tried out DB10,REAL50 but still nothing.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [May 4, 2021, 3:28pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/4 "2021-05-04T15:28:35Z")

</div>

I’m 99.9 % sure that you don’t have DB10 in your 1200 plc…?

---

<div class="post-metadata">

**Author:** ![EduardoChega](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@EduardoChega](https://forum.inductiveautomation.com/u/EduardoChega)\
**Post date:** [May 4, 2021, 3:47pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/5 "2021-05-04T15:47:51Z")

</div>

Sorry my bad, I had a typo. It is working now.

---

<div class="post-metadata">

**Author:** ![Jakub\_Lastovicka](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jakub\_Lastovicka](https://forum.inductiveautomation.com/u/Jakub_Lastovicka)\
**Post date:** [July 25, 2022, 5:06pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/6 "2022-07-25T17:06:28Z")

</div>

I’m having a similar problem with my S7-1500. I successfully tried TCP/IP, but with S7, I always end up with “Bad” quality on PLC tags.

My syntax [S7]DB57,X4.0  
S7 connected status is 1, so that is okay.

Boolean in 4.0 offset. datablock 57. Also tried with DInt and others, but always bad quality.  
Optimized block access is turned off, accessible for writing/reading, non restricted access to anyone…  
I have run out of ideas what to try.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [July 25, 2022, 5:49pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/7 "2022-07-25T17:49:55Z")

</div>

Hi @Jakub_Lastovicka,

Are you sure that you have activate the put/get mechanism in your hardware configuration?

---

<div class="post-metadata">

**Author:** ![Jakub\_Lastovicka](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jakub\_Lastovicka](https://forum.inductiveautomation.com/u/Jakub_Lastovicka)\
**Post date:** [July 25, 2022, 6:06pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/8 "2022-07-25T18:06:46Z")

</div>

Yes. PUT/GET is ticked.  
Directly on PLC properties : “Permit access with PUT/GET communication from remote partner”

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [July 25, 2022, 7:19pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/9 "2022-07-25T19:19:58Z")

</div>

can you share some print screen of your db and of the tag configuration in ignition ?

---

<div class="post-metadata">

**Author:** ![Jakub\_Lastovicka](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jakub\_Lastovicka](https://forum.inductiveautomation.com/u/Jakub_Lastovicka)\
**Post date:** [July 26, 2022, 10:25am UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/10 "2022-07-26T10:25:50Z")

</div>

Sure, here they are:

 ![OPC - TIA](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/b/db0628c391e354da12ab519cbce5aab7ebcb9d5d.png)  
 ![OPC Ignition](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/26b2622a0c5d911be8f05c9ff20c8ac48ee09865.png)

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [July 26, 2022, 11:56am UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/11 "2022-07-26T11:56:23Z")

</div>

Show also the Ignition gateway page, where you configured the connection to the PLC…

---

<div class="post-metadata">

**Author:** ![Jakub\_Lastovicka](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jakub\_Lastovicka](https://forum.inductiveautomation.com/u/Jakub_Lastovicka)\
**Post date:** [July 26, 2022, 3:21pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/12 "2022-07-26T15:21:18Z")

</div>

Here. I thought that once I get "connected: message, it’s okay. CPU is on Slot 1, Rack 0.

 ![OPC - Device overview](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/f/af7c74e8de8933006e2bcfb60333892b6c6331bf.png)  
 ![OPC - Ignition gateway confiq](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0d9a92675cd9daec3da2ba3f9a8949f00418c2ee.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 26, 2022, 3:22pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/13 "2022-07-26T15:22:33Z")

</div>

You know… every time this ever comes up it’s one of two things:

1. reading data from a block or offset that doesn’t exist. (make sure you don’t have other tags accidentally reading beyond the end of this block)
2. the hardware configuration hasn’t been compiled and downloaded and the chickens haven’t been sacrificed such that the PUT/GET and other required settings actually take effect.

---

<div class="post-metadata">

**Author:** ![Jakub\_Lastovicka](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jakub\_Lastovicka](https://forum.inductiveautomation.com/u/Jakub_Lastovicka)\
**Post date:** [July 26, 2022, 3:35pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/14 "2022-07-26T15:35:35Z")

</div>

You were right, all it needed was a hardware download. All I did before was Software only. I can’t belive I spend so many hours of testing just because of this. Thank you

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 26, 2022, 3:44pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/15 "2022-07-26T15:44:36Z")

</div>

> [@Kevin.Herron](#):
>
> the chickens haven’t been sacrificed

Snort! Ok, it's Siemens. /:

---

<div class="post-metadata">

**Author:** ![zach\_Tate](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_tate/32/39581_2.png) [@zach\_Tate](https://forum.inductiveautomation.com/u/zach_Tate)\
**Post date:** [October 26, 2022, 4:54pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/16 "2022-10-26T16:54:19Z")

</div>

Hello all, I had a similar problem trying to read tags from a DB on an S7-1200 in which the tag addressing was correct and the Siemens settings (PUT/GET ,non-optimized access, etc.) were fine, but I was still getting bad status from those tag connections. The solution for my issue was in @Kevin.Herron's point #1 above. I had a test tag off somewhere else in my data browser that was trying to reference a part of the DB that didn't exist, and as a result, all tag connections to that DB in my default tag group were bad status. The error description I was getting was:

Bad("Bad\_ConfigurationError: There is a problem with the configuration that affects the usefulness of the value.")

If you reference any part of a DB that doesn't exist (i.e. DB4X3.8, but the offsets end at 3.7), then all **subscribed** tag connections to that DB will break. Apparently since they are all sent together when polling the device, if any single connection is invalid it will break all the connections in that subscribed tag group. The service tech I spoke with mentioned the same thing happens if you have incorrect addressing on Modbus connections.

If you suspect this is happening, one thing you can do to troubleshoot is create a new tag with a valid reference to the DB, then assign it to a new tag group with data mode set to **Polled**. That OPC request will be sent separately from all the subscribed tag connections, and it should work. Then you know that at least one of your subscribed tag connections is breaking all of the references to that DB.

---

<div class="post-metadata">

**Author:** ![Rodwell\_Ngara](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@Rodwell\_Ngara](https://forum.inductiveautomation.com/u/Rodwell_Ngara)\
**Post date:** [February 13, 2025, 7:31am UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/17 "2025-02-13T07:31:51Z")

</div>

I have tried all I can to resolve this same issue, however, in our case the PLC is configured okay and we can see data from some of the DBs. Which shows us that the hardware config is correct, but the majority of the DBs we just "Bad". We have done several projects with the same setup and are working fine. Someone help if there are other things to look at.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 13, 2025, 12:49pm UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/18 "2025-02-13T12:49:13Z")

</div>

IIUC, each DB has its own optimized block access setting, which must be turned off for IA legacy protocol driver.

---

<div class="post-metadata">

**Author:** ![Remco\_Geervliet](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Remco\_Geervliet](https://forum.inductiveautomation.com/u/Remco_Geervliet)\
**Post date:** [February 18, 2025, 6:29am UTC](https://forum.inductiveautomation.com/t/siemens-datablocks/46292/19 "2025-02-18T06:29:26Z")

</div>

As @pturmel mentioned already, every datablock has it's own optimized access setting that needs to be disabled (rightclick in the left-most treeview, properties, attributes). In that same menu you can check a box to allow access from OPC UA.

Another thing to check - if you are reading multiple OPC tags from a singular DB, having 1 tag defined incorrectly can cause all tags reading from that same DB to go bad.

If just a few DB's/tags are unreadable, this is probably where you'll find your solution.
