# Writing To Bacnet Tags

**URL:** <https://forum.inductiveautomation.com/t/writing-to-bacnet-tags/80154>\
**Category:** Ignition\
**Created:** [October 6, 2023, 7:35pm UTC](https://forum.inductiveautomation.com/t/writing-to-bacnet-tags/80154 "2023-10-06T19:35:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alec/32/41994_2.png) [@alec](https://forum.inductiveautomation.com/u/alec)\
**Post date:** [October 6, 2023, 7:35pm UTC](https://forum.inductiveautomation.com/t/writing-to-bacnet-tags/80154/1 "2023-10-06T19:35:10Z")

</div>

Can you write to bacnet tags directly without using scriping system.bacnet.writeRaw?

When trying to write to bacnet objects 'present-value' property tied to tags I get `Bad("Bad_NotWritable: The access level does not allow writing to the Node.")`

---

<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:** [October 6, 2023, 7:42pm UTC](https://forum.inductiveautomation.com/t/writing-to-bacnet-tags/80154/2 "2023-10-06T19:42:31Z")

</div>

Yes, you can.

You haven't responded in the other thread where you indicated your BACnet tags come from a 3rd party OPC UA server, in which case the fact they are BACnet is essentially irrelevant. Is this a different scenario?

---

<div class="post-metadata">

**Author:** ![alec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alec/32/41994_2.png) [@alec](https://forum.inductiveautomation.com/u/alec)\
**Post date:** [October 6, 2023, 8:11pm UTC](https://forum.inductiveautomation.com/t/writing-to-bacnet-tags/80154/3 "2023-10-06T20:11:04Z")

</div>

Yes this is a different scenario talking directly to a bacnet device

---

<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:** [October 6, 2023, 8:34pm UTC](https://forum.inductiveautomation.com/t/writing-to-bacnet-tags/80154/4 "2023-10-06T20:34:11Z")

</div>

What kind of Object are you trying to write the present-value property on?

Is there a warning in the gateway logs about the writing failing? The device you are writing to may be responding with an ErrorCode indicating WriteAccessDenied.

---

<div class="post-metadata">

**Author:** ![alec](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alec/32/41994_2.png) [@alec](https://forum.inductiveautomation.com/u/alec)\
**Post date:** [October 6, 2023, 8:40pm UTC](https://forum.inductiveautomation.com/t/writing-to-bacnet-tags/80154/5 "2023-10-06T20:40:44Z")

</div>

A analog-value object type.

Pasted below appears to be the log from the error. I can write to this value from another BACnet device but not from Ignition.

```auto
com.serotonin.bacnet4j.exception.ErrorAPDUException: ErrorAPDU(errorClass=property, errorCode=write-access-denied,errorClass=property, errorCode=write-access-denied)

at com.serotonin.bacnet4j.transport.ServiceFutureImpl.result(ServiceFutureImpl.java:83)

at com.serotonin.bacnet4j.transport.ServiceFutureImpl.get(ServiceFutureImpl.java:64)

at com.serotonin.bacnet4j.util.RequestUtils.writeProperty(RequestUtils.java:509)

at com.inductiveautomation.ignition.drivers.bacnet.BatchWriteContextImpl$execute$statusCodes$1$1.invokeSuspend(BatchWriteContext.kt:81)

at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)

at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)

at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)

at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)

```

---

<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:** [October 6, 2023, 8:44pm UTC](https://forum.inductiveautomation.com/t/writing-to-bacnet-tags/80154/6 "2023-10-06T20:44:45Z")

</div>

Maybe you can compare a Wireshark capture or something. This is clearly the device rejecting the write for some reason 🤷
