Chapter 108. MODBUS overview

Table of Contents

108.1. Introduction

108.1. Introduction

eCosPro-MODBUS is eCosCentric's commercial name for the CYGPKG_MODBUS package. The CYGPKG_MODBUS package implements a MODBUS server and a ModbusTCP transport layer, and provides an API to enable applications to implement the actual hardware interaction as required.

The implementation is based on the following documents available from the MODBUS website:

  • “MODBUS Application Protocol Specification V1.1b3”
  • “MODBUS Messaging on TCP/IP Implementation Guide V1.0b”

Familiarity with MODBUS, and ModbusTCP, and the relevant specifications is assumed in the following eCosPro-MODBUS specific documentation.

The MODBUS package features:

  • MODBUS server

    Generic MODBUS request processing. This parses MODBUS function code requests, passing validated requests to the relevant backend handler function as appropriate.

  • ModbusTCP transport

    TCP/IP (Ethernet) transaction support. This accepts ModbusTCP client requests, passing valid requests to the MODBUS server for processing.

  • Example applications

For MODBUS server applications the user-supplied code registers a backend driver, which will implement the actual hardware operations as defined by the supported MODBUS function codes.

The backend interface is transport agnostic. MODBUS over serial or TCP share the same PDU format structure within requests, with the transport layer wrapping requests and responses as appropriate for the medium being used:

ModbusTCP       | MBAP Header | FuncCode | Data…. |
MODBUS Serial       | Address | FuncCode | Data…. | Checksum |
                              \                     /

The CYGPKG_MODBUS package currently only implements a ModbusTCP transport layer. There is no MODBUS client API, or serial (MODBUS-RTU, MODBUS-ASCII) transport support.