oru.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard1
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
A compositional implementation of Modbus in Protege
Örebro University, School of Science and Technology.
2011 (English)In: 6th IEEE International Symposium on Industrial Embedded Systems (SIES), 2011, IEEE conference proceedings, 2011, p. 123-131Conference paper, Published paper (Refereed)
Abstract [en]

This is a case study for Protege. The language is used to produce a radically modular implementation of the Modbus [Mod06a] protocol for industrial process controllers. We show that Protege is an excellent tool to produce customized subset implementations, a commonly used technique to reduce software size and complexity in small industrial controller units.

Modbus is one of the most widely used network protocols in industrial automation applications, and a typical example of an industrial protocol with rich functionality, relatively simple data structures, and several communication layer variants in practical use. The original ModbusSerial uses legacy serial communication protocol standards (RS232 or RS485) for communication between Fieldbus-enabled equipments, e.g. micro-controllers and PLCs within an industrial controller network. ModbusTCP is a more recent Modbus variant that oers Modbus messaging services over TCP/IP networks, to connect modern devices like intelligent sensors or advanced PLCs to a Modbus network.

As already described in Sections 4.1 and 4.3, Modbus divides into several specification and implementation documents [Mod06a, Mod06c, Mod06b]. The core functionality of Modbus is given as the Modbus application protocol [Mod06a], which is independent of the underlying communication layer variants and specifes a large number of relatively simple functions to read and manipulate device state. Separate specications for the communication layer [Mod06b, Mod06c] describe how the Modbus application messaging service should inter-operate with the seria

l line or the TCP/IP stack, respectively resulting in either ModbusSerial or ModbusTCP.

Good maintainability, modularity and code reuse are key features for quick time-to-market, and especially attractive properties in the area of industrial protocols, characterised by long-lived standards and ongoing integration work. In our paper, we show the advantages of our compilation-based DSL approach Protege. We exemplify how to systematically decompose industrial protocols like Modbus, and propose a modular Modbus implementation concept which not only separates the communiation layer as in the specification, but also decomposes Modbus application protocol functionality into separate modules. A Modbus protocol implementation can be decomposed into the two underlying communication layer variants and a number of application layer functions. These application layer functionalities can be seen as independent modules of an entire application layer, acting as small sub-protocols of their own and sharing only the common communication infrastructure below. Furthermore, every protocol in the picture splits into a client and a server part, which operate on the same packet layouts as sender and receiver.

The compilation-based Protege approach provides the necessary setting to reflect this multi-level modularity faithfully in the code. By defining each function code as a separate (sub-)protocol of its own, they can be freely combined to custom implementations tailored towards small controller devices with limited functionality. In addition, the compilation-based high-level approach of Protege enables code reuse for the packet processing code. Parsing (receiver) and marshaling code (sender) are generated from the same Protege source code, imported into the client and server modules. And from the separation of runtime system features for Protege, our implementation gains a large degree of platform-independence; Modbus can thus be integrated in various platforms with specialized embedded operating systems.

In total, our case study implementing Modbus demonstrates that Protege increases flexibility in several aspects and thereby considerably reduces implementation cost. New customized Modbus implementations can be produced very quickly using our approach, which makes integration and maintenance much easier and results in drastically reduced time-to-market, a key feature. for success especially in the industrial setting.

Place, publisher, year, edition, pages
IEEE conference proceedings, 2011. p. 123-131
National Category
Engineering and Technology Computer Sciences
Research subject
Computer and Systems Science
Identifiers
URN: urn:nbn:se:oru:diva-15280DOI: 10.1109/SIES.2011.5953654ISBN: 978-1-61284-818-1 (print)OAI: oai:DiVA.org:oru-15280DiVA, id: diva2:410992
Conference
6th IEEE International Symposium on Industrial Embedded Systems (SIES 2011), June 15th - 17th, 2011, Västerås, Sweden
Available from: 2011-04-15 Created: 2011-04-15 Last updated: 2018-01-12Bibliographically approved
In thesis
1. A domain-specific language for protocol stack implementation in embedded systems
Open this publication in new window or tab >>A domain-specific language for protocol stack implementation in embedded systems
2011 (English)Doctoral thesis, comprehensive summary (Other academic)
Abstract [en]

Embedded network software has become increasingly interesting for both research and business as more and more networked embedded systems emerge. Well-known infrastructure protocol stacks are reimplemented on new embedded hardware and software architectures. New requirements of modern applications and devices require to implement newly designed or revised protocols. However, implementing protocol stacks for embedded systems remains a time-consuming and error-prone task due to the complexity and performancecritical nature of network software. It is even more so when targeting resource constrained embedded systems: implementations have to minimize energy consumption, memory usage etc., while programming efficiency is needed to improve on time-to-market, scalability, maintainability and product evolution. Therefore, it is worth researching on how to make protocol stack implementations for embedded systems both easier and more likely to be correct within the resource limits.

In the work presented in this thesis, we take a language-based approach and aim to facilitate the implementation of protocol stacks while realizing performance demands and being aware of energy consumption and memory usage within the constraints imposed by embedded systems. We give background on DSL implementation techniques, investigate common practices in network protocol development to determine the potential of domain-specifi languages (DSLs) for embedded network software, and propose a domain-specifi embedded language (DSEL), Protege (Protocol Implementation Generator), for declaratively describing overlaid protocol stacks. In Protege, a high-level packet specification is dually compiled into an internal data representation for protocol logic implementation, and packet processing methods which are then integrated into the dataflow framework of a protocol overlay specification. Constructs for finite state machines allow to specify protocol logic in a concise manner, close to the protocol specification style. Protege specifications are compiled to highly portable C code for various architectures.

Four attached scientific papers report our main results in more detail: an embedded implementation of the data description calculus in Haskell, a compilation framework for generating packet processing code with overlays, the domain-specific language Protege in overview (including embedding techniques and runtime system features), and a real-world case study implementing an industrial application protocol.

Place, publisher, year, edition, pages
Örebro: Örebro universitet, 2011. p. 63
Series
Örebro Studies in Technology, ISSN 1650-8580 ; 49
National Category
Engineering and Technology Computer Sciences
Research subject
Computer and Systems Science
Identifiers
urn:nbn:se:oru:diva-15249 (URN)978-91-7668-795-6 (ISBN)
Public defence
2011-06-08, Högskolan i Halmstad, Wigforssalen, Halmstad, 10:15 (English)
Opponent
Supervisors
Note
Dimiter Driankov is the Director of Applied Autonomous Sensor Systems center (AASS), Örebro UniversityAvailable from: 2011-04-13 Created: 2011-04-13 Last updated: 2018-01-12Bibliographically approved

Open Access in DiVA

No full text in DiVA

Other links

Publisher's full text

Authority records BETA

Wang, Yan

Search in DiVA

By author/editor
Wang, Yan
By organisation
School of Science and Technology
Engineering and TechnologyComputer Sciences

Search outside of DiVA

GoogleGoogle Scholar

doi
isbn
urn-nbn

Altmetric score

doi
isbn
urn-nbn
Total: 77 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard1
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf