Visual Basic Modbus TCP Client

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ม.ค. 2025

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

  • @user-dr-noor
    @user-dr-noor 2 ปีที่แล้ว +1

    Thank you very much

    • @hadiscada
      @hadiscada  ปีที่แล้ว

      You are welcome

  • @spk7054
    @spk7054 4 ปีที่แล้ว

    Thank you I was followed ch.

  • @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

  • @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();

  • @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"

  • @rzqmlna124
    @rzqmlna124 2 ปีที่แล้ว

    Kalau dikombinasikan dengan advanced HMI bisa?

  • @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

  • @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.

  • @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

  • @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-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.

  • @industrialautomation5727
    @industrialautomation5727 4 ปีที่แล้ว

    Showing application in break mode error while running

    • @hadiscada
      @hadiscada  3 ปีที่แล้ว

      i dont understand, can you explain?

  • @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