Sapia
Incorporated Modbus Software Components for Developers |
Any container application that can embed ActiveX controls can use SMTX. At design time, you can access your Modbus device from SMTX's test property page. This makes start-up and troubleshooting a snap, all without writing a single line of code! To further get you going quickly, SMTX also includes extensive online HTML help files with detailed examples for Excel, Visual Basic and Visual C++. SMTX conforms to all of the Class 1 and Class 2 commands—plus a few additional ones—as specified in the Open Modbus/TCP Specification.
A powerful set of properties and methods are provided for configuring SMTX and for talking to slave devices at run-time. Talking to a Modbus/TCP slave is as simple as calling a function with the necessary arguments. SMTX automatically builds the command, prepends the header, sends the command over the network, and receives and validates the response. Your program just reads and writes simple 16-bit data values. The example fragments below show just how easy it is to read the first ten holding registers from slave device 5.
Visual Basic
Dim
iVal As Integer
' place to catch word data
Dim
nHrData(10) As Integer
' holding register data
Dim
e As Integer
' last error number
' Note: SMTX1 below is an instance of the SMTX control placed
' on the form that this code belongs to
' Read first ten holding registers from slave 5
iVal = SMTX1.MbReadHoldingRegs(5, 0, 10, nHrData(0))
e = SMTX1.LastErrorNumber ' get last error code
Visual C++
int
nStatus;
// return status
short
nReg[ 10 ];
// holding register buffer
// Note: m_pSMTXCtrl below points to a SMTX object that has been
created
// and initialized
// Read first ten holding registers from slave 5
nStatus = (SMTX_STATUS_TYPE)m_pSMTXCtrl->MbReadHoldingRegs( 5, 0, 10, &nReg[ 0 ] );
SMTX provides property pages for configuration and testing at design time.
Properties serve as variables for configuring the communications
parameters of your Modbus/TCP server.
Like most ActiveX controls, SMTX’s properties can be set at
design-time from the Server property page or programmatically set at
run-time by the application program.
The figure below shows the Server property page and the
communications properties that it contains.
SMTX Properties Page
The Test page provides access to slave devices at design time. This is convenient for testing out your network hardware and slave devices before writing any code. All of the communications methods can be exercised from the Test page.
SMTX Test Page
Supported Modbus Commands (decimal) | 01 – Read Coil Status (0x references) |
02 – Read Input Status (1x references) | |
03 – Read Holding Register(s) (4x references) | |
04 – Read Input Register(s) (3x references) | |
05 – Force Single Coil (0x references) | |
06 – Preset Single Register (4x references) | |
07 – Read Exception Status | |
15 – Force Multiple Coils (0x references) | |
16 – Preset Multiple Registers (4x references) | |
17 – Report Slave ID |
The SMTX Demo is a complete operating ActiveX 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* |
---|---|---|
SMTX-CD |
Modbus/TCP ActiveX Control, Single Development Site License (on CD-ROM) |
$110 |
SMTX-OL |
Modbus/TCP ActiveX Control, Single Development Site License (on-line delivery) |
$90 |
* 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 SMTX 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. When SMTX is used in a Microsoft Excel, Word, PowerPoint or other non-compiling end-user application program where full development capabilities are always present, a separate license file must be purchased and installed on each computer that the end-user application program is installed and running on. Please see the EULA included with the demo for complete licensing information.