• Libraries
  • Shop
  • Doc
  • Free Modbus
  • Support
  • Login
  • Introduction
  • Chapters
  • Modules
  • Classes

Introduction

Library version 2.6.5

The FieldTalk™ Modbus Master® Library, Java™ Edition provides connectivity to Modbus slave compatible devices and applications.

industrial_modbus.png

Typical applications are Modbus based Supervisory Control and Data Acquisition Systems (SCADA), Modbus data concentrators, Modbus gateways, User Interfaces and Factory Information Systems (FIS). It also helps publishing plant floor data on the web using Java applets and Java servlets.

Features:

  • Robust design suitable for industrial applications
  • Full implementation of Bit Access and 16 Bits Access Function Codes as well as a subset of the most commonly used Diagnostics Function Codes
  • Standard Modbus bit and 16-bit integer data types (coils, discretes & registers)
  • Support for 32-bit integer and float data types, including Daniel/Enron protocol extensions
  • Support for the Extended Lufkin Automation (ELAM) Modbus protocol
  • Configurable word alignment for 32-bit types (big-endian, little-endian)
  • Support of Broadcasting
  • Failure and transmission counters
  • Transmission and connection time-out supervision
  • Detailed transmission and protocol failure reporting with Exception classes
  • Thread-safe implementation to support concurrent programming

Prerequisites

The package is designed for the Java 2 Platform Standard Edition. It is also compatible with the J2ME Foundation and TINI SDK 1.11 platforms.

The standard Java API does not provide any support for serial ports. However serial port support is available in the form of a Java extension, which must be installed and licensed separately to the JDK and JRE. The Communications API is not part of the supply of FieldTalk.

The serial versions of this package are based on the Java Communications API 2.0. This API is a Java extension, implemented in the package javax.comm.

The Java Communication API is available from different sources:

  1. SUN's Java Communications API 2.0 for Windows can be found in the lib sub-directory of this package.
  2. Sun Microsystems is publishing versions for the Solaris and Linux platform at http://java.sun.com/products/javacomm/ .
  3. Keane Jarvi publishes a LGPL licensed Linux and cross-platform COMM API at http://www.rxtx.org/ .
  4. An excellently performing package for a large variety of platforms is the SerialPort package from Solutions Consulting at http://www.serialio.com . Using this package, poll cycles of less than 10 ms can be achieved!
Note:
Without proper installation of a Java Communications API, the serial versions of the FieldTalk package cannot be used!

Library Structure

The library is organised into one class for each Modbus protocol flavour and a common base class, which applies to all Modbus protocol flavours. Because the two serial-line protocols Modbus ASCII and Modbus RTU share some common code, an intermediate base class implements the functions specific to the serial protocols.

master_inherit_diagram.png

The base class MbusMasterFunctions contains all protocol unspecific functions, in particular the data and control functions defined by Modbus. All Modbus protocol flavours inherit from this base class.

The class MbusAsciiMasterProtocol implements the Modbus ASCII protocol, the class MbusRtuMasterProtocol implements the Modbus RTU protocol. The class MbusTcpMasterProtocol implements the MODBUS/TCP protocol. Support for the Extended Lufkin Automation (ELAM) Modbus protocol is realized by the class MbusElamMasterProtocol.

In order to use one of the four Modbus protocols, the desired Modbus protocol flavour class has to be instantiated:

MbusRtuMasterProtocol mbusProtocol = new MbusRtuMasterProtocol();

After a protocol object has been declared and opened, data and control functions can be used:

mbusProtocol.writeSingleRegister(slaveId, startRef, 1234);

FieldTalk Modbus Master Library, Java Edition
Library version 2.6.5
Speak to the Experts
Modbus Organization Member logo

We are member of the Modbus Organization, Inc.

Buy with Confidence
30-day money back guarantee All our FieldTalk web sales are backed by a 30-day Money Back Guarantee.
We Accept
Bank VISA MasterCard PayPal
Customer Info
  • Info & Contact
  • Customer Login
  • Terms of Service
  • Terms of Sale
  • Privacy Policy
© 2005-2025 proconX Pty Ltd. All rights reserved. proconX and FieldTalk are trademarks of proconX Pty Ltd.
All other trademarks and registered trademarks appearing on www.modbusdriver.com are the property of their respective owners.