GPIO state changes only after reboot of Node-RED

Hello,
I have a problem reading the digital IO from Node-RED. The raspberry PI Computing module 4 is enclosed in reTerminal DM industrial HMI.

In documentation it is specified that Digital Input 1 is GPIO pin 16. Therefor I have connected a position sensor into Digital Input 1 and ground to GND_INPUT.

With my voltmeter I can confirm that the position sensor is outputting 24V when triggered and 0 when not.

I have noticed that the input GPIO node is actually changing according to the position sensor BUT!

  • But it only changes after redeployment of the whole Node-RED! See video attachment.
  • I have connected DI1 to output signal of the Festo position sensor and DI_GND to ground of the Festo position sensor
  • I know for sure that there is voltage because my voltmeter reads 24V when triggered and 0V when not triggered.

How can I solve this problem?

This is the link for the video: video_demonstration.mp4 - VEED

Is there something I need to configure in the Node-RED?

[ { "id": "a9c27808bef7b34a", "type": "debug", "z": "103c0611d42ccc43", "name": "debug 24", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 560, "y": 200, "wires": [] }, { "id": "b13d3ca712220c36", "type": "pi-gpiod in", "z": "103c0611d42ccc43", "name": "", "host": "localhost", "port": 8888, "pin": "16", "intype": "PUD_OFF", "debounce": "25", "read": true, "x": 310, "y": 200, "wires": [ [ "a9c27808bef7b34a" ] ] }, { "id": "0c4a26fd670926f0", "type": "pi-gpiod in", "z": "103c0611d42ccc43", "name": "", "host": "localhost", "port": 8888, "pin": "17", "intype": "PUD_OFF", "debounce": "25", "read": true, "x": 310, "y": 240, "wires": [ [ "a9c27808bef7b34a" ] ] } ]

Does the Festo sensor has his own supply? Or does it have only 2 wires?
Do you have type number and/or datasheet for the sensor?

The FESTO position sensor has 3 wires:

  • Ground
  • 24V Power supply
  • Signal

Again I need to highlight the fact that the value in Node-RED changes ONLY AFTER REDEPLOYMENT.

Is the output of the sensor not an open collector and requires a pull up resistor?
Again, do you have type of the sensor?

Don't think is a NR issue, more a hw problem.

1 Like

This is the PDF documentation of the sensor.

It is PNP sensor - I do not know if it requires a pull up resistor. But when I connect it to standard PLC I do not use any pull up / down resistors.

@edje11
I have now tested the GPIO library in terminal and when I run the rapsi-gpio get 16 command the value changes accordingly to the position sensor ... :confused:

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