Giter Site home page Giter Site logo

modbus's Introduction

Modbus Protocol

Copyright (c) 2016 - 2017 Keith Cullen

Test Applications

To test the PDU library

$ cd test_mb_pdu

$ make

$ ./test_mb_pdu

To test the RTU ADU library

$ cd test_mb_rtu_adu

$ make

$ ./test_mb_rtu_adu

To test the TCP ADU library

$ cd test_mb_tcp_adu

$ make

$ ./test_mb_tcp_adu

To test the IP authentication library

$ cd test_mb_ip_auth

$ make

$ ./test_mb_ip_auth

To test the RTU master/slave

$ socat -d -d pty,raw,echo=0 pty,raw,echo=0

(In a different terminal)

$ cd test_mb_rtu_slave

$ make

$ ./test_mb_rtu_slave /dev/pts/2

(In a different terminal)

$ cd test_mb_rtu_master

$ make

$ ./test_mb_rtu_master /dev/pts/3

To test the TCP client/server

$ cd test_mb_tcp_server

$ make

$ ./test_mb_tcp_server

(In a different terminal)

$ cd test_mb_tcp_client

$ make

$ ./test_mb_tcp_client

Supported Protocol Versions

Protocol Version Supported
Modbus TCP yes
Modbus RTU yes
Modbus ASCII no

Supported Function Codes

Function Code Supported
(0x01) Read Coils yes
(0x02) Read Discrete Inputs yes
(0x03) Read Holding Registers yes
(0x04) Read Input Registers yes
(0x05) Write Single Coil yes
(0x06) Write Single Register yes
(0x07) Read Exception Status (Serial Line Only) yes
(0x08) Diagnostics (Serial Line Only) yes
(0x0b) Get Comm Event Counter (Serial Line Only) yes
(0x0c) Get Comm Event Log (Serial Line Only) yes
(0x0f) Write Multiple Coils yes
(0x10) Write Multiple Registers yes
(0x11) Report Server ID (Serial Line Only) yes
(0x14) Read File Record yes
(0x15) Write File Record yes
(0x16) Mask Write Register yes
(0x17) Read/Write Multiple Registers yes
(0x18) Read FIFO Queue yes
(0x2b) Encapsulated Interface Transport yes

Validation History

v0.1

BeagleBone Black

Debian 9.1

Linux beaglebone 4.4.88-ti-r125 #1 SMP Thu Sep 21 19:23:24 UTC 2017 armv7l GNU/Linux

HP Pavilion

Ubuntu 16.04

Linux HighCreekLinux 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

modbus's People

Contributors

keith-cullen avatar

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.