This is example code to run modbus RTU using python with minimalmodbus or pymodbus libraries
conda create -n modbus_env python=3.7 pip
pip install -r requirement.txt
pyserial
minimialmobdus
pymodbus
numpy
- Using minimalmodbus library
python modbus_min.py
- Using pymodbus library
python modbus_py.py