Why is the Value being Read from the Register Constantly Zero? (Pymodbus)

I am trying to read the value of a holding register using Pymodbus in a python script. I know what the value in the register is (8500), but in the python script I keep getting 0.

See Below:

from pymodbus.client.sync import ModbusTcpClient as ModbusClient
from pymodbus.constants import Endian
from pymodbus.payload import BinaryPayloadBuilder
from pymodbus.payload import BinaryPayloadDecoder

client = ModbusClient('IPaddress')
connection = client.connect()

if connection:
   response = client.read_holding_registers(0x00, 4, unit=1)
   print(response.registers)


----------------------------------------------------------------
result  = [0,0,0,0]

Can anybody help, or know what wrong?



from Recent Questions - Stack Overflow https://ift.tt/3wZBzHi
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)