# Read value from PLC and send email

**URL:** <https://discourse.nodered.org/t/read-value-from-plc-and-send-email/21845>\
**Category:** General\
**Created:** [17 February 2020 12:21 UTC](https://discourse.nodered.org/t/read-value-from-plc-and-send-email/21845 "2020-02-17T12:21:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![box](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@box](https://discourse.nodered.org/u/box)\
**Post date:** [17 February 2020 12:21 UTC](https://discourse.nodered.org/t/read-value-from-plc-and-send-email/21845/1 "2020-02-17T12:21:52Z")

</div>

Hi All,

I am starting to use Node-Red and I would like to read a value of a PLC (modbus TCP read node) and I would like to send email if the value is higher than 10 for example.

I can read the value  
I can also send email with the email nodes but only with the inject node (true/false)

I don't know how to link the value that I am reading to the email node. I have tried to use some functions but so far without success.

Do you have any example or advice please ?

Thanks for your help

Best Regards 🙂

---

<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:** [17 February 2020 13:38 UTC](https://discourse.nodered.org/t/read-value-from-plc-and-send-email/21845/2 "2020-02-17T13:38:40Z")

</div>

You can use a switch node to only pass on the message if the value is \> 10. Then feed that to an email node.  
Have you read the node red docs Working with Messages?

---

<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:** [17 April 2020 13:38 UTC](https://discourse.nodered.org/t/read-value-from-plc-and-send-email/21845/3 "2020-04-17T13:38:47Z")

</div>

Closed on 17 April 2020 13:38 UTC

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