Tutorial: Modbus TCP Server - C# Desktop App

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 40

  • @georgecormier7922
    @georgecormier7922 10 місяців тому +1

    Thanks for a great training videos

  • @viveksubramanian7688
    @viveksubramanian7688 Рік тому

    Thank you very much, i was able to connect the Modbus Server with Node Red and other Modbus Clients

  • @MrDhananjayjadhav
    @MrDhananjayjadhav 5 місяців тому +1

    Thank you very much sir.

  • @UrbanProjects-kh6st
    @UrbanProjects-kh6st Рік тому

    My PLC is not receiving the set values. What are some things to check for? Do I need to set a static IP and port?

    • @hadiscada
      @hadiscada  Рік тому

      The application is Modbus Server, so it a standby system, the Client is the one who always active to read/monitor the data. So I think the problem is in your PLC program.

    • @UrbanProjects-kh6st
      @UrbanProjects-kh6st Рік тому

      @@hadiscada I am looking to trigger a coil in the PLC program from the C# program

    • @UrbanProjects-kh6st
      @UrbanProjects-kh6st Рік тому

      Do you think your example would help out?

    • @hadiscada
      @hadiscada  Рік тому

      if the PLC is a Modbus TCP server and the PC as a Modbus TCP client, i think this link will help you:
      ua-cam.com/video/zsM-L-kN6Ps/v-deo.html

  • @inmylife194
    @inmylife194 9 місяців тому

    I try and it's working. But i don't understand why both doesn't need TCP/IP and Port information. You can explain for me, please. Thanks. And i have a hardware device (set client) connect by cable with my laptop (set sever). It's can't connect. Why? and need hardware set TCP/IP ?

    • @hadiscada
      @hadiscada  9 місяців тому

      as a TCP server we dont need to define the IP address, but we need to define Port, but in this example project we are using default Modbus port (502) so we dont need to set the port in script, if you want to use other port then you need to set in the script.
      For your hardware client, I think you need to set the IP address in a same class of your laptop.

  • @guilhermevgames4682
    @guilhermevgames4682 Рік тому

    when i click the start button my form freeze any tip?

    • @hadiscada
      @hadiscada  Рік тому

      you can do some debugging, like put a breakpoint in Start button clicked event, and try to find out what is the problem
      Thanks

  • @yvestheunissen
    @yvestheunissen Рік тому +1

    Is this using the rosmann EasyModbus TCP plugin?

    • @hadiscada
      @hadiscada  Рік тому

      Yes you are right

    • @yvestheunissen
      @yvestheunissen Рік тому

      @@hadiscada hmm good to know gonna look through this. Couldn't figure out how to get my slave id included.

    • @hadiscada
      @hadiscada  Рік тому

      @@yvestheunissen you need to modify the library if need more slaves

  • @SonchaiNukaeo-d7e
    @SonchaiNukaeo-d7e 7 місяців тому

    you can show example Ethernet IP? Visual is scanner

    • @hadiscada
      @hadiscada  7 місяців тому

      sorry i dont understand your question

    • @SonchaiNukaeo-d7e
      @SonchaiNukaeo-d7e 7 місяців тому

      @@hadiscada you know Ethernet IP protocol?

  • @vanminhtrip
    @vanminhtrip 8 місяців тому

    My app working sir ,but How to read string data from plc siemmen s7 1200 sir ?

    • @hadiscada
      @hadiscada  8 місяців тому

      for read data from S7 PLC you can see here :
      ua-cam.com/video/K_GIVV2mI9E/v-deo.html
      for read String you can add this script :
      if (type == "String")
      {
      string[] ardb = tag.Split('.');
      if (ardb.Length > 1)
      {
      string sdb1 = ardb[0];
      string sdb2 = ardb[1];
      int idb1 = int.Parse(sdb1.Replace("DB", ""));
      int idb2 = int.Parse(sdb2.Replace("DBD", ""));
      object ival1 = plc.Read(S7.Net.DataType.DataBlock, idb1, idb2, VarType.Byte, 1);
      object ival2 = plc.Read(S7.Net.DataType.DataBlock, idb1, idb2+1, VarType.Byte, 1);
      int ilen = int.Parse(ival2.ToString());
      object val = plc.Read(S7.Net.DataType.DataBlock, idb1, idb2+2, VarType.String, ilen);
      if(val!=null) sret = val.ToString();
      }
      }

    • @vanminhtrip
      @vanminhtrip 8 місяців тому +1

      @@hadiscada thank you sir this help me read string from qrcode reader 🥰🥰🥰

  • @nielthor
    @nielthor Рік тому

    can this be set as a base class where I can create multiple connections based off a random number of devices I need to connect to?

    • @hadiscada
      @hadiscada  Рік тому

      yes, but you need to modify some code of the library. just try it.
      thanks.

  • @AbdulRahman-jz3px
    @AbdulRahman-jz3px Рік тому

    Kalo mau nge baca output coil PLC caranya gmna ya?

    • @hadiscada
      @hadiscada  Рік тому +1

      kalau PLC nya sudah bisa diakses via Modbus TCP, silakan coba tutorial ini (VB net):
      ua-cam.com/video/kLeXFN1vgF8/v-deo.html
      atau yg ini dalam bahasa C# :
      ua-cam.com/video/zsM-L-kN6Ps/v-deo.html

  • @ОлегСтрюков-е3к
    @ОлегСтрюков-е3к 3 місяці тому

    good day! Is there a simple for Modbus RTU slave?

    • @hadiscada
      @hadiscada  2 місяці тому

      hello,
      sorry, there is no sample project yet for the Modbus RTU slave.
      thanks and regards.

  • @郭昱均-m7d
    @郭昱均-m7d Рік тому +1

    it is work,thanks

  • @abrarnasir6585
    @abrarnasir6585 6 місяців тому

    Modbus RTU ade tak tuan?

    • @hadiscada
      @hadiscada  5 місяців тому +1

      untuk Modbus RTU Slave belum ada tutorialnya pak, tapi bisa kok pakai library EasyModbus ini, saya sudah pakai di aplikasi ModbusHD saya.
      Silakan dicoba sendiri ya..
      maaf jawabannya telat.
      Terima kasih.

  • @moradecarime5480
    @moradecarime5480 Рік тому +1

    thanks

  • @jigarpanchal7995
    @jigarpanchal7995 Рік тому

    Kindly update the download link.for tcp/ip

    • @hadiscada
      @hadiscada  Рік тому

      sorry, what link did you mean?

    • @jigarpanchal7995
      @jigarpanchal7995 Рік тому

      @@hadiscada we want download link.for TCP/ip library