Solutions

Free Modbus RTU Source Code Download - ProtoCessor

ProtoCessor's free Modbus RTU Source Code is what you need to help your Modbus industrial automation protocol get to work!

  • Are you designing an industrial or building automation controller that requires Modbus RTU?
  • Do your customers ask for Modbus RTU protocol support?
  • Did you know that Modbus RTU is the most popular Industrial Automation protocol in the world?
  • Did you know that implementing Modbus RTU on your embedded systems will provide the greatest connectivity?

If the answer to any of the above is yes, then this Modbus RTU source code download is a good place to start. Download the source code by filling out the information below. This code is written for a PIC18f2431 chip, but it can easily be adapted for other CPUs. The steps required to have a functioning Modbus RTU server device are:

  • Compile our Free Modbus RTU Source Code using the Microchip C18 compiler
  • Using the Microchip ICD2 debugger module, download the resulting binary image to a PIC18F2431 on the Microchip PICDEM2 Plus evaluation board
  • Fire up a working Modbus RTU server (slave).
  • Use our Modbus Simulator to test the communications with your controller.

Free Modbus Source Code Download

To download the Modbus source code, please complete the following form and submit. We are asking for your name and email address not only to provide you with the password to unlock the code, but also to keep you informed of any updates and changes to this code. We will never sell your email address or give it away.

Frequently Asked Questions

What is this code good for?

Modbus is by far the most popular industrial automation protocol in use today. It is relatively easy to implement. Any engineer considering what protocol to support for a new industrial control product cannot go wrong by implementing Modbus RTU in the default base product. Of course, there are good alternative protocols such as EtherNet/IP (for process automation), BACnet MS/TP and BACnet/IP (for building automation), but these protocols are much harder to implement and support, and also tend to be based on Ethernet rather than RS-232 or RS-485. If you are interested in our products or learning more about solutions for these other protocols, please visit our ProtoCessor Solutions webpage showing protocol solutions.

Why does FieldServer Technologies provide this free Modbus RTU source code?

There are already numerous places to obtain free Modbus RTU source code. The protocol specification is in the public domain (PAS at modbus.org/tech.php) and we at FieldServer Technologies cannot add much value to the protocol itself. However, our ProtoCessor family of protocol coprocessors has an option to support Modbus RTU as the Host Protocol to act as the link between the ProtoCessor and the Host CPU. It follows that some of our customers need the Modbus RTU source code in order to implement Modbus RTU on their system. In such cases, we would rather that they implement our tested and supported Modbus code which we are familiar with, than some other third party's code.

Visit FieldServer's Modbus Gateway page for more information.

What tools are available for testing?

A Modbus RTU Simulator is available that will run on a Windows PC and act as a Modbus RTU client (master). Full instructions are provided with the download.

Please contact Chipkin for more information

What Modbus RTU data objects are supported?

As coded, this Modbus RTU server will provide data in four Modbus memory map groups or data types. Each data type will provide 20 points or values. The number of points can be changed easily by modifying the source code, but the data types are set in the Modbus protocol specification.

The Modbus RTU Memory Map

As defined, this Modbus RTU standard provides data in four Modbus memory map groups or data types.

Modbus RTU Data Type Common name Starting address
  Modbus Coils Bits, binary values, flags 00001  
  Digital Inputs Binary inputs 10001  
  Analog Inputs Analog inputs 30001  
  Modbus Registers Analog values, variables 40001  

Do you support Modbus TCP or Modbus TCP/IP ?

Our family of ProtoCessors will enable your device to support Modbus TCP or Modbus TCP/IP. The ProtoCessor also provides the required Ethernet interface necessary for Modbus TCP or Modbus TCP/IP support. In addition, once the “ProtoCessor socket” has been added to your design, there are other ProtoCessor modules that will support many other protocols. This will immediately increase the market for your product, and we highly recommend that you investigate this approach. Click the following link for a full list of ProtoCessor supported protocols.

FieldServer Technologies does not provide technical support for the free Modbus RTU source code download.

Contact Us

1991 Tarob Court
Milpitas, CA 95035
408 964 4433

800 317 8319
sales@protocessor.com