# OPC UA Example Device: Setting Tag Quality

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-example-device-setting-tag-quality/77744>\
**Category:** Module Development\
**Created:** [August 11, 2023, 8:58am UTC](https://forum.inductiveautomation.com/t/opc-ua-example-device-setting-tag-quality/77744 "2023-08-11T08:58:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Fekete](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@Sebastian\_Fekete](https://forum.inductiveautomation.com/u/Sebastian_Fekete)\
**Post date:** [August 11, 2023, 8:58am UTC](https://forum.inductiveautomation.com/t/opc-ua-example-device-setting-tag-quality/77744/1 "2023-08-11T08:58:58Z")

</div>

I am programming a Driver Module with the ignition SDK. I create UaFolder Nodes that contain my UaVariableNodes, i want to change the Quality of the tags manually to Bad/Good. Is there any existing way how i can implement this to my java code?

---

<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:** [August 11, 2023, 12:47pm UTC](https://forum.inductiveautomation.com/t/opc-ua-example-device-setting-tag-quality/77744/2 "2023-08-11T12:47:24Z")

</div>

Quality is wrapped into the `DataValue` you set on the items.

---

<div class="post-metadata">

**Author:** ![Sebastian\_Fekete](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@Sebastian\_Fekete](https://forum.inductiveautomation.com/u/Sebastian_Fekete)\
**Post date:** [August 17, 2023, 5:09am UTC](https://forum.inductiveautomation.com/t/opc-ua-example-device-setting-tag-quality/77744/3 "2023-08-17T05:09:28Z")

</div>

thanks for you answer, so how do i set the Quality? with an StatusCode for my UaVariableNode? May you provide example code please?

---

<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:** [August 17, 2023, 12:57pm UTC](https://forum.inductiveautomation.com/t/opc-ua-example-device-setting-tag-quality/77744/4 "2023-08-17T12:57:16Z")

</div>

I use the two-arg constructor shown here:

[https://javadoc.io/static/org.eclipse.milo/stack-core/0.5.2/org/eclipse/milo/opcua/stack/core/types/builtin/DataValue.html](https://javadoc.io/static/org.eclipse.milo/stack-core/0.5.2/org/eclipse/milo/opcua/stack/core/types/builtin/DataValue.html)

(You cannot set the quality on the node, I don't think. You just supply a new DataValue with the desired quality.)
