connecting Mitsubishi via RS485 - Printable Version +- Hilscher Community Forum (https://forum.hilscher.com) +-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html) +--- Forum: Hardware (https://forum.hilscher.com/forum-4.html) +--- Thread: connecting Mitsubishi via RS485 (/thread-537.html) Pages:
1
2
|
RE: connecting Mitsubishi via RS485 - COswald - January-14th-2020 Hello Armin, because I cannot see how to set the Node-RED Modbus as slave, I have to set the PLC as slave, even I think this is the wrong way. Under normal circumstances the PLC should work as server. Thanks RE: connecting Mitsubishi via RS485 - Armin@netPI - January-14th-2020 Well the Node-RED software we provide consists of a set of preinstalled nodes that others have written in the community. Each node usually has a hosted web site that explains how to use it. The same applies for the Modbus nodes like this web page shows: https://flows.nodered.org/node/node-red-contrib-modbus. Here all the details are explained. Please read this thread https://forum.hilscher.com/Thread-NPIX-RS485-with-auto-direction-control-now-available that tells you to activate the RS-485 driver to run in auto-direction control. There is a also a very simple Node-RED flow that you can copy and insert in your Node-RED. Here a very simple code to use Modbus RTU as master/client to read out a Modbus register from a server (Mitsubishi) with Modbus address (Unit Id) of 1 at a baudrate of 9600,7,1N. Code: [{"id":"38958c5.2fe5974","type":"modbus-read","z":"4411c241.bb70ac","name":"MyRead","topic":"","showStatusActivities":false,"showErrors":false,"unitid":"1","dataType":"HoldingRegister","adr":"0","quantity":"2","rate":"100","rateUnit":"ms","delayOnStart":false,"startDelayTime":"","server":"d0f81b82.fb6ad8","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":610,"y":260,"wires":[["6745989e.9bd2f"],["6745989e.9bd2f"]]},{"id":"6745989e.9bd2f","type":"debug","z":"4411c241.bb70ac","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":860,"y":260,"wires":[]},{"id":"d0f81b82.fb6ad8","type":"modbus-client","z":"","name":"MyRTUTest","clienttype":"serial","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyS0","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"7","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectTimeout":"2000"}] And yes I agree that usually the PLC should be configured to be of type "slave/server" but you need to verify it if this is true. |