Sapia
Incorporated Modbus Software Components for Developers |
Compatible With
Supports Standard Modbus Functions
Additional Features
SMRN is an easy to use Modbus/RTU Master Windows Forms control that provides a fast, convenient way to communicate with Modbus/RTU slave devices connected to your PC's serial port. Within minutes, your VB.NET, C# or Managed C++ application can be talking Modbus/RTU. Talking to a Modbus/RTU slave is as simple as calling a function with the necessary arguments. SMRN 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.
SMRN can be used on a form as shown below, or optionally without a form. At design time, you can access your Modbus device from SMRN'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, SMRN also includes an extensive HTML help file and example projects for VB.NET, C#.NET and C++.NET.
SMRN on a form
A powerful set of properties and methods are provided for configuring SMRN 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/RTU slave.
For Modbus devices that use floating point data, SMRN 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.
SMRN 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 SMRN.SMRNControl.MB_STATUS
' variable for receiving return
status
Status = SmrnControl1.MbReadHoldingRegs(2,
0,
7, RegData)
If (Status =
SMRN.SMRNControl.MB_STATUS.MB_NO_ERROR)
Then
' MbReadHoldingRegs succeeded.
Process the holding register data.
' ....
End
If
C#
UInt16[] RegData = new
UInt16[7];
// array for receiving holding
register values
SMRN.SMRNControl.MB_STATUS Status;
// variable for receiving return status
Status = smrnControl1.MbReadHoldingRegs(2,
0,
7,
ref RegData);
// read HR's
if( Status ==
SMRN.SMRNControl.MB_STATUS.MB_NO_ERROR )
{
// MbReadHoldingRegs
succeeded. Process the holding register data.
// ....
}
C++
array<UInt16>^ RegData =
gcnew
array<UInt16>(7);
// array for receiving holding
register values
SMRN::SMRNControl::MB_STATUS Status;
// variable for receiving return status
Status = smrnControl1->MbReadHoldingRegs(2,
0,
7, RegData);
if( Status ==
SMRN::SMRNControl::MB_STATUS::MB_NO_ERROR )
{
// MbReadHoldingRegs
succeeded. Process the holding register data.
// ....
}
SMRN 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 five tab pages: the Properties page, Test page, User Request page,Raw Frames page and Serial I/O page. The figure below shows the Properties page and the communications properties that it contains.
SMRN 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.
SMRN 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.
SMRN User Request Page
The Raw Frames page displays the request and response raw frames in bytes for the last Modbus/RTU 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/RTU messages are constructed.
SMRN Raw Frames Page
The Serial I/O tab contains controls for exercising the low-level serial I/O primitives available for non-Modbus communications.
SMRN Serial I/O Page
The SMRN 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.
Model | Description | Price* |
---|---|---|
SMRN-CD |
Modbus/RTU Windows Forms Control for Visual Studio 2005/2008/2010, Single Development Site License (on CD-ROM) |
$170 |
SMRN-OL |
Modbus/RTU Windows Forms Control for Visual Studio 2005/2008/2010, Single Development Site License (on-line delivery) |
$150 |
* 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 SMRN 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.