# Problem Read Boolean Variable Contrib S7

**URL:** <https://discourse.nodered.org/t/problem-read-boolean-variable-contrib-s7/48348>\
**Category:** Industrial\
**Created:** [13 July 2021 05:35 UTC](https://discourse.nodered.org/t/problem-read-boolean-variable-contrib-s7/48348 "2021-07-13T05:35:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisWeb71](https://avatars.discourse-cdn.com/v4/letter/c/53a042/32.png) [@ChrisWeb71](https://discourse.nodered.org/u/ChrisWeb71)\
**Post date:** [13 July 2021 05:35 UTC](https://discourse.nodered.org/t/problem-read-boolean-variable-contrib-s7/48348/1 "2021-07-13T05:35:34Z")

</div>

Hall, I'm having problems with an S7 417-3.  
I can no longer write any Boolean variables to the controller.  
If I do the whole thing using an integer variable, it works fine.  
Has anyone ever had the same problem

---

<div class="post-metadata">

**Author:** ![jkloa](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jkloa](https://discourse.nodered.org/u/jkloa)\
**Post date:** [13 July 2021 10:13 UTC](https://discourse.nodered.org/t/problem-read-boolean-variable-contrib-s7/48348/2 "2021-07-13T10:13:49Z")

</div>

Just installed and tried S7 on node red out and I'm having the same problem. Variable writing works but trying to write single bit with boolean doesn't work. I'm running 416-5H and using PCS7 to program.

---

<div class="post-metadata">

**Author:** ![effgee](https://avatars.discourse-cdn.com/v4/letter/e/7ea924/32.png) [@effgee](https://discourse.nodered.org/u/effgee)\
**Post date:** [5 August 2021 02:24 UTC](https://discourse.nodered.org/t/problem-read-boolean-variable-contrib-s7/48348/3 "2021-08-05T02:24:48Z")

</div>

working OK to S7-315 and IMI151-8 using this code:

msg.payload = {"value":[!!Number(msg.payload)]};

---

<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:** [4 October 2021 02:25 UTC](https://discourse.nodered.org/t/problem-read-boolean-variable-contrib-s7/48348/4 "2021-10-04T02:25:16Z")

</div>

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