Skip to content

annabadsi/modbus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modbus RTU (RS-485) and TCP example

Setup

  • Download pymodbus and dependencies
    • sudo pip install -U pymodbus[twisted]
    • sudo apt-get install build-essential libssl-dev libffi-dev python-dev
    • sudo pip install bcrypt
    • pip install service_identity
  • start each (modbus-master and modbus-slave) on one Raspberry PI with RS-485 adapter
  • the modbus-slave has to be connected to an LED
  • to turn the LED on and off via modbus browse on your laptop the webserver which were started by the modbus-master

Setup RTU

  • a 120 ohm resistor must be connected to each of the RS-485 adapter
  • the Raspberry PI UARTs may need to be configured, see documentation, if so then restart afterwards

Setup TCP

  • both Raspberry PI must be connected with the same network
  • to allow Port 22 use sudo ufw allow 22 and reboot

Structure

structure1

structure2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published