Giter Club home page Giter Club logo

pylibmodbus's Introduction

GitHub Statistics Top Languages

pylibmodbus's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pylibmodbus's Issues

ImportError: cannot import name 'ModbusRtu'

Tried this on a raspberry PI using the RS485 Shield V3 - Raspberry Pi
Already configured the UART pins to disable serial login prompt and to enable the serial hardware.
My code is below:

from pylibmodbus import ModbusRtu

modbus = ModbusRtu(baud=9600)
response = modbus.read_registers(0,1)

print(response)

This is the error I get:

Traceback (most recent call last):
  File "libmodbus.py", line 1, in <module>
    from pylibmodbus import ModbusRtu
ImportError: cannot import name 'ModbusRtu'

report a bug about errno

I'm sorry for my English.
When I use pylibmodbus in rtc mode,crc16 checksum was failed,fetch errno still is 0.
I know this is cffi bug.

problem to connect with modbus_tcp

Hi Stephane,

i wrote some simple code to read the power value from a energy measurement device via modbus tcp.
The code worked fine until I used it again today. The device is available and can be polled with other modbus clients. Somehow the connection is refused with Errno 115.
Have there been any changes on the library or do you have an idea what might be the problem?

Thanks for your help!
Jan

from pylibmodbus import modbus_tcp
client = modbus_tcp.ModbusTcp('10.15.2.1', 502)
client.connect()
client.set_slave(2)
ans = client.read_input_registers(19026, 2)
num = struct.unpack('>f', struct.pack('>HH', ans[0], ans[1]))[0]
client.close()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.