Hart Software and Embedded Systems Development
Hart Software and Embedded Systems Development

Abstraction of an Embedded HART Protocol Application

The example shows a way to make the embedded code reusable and platform independent. HART is used for the communication and the Windows terminal as display.

The following shows how the code from the example application is further realized.

The main execution program The main execution program

The outputs and inputs are made via a console. Behind this is access to the Windows terminal. The applied methods are defined in the CVConsole class.

The access of the console output is implemented as a class The access of the console output is implemented as a class

For example, the function Init looks like this.

The implementation of the console class is Windows specific The implementation of the console class is Windows specific

The realization here still looks relatively abstract for the most part, but it already accesses certain functions of the console API. A look at the ClearSteadyDisplay() function shows how further refinements are being made.

The further refinements are very specific The further refinements are very specific

This function 'paints' the background and the border of the white display area and is not quite as trivial as the two higher levels. But the function is self-contained and therefore easier to understand.

The console display The console display

The integration of the HART protocol communication software is designed similarly to the integration of the console. The basis here is the HartTools DLL together with the header file BaHartDrv76.h. The class with the access functions is declared as follows.

The interface of the HART implementation The interface of the HART implementation

The functions of this class then access the interface of the DLL.

Finally the Hart DLL is accessed Finally the Hart DLL is accessed

I think it would go beyond the scope to go into more detail here. This example will be available in HartTools 7.6 (Developer) in the summer (this Year, by the way). Then you are welcome to inspect and test it in detail.

Incidentally, the HartTools themselves proved to be very useful in the development of this example. In addition to a real device, I used the slave integrated into the FrameAlyst to run tests.

The slave simulation is visible in the FrameAlyst The slave simulation is visible in the FrameAlyst
Druckversion | Sitemap
Copyright © 1998-2023 Walter Borst. All Rights Reserved.