# Node PID enable/disable not working

**URL:** <https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322>\
**Category:** General\
**Created:** [22 March 2019 15:21 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322 "2019-03-22T15:21:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank2](https://avatars.discourse-cdn.com/v4/letter/f/f9ae1b/32.png) [@Frank2](https://discourse.nodered.org/u/Frank2)\
**Post date:** [22 March 2019 15:21 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322/1 "2019-03-22T15:21:13Z")

</div>

Hi,

I am not getting the PID in disable mode. Am I doing something wrong?

```auto
[{"id":"6deef0a.ca0fa1","type":"function","z":"d71f1b7b.004ad8","name":"","func":"msg = {payload:1}\nmsg.enable = 1;\nmsg.topic = \"enable\"\n\nreturn msg;","outputs":1,"noerr":0,"x":314,"y":182,"wires":[["37d2fe8f.ccfba2"]]}]

```

Frank

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 March 2019 16:45 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322/2 "2019-03-22T16:45:06Z")

</div>

Which pid node are you using? node-red-xxxxx-xxxxx

---

<div class="post-metadata">

**Author:** ![Frank2](https://avatars.discourse-cdn.com/v4/letter/f/f9ae1b/32.png) [@Frank2](https://discourse.nodered.org/u/Frank2)\
**Post date:** [22 March 2019 17:09 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322/3 "2019-03-22T17:09:48Z")

</div>

Hi Colin,

I am using this one:

node-red-contrib-pid

> **[node-red-contrib-pid](https://flows.nodered.org/node/node-red-contrib-pid)**
>
> PID loop controller for Node-RED

Frank

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 March 2019 17:13 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322/4 "2019-03-22T17:13:34Z")

</div>

> [@Frank2](#):
>
> node-red-contrib-pid

That function node should work, and does work for me. I notice though that the status display does not change until the next time it receives a process sample, so if you are not also sending it data then you won't know that it has worked. Feed an inject node direct into the pid node to give it something to do and your function node should work. If not then post a mini-flow with injects and the function and pid node exhibiting the problem.

---

<div class="post-metadata">

**Author:** ![Frank2](https://avatars.discourse-cdn.com/v4/letter/f/f9ae1b/32.png) [@Frank2](https://discourse.nodered.org/u/Frank2)\
**Post date:** [22 March 2019 17:57 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322/5 "2019-03-22T17:57:03Z")

</div>

Ah Colin,

You are right again. Disable is displayed when other feed is going in.

Thanks.  
Frank

---

<div class="post-metadata">

**Author:** ![Frank2](https://avatars.discourse-cdn.com/v4/letter/f/f9ae1b/32.png) [@Frank2](https://discourse.nodered.org/u/Frank2)\
**Post date:** [22 March 2019 18:54 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322/6 "2019-03-22T18:54:11Z")

</div>

My reflow oven stayed on this afternoon burning my PCB so thought the PID was the issue. I didn't set all variables to default when off. Grrr. But the graph looks great now.

 ![03](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b2cf69da631217901acdf15b1d1f765ac48b11b1.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 March 2019 22:04 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322/7 "2019-03-22T22:04:17Z")

</div>

I have submitted an issue against the node, next time I am doing anything to it I will sort it. [https://github.com/colinl/node-red-contrib-pid/issues/8](https://github.com/colinl/node-red-contrib-pid/issues/8)

---

<div class="post-metadata">

**Author:** ![Frank2](https://avatars.discourse-cdn.com/v4/letter/f/f9ae1b/32.png) [@Frank2](https://discourse.nodered.org/u/Frank2)\
**Post date:** [23 March 2019 00:31 UTC](https://discourse.nodered.org/t/node-pid-enable-disable-not-working/9322/8 "2019-03-23T00:31:40Z")

</div>

Thanks highly appreciated. It helps hobby programmers like me to visualize their mistakes. I can see nothing is turning on my oven because some nodes putting out data after presumed stopped. Buffering or temp updates messing with my output 😁

 ![51](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/406cb6d8508805c04b82475d72cf5296ed98d700.png)
