• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
connecting Mitsubishi via RS485
#11
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
  Reply
#12
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-R...-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.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  NPIX-RS485 with auto direction control now available Armin@netPI 11 7,917 May-15th-2020, 10:46 PM
Last Post: EnergyKonnex
  Problems with the communication of the RS485 interface PeterL. 9 6,236 April-28th-2020, 02:53 PM
Last Post: Armin@netPI
  connec Mitsubishi using Modbus/TCP or SLMP COswald 1 2,612 January-8th-2020, 03:24 PM
Last Post: Armin@netPI
  Dual RS485 Ports primmer 2 2,931 September-25th-2019, 09:43 AM
Last Post: primmer
  Connecting two LAN network segments Lingyue 2 6,540 September-9th-2019, 07:45 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)