# Communication Between RS485 to Node red on raspberry pi

**URL:** <https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185>\
**Category:** Industrial\
**Created:** [24 November 2022 13:53 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185 "2022-11-24T13:53:00Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [24 November 2022 13:53 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/1 "2022-11-24T13:53:01Z")

</div>

I am trying to connect a device which is connected to USB to RS485 Converter which i have connected to raspberry pi. i have tested the device on windows which is working fine but i want to do communication between node red and the device using USB to RS485 Converter.i have the connection details on windows which are as follows:  
Driver: Modbus ASCII Serial  
Baud Rate: 9600  
Data Bit: 8  
Parity: None  
Station ID: 10  
So anyone who Knows How to Connect this device to Node red please reply

---

<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:** [24 November 2022 15:12 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/2 "2022-11-24T15:12:31Z")

</div>

With the adaptor unplugged run  
`ls /dev/serial/by-id/`  
and note what is there (there may be nothing if you have no serial devices plugged in. Then plug it in and run the command again, you should see an entry there now (or an additional entry). For example, mine shows

```auto
ls /dev/serial/by-id/
usb-FTDI_FT232R_USB_UART_A1011UDF-if00-port0

```

Then in node-red you can use the serial node node-red-node-serialport and configure it to use the adaptor. So for mine, in the serial port device I put  
`/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A1011UDF-if00-port0`

You can also use other port names, perhaps `/dev/ttyUSB0` or `/dev/ttyASM0` but the problem with those is that the name can change, particularly if it is unplugged and plugged back in again, or you add another serial port for example. Using the by-id name it should always be the same.

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [24 November 2022 16:28 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/3 "2022-11-24T16:28:57Z")

</div>

@Colin can we contact on phone or whatsapp

---

<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:** [24 November 2022 16:31 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/4 "2022-11-24T16:31:17Z")

</div>

No, use the forum please, then others can help if appropriate.

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [25 November 2022 05:34 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/5 "2022-11-25T05:34:53Z")

</div>

So @Colin as your wrote but the thing is how to add it in NodeRED because i add serialport in NodeRED and the com Id so but it did give me feedback on wheather it is working because it shows me connected so what function or what should I add so i can get some feedback from PLC to NodeRED.

---

<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:** [25 November 2022 07:48 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/6 "2022-11-25T07:48:09Z")

</div>

That is an entirely different question. What protocols does your plc support? Modbus possibly? If it supports modbus then remove the serial node and try node-red-contrib-modbus. You will need to do some research about modbus so you understand the principles, and look at the docs for the PLC to find how the plc data is accessed via modbus.

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [25 November 2022 10:31 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/7 "2022-11-25T10:31:04Z")

</div>

@Colin can you guide me well Because i don't know what to do, I have a working simple program in ML\_1400 which is working on ethernet, but I need to try it on USB this is why I was asking you whether you can help me through social media, but in fact you decline it therefore I don't understand what to do.

---

<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:** [25 November 2022 10:44 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/8 "2022-11-25T10:44:56Z")

</div>

> [@Jayeshpitale1](#):
>
> working on ethernet, but I need to try it on USB

Why do you need to use serial connection? Can you not use the ethernet connection?

In ML\_1400, whatever that is, what protocol does it use to communicate with the PLC?

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [25 November 2022 10:46 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/9 "2022-11-25T10:46:38Z")

</div>

yes as your point is correct but for ML 1200 it has only USB using RS 232 or RS 485 so i need to know how to communicate with that in nodeRED

---

<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:** [25 November 2022 10:51 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/10 "2022-11-25T10:51:14Z")

</div>

Since you have not, apparently, attempted to find out whether the ML\_1200 supports modbus I have just googled it for you and it seems appear that it does. Therefore you need to study the manuals to find out how to use it on the device, then you should be able to use node-red-contrib-modbus nodes to do it. You do need to understand the basics of modbus though, that is not a node red issue.

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [25 November 2022 11:46 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/11 "2022-11-25T11:46:50Z")

</div>

@Colin if i had understand the concept why I would ask this question in node RED and still i can't understand how the protocol work how to connect Modbus to USB

---

<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:** [25 November 2022 12:01 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/12 "2022-11-25T12:01:39Z")

</div>

> [@Jayeshpitale1](#):
>
> how to connect Modbus to USB

What bit don't you understand?  
Do you understand the basics of Modbus? If not then you must research that. That is not something we can help with here.  
Have you installed and looked at node-red-contrib-modbus?

---

<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:** [26 November 2022 14:32 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/13 "2022-11-26T14:32:44Z")

</div>

@Jayeshpitale1 you might like to follow this thread which appears to be asking a similar question to yourself. [How to find address for ML 1200 for modbus or RS485](https://discourse.nodered.org/t/how-to-find-address-for-ml-1200-for-modbus-or-rs485/71284)

---

<div class="post-metadata">

**Author:** ![FrankAB](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@FrankAB](https://discourse.nodered.org/u/FrankAB)\
**Post date:** [28 November 2022 07:21 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/15 "2022-11-28T07:21:01Z")

</div>

The ML 1200 has no USB - it has a configurable MiniDIN port which can be RS232 or RS485, among others.  
Shouldn't this sentence be: ...but for the ML 1200 I have  
in my device only USB and using RS 232 or RS485 so I need to know how to communicate with this in nodeRED?

---

<div class="post-metadata">

**Author:** ![smithtek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smithtek/32/17411_2.png) [@smithtek](https://discourse.nodered.org/u/smithtek)\
**Post date:** [29 November 2022 04:13 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/16 "2022-11-29T04:13:41Z")

</div>

@Jayeshpitale1 Send a schematic of how you think you need to connect the ML1200 to the raspberry pi?  
Im assuming you have connected the MiniDIN, chopped stripped the the ends and wired 2/3 cores to the USB rs485 dongle? is it not only rs232?

---

<div class="post-metadata">

**Author:** ![FrankAB](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@FrankAB](https://discourse.nodered.org/u/FrankAB)\
**Post date:** [29 November 2022 16:59 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/17 "2022-11-29T16:59:43Z")

</div>

@smithtek Who is this question for?

---

<div class="post-metadata">

**Author:** ![smithtek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smithtek/32/17411_2.png) [@smithtek](https://discourse.nodered.org/u/smithtek)\
**Post date:** [30 November 2022 00:00 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/18 "2022-11-30T00:00:50Z")

</div>

@FrankAB , OP, I fixed the message!

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [9 December 2022 05:40 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/19 "2022-12-09T05:40:52Z")

</div>

@smithtek could you tell me how to write tag in MODBUS address in function node because i don't understand that, as i have tag N7:0 which has a timer in ML has to show on NodeRED using MODBUS in function node

---

<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:** [7 February 2023 05:41 UTC](https://discourse.nodered.org/t/communication-between-rs485-to-node-red-on-raspberry-pi/71185/20 "2023-02-07T05:41:08Z")

</div>

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