# When the connection status variable of node S7 is false, I want to send the values to 0 of all the variables that it has configured

**URL:** <https://discourse.nodered.org/t/when-the-connection-status-variable-of-node-s7-is-false-i-want-to-send-the-values-to-0-of-all-the-variables-that-it-has-configured/78820>\
**Category:** General\
**Created:** [30 May 2023 15:52 UTC](https://discourse.nodered.org/t/when-the-connection-status-variable-of-node-s7-is-false-i-want-to-send-the-values-to-0-of-all-the-variables-that-it-has-configured/78820 "2023-05-30T15:52:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TadeoRodriguez](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TadeoRodriguez](https://discourse.nodered.org/u/TadeoRodriguez)\
**Post date:** [30 May 2023 15:52 UTC](https://discourse.nodered.org/t/when-the-connection-status-variable-of-node-s7-is-false-i-want-to-send-the-values-to-0-of-all-the-variables-that-it-has-configured/78820/1 "2023-05-30T15:52:26Z")

</div>

**Hello everybody!**  
I am needing that when the connection state of the S7 node is offline (attachment 1) I want to send the values to -1 to some specific variables that I have created inside the node.  
This is because we need to log and visualize when the problem occurs in the PLC.  
I don't know how to call the variable that identifies the state of the S7 node.

Thank you very much!

**Shortcut: node-red-contrib-s7**

![Captura de pantalla 2023-05-30 124957](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/4936df40e3b5eb68d4790cce5aa823b24ec61aad.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [30 May 2023 16:42 UTC](https://discourse.nodered.org/t/when-the-connection-status-variable-of-node-s7-is-false-i-want-to-send-the-values-to-0-of-all-the-variables-that-it-has-configured/78820/2 "2023-05-30T16:42:49Z")

</div>

Have you tried using a status node set to monitor the s7 node, this should give some output that may help you, if the s7 node is compliant with the status node. Or possibly a catch node may work.

---

<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:** [29 July 2023 16:43 UTC](https://discourse.nodered.org/t/when-the-connection-status-variable-of-node-s7-is-false-i-want-to-send-the-values-to-0-of-all-the-variables-that-it-has-configured/78820/3 "2023-07-29T16:43:16Z")

</div>

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