This project implements a Modbus RTU Master for the Arduino microcontroller. The code is packaged as an Arduino library, complete with example sketches.
The Playground wiki has been updated to include the above link. Code has been tested on a Phoenix Contact nanoLC controller.
The following Modbus functions have been implemented:
- 0x01 - Read Coils
- 0x02 - Read Discrete Inputs
- 0x05 - Write Single Coil
0x0F - Write Multiple Coils
0x03 - Read Holding Registers
0x04 - Read Input Registers
0x06 - Write Single Register
0x10 - Write Multiple Registers
0x16 - Mask Write Register
0x17 - Read Write Multiple Registers
Feedback is welcome.
Project inspired by Arduino Modbus Master http://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-master.