# How to write a String Data Type Bosch Rexroth PLC OPC UA Server

**URL:** <https://forum.inductiveautomation.com/t/how-to-write-a-string-data-type-bosch-rexroth-plc-opc-ua-server/42457>\
**Category:** Ignition\
**Created:** [January 20, 2021, 9:10pm UTC](https://forum.inductiveautomation.com/t/how-to-write-a-string-data-type-bosch-rexroth-plc-opc-ua-server/42457 "2021-01-20T21:10:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [January 20, 2021, 9:10pm UTC](https://forum.inductiveautomation.com/t/how-to-write-a-string-data-type-bosch-rexroth-plc-opc-ua-server/42457/1 "2021-01-20T21:10:41Z")

</div>

The data type in the PLC is a string. Does ignition treat as an array of shorts?

How might I go about writing to this OPC item? I made a string OPC tag to that path and it returns [0,0,0,0,....] and won't write to it

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/a/7a7e0010a29b071f970f98c796df8fb440d38324.png)

```auto

server = "IndraControl OPC UA Server"
path = "ns=2;s=Application.GVL.EXT_OPC.OperatorInfo"
qualifiedValue = system.opc.readValue(server, path)
print "Value: " + str(qualifiedValue.getValue())
print "Quality: " + qualifiedValue.getQuality().toString()
print "Timestamp: " + qualifiedValue.getTimestamp().toString()

```

> > >

```auto
Value: array(java.lang.Short, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
Quality: Good
Timestamp: Wed Jan 20 14:55:38 CST 2021 

```

---

<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:** [January 20, 2021, 9:12pm UTC](https://forum.inductiveautomation.com/t/how-to-write-a-string-data-type-bosch-rexroth-plc-opc-ua-server/42457/2 "2021-01-20T21:12:53Z")

</div>

Can you connect UaExpert to the server and view that tag as well as its member tags and tell me what the reported DataTypes are?

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [January 20, 2021, 9:37pm UTC](https://forum.inductiveautomation.com/t/how-to-write-a-string-data-type-bosch-rexroth-plc-opc-ua-server/42457/3 "2021-01-20T21:37:21Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/4/344e584a3409dfbd991cbfa809117007ad1afca8.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/c/bcee7e176a2354d1735d5fb7e1afb1465bebf2e3.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:** [January 20, 2021, 9:39pm UTC](https://forum.inductiveautomation.com/t/how-to-write-a-string-data-type-bosch-rexroth-plc-opc-ua-server/42457/4 "2021-01-20T21:39:43Z")

</div>

I can’t see the DataType or ArrayDimension attributes for the OperatorInfo tag to confirm, but it does indeed look like the value of that tag is just an array of unsigned bytes.

If OperatorInfo should be a String then it seems like whoever built this server doesn’t understand how to model data in OPC UA.

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [January 20, 2021, 9:42pm UTC](https://forum.inductiveautomation.com/t/how-to-write-a-string-data-type-bosch-rexroth-plc-opc-ua-server/42457/5 "2021-01-20T21:42:49Z")

</div>

It is…

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

You would think Bosch would build a proper server. 😑

I guess I have to write a script to ship the ordinals to the members.

---

<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:** [January 20, 2021, 9:44pm UTC](https://forum.inductiveautomation.com/t/how-to-write-a-string-data-type-bosch-rexroth-plc-opc-ua-server/42457/6 "2021-01-20T21:44:04Z")

</div>

Yeah, that sucks. Seems like they have just mirrored the internal data structures to OPC UA without any additional thought.
