Skip to content

Modbus SDK

This SDK is intended to be used by those who are familiar with and prefer to use Modbus to build and deploy an application to the HCC2. However, the application is not as integrated into the HCC2's runtime environment as those developed with REST API.

Additional Components

  • Integrated Development Environment (IDE). Use your favorite IDE. The choice may depend on the programming language selected for building the application. For the purpose of this document, Visual Studio Code (vscode) is the IDE.

  • Data Simulator. For testing purposes, a data simulator is advised. Simulation allows you to verify the application before deploying it to the HCC2 hardware. The SDK protocol deployed in version 1.0 of the SDK is Modbus. Any free or commercially available custom Modbus solution may be used as a simulation source during the testing phase of development.

You may install these components on a standard, development-grade laptop or computer (refer to the Development Environment section for the recommended specification). Although these components may be installed under Windows, Sensia recommends creating a virtual machine (using the selected virtualization application) running Linux-based OS. Ubuntu 22.04 is preferred, but any major standard Linux distro may be used.

Hardware

It is advisable to have an HCC2 device that is properly configured to be the final target for application development.

Libraries

For developing a new application, the SDK requires a set of libraries and packages, which vary depending on the programming language selected. For C# and Python, we recommend installing these libraries:

Python

C#

  • Microsoft.Extensions.Configuration, 6.0.0
  • Microsoft.Extensions.DependencyInjection, 6.0.0
  • Microsoft.Extensions.Hosting, 6.0.0
  • Newtonsoft.Json, 13.0.3
  • NModbus, 3.0.81
  • Serilog, 3.1.1

Install these libraries into the IDE of choice using recommended installation procedures. In the case of vscode, you can use the nuget command or install the libraries through Extensions.