You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
When I am alone read_coils function, the return value for “ReadDiscreteInputsResponse (24)”, when I use write_coil functions first, then use read_coils function, Its return value changes to “WriteCoilResponse(100) => True”. Shouldn't the return value of the read_coils function be the ReadCoilsResponse object?
Code and Logs
codeone:
###################frompymodbus.clientimportModbusTcpClient# 连接到Modbus服务器client=ModbusTcpClient('169.254.94.2', port=502)
client.connect()
# client.write_coil(100,True,1)a=client.read_coils(100,1)
print(a)
# close the connectionclient.close()
#################print (a) is" ReadDiscreteInputsResponse (24)"#################codetwo:
###################frompymodbus.clientimportModbusTcpClient# 连接到Modbus服务器client=ModbusTcpClient('169.254.94.2', port=502)
client.connect()
client.write_coil(100,True,1)
a=client.read_coils(100,1)
print(a)
# close the connectionclient.close()
#################print (a) is" WriteCoilResponse(100) => True"#################
The text was updated successfully, but these errors were encountered:
Versions
Pymodbus Specific
Description
Hi!
When I am alone read_coils function, the return value for “ReadDiscreteInputsResponse (24)”, when I use write_coil functions first, then use read_coils function, Its return value changes to “WriteCoilResponse(100) => True”. Shouldn't the return value of the read_coils function be the ReadCoilsResponse object?
Code and Logs
The text was updated successfully, but these errors were encountered: