# Read barcode string from S7 to Ignition

**URL:** <https://forum.inductiveautomation.com/t/read-barcode-string-from-s7-to-ignition/111493>\
**Category:** Ignition\
**Tags:** ignition81, ignition80, perspective\
**Created:** [October 15, 2025, 11:26pm UTC](https://forum.inductiveautomation.com/t/read-barcode-string-from-s7-to-ignition/111493 "2025-10-15T23:26:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darpan.chapaneri](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@darpan.chapaneri](https://forum.inductiveautomation.com/u/darpan.chapaneri)\
**Post date:** [October 15, 2025, 11:26pm UTC](https://forum.inductiveautomation.com/t/read-barcode-string-from-s7-to-ignition/111493/1 "2025-10-15T23:26:00Z")

</div>

Hi there, I am new to Ignition but very excited to work.

I am unable to read barcode data from Siemens 317 CPU programmed using S7 and trying to read directly in Ignition OPC server.

The PLC has data type as pointer #pDB701.DBX 196.0 which has ASCII values for the barcode in byte 198, 199, 200 and so on.

The data type selected in ignition as String and path as below.

ns=1;s=[CC09]DB701,STRING196.30

The data quality is good but value is blank.

What is the reason?

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [October 15, 2025, 11:45pm UTC](https://forum.inductiveautomation.com/t/read-barcode-string-from-s7-to-ignition/111493/2 "2025-10-15T23:45:50Z")

</div>

Can you try the following and post the result?  
`ns=1;s=[CC09]DB701,STRING196`  
`ns=1;s=[CC09]DB701,I196.0`  
`ns=1;s=[CC09]DB701,I196.1`

---

<div class="post-metadata">

**Author:** ![darpan.chapaneri](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@darpan.chapaneri](https://forum.inductiveautomation.com/u/darpan.chapaneri)\
**Post date:** [October 21, 2025, 6:36am UTC](https://forum.inductiveautomation.com/t/read-barcode-string-from-s7-to-ignition/111493/3 "2025-10-21T06:36:24Z")

</div>

It doesn’t read the string and only seem to read the first byte. Even after changing the data type to be String Array it reads the next bytes but populates in binary in the array.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/e/be308c0e7f6c80aea06e91642f6f19d6619eb8f1.png)

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [October 21, 2025, 7:11am UTC](https://forum.inductiveautomation.com/t/read-barcode-string-from-s7-to-ignition/111493/4 "2025-10-21T07:11:34Z")

</div>

This is because you are not populating the length of the string in the PLC.  
Refer to this post from the forum:

> [@Siemens string address syntax](https://forum.inductiveautomation.com/t/siemens-string-address-syntax/68353/8):
>
> The Siemens string format that Ignition expects to find at offset 80 starts with two non-string bytes-max length and occupied length. The 18 bytes of actual string follow that, and Ignition will only use the "occupied" length to construct its result. Verify that you have the correct max and actual lengths in those two leading bytes.

In the pictures above, you show that the Max Length in bytes is 1, and there are 0 characters in the string, so Ignition will display nothing.
