# OPC-UA BadTypeMismatch (0x80740000) - S7\_1500

**URL:** https://discourse.nodered.org/t/opc-ua-badtypemismatch-0x80740000-s7-1500/54935
**Category:** General
**Created:** [9 December 2021 14:17 UTC](https://discourse.nodered.org/t/opc-ua-badtypemismatch-0x80740000-s7-1500/54935 "2021-12-09T14:17:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nico25](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@nico25](https://discourse.nodered.org/u/nico25)
#### Post date: [9 December 2021 14:17 UTC](https://discourse.nodered.org/t/opc-ua-badtypemismatch-0x80740000-s7-1500/54935/1 "2021-12-09T14:17:06Z")

</div>

Hello,

i am using node-red-contrib-opcua in my current project.  
I am able to read/write boolean values with the opc-client to my S7-1500.  
Now i am trying so send a numerical value e.g 70009, to my S7.  
For some reason i always get the error BadTypeMismatch (0x80740000)when trying to do so.

This is what my topic looks like:  
ns=3;s="RW\_RFID\_MASTER"."THIS"[0]."Wr\_UserData0";datatype=number

The datatype of Wr\_UserData0 is LINT.  
What am I doing wrong?

Also: I am not a Pro, so be kind 😃

Edit:

Was able to solve it. Leaving this here, for the people googling this issue:

While reading using the client node, it is good enough to define the datatype as number,string, boolean in Nodered. While writing, you have to define the OPC-UA datatype in the topic.  
You can find an overview here:

[https://www.mathworks.com/help/opc/ug/opc-ua-server-data-types.html](https://www.mathworks.com/help/opc/ug/opc-ua-server-data-types.html)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [7 February 2022 14:17 UTC](https://discourse.nodered.org/t/opc-ua-badtypemismatch-0x80740000-s7-1500/54935/2 "2022-02-07T14:17:52Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
