Visual Basic Modbus TCP Client

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

КОМЕНТАРІ • 42

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

    Can you use 400***/analog output holding registers with this also?

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

      Sorry, I don't understand your question. As far as I know, 400xx is for Holding Register, there is no "Analog Output Holding Register. If you want to write to Holding Register, just use "Write Single Register" like I show in this video.
      Thanks.

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

      @@hadiscada Ok might be my bad. Not that familiar with modbus.
      But trying to populate labels and text boxes with info from certain registers.
      So only read, no write.

  • @ntqphong12t0304
    @ntqphong12t0304 2 роки тому

    Halo !
    I follow the same but in the listbox not showing the value but showing int32[]aray. Can you show me how to show the value like you do

  • @alpaytoprak7805
    @alpaytoprak7805 4 роки тому

    Do you know how can we read or write data from analog inputs that have 30001-300.. address, i could read from holding registers but i could not read from analog inputs

    • @hadihidayat2188
      @hadihidayat2188 4 роки тому

      yes.. but Analog Inputs can only be Read, its can not be Write.
      just replace in script "ReadHoldingRegisters" with "ReadInputRegisters"

  • @fatima-zahraelhamzaoui478
    @fatima-zahraelhamzaoui478 3 роки тому +1

    please how to use ConvertRegistersTodouble in VB plz

    • @hadiscada
      @hadiscada  3 роки тому +1

      please use this:
      32-Bit Signed:
      val1 = mod.ModServer.holdingRegisters[reg];
      val2 = mod.ModServer.holdingRegisters[reg + 1];
      svalmod = ((val1 * 65536) + (UInt16)val2).ToString();
      32-Bit UnSigned:
      val1 = mod.ModServer.holdingRegisters[reg];
      val2 = mod.ModServer.holdingRegisters[reg + 1];
      svalmod = (((UInt16)val1 * 65536) + (UInt16)val2).ToString();

  • @rzqmlna124
    @rzqmlna124 2 роки тому

    Kalau dikombinasikan dengan advanced HMI bisa?

  • @rizkymaulanaw341
    @rizkymaulanaw341 2 роки тому

    mas kok saya menggunakan cara yg sama beberapa waktuu kemudian muncul kode ini ya System.IO.IOException: 'Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.', itu kenapa ya mas

    • @hadiscada
      @hadiscada  2 роки тому

      sepertinya ada setting yang tidak cocok antara server dan client. coba tes pakai aplikasi Modbus client yang lain.

  • @fatima-zahraelhamzaoui5663
    @fatima-zahraelhamzaoui5663 3 роки тому

    Plz how to read unsigned long or to convert to unsigned long data digital input from pac 3200 siemens communications modbus tcp ip

    • @hadiscada
      @hadiscada  3 роки тому

      sorry, i dont know, i have no experience with PAC 3200

  • @spk7054
    @spk7054 4 роки тому

    Thank you I was followed ch.

  • @user-dr-noor
    @user-dr-noor 2 роки тому +1

    Thank you very much

  • @ninisachon5645
    @ninisachon5645 4 роки тому

    Do you have exemple for read data tyte 2 word?
    Please share code to me? Thank you.

    • @hadiscada
      @hadiscada  4 роки тому

      the code is long, please send your email to hadiscada@gmail.com thanks.

  • @industrialautomation5727
    @industrialautomation5727 4 роки тому

    Showing application in break mode error while running

    • @hadiscada
      @hadiscada  4 роки тому

      i dont understand, can you explain?

  • @fatima-zahraelhamzaoui478
    @fatima-zahraelhamzaoui478 3 роки тому

    please how to use ConvertRegistersToFloat in VB

    • @hadiscada
      @hadiscada  3 роки тому +1

      Hello,to read Modbus register with Floating point data format, you must read 2 registers, then write script like this:
      'read float //
      Dim reg1 As Short
      Dim reg2 As Short
      reg1 = vals(0) 'value from register 1
      reg2 = vals(1) 'value from register 2
      Dim fval As Double
      Dim intBytes1 As Byte() = BitConverter.GetBytes(reg1)
      If (BitConverter.IsLittleEndian) Then Array.Reverse(intBytes1)
      Dim result1 As Byte() = intBytes1
      Dim intBytes2 As Byte() = BitConverter.GetBytes(reg2)
      If (BitConverter.IsLittleEndian) Then Array.Reverse(intBytes2)
      Dim result2 As Byte() = intBytes2
      Dim _bytes(4) As Byte
      _bytes(0) = intBytes1(1)
      _bytes(1) = intBytes1(0)
      _bytes(2) = intBytes2(1)
      _bytes(3) = intBytes2(0)
      Dim _val As Double = BitConverter.ToSingle(_bytes, 0)
      _val = Math.Round(_val, 2)
      fval = _val
      txtVal.Text = fval 'plot float value to text box
      Regards.

  • @dhanit46
    @dhanit46 4 роки тому

    Mas klo multi client bagiamana? vb.netnya buka tutup connectionnya?

    • @hadiscada
      @hadiscada  4 роки тому

      buat multi Modbus Client di script nya.. gak perlu di-buka-tutup koneksi, masing2 melayani koneksi yang berbeda.
      saya coba nanti buat tutorialnya, insya Allah..

    • @tomio-omron_practitioner
      @tomio-omron_practitioner 4 роки тому

      ngiring... haha

    • @dhanit46
      @dhanit46 4 роки тому

      @@hadiscada oh paham paham. tinggal bagian ini berarti ya. Dim ModClient As New ModbusClient. misal jadi modclient2

    • @dhanit46
      @dhanit46 4 роки тому

      @@tomio-omron_practitioner wkwkwkw. Ngelmu ngelmu. Kahadr ditinggang ku pamajikan

    • @hadiscada
      @hadiscada  4 роки тому

      @@dhanit46 betul kang seperti itu.. siip.. gak perlu dibuat tutorialnya klo gitu

  • @JoseAntonio-rb8iv
    @JoseAntonio-rb8iv 3 роки тому

    Hola
    Muchas gracias he aprendido mucho de tu video pero quisiera saber como leer los bits de cada holding register
    Ejemplo MW 50 bit 12
    Cuando pongo el simulador en hex y le escribo FFFF en el proyecto sale -1
    ¿Como lo puedo pasar a hexadecimal?
    Muchas gracias y sigue con estos tutoriales son muy buenos