[ { "id": "c2d765b9.95b39", "type": "tab", "label": "Modbus to S7 Gateway", "disabled": false, "info": "Modbus to S7 Gateway" }, { "id": "8ee576f9.aa2768", "type": "modbus-read", "z": "c2d765b9.95b39", "name": "M340 MW205 Read", "topic": "", "showStatusActivities": false, "showErrors": false, "unitid": "", "dataType": "HoldingRegister", "adr": "205", "quantity": "1", "rate": "1", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "a5c6f183.a00a4", "x": 150, "y": 100, "wires": [ [ "c64cbda0.4e2e08", "bd859462.e90558" ], [] ] }, { "id": "c64cbda0.4e2e08", "type": "debug", "z": "c2d765b9.95b39", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 370, "y": 100, "wires": [] }, { "id": "b3969b8f.55421", "type": "ui_gauge", "z": "c2d765b9.95b39", "name": "Modbus Gauge", "group": "d2060cc6.db4118", "order": 1, "width": 0, "height": 0, "gtype": "gage", "title": "MW205 Gauge", "label": "units", "format": "{{value}}", "min": 0, "max": "65535", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 520, "y": 180, "wires": [] }, { "id": "bd859462.e90558", "type": "function", "z": "c2d765b9.95b39", "name": "", "func": "var msg_out = {payload:msg.payload[0]};\nreturn msg_out;", "outputs": 1, "noerr": 0, "x": 350, "y": 140, "wires": [ [ "b3969b8f.55421", "c2ebd58a.045748" ] ] }, { "id": "c2ebd58a.045748", "type": "debug", "z": "c2d765b9.95b39", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 510, "y": 140, "wires": [] }, { "id": "2cbd2ae3.b7e886", "type": "s7comm read", "z": "c2d765b9.95b39", "connection": "e2e8bf68.7f1608", "payload": "{\"S7_Type\":\"M\",\"S7_DBnum\":\"0\",\"S7_Datatype\":\"uint16\",\"S7_Offset\":\"10\",\"S7_BitOffset\":\"0\",\"S7_Quantity\":\"1\",\"S7_Name\":\"MW10\"}", "s7Name": "MW10", "topic": "", "name": "Read %MW10 (UINT16)", "signalSetted": false, "none": "false", "repeat": "1", "once": false, "x": 150, "y": 340, "wires": [ [ "92eae6b3.ffad48", "f6e321a5.cc68f", "57f41797.6e3768" ] ] }, { "id": "92eae6b3.ffad48", "type": "debug", "z": "c2d765b9.95b39", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 370, "y": 340, "wires": [] }, { "id": "f6e321a5.cc68f", "type": "function", "z": "c2d765b9.95b39", "name": "", "func": "var msg_out = {payload:msg.payload.value[0]};\nvar msg_com = {payload:(msg.payload.error === 0)};\nreturn [msg_out, msg_com];", "outputs": 2, "noerr": 0, "x": 350, "y": 380, "wires": [ [ "f831cf69.cae43", "2e6012a4.784e56" ], [ "84e90eda.dc1448" ] ] }, { "id": "f831cf69.cae43", "type": "debug", "z": "c2d765b9.95b39", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 550, "y": 380, "wires": [] }, { "id": "2e6012a4.784e56", "type": "ui_gauge", "z": "c2d765b9.95b39", "name": "S7-1500 Gauge", "group": "5050792b.05421", "order": 1, "width": 0, "height": 0, "gtype": "gage", "title": "S7-1500 MW10 Gauge", "label": "units", "format": "{{value}}", "min": 0, "max": "65535", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 560, "y": 420, "wires": [] }, { "id": "a817e8c6.569248", "type": "ui_slider", "z": "c2d765b9.95b39", "name": "S7-1500 Slider", "label": "S7-1500 MW10 Slider", "group": "5050792b.05421", "order": 2, "width": 0, "height": 0, "passthru": true, "topic": "", "min": 0, "max": "65535", "step": 1, "x": 120, "y": 500, "wires": [ [ "ab2b3bf9.033c08" ] ] }, { "id": "ab2b3bf9.033c08", "type": "function", "z": "c2d765b9.95b39", "name": "", "func": "var msg_out = {payload:{value:[msg.payload]}};\nreturn msg_out;", "outputs": 1, "noerr": 0, "x": 350, "y": 500, "wires": [ [ "688862a5.1ffdcc" ] ] }, { "id": "688862a5.1ffdcc", "type": "s7comm write", "z": "c2d765b9.95b39", "connection": "e2e8bf68.7f1608", "payload": "{\"S7_Type\":\"M\",\"S7_DBnum\":\"0\",\"S7_Datatype\":\"uint16\",\"S7_Offset\":\"10\",\"S7_BitOffset\":\"0\",\"S7_Quantity\":\"1\",\"S7_Name\":\"MW10\"}", "s7Name": "MW10", "topic": "", "name": "Write %MW10 (UINT16)", "signalSetted": false, "x": 590, "y": 500, "wires": [ [] ] }, { "id": "bb4e8812.08b4f8", "type": "comment", "z": "c2d765b9.95b39", "name": "S7-1500", "info": "Lecture / écriture du MW0", "x": 100, "y": 300, "wires": [] }, { "id": "84e90eda.dc1448", "type": "ui_text", "z": "c2d765b9.95b39", "group": "5050792b.05421", "order": 3, "width": 0, "height": 0, "name": "S7-1500 Status Com", "label": "S7-1500 Com", "format": "", "layout": "row-spread", "x": 580, "y": 460, "wires": [] }, { "id": "b7390f7b.70502", "type": "comment", "z": "c2d765b9.95b39", "name": "M340", "info": "", "x": 90, "y": 60, "wires": [] }, { "id": "c7ddf1eb.1534b8", "type": "modbus-write", "z": "c2d765b9.95b39", "name": "M340 MW205 Write", "showStatusActivities": false, "showErrors": false, "unitid": "", "dataType": "HoldingRegister", "adr": "205", "quantity": "1", "server": "a5c6f183.a00a4", "x": 580, "y": 260, "wires": [ [], [] ] }, { "id": "57f41797.6e3768", "type": "function", "z": "c2d765b9.95b39", "name": "", "func": "var msg_out = {payload:msg.payload.value[0]};\nreturn msg_out;", "outputs": 1, "noerr": 0, "x": 350, "y": 260, "wires": [ [ "c7ddf1eb.1534b8", "210e3623.a230d2" ] ] }, { "id": "eeb39bd1.6ac94", "type": "modbus-server", "z": "c2d765b9.95b39", "name": "", "logEnabled": false, "serverPort": 10502, "responseDelay": 100, "delayUnit": "ms", "coilsBufferSize": 10000, "holdingBufferSize": 10000, "inputBufferSize": 10000, "x": 120, "y": 620, "wires": [ [], [], [] ] }, { "id": "e1fc559.843ff28", "type": "modbus-write", "z": "c2d765b9.95b39", "name": "MBS MW0 Write", "showStatusActivities": false, "showErrors": false, "unitid": "", "dataType": "HoldingRegister", "adr": "0", "quantity": "1", "server": "b2c44c33.ad8b58", "x": 540, "y": 620, "wires": [ [], [] ] }, { "id": "e259d770.e481e8", "type": "ui_slider", "z": "c2d765b9.95b39", "name": "MBS MW0 Slider", "label": "MBS MW0 Slider", "group": "67695ca9.581c1c", "order": 1, "width": 0, "height": 0, "passthru": true, "topic": "", "min": 0, "max": "65535", "step": 1, "x": 330, "y": 620, "wires": [ [ "e1fc559.843ff28" ] ] }, { "id": "2be95a22.68a71e", "type": "ui_gauge", "z": "c2d765b9.95b39", "name": "MBS MW0 Gauge", "group": "67695ca9.581c1c", "order": 2, "width": 0, "height": 0, "gtype": "gage", "title": "MBS MW0 Gauge", "label": "units", "format": "{{value}}", "min": 0, "max": "65535", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 550, "y": 700, "wires": [] }, { "id": "e2f1d682.5f8bb8", "type": "modbus-read", "z": "c2d765b9.95b39", "name": "MBS MW0-1 Read", "topic": "", "showStatusActivities": false, "showErrors": false, "unitid": "", "dataType": "HoldingRegister", "adr": "0", "quantity": "2", "rate": "1", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "b2c44c33.ad8b58", "x": 150, "y": 700, "wires": [ [ "425e0fdb.85607" ], [] ] }, { "id": "425e0fdb.85607", "type": "function", "z": "c2d765b9.95b39", "name": "", "func": "var msg_out0 = {payload:msg.payload[0]};\nvar msg_out1 = {payload:msg.payload[1]};\nreturn [msg_out0, msg_out1];", "outputs": 2, "noerr": 0, "x": 350, "y": 700, "wires": [ [ "2be95a22.68a71e" ], [ "a149e152.5c1548" ] ] }, { "id": "2b1e3bef.08b3bc", "type": "comment", "z": "c2d765b9.95b39", "name": "Node-RED as Modbus TCP Client Example ", "info": "", "x": 200, "y": 20, "wires": [] }, { "id": "544a9c72.bbd904", "type": "comment", "z": "c2d765b9.95b39", "name": "Node-RED as Modbus TCP Server Example ", "info": "", "x": 210, "y": 560, "wires": [] }, { "id": "210e3623.a230d2", "type": "modbus-write", "z": "c2d765b9.95b39", "name": "MBS MW1 Write", "showStatusActivities": false, "showErrors": false, "unitid": "", "dataType": "HoldingRegister", "adr": "1", "quantity": "1", "server": "b2c44c33.ad8b58", "x": 600, "y": 320, "wires": [ [], [] ] }, { "id": "a149e152.5c1548", "type": "ui_gauge", "z": "c2d765b9.95b39", "name": "MBS MW1 Gauge", "group": "67695ca9.581c1c", "order": 2, "width": 0, "height": 0, "gtype": "gage", "title": "MBS MW1 Gauge", "label": "units", "format": "{{value}}", "min": 0, "max": "65535", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 550, "y": 740, "wires": [] }, { "id": "a5c6f183.a00a4", "type": "modbus-client", "z": "c2d765b9.95b39", "name": "M340", "clienttype": "tcp", "bufferCommands": true, "stateLogEnabled": false, "tcpHost": "192.168.1.100", "tcpPort": "502", "tcpType": "DEFAULT", "serialPort": "/dev/ttyUSB", "serialType": "RTU-BUFFERD", "serialBaudrate": "9600", "serialDatabits": "8", "serialStopbits": "1", "serialParity": "none", "serialConnectionDelay": "100", "unit_id": 1, "commandDelay": 1, "clientTimeout": 1000, "reconnectTimeout": 2000 }, { "id": "d2060cc6.db4118", "type": "ui_group", "z": "c2d765b9.95b39", "name": "M340", "tab": "7ce368e3.95879", "disp": true, "width": "6" }, { "id": "e2e8bf68.7f1608", "type": "s7comm", "z": "c2d765b9.95b39", "ip": "192.168.1.1", "port": "102", "rack": "0", "slot": "1", "payload": [ { "S7_Type": "M", "S7_DBnum": "0", "S7_Datatype": "uint16", "S7_Offset": "10", "S7_BitOffset": "0", "S7_Quantity": "1", "S7_Name": "MW10" } ] }, { "id": "5050792b.05421", "type": "ui_group", "z": "c2d765b9.95b39", "name": "S7-1500", "tab": "7ce368e3.95879", "order": 2, "disp": true, "width": "6" }, { "id": "b2c44c33.ad8b58", "type": "modbus-client", "z": "c2d765b9.95b39", "name": "Modbus Server Node", "clienttype": "tcp", "bufferCommands": true, "stateLogEnabled": false, "tcpHost": "127.0.0.1", "tcpPort": "10502", "tcpType": "DEFAULT", "serialPort": "/dev/ttyUSB", "serialType": "RTU-BUFFERD", "serialBaudrate": "9600", "serialDatabits": "8", "serialStopbits": "1", "serialParity": "none", "serialConnectionDelay": "100", "unit_id": 1, "commandDelay": 1, "clientTimeout": 1000, "reconnectTimeout": 2000 }, { "id": "67695ca9.581c1c", "type": "ui_group", "z": "c2d765b9.95b39", "name": "Node-RED MBS", "tab": "7ce368e3.95879", "order": 3, "disp": true, "width": "6" }, { "id": "7ce368e3.95879", "type": "ui_tab", "z": "c2d765b9.95b39", "name": "Modbus to S7 Gateway", "icon": "dashboard", "order": 7 } ]