Sapia Large Logo Sapia Incorporated                       
Modbus Software Components for Developers

Microsoft .NET Logo Image  SMTN Modbus/TCP Master Control

Compatible With

  • Visual Studio 2005, 2008, 2010, 2013 and later
  • Windows XP, Vista, 7, 8 and 10
  • x32 and x64 platforms
  • Assemblies provided for .NET Framework 2.0, 3.5 and 4.0

Supports Standard Modbus Functions

  • 01 - Read Coil Status (0x references)
  • 02 - Read Input Status (1x references)
  • 03 - Read Holding Registers (4x references)
  • 04 - Read Input Registers (3x references)
  • 05 - Force Single Coil (0x references)
  • 06 - Preset Single Registers (4x references)
  • 15 - Force Multiple Coils (0x references)
  • 16 - Preset Multiple Registers (4x references)

Additional Features

  • Send Custom User Request - provides unlimited Modbus functionality
  • Access Raw Request/Response Frames - helpful for troubleshooting
  • Built-in IEEE Single Precision Floating Point Support
  • Visual Indication of Communications - Comm. LED
  • Visual Connection Status
  • Built-in Test Panel - powerful troubleshooting aide
  • Can be used on a form (Visual Programming) or without a form


SMTN is an easy to use Modbus/TCP Master Windows Forms control that provides a fast, convenient way to communicate with Modbus/TCP slave devices connected to your PC's Ethernet network. Within minutes, your VB.NET, C# or Managed C++ application can be talking Modbus/TCP. Talking to a Modbus/TCP slave is as simple as calling a function with the necessary arguments. SMTN automatically builds and sends the request over the network, and receives and validates the response. Your application just operates on simple 16-bit data values representing Modbus registers, coils and discretes.

SMTN can be used on a form as shown below, or optionally without a form.   At design time, you can access your Modbus device from SMTN's built-in Test Panel. This makes start-up and troubleshooting a snap, all without writing a single line of code!  To further get you going quickly, SMTN also includes an extensive HTML help file and example projects for VB.NET, C#.NET and C++.NET.


SMTN on a Form Image

SMTN on a form

A powerful set of properties and methods are provided for configuring SMTN and for talking to slave devices at run-time.  The example fragments below show just how easy it is to read holding registers from a Modbus/TCP slave.

For Modbus devices that use floating point data, SMTN provides RegsToFloat( ) and FloatToRegs( ) conversion methods to handle the job.  These two methods convert two consecutive Input Registers or Holding Registers into a 32-bit, IEEE single precision floating point number, and vice-versa respectively.

SMTN is a real Windows Forms Control that inherits form System.Windows.Forms.UserControl and therefore has all of the usual user control properties and methods in addition to the Modbus specific ones of its own.



The following example demonstrates how to read the values of the first seven holding registers of slave device 2.

Visual Basic

Dim RegData(7) As UShort ' array for receiving holding register values
Dim Status As SMTN.SMTNControl.MB_STATUS  ' variable for receiving return status
Status = SmtnControl1.MbReadHoldingRegs(2, 0, 7, RegData)
   ' MbReadHoldingRegs succeeded.  Process the holding register data.
   ' ....
End If


UInt16[] RegData = new UInt16[7]; // array for receiving holding register values
SMTN.SMTNControl.MB_STATUS Status; // variable for receiving return status
Status = smtnControl1.MbReadHoldingRegs(2, 0, 7, ref RegData); // read HR's
if( Status == SMTN.SMTNControl.MB_STATUS.MB_NO_ERROR )
    // MbReadHoldingRegs succeeded.  Process the holding register data.
    // ....


array<UInt16>^ RegData = gcnew array<UInt16>(7); // array for receiving holding register values
SMTN::SMTNControl::MB_STATUS Status; // variable for receiving return status
Status = smtnControl1->MbReadHoldingRegs(2, 0, 7, RegData);
if( Status == SMTN::SMTNControl::MB_STATUS::MB_NO_ERROR )
    // MbReadHoldingRegs succeeded.  Process the holding register data.
    // ....

SMTN provides a built-in Test Panel for configuration and testing on the development computer or optionally on the run-time computer.  The Test Panel contains four tab pages:  the Properties page, Test page, User Request page and Raw Frames page.  The figure below shows the Properties page and the communications properties that it contains.

SMTN Properties Page

SMTN Properties Page


The Test page provides access to the Modbus network and slave devices on the development computer or optionally on the run-time computer. This is convenient for testing out your network and slave devices before writing any code.  All of the communications methods can be exercised from the Test page. 

SMTN Test Page

SMTN Test Page


The User Request page provides a way to enter a custom user request and to send it to the slave and observe the response.

SMTN User Request Page

SMTN User Request Page


The Raw Frames page displays the request and response raw frames in bytes for the last Modbus/TCP message sent to the slave device.  Viewing the raw frames is very beneficial when troubleshooting communications problems with your slave device or for just understanding how Modbus/TCP messages are constructed.

SMTN Raw Frames Page

SMTN Raw Frames Page


Download SMTN Demo here

The SMTN Demo is a complete operating control that has a 60-minute time limit.  After 60 minutes, communication functions will be disabled.  Re-starting the application will initiate another 60-minute demonstration period.

View SMTN Revision History


Model Description Price*

Modbus/TCP Windows Forms Control for Visual Studio 2005/2008/2010, Single Development Site License (on CD-ROM)


Modbus/TCP Windows Forms Control for Visual Studio 2005/2008/2010, Single Development Site License (on-line delivery)


* Quantity 1 (US$).  For larger quantities, contact Sapia.   Michigan residents please add 6% sales tax.

By purchasing a single development site license you may install SMTN and develop your  application with it on a single PC and distribute it with your compiled application program royalty free an unlimited number of times.  Please see the EULA included with the demo for complete licensing information.