# How to implement control pin of the RS485

**URL:** <https://discourse.nodered.org/t/how-to-implement-control-pin-of-the-rs485/68351>\
**Category:** General\
**Created:** [28 September 2022 16:06 UTC](https://discourse.nodered.org/t/how-to-implement-control-pin-of-the-rs485/68351 "2022-09-28T16:06:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamuelXiot](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/samuelxiot/32/68385_2.png) [@SamuelXiot](https://discourse.nodered.org/u/SamuelXiot)\
**Post date:** [28 September 2022 16:06 UTC](https://discourse.nodered.org/t/how-to-implement-control-pin-of-the-rs485/68351/1 "2022-09-28T16:06:08Z")

</div>

Hi all!

I want to implement following flow for controlling read and write function of the modbus.

toggle GPIO4 to 1 --\> Send with serial port --\> Data out end --\> toggle GPIO4 to 0

This there have any way to achieve this?

---

<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:** [28 September 2022 18:20 UTC](https://discourse.nodered.org/t/how-to-implement-control-pin-of-the-rs485/68351/2 "2022-09-28T18:20:38Z")

</div>

Welcome to the forum @SamuelXiot

> [@SamuelXiot](#):
>
> is there have any way to achieve this

What aspect do you not know how to do?

---

<div class="post-metadata">

**Author:** ![SamuelXiot](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/samuelxiot/32/68385_2.png) [@SamuelXiot](https://discourse.nodered.org/u/SamuelXiot)\
**Post date:** [29 September 2022 04:46 UTC](https://discourse.nodered.org/t/how-to-implement-control-pin-of-the-rs485/68351/3 "2022-09-29T04:46:51Z")

</div>

The flow I make is attached. please see the function 2 and 3.

What I need is a way to set the gpio7 to 1 when message send and set the gpio7 to 0 after send. I am using serial port, but I found if I use the serial port, there is no way set the gpio7 with the serial message send.

[flows.json](https://discourse.nodered.org/uploads/short-url/gRJtO5GmZgMHZo4iNFqWuAU5qBX.json) (6.4 KB)

---

<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:** [29 September 2022 07:32 UTC](https://discourse.nodered.org/t/how-to-implement-control-pin-of-the-rs485/68351/4 "2022-09-29T07:32:35Z")

</div>

Set the pin before sending the message to the serial node, wait sufficient time for the transmission to complete, then reset the pin.

---

<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:** [28 November 2022 07:32 UTC](https://discourse.nodered.org/t/how-to-implement-control-pin-of-the-rs485/68351/5 "2022-11-28T07:32:53Z")

</div>

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