Studienprojekte

Projekte sind ein essenzieller Bestandteil des Curriculums von Mobile Computing. Die Studierenden bekommen die Möglichkeit, das im Zuge ihres Studiums erworbene theoretische Wissen selbst praktisch umzusetzen. Ein sowohl für Studierende als auch für Lehrende immer wieder spannendes Unterrichtskonzept, in dem schon erfolgreiche Startups wie z.B. runtastic und Butleroy ihre Anfänge gefunden haben.

Power Energy Logger 103

Zeitraum
Oct 2018 - Feb 2019
FH Studierende
Bernadette Theuretzbachner
FH BetreuerIn
Dipl.-Ing. Armin Veichtlbauer

Ziel

The basic purpose of the project was to use and work with the PEL-103 Power and Energy Logger, which is a device that measures single-phase, two-phase and three-phase currents and voltage, amongst other things, in order to optimize energy efficiency. It is able to record sessions, but unable to export data in real time. The device can be accessed by a Modbus interface.

This project focuses on accessing the data measured by the device right as it is measured and export it to a database, where it can be saved. It should be possible to work with that data, so it can be used for “real time” tasks that require live data input. (As opposed to a recorded period of time, that has to be concluded before the data can be used.)

Umsetzung

At first, there was the idea of using already existing Modbus software or an existing Java library to communicate with the device; the only challenge in that case would have been to address the correct registers within the internal storage. For a number of reasons that was an impractical idea. Existing free software was limited in many ways. It also did not allow to formulate Modbus requests exactly so the device could interpret them, since it turned out that the Modbus version used by the PEL 103 was somewhat specific.

Therefore, the decision was made to write a completely new Modbus client that would function as the master in the slave / master-relationship that is inherent for any working Modbus protocol. The PEL device would have a slave role in any case. The decision to connect the device via Ethernet cable or WLAN and not use the serial connection was made, because the device has its own IP address and can also use DHCP to get an IP address dynamically if connected to a network. The device uses UDP and is capable of receiving and sending data packets, which is how the Java client corresponds with it.

Thus a Java program was written that sent a simple request to the device and get the device to respond. Once that was done, the answer was deconstructed and interpreted. Then the program was refined to be able to send specific requests by addressing only registers that contained relevant information. Modbus protocol saves data in tables consisting of registers of one words; to access it the exact register has to be included in the request that is sent to the device. The program sends out request at an interval that can be defined by the user and saves the received data to a database. It keeps on going until it is stopped, even if the device is disconnected. The reason for that is that UDP is used and since it is not as reliable as TCP, there is always the possibility of a temporary connection failure that has to be considered. The data can be accessed via an Excel file in real time; Excel obtains the values from the database and updates every time the source data changes.