# Error writing to OPC UA tag : "Bad"

**URL:** <https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [December 28, 2022, 2:29pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025 "2022-12-28T14:29:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Warren](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Andrew\_Warren](https://forum.inductiveautomation.com/u/Andrew_Warren)\
**Post date:** [December 28, 2022, 2:29pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/1 "2022-12-28T14:29:12Z")

</div>

I'm working on duplicating an existing tool that writes to OPC tags to control access level on some PLCs. I have setup the tags in the same manner when I expanding the tool previously. The tool does nothing when the field is edited. If I step back and try to change the value of a tag in the tag browser, I get this error:

Error writing to User Access Level.value: Bad  
 ![ErrorWriting](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/daffbba42abdf8a945b9d07e4f099d5236f40d39.png)

I have opened the PLC program and validated that the corresponding UDT for the Controller tags has External Access set to Read/Write.

 ![ExternalAccess](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/4/14ec4e76ec0a8aed6a84c46d93b205eda82bc247.png)

If I edit the tag in the PLC, the corresponding value updates in Ignition.

The tag is a Controller tag in scope and in the UDT is setup as a DINT, just like the other tags that are set up in the existing tool (different equipment but same Allen Bradley Contrologix hardware)

 ![UDT_Tag](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/5/c5e9ae7232e18da40d9bc7b8df9ee12c16e1cfed.png)

I have tried changing the tag permissions to Public and I still receive the same message

I tried to look at the gateway logs put couldn't find any additional details about the error. Not sure if there are individual errors logged for OPC transactions.

Where can I find more info about this error?

Any advice is appreciated.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 28, 2022, 2:37pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/2 "2022-12-28T14:37:24Z")

</div>

You might mention what device driver you're using and show the configuration. Someone may spot an error there.

You've tagged the question as _Perspective_ but I don't think that's relevant to the problem you're describing.

---

<div class="post-metadata">

**Author:** ![Andrew\_Warren](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Andrew\_Warren](https://forum.inductiveautomation.com/u/Andrew_Warren)\
**Post date:** [December 28, 2022, 2:54pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/3 "2022-12-28T14:54:39Z")

</div>

These devices are using the Allen-Bradley Logix Driver.

 ![OPC Drivers](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/f/9fdf6c78a174f9978c36e94f4f6f4c60ed693e22.png)

Here is a sample configuration. It's essentially the same (except name/IP address) as the OPC devices whose tags CAN be edited.

 ![OPC Driver Settings](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/7/3785e2cd83a9caf5f8b80aafdcc60b392ca5baf2.png)

---

<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:** [December 28, 2022, 4:56pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/4 "2022-12-28T16:56:01Z")

</div>

Did you disable "automatic rebrowse" in the connection's advanced properties? Have you tried an edit/save cycle on the device to restart it?

{ There are reports that some later Logix firmware versions don't always flag tag edits for 3rd party connections as documented by Rockwell. Restarting a device should force a rebrowse anyways. }

---

<div class="post-metadata">

**Author:** ![Andrew\_Warren](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Andrew\_Warren](https://forum.inductiveautomation.com/u/Andrew_Warren)\
**Post date:** [December 28, 2022, 7:00pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/5 "2022-12-28T19:00:32Z")

</div>

Studio5000 Firmware is 30.14

I just tried editing the connection properties on all of the devices. I disabled automatic rebrowse and then disabled-\>enabled the OPC-UA device connection.

The same error still displays if I try to edit the tag in tag browser.

Is there a place I can find a more meaningful error log to perhaps troubleshoot more?

---

<div class="post-metadata">

**Author:** ![Andrew\_Warren](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Andrew\_Warren](https://forum.inductiveautomation.com/u/Andrew_Warren)\
**Post date:** [December 28, 2022, 7:14pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/6 "2022-12-28T19:14:23Z")

</div>

I found this [thread](https://forum.inductiveautomation.com/t/error-writing-to-ok-value-bad-received-when-trying-to-write-to-opc-device-tags/26035/5) that sounds like probably the same problem. They mention turning on Trace-level of logging for _com.inductiveautomation.ignition.gateway.opcua.client.connection.OpcUaConnection_ but I'm not sure where to find that. I've browsed around a bit in the Server setup webpages but I don't see where I can specify or view logs for specific parts of Ignition. I'll keep looking.

---

<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:** [December 28, 2022, 7:58pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/7 "2022-12-28T19:58:25Z")

</div>

Consider restarting the entire OPC UA Module, if you can tolerate the disruption. I've encountered situations where OPC Node properties get "stuck".

---

<div class="post-metadata">

**Author:** ![Andrew\_Warren](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Andrew\_Warren](https://forum.inductiveautomation.com/u/Andrew_Warren)\
**Post date:** [December 28, 2022, 8:10pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/8 "2022-12-28T20:10:36Z")

</div>

We are luckily not in production today, so I was able to try that. Seemingly no change, unfortunately.

---

<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:** [December 28, 2022, 8:19pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/9 "2022-12-28T20:19:45Z")

</div>

Are you sure that **member** of that datatype is writable? Datatypes and AOI types have per-member external access controls.

---

<div class="post-metadata">

**Author:** ![Andrew\_Warren](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Andrew\_Warren](https://forum.inductiveautomation.com/u/Andrew_Warren)\
**Post date:** [December 28, 2022, 8:48pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-opc-ua-tag-bad/68025/10 "2022-12-28T20:48:28Z")

</div>

That was it, @pturmel. The Parameter inside the AOI that corresponded to this tag was set to Read Only. I tried a bit of foolery but it seems that the only way to change the External Access level on such a parameter is Offline, so that means the settings change requires a Download, in case anyone runs into this in the future.
