# OPCUA communication slow

**URL:** <https://discourse.nodered.org/t/opcua-communication-slow/10356>\
**Category:** General\
**Created:** [19 April 2019 07:52 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356 "2019-04-19T07:52:19Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![domcsidd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/domcsidd/32/5379_2.png) [@domcsidd](https://discourse.nodered.org/u/domcsidd)\
**Post date:** [19 April 2019 07:52 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/1 "2019-04-19T07:52:20Z")

</div>

Hi everyone!

I want to make a communication between my Node-RED server, which runs on my PC and a PFC100 WAGO PLC . After deploying and rebooting both systems, the communication works well but after a few minutes it's continuously getting slower and some of the active connections go inactive. I tried to delay the messages, but the way it worked its look terrible. Does anyone know the solution to this problem? Could someone help me solve this? Thank you!!

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5b7ebab9f6453bd4eb479e590d14ad14de3ba623.png)

If you could watch the code , it would be clear , why i thinks its terrible.  
[opcua com flow.json](https://discourse.nodered.org/uploads/short-url/dMVTIuhiIqwXSiJ4d5QHF9x633o.json) (55.5 KB)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [19 April 2019 08:21 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/2 "2019-04-19T08:21:39Z")

</div>

How are the delay nodes configured ? As delays or as rate limiters ?  
Try rate limit with 'drop immediate msgs'

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 April 2019 10:12 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/3 "2019-04-19T10:12:29Z")

</div>

Why not use a listener and just let the data come through as it comes.

I don't know the internals of the nodes you're using but perhaps it's creating objects every 1s. Might be a memory leak?

Anyhow, check out the built in examples. Node-red menu button (top right) --\> import --\> examples --\> iiot

---

<div class="post-metadata">

**Author:** ![domcsidd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/domcsidd/32/5379_2.png) [@domcsidd](https://discourse.nodered.org/u/domcsidd)\
**Post date:** [24 April 2019 15:23 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/4 "2019-04-24T15:23:23Z")

</div>

Thanks for your help , They are configured as delays. i understand , what rate limiters are , but i am not know, how should they solve my problem.

---

<div class="post-metadata">

**Author:** ![domcsidd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/domcsidd/32/5379_2.png) [@domcsidd](https://discourse.nodered.org/u/domcsidd)\
**Post date:** [24 April 2019 15:28 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/5 "2019-04-24T15:28:12Z")

</div>

I am not using the iiot opc ua library . I tried to use "subsribe" type nodes , but it is not working well. The reason why i need them , is that the plc writes the variables. So if i switch on the 50% and 100% motor parallel, the plc switch them off , so this is why i want to read they state. With subsribe it works sometimes , but sometimes not.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/533311b3315c13c5bb37a68c70a810f69978d437.png)

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [16 August 2019 07:56 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/6 "2019-08-16T07:56:04Z")

</div>

I have the same problem,when i use subscribe, sometimes work but sometimes not

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [16 August 2019 08:15 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/7 "2019-08-16T08:15:59Z")

</div>

Try using the IIOT nodes instead.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/245025096d9b84d4342734a665a768a008bb4862.png)

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [16 August 2019 08:51 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/8 "2019-08-16T08:51:34Z")

</div>

Yes,i use iiot instead. the problem is iiot. others,i can't find the method to pub in iiot,i only find the method node to sub

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [16 August 2019 08:56 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/9 "2019-08-16T08:56:28Z")

</div>

not sure what you mean?

At first you say "when i use subscribe, sometimes work but sometimes not"

- So are you using `Listener` and `Response` nodes for reading?

Now you say "i can't find the method to pub in iiot,i only find the method node to sub"

- Are you saying you cant find a way to write?

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [16 August 2019 09:10 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/10 "2019-08-16T09:10:43Z")

</div>

i use the cs(client,server) mode to read and write before,but, When I try to use pub,sub mode,i only finded sub node(listener),and the sub response has no data sometimes,only response when the data change?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [16 August 2019 09:13 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/11 "2019-08-16T09:13:14Z")

</div>

> [@Jack](#):
>
> only response when the data change?

I believe thats how its supposed to work. Only get data upon change It minimises traffic.

If you need data adhoc, you can use a read node.

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [16 August 2019 09:19 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/12 "2019-08-16T09:19:21Z")

</div>

thank you very much, and ,iiot don't have pub node?only have write node?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [16 August 2019 09:29 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/13 "2019-08-16T09:29:23Z")

</div>

Look in tool bar. No pub, no sub - but many others.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f274e170006c809658891dfd2b0388cae2f7fbde.png)

There are even a shed load of built in samples/demos...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c797d9d97e041c619c98dcdf33259b678006b9a2.png)

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [16 August 2019 09:34 UTC](https://discourse.nodered.org/t/opcua-communication-slow/10356/14 "2019-08-16T09:34:54Z")

</div>

thank you
