# How I can trigger inject node with input signal?

**URL:** https://discourse.nodered.org/t/how-i-can-trigger-inject-node-with-input-signal/57229
**Category:** General
**Created:** [25 January 2022 22:29 UTC](https://discourse.nodered.org/t/how-i-can-trigger-inject-node-with-input-signal/57229 "2022-01-25T22:29:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![maliheh.amirfakhry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maliheh.amirfakhry/32/55147_2.png) [@maliheh.amirfakhry](https://discourse.nodered.org/u/maliheh.amirfakhry)
#### Post date: [25 January 2022 22:29 UTC](https://discourse.nodered.org/t/how-i-can-trigger-inject-node-with-input-signal/57229/1 "2022-01-25T22:29:54Z")

</div>

Hi, First of all, I have to say thank you for accepting me to this forum and sorry if my English is bad. I have a project with node-red and raspberry pi, I want to send an input signal to raspberry pi from a PLC and see the signal in a TCP server ( Hercules ). With inject node I can see the signal (1, 0) in Hercules at a specified time ( interval, interval between times, ...) but it doesn't work for me, What I need is to see the signal whenever it changes from 5 volts to 0 volts and vice versa. Please let me know if you have any suggestion? Thanks 🙂

---

<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: [26 January 2022 10:44 UTC](https://discourse.nodered.org/t/how-i-can-trigger-inject-node-with-input-signal/57229/2 "2022-01-26T10:44:47Z")

</div>

Can you show us the values returned from the PLC?  
Can you confirm the values you want to send over TCP (strings? booleans? bytes?)

Can you confirm I understand your requirements ...

1. When value from PLC changes from EXACTLY `5` to `0`
  - Send `0` as a byte value to the TCP node - ONCE ONLY (until value changes)

2. When value from PLC changes from EXACTLY `0` to `5`
  - Send `1` as a byte value to the TCP node - ONCE ONLY (until value changes)

---

<div class="post-metadata">

### Author: ![maliheh.amirfakhry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maliheh.amirfakhry/32/55147_2.png) [@maliheh.amirfakhry](https://discourse.nodered.org/u/maliheh.amirfakhry)
#### Post date: [26 January 2022 19:53 UTC](https://discourse.nodered.org/t/how-i-can-trigger-inject-node-with-input-signal/57229/3 "2022-01-26T19:53:20Z")

</div>

the value I see in TCP server is string. like input1:1,input2:1,input3:0,input4:1, ... but they are sent every 10 second according my injection nodes setting .

Yes, exactly my requirement is this.

---

<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: [27 March 2022 19:54 UTC](https://discourse.nodered.org/t/how-i-can-trigger-inject-node-with-input-signal/57229/4 "2022-03-27T19:54:13Z")

</div>

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