Modbus Source Code Libraries

Modbus is an application layer messaging protocol, positioned at level 7 of the OSI model that provides client/server communication between devices connected on different types of buses or networks. Modbus is a request/reply protocol and offers services specified by function codes. Modbus function codes are elements of Modbus request/reply PDUs.

Triangle MicroWorks’ Software Libraries provide a cost-effective means of supporting industry-standard protocols in your device. Incorporating our  Software Libraries in your products will shorten development time, freeing internal resources to work on company proprietary aspects of your products.

Triangle MicroWorks Software Libraries are available in two formats: .NET Protocol Components for incorporation in Windows .NET-based products, and ANSI-Standard C Source Code Libraries for all other platforms.

For 25 years, Triangle has provided the diagnostic tools and protocol expertise to  our customers to support all their conformance  & certification needs. We will work with you to ensure that your implementation of our source code libraries will pass all industry related certification and conformance testing.

Related Products

What's New

Current Release: v3.25
Release Date:  August 2019

Newest Features in this Release

  • Created an implementation guide for SCLs. 
  • The SCL now supports a common serial configuration structure. 
  • Added event driver support to Windows serial channel. 
  • WinIoTarg now uses the Channel thread to check for received data eliminating the need for a separate CheckForInput thread/class. 
  • Update Linux target layer to use consistent logging technique. 
  • LinIoTarg now creates a thread per channel (when not configured to run in polled mode). Once the channel has been opened, this thread will establish/listen for the channel connection and wait on the data socket for incoming data. This eliminates the latency when polling for received data. Also, locking has been reduced by eliminating the linked list of TCP Channels which required locking each time the list was accessed. 
  • The Linux target layer has been updated to provide a basis for porting a target layer to another OS: 

• The dependency on threads has been removed.
• The Linux target layer will conditionally support poll and select. The Linux target layer will default to use epoll/poll which is more efficient than select and correctly handles file descriptors greater than 1024. However, select will continue to be supported by using a conditional such that it can be tested with Linux and provide a port example for OS's that only support select.
• A tmwtargcnfg.h file has been added to both the Linux and Windows target layer. This configuration file defines which features a given target layer supports. This will allow customers porting the Linux target layer to other OS's to easily identify code that may be unnecessary for their application and remove it instead of wasting time porting it. Target layer features currently defined in this file are:
1. RS232
2. TCP
3. UDP (Only required for DNP)
4. TLS
5. EPOLL

  • In addition, SampleIoTarg has been created. This Sample target layer is a target layer example that can be compiled and linked with the wintoolkit C example programs that has no OS dependencies. It can be used as a baseline target layer to port the library to another OS or RTOS.  It can be built by specifying 
    build=sample from the Linux command line.

Key Additions to Recent Releases

v3.24

  • Made improvements to target layer timer examples. 

  • Implemented event driven receive data in winiotarg so channels don’t have to be polled.  This is also available in liniotarg. 

  • Updated the Linux target layer, replaced LINIOCNFG_EVENT_DRIVEN conditional with polledMode configuration.  

  • Support for epoll has been added to the Linux target layer.  This support is controlled by the preprocessor conditional LINIOTARG_SUPPORT_EPOLL.  If this is not defined, select is used.  The select option has been left in place so we continue to have an example that can be ported to OS’s that do not support epoll. 

  • Include files to allow SCL customers to generate Windows project files for different versions of Visual Studio. 

  • Support for 64-bit versions of the .NET Protocol Components has been added. 

  • Added configuration for the generation of diagnostic messages per sector, session, and channel to allow maximum flexibility.  Maximum performance can be achieved by configuring each mask to zero so no diagnostic messages are generated, thus no messages would be forwarded to the .NET code.  This also would allow a user to enable diagnostic messages on a single sector, session, etc. in a large configuration on a problem connection and avoid having to filter out diagnostic messages from all other connections. 

  • Updated database wrapper header files and removed the /clr flag from the modbusManaged and utilsManaged projects. 

v3.23

  • Added support for TLS v1.2 in target layer
  • Included support for 64 bit builds in the example project and solution files provided for Visual Studio
  • Improved management of Transaction IDs by Master when responses are severely delayed
v3.22
  • Improved performance of database interface and other library functions
  • Restructured directories and sample code for Windows® and Linux® target layer libraries
  • Added support for IPv6 in Linux target layer (Modbus TCP)
  • Expanded Windows target layer support for resolving IP address from destination host name
  • Updated Linux sample makefiles to generate debug information by default
v3.20 
  • Allow compile time choice of using either standard or Microsoft “safe” string functions that include the length of the buffer to be written to (ie strcpy or strcpy_s)
  • Added more checking to discard improperly formatted messages
v3.21
  • Improved Linux makefiles and Windows® solution and project files
v3.20 
  • Allow compile time choice of using either standard or Microsoft “safe” string functions that include the length of the buffer to be written to (ie strcpy or strcpy_s)
  • Added more checking to discard improperly formatted messages
v3.19 - allow use of either UNICODE or MBCS character set
v3.18 - Support for C99 standard types for 16 bit and 32 bit types
v3.16 - Corrected GNU-Wall compiler warnings
v3.09 - Modifications to conform to new Modbus certification tests.
v3.07 - Added sample Linux and Windows target implementation.
v3.01.01 - Added ability to keep time on a per-session basis.
v3.00.35 - Added memory alignment support.
v3.00.32 - Added support for multiple threads.
v3.00.25 - Added ability for Master to queue commands.


 

 TMWLogo

 
Quick Links  Contact Us:
Home
Products
Videos
Training
Support
Reference
About Us

Triangle MicroWorks, Inc.
Sales: +1 919.870.5101
Support: +1 919.781.1931
Fax: +1 919.870.6692
sales@TriangleMicroWorks.com
support@TriangleMicroWorks.com

Follow us on YouTube Follow us on Facebook Visit us on LinkedIn Follow us on Twitter

 
Copyright © 2013-2019 Triangle MicroWorks, Inc. All Rights Reserved