Node-RED Modbus RTU / TCP Communication

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024

ความคิดเห็น • 73

  • @osseo9947
    @osseo9947 3 ปีที่แล้ว +1

    Great info, thank you! I will be watching for more videos on this topic.

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +1

      Hi Osseo,
      I'm glad you found it helpful. Thanks for the comment.
      Garry

  • @frustino1979
    @frustino1979 2 ปีที่แล้ว +1

    Very nice video, and well explained.
    I didn't know about node RED and it's amazing how fast it is to do what instead requires hours and hours of multithreaded programming and code pages, as I've always done until now.
    Thanks for the explanation.

    • @ACCautomation
      @ACCautomation  2 ปีที่แล้ว +1

      Thank you for the comment. Node-RED is an excellent way to get data out of the PLC. PLCs can act as an edge controller in the IoT.
      Garry
      accautomation.ca/series/node-red-iot-enabling-software/

    • @frustino1979
      @frustino1979 2 ปีที่แล้ว +1

      @@ACCautomation Thanks again for the link, bye!

  • @diegomartinbartolotirado1924
    @diegomartinbartolotirado1924 2 ปีที่แล้ว +1

    Thank you very much Sir for this video, you are the master!

    • @ACCautomation
      @ACCautomation  2 ปีที่แล้ว +1

      Hi Diego Martin Bartolo Tirado,
      Thank you for the comment. I appreciate it.
      Garry

  • @Zbevc
    @Zbevc ปีที่แล้ว +2

    Hello!
    Trying to do a similar thing except there is no SOLO. Just Node-RED and Click Plus via Modbus TCP. I can not figure out how to set or reset the coil on Click with Node-RED via Modbus.

    • @ACCautomation
      @ACCautomation  ปีที่แล้ว +2

      Hi @MrBEvcar,
      If you can send me your Click program and the Node-RED flow, I'll see what I can find.
      garryshortt@accautomation.ca
      Thank you,
      Garry

    • @Zbevc
      @Zbevc ปีที่แล้ว +2

      @@ACCautomation I have figured it out. To the flex write input, you have to send 0 or 1(off/on). And the address is the Modbus address number written in address picker -1.

    • @ACCautomation
      @ACCautomation  ปีที่แล้ว +1

      @@Zbevc
      Thanks for the update. I'm glad you got it figured out.
      Garry

  • @danielru3832
    @danielru3832 3 ปีที่แล้ว +1

    👍 Great video Thanks

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +1

      Thanks Daniel.
      I appreciate the comment.
      Garry

  • @ivanpaez4748
    @ivanpaez4748 7 หลายเดือนก่อน

    Muy bueno

    • @ACCautomation
      @ACCautomation  7 หลายเดือนก่อน +1

      Gracias por el comentario. Me alegra que te haya resultado útil.
      Thank you for the comment. I am glad that you found it helpful.
      Garry

  • @HadifRoslan
    @HadifRoslan 6 หลายเดือนก่อน +1

    Hello sir, I am having trouble with modbus simulator . Can you perhaps suggest any free modbus simulator that support rtu/serial? can you cover the guide on how to operate it in your video?

    • @ACCautomation
      @ACCautomation  6 หลายเดือนก่อน +2

      Hi @HadifRoslan,
      You could try the Do-More Designer Software for a free PLC with a Modbus Simulator.
      Here is a playlist that may help you out.
      th-cam.com/play/PL3y71jAPOdZB5LJMMotZP36LvzfdgkgzW.html
      Regards,
      Garry

  • @102diy
    @102diy 3 ปีที่แล้ว +1

    And according to your flow, you querying modbus devices without any exception or timeout controlling - what will happens if one of your modbus devices stay unavailable? - I think it is will be a some timeout and it is not really good, especially if the system must react on device register changes very quickly... of course node red and end-user must know if some device is fail for example, but I didn't see nothing in your flow about this moment ((((

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +2

      Hi Yuri,
      Remember that this is a sample flow with the basics to communicate Modbus RTU and Modbus TCP.
      There are a few different ways you can catch errors.
      Catch and trigger nodes are used for what you are describing above. The use of each one would depend on what you want to achieve with your flow.
      Regards,
      Garry

  • @galapagoat
    @galapagoat 2 ปีที่แล้ว +1

    I am having trouble reading floating point numbers. is this covered in any of your videos?

    • @ACCautomation
      @ACCautomation  2 ปีที่แล้ว +1

      Hi dv,
      I have not done a video on this, but the following thread should help you out.
      discourse.nodered.org/t/convert-modbus-float-array-register-to-value/26303
      Regards,
      Garry

  • @102diy
    @102diy 3 ปีที่แล้ว +1

    What is the interval in inject node do you use?

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +2

      The interval for the inject node is 0.2 seconds. This can be found on the post for this video at the following location:
      accautomation.ca/node-red-modbus-rtu-tcp-communication/
      Regards,
      Garry

  • @qzorn4440
    @qzorn4440 3 ปีที่แล้ว +1

    another fascinating modbus video... is there a simple way to test and sniff the addresses of old modbus displays with pushbuttons and led lights to find out if they are working? Thanks a lot...:)

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +2

      Thanks for the comment q zorn. There is no simple way to test for addresses of a Modbus system. I would take a look at the manual for the server or slave to give an idea of what the addresses may be.
      Regards,
      Garry

  • @andrewtait6227
    @andrewtait6227 3 ปีที่แล้ว +1

    With click plus, would you use MQTT to replace modbus at the edge for this type of install?

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +2

      Hi Andrew
      You could use MQTT instead of Modbus. The choice is up to you.
      MQTT would require a broker if you do not already have one on the network.
      Regards,
      Garry

    • @andrewtait6227
      @andrewtait6227 3 ปีที่แล้ว +1

      @@ACCautomation due to the broker, I think modbus would likely be more robust.

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +1

      @@andrewtait6227
      I agree.
      Garry

  • @lyndonjosephrealubit3892
    @lyndonjosephrealubit3892 2 ปีที่แล้ว +1

    I find Node Red interesting for PLC programming.. How to learn more to control vfd for motors and Temp monitorng and recording?

    • @ACCautomation
      @ACCautomation  2 ปีที่แล้ว +1

      Hi Lyndon Joseph Realubit,
      You will find additional information on our website. This will have posts for HTTP requests, Saving information to a database, HMI, etc.
      accautomation.ca/series/node-red-iot-enabling-software/
      Regards,
      Garry

  • @robdriver5131
    @robdriver5131 3 ปีที่แล้ว +1

    When I try to read a register from a Click PLC I have to subtract 1 from the address. For example to read register 192 I have to set up to read 191. Any reason for this? I am using the Node Red integration in Home Assistant. I was wondering if anyone else has run across this?

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +1

      Hi Rob Driver,
      That is a good question and one that causes confusion with Modbus addressing.
      Some device manufacturers start their “4xxxx” references at 40001, and some start at 40000. The starting register corresponds to offset “0” within the given function. It is not always evident which reference a manufacturer uses. AD usually uses an offset of 1.
      Here is a good reference article:
      support.elkor.net/knowledgebase.php?article=14
      I hope this helps you out.
      Regards,
      Garry

  • @ahmedjoo1858
    @ahmedjoo1858 3 ปีที่แล้ว +1

    Very informative, can you explain how to use the dashboard to change modbus STATIC parameters to dynamic user entry values ? Thanks

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +2

      Hi ahmedjoo,
      I am currently working on the next part of this series in which the Node-Red Dashboard is installed. It will display the present and set values of the Solo on the user interface. A switch on the dashboard will determine if the set value is coming from the Click PLC or the slider on the dashboard user interface.
      This will be released on April 19.
      Regards,
      Garry
      P.S. Here is a link for the series to date.
      accautomation.ca/series/node-red-iot-enabling-software/

  • @samurock100
    @samurock100 ปีที่แล้ว +1

    Awesome content! Can you do one for Bacnet MS/TP to BANCET IP?

    • @ACCautomation
      @ACCautomation  ปีที่แล้ว +1

      Thank you for the comment samurock100.
      I do not have any hardware that supports this protocol. What devices are you using?
      Thanks,
      Garry

  • @lakshmism1591
    @lakshmism1591 2 ปีที่แล้ว +1

    nice video thanks. will you pls tell how to convert my unsigned decimal value from my modbus to swapped float display
    and how to add the ui window to read this data

    • @ACCautomation
      @ACCautomation  2 ปีที่แล้ว +1

      Hi Muthulakshmi S
      This is just one video of the Node-RED series. Here is the link to the rest of the series:
      accautomation.ca/series/node-red-iot-enabling-software/
      Take a look at the UI dashboard:
      accautomation.ca/node-red-user-interface-dashboards/
      This also shows how to add decimal places to the returned Modbus data.
      I hope this helps you out.
      Regards,
      Garry

  • @sajadmohammadi3155
    @sajadmohammadi3155 9 หลายเดือนก่อน +1

    Hello,
    I want to set the parameters of an industrial drive using a node through RS485 serial communication.
    In this project, I need to use the hex codes of an industrial drive and control the drive using the hex codes.
    Can anyone help me with this project?

    • @ACCautomation
      @ACCautomation  9 หลายเดือนก่อน +1

      Hi @sajadmohammadi3155
      If you want to send just HEX codes in and out of the serial port, then you would use the following nodes in Node-RED:
      flows.nodered.org/node/node-red-node-serialport
      Note: accepts hex notation (0x0a)
      I hope this helps you out.
      Regards,
      Garry

    • @sajadmohammadi3155
      @sajadmohammadi3155 9 หลายเดือนก่อน +1

      Hi​@@ACCautomation
      Thank you for your guidance
      I will let you know the result

    • @sajadmohammadi3155
      @sajadmohammadi3155 9 หลายเดือนก่อน +1

      Hello again my friend,
      I went to the address you posted and I'm going to change the parameters of a variable frequency drive using node red and set the parameters I want for the drive.
      I have not used Nod Red until now. Can you please send me a video on how to do this?
      I want to see what code I should write for the function section?
      Or what code should I write for the inject part and what blocks should I use for setting values?
      please guide me
      regards,
      Sajad

    • @ACCautomation
      @ACCautomation  9 หลายเดือนก่อน +1

      @@sajadmohammadi3155
      I am providing information, not writing your code. Every drive is different, and each application is unique to the industry that it serves.
      If you have a specific question, I can help or point you in the correct direction.
      Here is some general information on Node-RED.
      accautomation.ca/series/node-red-iot-enabling-software/
      Regards,
      Garry

  • @mumbles1justin
    @mumbles1justin 3 ปีที่แล้ว +1

    👍🏼👍🏼

  • @to1to192
    @to1to192 3 ปีที่แล้ว +1

    Hello. I have a qeustion about using this lib.
    When I disconnect (physically) slave device from hardware where Node-red server runs, whole Node-red server goes down. In console window I see next message: "Error: Writing to COM port (GetOverlappedResult): Operation aborted". To solve this problem I should restart Node-red server. What wrong I do? Any ideas?

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +1

      Hi to1 to1,
      Errors will be shown in the console window. This error should be constantly repeating at the interval in which you are injecting the flow.
      When you reconnect the communication port the error should correct itself. That is if you had good communication originally.
      Regards,
      Garry

    • @to1to192
      @to1to192 3 ปีที่แล้ว +1

      @@ACCautomation Thank you for your answer. I have one mode question about Modbus TCP (same lib). When I reboot Server side hardware TCP connection from Node-RED side did't retrieve. To solve this problem I should deploy Node-RED flow again or reboot hardware where Node-RED server runs. Option ""Reconnect on timeout" is checked. Any ideas about it ?

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +1

      @@to1to192
      So even when you reboot and run Node-RED your communication port is not working?
      I would check through the device manager on your computer to see if the drivers are working correctly. Can you run a different software package (Programming Software if a PLC) through the same port to see if it is actually working correctly?
      I am assuming that you are running a Windows 10 computer and Node-RED.
      Can you specify the equipment you are using?
      Thanks,
      Garry

    • @to1to192
      @to1to192 3 ปีที่แล้ว +1

      @@ACCautomation We are talking about Modbus TCP connection. I have Node-RED software running on PC with windows10, and I have TCP server running on PLC. TCP connection cannot automatically recover after interrruption (due to PLC rebooting), but after flow deployment or Node-RED rebooting all work good (until next PLC rebooting).

    • @ACCautomation
      @ACCautomation  3 ปีที่แล้ว +1

      @@to1to192
      Thanks for the clarification. How often are you requesting the data? You may have to use a Catch node for the error and a time delay before continuing the flow.
      Regards,
      Garry

  • @graceautomation
    @graceautomation 2 ปีที่แล้ว +1

    I am able to successfully connect the Click PLC with node red through Modbus. Holding registers (DF, DS) are being transferred accurately. But I am not able to read or write the Boolean values (C).
    Can you help me out?
    Thanks in advance

    • @ACCautomation
      @ACCautomation  2 ปีที่แล้ว +1

      Hello,
      Here is the format to read C1 in the Click PLC.
      C1 - Modbus address 16385
      msg.payload = { value: msg.payload, 'fc': 1, 'unitid': 1, 'address': 16385, 'quantity': 1 } return msg
      What are the error messages that you getting?
      Regards,
      Garry