Micrium

µC/Modbus Overview

Introduction

µC/Modbus is a Modbus Slave (i.e. server) software module that provides the capability to make your embedded system communicate to a Modbus Master (i.e. client).

µC/Modbus is written in C and is highly portable. µC/Modbus supports both ASCII and RTU protocols and, RS-232C and RS-485.

µC/Modbus allows you to read or write integer, floating-point (assuming the Daniels Extensions) and discrete values from/to your target system.

Features and Benefits


MULTIPLE CHANNELS
µC/Modbus allows you to have multiple serial interfaces (channel) on a single target system.

RS-232C or RS-485
µC/Modbus allows you to have multiple RS-232C or RS-485 ports on the same target.

ASCII and RTU
µC/Modbus supports both Modbus ASCII and RTU on an individual channel basis.

APPLICATION DATA
µC/Modbus allows you to assign just about ANY application variable to any Modbus holding register, input register, coil (discrete output) or input status (discrete input).

MODBUS REGISTERS
Read and Write from/to up to 65536 16-bit Integer or Floating-Point Holding Registers.

Read from up to 65536 16-bit Integer or Floating-Point Input Registers.

Read and Write from/to up to 65536 Coils.

Read from up to 65536 Input Status.

MEMORY REQUIREMENTS
The amount of code space required by µC/Modbus depends upon which function codes are included required and varies between 6 and 15 kBytes.

The amount of data space (RAM) depends on the number of Modbus channels. Each channel requires about 1 kBytes.

DEVELOPMENT ENVIRONMENT
µC/Modbus is written in portable ANSI-C and thus, µC/Modbus can be used with most 8-, 16-, 32- and even 64-bit CPUs or DSPs. A C++ compiler is not required but can be used and thus, can be used in C++ based applications.

RTOS SUPPORT
µC/Modbus requires the presence of an RTOS but can be adapted to just about any commercial or in-house RTOS. µC/Modbus includes interface code to work with µC/OS-II.

SUPPORTED FUNCTION CODES

Function Code
Description
1
Coil Read
2
Discrete Input Read
3
Holding Register Read
4
Input Register Read
5
Write Single Coil
6
Write Single Holding Register
8
Diagnostic Loopback
15
Write Multiple Coils
16
Write Multiple Holding Registers
20
File Read
21
File Write