Communication Between RS485 to Node red on raspberry pi

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

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

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.

@Colin can we contact on phone or whatsapp

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

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.

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.

@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.

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?

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

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.

@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

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?

@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

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?

@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?

@smithtek Who is this question for?

@FrankAB , OP, I fixed the message!

@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

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