Skip to content

Very simple modbus RTU library and sample application in Python

License

Notifications You must be signed in to change notification settings

cagprog/ModbusMaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Very Easy Modbus Master

This project is easy modbus library and sample application. Developed and tested in linux system with USB-RS485 converter. For windows some small modification may be required.

In linux following line may be required to enable USB serial port:

sudo chmod a+rw /dev/ttyUSBx

You have to have installed required modules shown in *.py files. To run codes place following files into same directory:

  • modbusmaslib.py (Modbus RTU library)
  • modbusMaster.py (Modbus RTU sample application)
  • pk.py (Graphical user interface)

Then type:

python modbusMaster.py

In linux ,if there is more than one USB serial port, the same phsycal USB port may have different name (sometimes ttyUSB0 ,sometimes ttyUSB1).So code has been written to select serial port by its physical location.

in modbusMaster.py default_serial_port_loc variables defines serial port location. If default_serial_port_loc is not representing a valid location, serial port location will be asked on graphical interface.

About

Very simple modbus RTU library and sample application in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages