During the TACR TK04020326 project, I developed middleware designed for use within Hardware-in-the-Loop testbeds, in conjunction with TRNSYS simulations, to streamline heat pump testing. It allows for seamless communication between TRNSYS simulations and ModBus servers, enabling data exchange for both read-write and read-only operations. The middleware functions as a ModBus client, while the PLCs function as ModBus servers. The middleware is built on top of Type 3157.
Location:
CTU UCEEB
Development status:
Trial testing
Repository status:
Private / Internal
Language:
Python
Version control:
Git
The middleware is designed to facilitate data exchange between TRNSYS fortran kernel and multiple PLCs. The whole data exchange is initiated by TRNSYS initiation call. TRNSYS Type 3157 exchanges data with middleware through a nested dictionary leveraging CFFI python package. At the initialization call, the middleware opens all predefined ModBus TCP/IP clients and connects them to PLCs that are operated as standalone ModBus TCP/IP servers. The connection is kept alive till the last simulation call.
This middleware is built upon the groundwork laid by the authors of Type 3157. While I take credit for addressing communication between the middleware and PLCs, it's essential to acknowledge the authors of Type 3157 for resolving data exchange between TRNSYS and Python.