# Bad\_NotWritable: The access level does not allow writing to the Node

**URL:** <https://forum.inductiveautomation.com/t/bad-notwritable-the-access-level-does-not-allow-writing-to-the-node/59005>\
**Category:** Ignition\
**Created:** [April 28, 2022, 4:17pm UTC](https://forum.inductiveautomation.com/t/bad-notwritable-the-access-level-does-not-allow-writing-to-the-node/59005 "2022-04-28T16:17:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon.de.Kraa](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Simon.de.Kraa](https://forum.inductiveautomation.com/u/Simon.de.Kraa)\
**Post date:** [April 28, 2022, 4:17pm UTC](https://forum.inductiveautomation.com/t/bad-notwritable-the-access-level-does-not-allow-writing-to-the-node/59005/1 "2022-04-28T16:17:23Z")

</div>

Hello,

When I try to write data to a tag I get the following error message.

`Bad_NotWritable: The access level does not allow writing to the Node.`

I have created a few API endpoints using Web Dev as follows:

**createTags - doPost**

```auto
	basePath = request['data']['basePath']
	tags = request['data']['tags']
	collisionPolicy = request['data']['collisionPolicy']
	
	result = system.tag.configure(basePath, tags, collisionPolicy)

	return {'json': result}

```

**tag - doPost**

```auto
	paths = request['data']['paths']
	values = request['data']['values']

	result = system.tag.writeBlocking(paths, values)
	
	return {'json': result}

```

I create an additional tag in the Tag Provider `[Sample_Tags]` by calling `createTags - doPost` with the following body:

```auto
{
    "basePath": "[Sample_Tags]/Writeable",
    "tags": [
        {
            "name": "DeviceEUI",
            "opcItemPath" : "ns=2;s=[Sample_Tags]_Meta:Writeable/DeviceEUI",
            "opcServer": "Ignition OPC UA Server",
            "valueSource": "opc"
        }
    ],
    "collisionPolicy": "o"
}

```

The tag is created with the following result: (192 = “good”)

```auto
[
    {
        "code": 192
    }
]

```

If I want to write data to the tag using `tag - doPost` with the following body:

```auto
{
    "paths": ["[Sample_Tags]/Writeable/DeviceEUI", "[Sample_Tags]/Writeable/WriteableBoolean1"],
    "values": [12345, false]
}

```

I get the following message:

```auto
[
    {
        "code": -2147483136,
        "diagnosticMessage": "Bad_NotWritable: The access level does not allow writing to the Node."
    },
    {
        "code": 192
    }
]

```

So the predefined tag WriteableBoolean1 has a result of 192 = “good”. The other tag DeviceEUI that I defined myself gets an error message.

I suspect this is because I am trying to write to a tag which does not originates from a device that is defined in Ignition?

If so, how can I write to a tag which I have created dynamically from an external program (using the Web Dev API) and write to it? (using the same Web Dev API)

Thanks,

Simon.

---

<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:** [April 28, 2022, 4:36pm UTC](https://forum.inductiveautomation.com/t/bad-notwritable-the-access-level-does-not-allow-writing-to-the-node/59005/2 "2022-04-28T16:36:28Z")

</div>

You’re creating an OPC Tag pointing to an address in the simulator driver that doesn’t exist.

If you want to create an arbitrary tag then just create a Memory Tag instead, and don’t try to pretend it exists as part of some device/driver you don’t control.

---

<div class="post-metadata">

**Author:** ![Simon.de.Kraa](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Simon.de.Kraa](https://forum.inductiveautomation.com/u/Simon.de.Kraa)\
**Post date:** [April 28, 2022, 4:59pm UTC](https://forum.inductiveautomation.com/t/bad-notwritable-the-access-level-does-not-allow-writing-to-the-node/59005/3 "2022-04-28T16:59:01Z")

</div>

Thanks Kevin. Specifying `"valueSource": "memory"` did the trick…

```auto
{
    "basePath": "[Sample_Tags]/Writeable",
    "tags": [
        {
            "name": "DeviceEUI",
            "opcItemPath" : "ns=2;s=[Sample_Tags]_Meta:Writeable/DeviceEUI",
            "opcServer": "Ignition OPC UA Server",
            "valueSource": "memory"
        }
    ],
    "collisionPolicy": "o"
}

```

Another question though. Where can I find all the settings for a tag definition and their explanations?

The reason why I am asking is the difficulty I have with e.g. the dataType property. See below.

If I try for example to specify the data type with `"dataType": "string"` as follows:

```auto
{
    "basePath": "[Sample_Tags]/Writeable",
    "tags": [
        {
            "name": "DeviceEUI",
            "dataType": "string",
            "opcItemPath" : "ns=2;s=[Sample_Tags]_Meta:Writeable/DeviceEUI",
            "opcServer": "Ignition OPC UA Server",
            "valueSource": "memory"
        }
    ],
    "collisionPolicy": "o"
}

```

I do see the data type is string in the OPC client:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/5/65d33fe459bbb67725062acf6ca48587c880b1ce.png)

But in the designer it is set to None:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/0/90625e5fbcc9c1f28ade349d77cb534ddd9cfdfa.png)

And if I try to write to the tag with:

```auto
{
    "paths": ["[Sample_Tags]/Writeable/DeviceEUI"],
    "values": ["testing"]
}

```

I get:

```auto
[
    {
        "code": -1073741052,
        "diagnosticMessage": "Error trying to coerce 'testing' to a number."
    }
]

```

So if there is a complete overview of all the properties of the tag definition that would be a great help!

Thanks.

---

<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:** [April 28, 2022, 5:10pm UTC](https://forum.inductiveautomation.com/t/bad-notwritable-the-access-level-does-not-allow-writing-to-the-node/59005/4 "2022-04-28T17:10:41Z")

</div>

These doc pages should be useful:

[https://docs.inductiveautomation.com/display/DOC81/system.tag.configure](https://docs.inductiveautomation.com/display/DOC81/system.tag.configure)  
[https://docs.inductiveautomation.com/display/DOC81/Tag+Properties](https://docs.inductiveautomation.com/display/DOC81/Tag+Properties)

If you find the “Data Type” tag property there’s a list of valid values in its Description column.

In your case I’m guessing it’s just a case sensitivity issue and you should be using `String`, not `string`.

All the OPC-related properties you cited in your last example should be removed as well, they don’t apply to Memory Tags.
