Saturday, April 13, 2013

Apasih MODBUS itu ?

About Modbus

Modbus is a serial communications protocol published by Modicon in 1979 for use with its programmable logic controllers (PLCs). It has become a de facto standard communications protocol in industry, and is now the most commonly available means of connecting industrial electronic devices.[1] The main reasons for the extensive use of Modbus over other communications protocols are:

1. It is openly published and royalty-free
2. Relatively easy industrial network to deploy
3. It moves raw bits or words without placing many restrictions on vendors

Modbus allows for communication between many devices connected to the same network, for example a system that measures temperature and humidity and communicates the results to a computer. Modbus is often used to connect a supervisory computer with a remote terminal unit (RTU) in supervisory control and data acquisition (SCADA) systems.

Suppliers large and small, system integrators, end users, open source developers, educators and other interested parties can become Modbus organization members. Some of the prominent members are SoftDEL Systems, Precision Digital Corporation, Motor Protection Electronics, FieldServer Technologies and many more

Each device intended to communicate using Modbus is given a unique address. In serial and MB+ networks only the node assigned as the Master may initiate a command, but on Ethernet, any device can send out a Modbus command, although usually only one master device does so. A Modbus command contains the Modbus address of the device it is intended for. Only the intended device will act on the command, even though other devices might receive it (an exception is specific broadcastable commands sent to node 0 which are acted on but not acknowledged). All Modbus commands contain checking information, ensuring that a command arrives undamaged. The basic Modbus commands can instruct an RTU to change a value in one of its registers, control or read an I/O port, as well as commanding the device to send back one or more values contained in its registers.

Communication and devices

There are many modems and gateways that support Modbus, as it is a very simple protocol and often copied. Some of them were specifically designed for this protocol. Different implementations use wireline, wireless communication and even SMS or GPRS. Typical problems the designers have to overcome include high latency and timing problems.

Supported Function Codes

Modbus function codes / data types includes the following types [3] Most commonly used are given in italics.

  • 01 Read Coil Status
  • 02 Read Input Status
  • 03 Read Holding Registers
  • 04 Read Input Registers
  • 05 Force Single Coil
  • 06 Preset Single Register
  • 07 Read Exception Status
  • 08 Diagnostics
  • 09 Program 484
  • 10 Poll 484
  • 11 Fetch Communication Event Counter
  • 12 Fetch Communication Event Log
  • 13 Program Controller
  • 14 Poll Controller
  • 15 Force Multiple Coils
  • 16 Preset Multiple Registers
  • 17 Report Slave ID
  • 18 Program 884/M84
  • 19 Reset Comm. Link
  • 20 Read General Reference
  • 21 Write General Reference
  • 22 Mask Write 4X Register
  • 23 Read/Write 4X Registers
  • 24 Read FIFO Queue


Almost all implementations have variations from the official standard. Different varieties might not communicate correctly between equipment of different suppliers. Some of the most common variations are:

Data types
  1. Floating point IEEE
  2. 32-bit integer
  3. 8-bit data
  4. Mixed data types
  5. Bit fields in integers
  6. Multipliers to change data to/from integer. 10, 100, 1000, 256 ...
Protocol extensions
  • 16-bit slave addresses
  • 32-bit data size (1 address = 32 bits of data returned.)
  • Word swapped data

The following links to third party sites will let you leave this site. The linked sites are not under the control of the Modbus Organization and we are not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. We provide these links to you as a convenience only, and the inclusion of any link does not imply endorsement of the site by the Modbus Organization or imply approval of any content, recommendation or application information found on that site. So there.

  • ModLink
    ModLink is a set of native VCL components that allows you to integrate the ability of communication via Modbus protocol over a variety of networks into your applications created using Borland Delphi. For the extensive list of all currently supported features please refer to that site.
  • MBServer - Free ActiveX Modbus Master
    Mbserver is FREEWARE an out-process ActiveX automation server intended to communicate with PLCs or other industrial equipment that use Modbus (RTU/ASCII) protocol or Modbus TCP protocol.
  • LibModbus - Linux dynamic library
    A Modbus library for Linux, Mac OS X, FreeBSD, QNX and Win32 A free software library to send/receive data according to the Modbus protocol. This library is written in C and supports RTU (serial) and TCP (Ethernet) communications. The license of libmodbus is LGPL v3 and the licence of programs in the tests directory is GPL v3.
  • Jamod - Java Modbus implementation
    Java Modbus Library. This library was implemented by Dieter Wimberger.
  • Paul McCrae - code examples
    Example C, VB and Visual C++ code for Linux Modbus RTU communication.
  • MODBUS Serial RTU Simulator
    Modbus serial RTU simulator. Compiles with Visual C++ 6.0, and runs on Windows 2000 and probably 95/98.
  • Modpoll Modbus Polling Tool
    The FieldTalk(tm) utility modpoll is a command line based Modbus master simulator and test utility. modpoll runs on Linux kernel 2.2.0 or later, QNX RTOS 6.0.0 or later, QNX 4.23A and QNX TCP/IP 4.22 or later and Win32. Other platforms on request.
  • Modbus RTU and TCP ActiveX controls
    ActiveX control that provides a way to communicate with Modbus/RTU slave devices connected to the PC's serial port.
  • Triangle MicroWorks' Communication Protocol Test Harness
    Triangle MicroWorks' Communication Protocol Test Harness is a Windows(tm) application that acts like a typical Master or Slave Device. It can be configured through a graphical user interface (GUI) and Tcl/Tk scripts to provide automated testing or simulation of your device. Tcl/Tk scripts are available to perform the conformance test procedures published by the technical committees of each protocol. Triangle MicroWorks is Modbus Organization member. The company also provides communication protocol software libraries, protocol gateways, and OPC drivers for industry-standard communication protocols such as Modbus, DNP3 and IEC 60870-5.
  • Modicon SA85 Linux kernel driver
    This is a Linux kernel (2.2.19+, 2.4.7+) driver for both the Modicon ISA SA85 and PCI-85 cards. It is licensed under the BSD license. It includes source for the driver and an example client.
  • "Modbus Poll" for Windows 95/98/ME/2000/XP
    A shareware program, "Modbus Poll" for Windows 95/98/ME/2000/XP, is designed primarily to help developers of Modbus slave devices or others that want to test an instrumentation device. With the multiple document interface you can monitor several Modbus slaves and/or data areas at the same time.
  • Modbus Master and Slave ActiveX Controls
    ActiveX Controls for Modbus Master and Slave communications via Modbus/TCP, RTU, ASCII, and Plus. Powerful, fully-functioning HMI example application and source code are included with free trial version. No nag screens, hourly runtime limits, etc. You can completely develop and test your application(s) using the trial version, then switch to purchased verion without requiring a code modification. After 30 days, the ActiveX Controls stop communicating and return a result indicating that trial has expired. Trial period can be extended by calling Automated Solutions (+1 707-575-9631).
  • Modbus Master OPC Server
    Modbus Master OPC Server provides communications via Modbus/TCP, RTU, and ASCII. OPC Data Access 2.05a Compliance tested. Fully functioning trial version available for download. No nag screens, hourly runtime limits, etc. You can completely develop and test your application(s) using the trial version, then switch to purchased verion without requiring a code modification. After 30 days, OPC Server pops up a dialog indicating that trial period has expired and has several options for purchase (phone, online, etc.) Trial period can be extended by calling Automated Solutions (+1 707-575-9631).
  • FreeModbus
    Portable Modbus ASCII/RTU implementation for microcontrollers. Ports exist for AVR, ARM7 and Coldfire processors. The license is LGPL (permits commercial usage) for the stack and GPL for the demo applications.
  • NModbus
    NModbus is a C# 2.0 implementation of the Modbus protocol. It provides connectivity to Modbus slave compatible devices and applications. Supports serial ASCII, serial RTU, and TCP/IP protocols. Bugs can be submitted through the project's Issue tracker.
  • Modbus Constructor
    Modbus Constructor is a solution for testing and setting up the Modbus devices. Evaluation copies are available for free download. Modbus Constructor comes with a special utility, Modbus Reader, which operates using the model created with Modbus Constructor to interact with your device. Modbus Reader is a freeware program.
  • MODBUS applications for the Mac OS X operating system
    ModBusProbe has been developed by Matthew Butch of Volitans Software and Rudy Boonstra of R Engineering Inc. to provide one of the necessary tools to use the Apple Mac OS X platform for industrial control. Additionally, the framework ModBusKit was released to encourage further software development.
  • MBServer
    MBServer is a collection of programs and libraries offering both client and server Modbus TCP functionality. This includes both stand-alone servers and clients, as well as command line utilities and libraries which may be incorporated in your own application. The software is compatible with both Linux and MS-Windows and is licensed under the GPL as Free Software.
  • Free Modbus Simulator
    Modbus RTU and TCP/IP simulator intended as a master-tester and for users commissioning HMI/SCADA applications. Well featured, emulates multiple slaves at once; C++ sources available.
  • PHP library for Modbus UDP Master
    This is an implementation of the basic functionality of the Modbus UDP based protocol using PHP. Implemented features include UDP Modbus master, FC3, FC16, FC23.
  • ModbusPal
    ModbusPal is an on-going Java project to create a realistic Modbus slave simulator. Register values are generated dynamically thanks to predefined math functions and/or Python scripts. In the future releases, ModbusPal will improve its support of Modbus standards and offer more automation mechanisms. ModbusPal relies on RxTx for Serial communication, and Jython for script support.
  • Modbus Test Kit
    Modbus Tesk Kit is an implementation of the modbus protocol in Python and supports Modbus RTU and TCP for writing masters and slaves. It makes the development of modbus-capable applications as easy as possible thanks to Python. (The Python language is very flexible and easy to learn and to use.)
  • Modbus4J
    A high-performance and easy-to-use implementation of the Modbus protocol written in Java by Serotonin Software. Supports ASCII, RTU, TCP, and UDP transports as slave or master, automatic request partitioning, response data type parsing, and node scanning.
  • Mango M2M
    Mango is browser-based, Ajax-enabled M2M software that enables users to access and control electronic sensors, devices, and machines over multiple protocols (including Modbus) simultaneously. Easy to download and install on many platforms, Mango provides an interface with which diverse data sources can be created and configured while providing downstream management of user access, alerts, data logging, and automation.
  • Wireshark
    Wireshark® is a popular network protocol analyzer. It has a powerful feature set and runs on most computing platforms including Windows, OS X, Linux, and UNIX. It is freely available as open source, and is released under the GNU General Public License version 2.
  • Arduino Library for Communicating with Modbus Slaves
    This is an Arduino library for communicating with Modbus slaves over RS232/485 (via RTU protocol). 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
  • Open-source Modbus Library in C#
    Open-source Modbus library (master/slave) for Modbus ASCII, Modbus RTU, Modbus TCP, and Modbus UDP. Written in C#, the code library is designed for implementation in .NET projects.
  • Open Source ModbusTCP Library for Delphi
    A set of Delphi components to communicate with a Modbus PLC over TCP/IP. The library provides components to implement both a Modbus master and a Modbus slave, and is based on the Indy component set (both Indy 9 and 10 are supported).
  • RModBus
    RModbus is a free Ruby implementation of the Modbus protocol. It supports Modbus RTU and Modbus TCP as master or slave. For the extensive list of all currently supported features please refer to the web site.
  • Ananas - Win32/64 Modbus TCP Server - Client
    Modbus/TCP -diagnostic tool for Windows, equipped with loads of useful functionalities. This mighty fruit will not only capture your heart but also Modbus data traffic with interpretive logger.
  • Modbus TCP, RTU, and ASCII Master Drivers for .NET 
    Automated Solutions ASComm.NET is a fully-managed .NET component that delivers communications connectivity between .NET applications and a broad range of industrial devices/protocols including Modbus TCP, RTU, ASCII. ASComm.NET also supports Ethernet communications with A-B Logix Family, PLC5, SLC500, MicroLogix, and GE SRTP compatible controllers. ASComm.NET supports advanced features such as visual design (can be configured programmatically or visually), background scanning of data items at specified rates, data change and error events, and serialization. Free 30-day, fully-functioning trial available for download.
  • CAS Modbus RTU Parser
    Analyze Modbus Messages. Type in a string of hex bytes and the parser will break the message out for you showing you destination, function, data.
  • CAS Modbus Explorer
    Attempts to connect to RTU devices using various permutations of Baud, Data and Stop and data point until it makes a connection for you.
  • WinModbus
    WinModbus is a Windows Modbus Slave simulator supporting Modbus RTU and TCP, Serial and Network transport. Designed to be simple, elegant and efficient. Free trial version available for download.
  • Open-source multi-platform Modbus libraries for .Net
    Cet Electronics offers a series of open-source Modbus libraries written in C#. They support RTU (binary only), TCP and UDP, both master and slave. The libraries target .Net Micro Framework, Windows Phone, and standard .Net (incoming). High abstraction for easy pluggability, and extensibility. Multi-threading and C# 5 are supported. Very easy to use.