Raspberry Pi Zero Modbus TCP/RTU Gateway using Node-RED

preview_player
Показать описание
Simple way to communicate with Modbus RTU devices using Modbus TCP instead. The Raspberry Pi is acting as both a Modbus TCP slave and Modbus RTU master. The Node RED flow simply maps the slave commands over to the RTU addresses.

Parts List:
WAGO
750-8101 PFC100 Ethernet PLC
750-473 4ch AI Module
750-600 End Module
787-1602 24VDC 1A Power Supply
734-106 6 conductor MSC Mini Male
734-306 6 conductor MSC Mini Female
8002-025-000-007 WAGO USB Charging Station
289-175 RJ45 Interface Module
221-415 5-Position Lever Nuts
2002 Series Terminal Blocks

TECO L510 VFD
Baldor AC Motor 56J
Raspberry Pi Zero W
USB-RS485-WE USB to RS485 Adapter
Рекомендации по теме
Комментарии
Автор

every time I forget how to do this communication, this video makes it clear to me. thanks from Spain

gr
Автор

Awesome video Kurt..I have been using Pi3 for my projects. I just ordered a zero. I will replace my Pi3 with zero.

galigadu
Автор

Can you provide a link to the video you reference in the video for setting up the RPi? There is no link in the video, at least one that I have been able to click, and I haven't been able to find the video you are referencing. Thank you.

WillZotti
Автор

Thanks Kurt for a great vid. I have just bought a altivar 12 vsd. It has a rj45 connector with labels D1 and D2. My USB/RS485 adapter has A and B.. Would you know the correct connection for this. Thanks in advance Bradley Mohr..

powermate
Автор

Hi Kurt, i have some questions please:


i taking advantage the "corona times" to do some project with rpi and automation plc's(thats whare i come from(plc))
it this project i choose to use NODE-RED, and the rpi to create a very chip web based telemetry system (like you did in the video controlling modbus slave devices)


1. should i start learning java script before using node-red ?,


2. does people who are familiar with JS or node.js have some advantage ? by means ...it will be easy to them to use node-red ?


3. should i master LINUX OS before i go into programming the pi ? or just "go with the flow and ask google "how to" whanever i come across some problems ?

ofir
Автор

Great video! I have a question about a ModBus 485 over RTU. Do you know what might be: reading values from the device using ModScan54 works as expected but using node-red packages getting different value. Have you been in such a situation?

alexszilagyi
Автор

Do you have a written tutorial? Thanks in advance

lmarkrol
Автор

Modbus TCP does not connect back when the connection is broken, how to solve this

sharadpatle
Автор

Hi Kurt. Thanks for the videos. All very interesting. Just wondering, is there a way of controlling (reading and writing) an inverter with Modbus RTU via RS485 with node red, raspberry pi and a usb converter. All I see is tutorials using TCP rather than RTU?

Thewonder
Автор

Hi sir, how are you? Where did you get the holding register? also how to connect using TCP with TECO VFD F510?

harleylovitos
Автор

Hi, Thanks for you fruitful video. Is it possible to directly connect modbus rtu frequency converter with raspberry pi?

mrusmanishtiaq
Автор

It is not actually a TCP gateway but rather RS485-Etherner converter. For gateway I understand that you can connect few serial interface devices and convert it to single Ethernet.

Is there a way to connect for example 10 VFDs and control each one separately?

serhioromano
Автор

Hi, thanks for your videos are very good, some expriencia with modbus tcp and plc zelio? greetings from Chile

Master_Teco
Автор

[{"id":"bdc4476f.b8ea08", "type":"modbus-server", "z":"c1481282.fa736", "name":"", "logEnabled":false, "serverPort":10502, "responseDelay":100, "delayUnit":"ms", "coilsBufferSize":1024, "holdingBufferSize":"4", "inputBufferSize":1024, "x":303, "y":114.5, "wires":[["2cb93c43.f66474", "4b3e36bd.2cbec8"], [], []], "outputLabels":["Jesse", "Frequency", ""]}, {"id":"efc51d9f.581fb", "type":"inject", "z":"c1481282.fa736", "name":"", "topic":"", "payload":"", "payloadType":"date", "repeat":"1", "crontab":"", "once":false, "x":123, "y":114, "wires":[["bdc4476f.b8ea08"]]}, {"id":"ab2fa413.486158", "type":"modbus-write", "z":"c1481282.fa736", "name":"Start", "showStatusActivities":false, "showErrors":false, "unitid":"1", "dataType":"HoldingRegister", "adr":"9473", "quantity":"1", "server":"ee4c917a.bb25d", "x":670, "y":80, "wires":[[], []]}, {"id":"2cb93c43.f66474", "type":"function", "z":"c1481282.fa736", "name":"Gateway", "func":"// Control\nvar low_byte = msg.payload[0];\nlow_byte = low_byte << 8;\nvar high_byte = msg.payload[1];\nvar x = low_byte + high_byte; \nvar msg1 = {payload: x};\n\n// Speed Ref\nlow_byte = msg.payload[2];\nlow_byte = low_byte << 8;\nhigh_byte = msg.payload[3];\nvar x = low_byte + high_byte;\nvar msg2 = {payload: x};\n\nreturn [msg1, msg2];\n", "outputs":"2", "noerr":0, "x":493, "y":102, "wires":[["ab2fa413.486158", "d011f589.5da148"], ["1239a31.5f9f85d", "669840d9.3c792"]]}, {"id":"1239a31.5f9f85d", "type":"modbus-write", "z":"c1481282.fa736", "name":"Freq", "showStatusActivities":false, "showErrors":false, "unitid":"1", "dataType":"HoldingRegister", "adr":"9474", "quantity":"1", "server":"ee4c917a.bb25d", "x":670, "y":140, "wires":[[], []]}, {"id":"4b3e36bd.2cbec8", "type":"debug", "z":"c1481282.fa736", "name":"", "active":false, "console":"false", "complete":"false", "x":490, "y":240, "wires":[]}, {"id":"669840d9.3c792", "type":"debug", "z":"c1481282.fa736", "name":"", "active":false, "console":"false", "complete":"false", "x":670, "y":200, "wires":[]}, {"id":"d011f589.5da148", "type":"debug", "z":"c1481282.fa736", "name":"", "active":false, "console":"false", "complete":"false", "x":670, "y":20, "wires":[]}, {"id":"ee4c917a.bb25d", "type":"modbus-client", "z":"", "name":"", "clienttype":"simpleser", "bufferCommands":true, "stateLogEnabled":false, "tcpHost":"127.0.0.1", "tcpPort":"502", "tcpType":"DEFAULT", "serialPort":"/dev/ttyUSB0", "serialType":"RTU-BUFFERD", "serialBaudrate":"9600", "serialDatabits":"8", "serialStopbits":"1", "serialParity":"none", "serialConnectionDelay":"100", "unit_id":1, "commandDelay":1, "clientTimeout":1000, "reconnectTimeout":2000}]

WagoKurt
join shbcf.ru