Author Topic: MODBUS TCP/IP writing to adress register for zero loadcell amplifier  (Read 832 times)

arizawilmer

  • Newbie
  • *
  • Posts: 6
    • View Profile
Hi,

I am new with modbus, I am working with a DAD141.1 load cell amplifier

https://www.flintec.com/media/downloads/dad141.1-indicator-manual-en.pdf

with modbus addresses described here

https://www.flintec.com/media/downloads/DAD141_Modbus-Communication_Rev.2.3_EN.pdf

I am capable of reading the value of the DAD141 without problem.

If the address for reading is int32 you have to address AHMI to the next address and if its float is the exact address of the manual. But I can not find how to write to the address.

Code: [Select]
Dim CurrentValue As Integer = ModbusTCPCom1.Read("L48225") 'read DAD Value


' Zero DAD
        ModbusTCPCom1.Write("48289", &H2)
        'ModbusTCPCom1.Write("38289", &H2)
        ModbusTCPCom1.Write("08289", &H8)
        Dim CurrentValue2 As Integer = ModbusTCPCom1.Read("L48241")


Please  :-[ help me...


Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: MODBUS TCP/IP writing to adress register for zero loadcell amplifier
« Reply #1 on: September 16, 2020, 07:46:39 PM »
Put a BasicLabel on the form and set both PLCAddressValue and PLCAddressKeypad to L48241 (this address should be covering 2 registers 48241 and 48242 because you are looking for 32-bit value).

Once you run the application then this BasicLabel should show you the value stored in registers and if you click the BasicLabel then a keypad should pop up to allow you to write a new value, which if successful will then be shown on the BasicLabel.

arizawilmer

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: MODBUS TCP/IP writing to adress register for zero loadcell amplifier
« Reply #2 on: September 16, 2020, 07:57:20 PM »
Put a BasicLabel on the form and set both PLCAddressValue and PLCAddressKeypad to L48241 (this address should be covering 2 registers 48241 and 48242 because you are looking for 32-bit value).

Once you run the application then this BasicLabel should show you the value stored in registers and if you click the BasicLabel then a keypad should pop up to allow you to write a new value, which if successful will then be shown on the BasicLabel.


Thanks


I found a solution:


To Tare the load cell amplifier two codes have to be send to the specific adddress

As we send a 32 bits but is only a 16 bits I wireshark the TCP as recommended.


The amplifier accepts h2061 as the address to write, but the driver is sending to register 2060. Starting one before to write 32 bits.

I move my address to h2062 and the driver was sending the correct register to h2061.

Code: [Select]
Dim address = "48290"
        Dim v = ModbusTCPCom1.Write(address, "1")
        Dim v1 = ModbusTCPCom1.Write(address, "8")