Gå til hovedinnhold
Hopp til hovedinnhold

Jan Thomas Olsen

Jan Thomas Olsen
Fakultet for teknologi og realfag
15. desember 2017

Development of a Central Communication and Control Interface in the Norwegian Motion Laboratory

The Norwegian Motion Laboratory consists of several different machines and computers, with this extent of different equipment introduces a challenge to interact and control each subsystem simultaneously. It is therefore desired to develop a common control and monitoring interface for the related equipment. This will enable the Motion-Lab to be a more efficiently research platform, and reduces the time spend on fundamental engineering tasks, both for the industry and students working on their respective project.

The Norwegian Motion Laboratory (Motion-Lab), located in the Mechatronics Laboratory at the University of Agder (UiA), focus towards extending and improving methods and solutions related to offshore motion compensation. The Motion-Lab is funded by UiA, NORCOWE and the Research Council of Norway. The motion-lab facility is open for researchers, students and external partners for performing experiments and measurements.

The main equipment of the Motion-Lab are the two Stewart Platforms, used to simulate two floating vessels exposed to stochastic wave motions. An industrial robot is installed on top of the large Stewart Platform, responsible for simulation of load handling. In addition, the Motion-Lab is equipped with multiple sensors and trackers used for motion measurements. The Motion-Lab infrastructure is unique and serve as great research facility. Several successful experiments have already been conducted in the lab [1-3].


The Motion-lab consists of several different machines and computers, with this extent of different equipment introduces a challenge to interact and control each subsystem simultaneously. It is therefore desired to develop a common control and monitoring interface for the related equipment. This will enable the Motion-Lab to be a more efficiently research platform, and reduces the time spend on fundamental engineering tasks, both for the industry and students working on their respective project.

Project Objective

One of the active projects using the Motion-lab facility is the Ph.D. project of Sondre Sanden Tørdal. Considerable amount of the Ph.D. project is dominated by experimental work, and a considerable amount of time has already been spent on setup and integration of different equipment and machines. It is therefore decided to hire a Mechatronics master student, as a student research assistant, to assist in documentation and further development of the central communication and control interface.

The project was divided into the following tasks:

  • Get familiar with the Norwegian Motion Laboratory and the available equipment. Establish and document an overview of the current communication interface for the installed equipment.
  • Develop a real-time communication platform, to enable an effective interaction and control of the Motion-Lab.
  • Design and develop a human machine interface (HMI) for the central control access unit of the Motion-Lab.
  • Test and validate the developed functionality of the HMI.

Motion-Laboratory Setup

The Norwegian Motion Laboratory [4] consists of two Stewart Platforms (E-Motion 8000 and E-Motion 1500), an industrial robot (COMAU Smart 5 NJ 110-3.0), which is installed on top of the larger platform. There is also installed two Motion Reference Units (MRU), a laser tracker (Leica AT960), and a motion capture system (Qualisys Oqus 700+). Much of the mentioned equipment, except the motion capture system, is connected either directly or indirectly to an embedded PC/PLC (Beckhoff CX 2040), which works as a central control unit.

The two Stewart Platforms allows for simulation of vessels exposed to wave motion in 6 degrees of freedom (DOF). The industrial robot mounted in top of the E-Motion 8000, can be manipulated to simulate load handling (6-DOF). Thereby, combining these capabilities with the external sensor equipment such as the MRU's and the laser tracker, the Motion-Lab can serve as a facility for research and development of Vessel-to-Vessel Motion Compensation (VVMC).

Control Unit

The main control unit (Beckhoff CX 2040) is a combination of an embedded PC and a hardware PLC. The control unit is running a Windows 7 Embedded based operating system (OS), and with the TwinCAT automation software a real-time runtime (XAR) can run in parallel. This feature guarantees real-time control and monitoring of the connected equipment. The TwinCAT software is also available as an extension to Microsoft Visual Studio (XAE), which acts as an development platform. This allows programs to be developed on the Host computer (standard Windows based operating system) and to be uploaded on the control unit.

During real-time runtime, data can be transmitted and received from the control unit via an ADS router. In other words, the control unit runs a real-time kernel and the development computer (non real-time) can interact with the control unit via the ADS protocol. The Beckhoff PLC is equipped with a total of 6 analog and digital I/O modules: two analog output modules, two analog input modules, one digital output module, and one digital input module.

Stewart Platforms

The largest Stewart Platform, Bosch Rexroth E-Motion 8000 (EM 8000) has a payload capacity of 8000 [kg] and is controlled by a motion computer. For the experiments conducted in the Motion-Lab, the EM 8000 is most often used to simulate the main vessel, with the industrial robot mounted on top.

The smaller of the two Stewart Platforms is a Bosch Rexroth E-Motion 1500 (EM 1500). This platform is controlled by a second motion computer. The EM 1500, has a payload capacity of 1500 [kg] and actuator stroke of 650 [mm]. For the Vessel-to-Vessel experiments, the EM 1500 is most often used to represent the secondary vessel.

Industrial Robot

To mimic a crane or other handling equipment, an industrial robot of type Comau Smart 5 NJ 110-3.0 is installed on top of the EM 8000. The robot arm has a maximum wrist load capacity of 110 [kg] and a horizontal reach of 2980 [mm]. An independent computer running Linux, is responsible for the interaction with the Comau robot. 

Sensors and Tracking Equipment

To track of the motion of the actuated equipment, several sensors are installed at the Motion-Lab. All of which are connected to the industrial control unit (Beckhoff PLC).

Motion Reference Unit

One motion reference unit (MRU) is installed on each of the Stewart Platform, this feature enables 6-DOF measuring and tracking of the motion for each platform.

Laser Tracker

Leica Absolute Tracker AT960, is a laser tracker which can perform real-time 6-DOF probing and measurements. The laser tracker has an accuracy of +\- 15 [micro m] + 6 [micro m / m] and a measuring range up to 160[m].

Motion-Capture System

A full motion-capture system is installed in the Motion-Lab, consisting of 17 Qqus 700+ cameras. This gives a full coverage of the laboratory's working volume. The data captured from the cameras are logged by the Qualisys motion capture system, which runs on an independent computer.


A part of this project is to get an overview of the current communication interface for the equipment installed in the Motion-Lab. The full laboratory consists of multiple computers responsible for interaction with the equipment, where the main control unit is an embedded industrial PC/PLC (Beckhoff PLC). A total of 6 computers are currently installed in the Motion-Lab:

  • Two motion PC's, each connected to one of the Stewart Platforms.
  • Linux based platform computer, responsible for interaction with the industrial Comau robot.
  • The central control unit, Beckhoff CX 2040.
  • Host PC, used as the user interface and development platform.
  • Motion capture computer, connected to the Qualisys motion capture system

All the presented PC’s are connected to a KVM switch, except the Beckhoff PC/PLC (which is controlled by a remote desktop connection). The KVM switch allows for control of all the installed PC’s from the master keyboard.

Communication Protocols

The central control unit (Beckhoff CX 2040) runs a real-time kernel, and User Datagram Protocol (UDP) is implemented as communication protocol to interaction with the connected equipment. This feature ensures almost a real-time connection, but is not deterministic. UDP does not feature buffering and are therefore more suitable, than other communication protocols (e.g. TCP/IP) when it comes to transfer of data streams continuously. Development of the PLC is conducted on the host computer, and uploaded to run as a standalone program on the control unit. TwinCat's ADS protocol is implemented for control signals and data logging between the control unit and the developed user interface.

Control Interface

The main task of this project was to design and develop a common interface for the equipment installed in the Motion-Lab. Such an user interface will enable more efficient use of the lab in the means of system control and monitoring. It was decided to develop the human machine interface on the development computer, which is the machine directly connected to the industrial control unit. It was also of desire to develop the interface with the possibility to be exported to any computer as an executable program.

The central control unit (Beckhoff CX 2040) is assigned to be the main controller of the equipment in the Motion-Lab, which are connected via Ethernet or EtherCAT. The embedded PC is equipped with TwinCAT automation software, which enables the embedded PC to run as a standalone real-time control system, programmable with C++ and Structured Text (ST).

Much of the structure of the program responsible for interaction with the Motion-Lab equipment have already been developed. This includes the logic for control and monitoring of the Stewart Platforms and the industrial robot. Meaning command calls for control signals and feedback signals are already implemented and available via the ADS communication protocol. The available commands are mapped to structures for transmitting and receiving signals to and from the related equipment. The next step is to develop a common central control interface, which can handle this command logic to easily and effective interact with the Motion-Lab.

Human Machine Interface

It was decided to design and develop a human machine interface (HMI) to act as a common control interaction with the Motion-Lab. Python has been used throughout this project as the programming language for the HMI development. Python is a widely used high-level programming language, which supports a large number of community based libraries. For this project the following main libraries have been implemented:

  • PyQt5: Python bindings for the Qt platform, used for the design and development of the graphical user interface (GUI).
  • PyQtGraph: Scientific graphics and plotting GUI library which provides functionality for engineering and science applications.
  • pyads: Python wrapper for TwinCAT ADS library, provides functionality for communication with TwinCAT devices (Beckhoff).
  • NumPy: Fundamental package for scientific computing with Python.

The HMI is developed using Qt Designer, which is a tool for building graphical user interfaces, it uses windows and dialogues to compose and configure the GUI. The user interface for the Motion-Lab is designed with tabs, interactive buttons, plots and displays. These graphical widgets are assigned appropriate names, which are callable by the PyQt5 library in python. 

Interaction with the Motion-Lab equipment are performed by the related HMI buttons. These objects have been attached to the related functionality in the python program, which uses the pyads library to send command signals to the central control unit. The python program also receives data via the ADS, which is used for monitoring processes such as updating the plots, displays and indicators.

A real-time dynamic positioning simulator for each of the Stewart Platforms is implemented to one of the main tabs of the HMI. Within this feature, the user has the possibility to select from two different ocean wave spectrums; Pierson-Moskowitz Spectrum and JONSWAP Spectrum. The spectrum requires input values of significant wave height and wave time periods.

The developed user interface is a prototype, were validations test of the HMI functionality are performed with satisfactory results. The resulting common control and monitoring interface can be used as a platform for further development, allowing for easy implementation of additional features and functionality. A successful test is also conducted regarding the possibility for an executable program, which will enable the HMI to run on as a standalone program. However, since the interface is under development, this feature is not currently available.

Project Outcomes

The time spent on the project in the Norwegian Motion Laboratory has given a strong insight in the infrastructure and available equipment. The Motion-Lab consists of several interactive computers, which are either directly or indirectly connected. During the aspect of getting familiar with the current communication interfaces, it was clearly seen how a common central communication and control interface could improve the efficiency and interaction with the Motion-Lab facility. The project has been conducted as a collaboration between the student research assistant and the supervisor, where GitHub has proven to be a great tool for version control and management of the developed source code.

To easily introduce new personnel and students to the Motion-Lab, it was desired to document the infrastructure in the form of a manual-guide and source code. A decision landed on using Read the Docs, a web-based documentation service which can easily be connected to GitHub repositories. The documentation of the Motion-Lab is still in development, and needs further work before becoming a complete guideline tool for the Motion-Lab.

In this project, an overview of the current communication interface has been created. This required a thorough study of the Motion-Lab infrastructure, and how each computer interacted with the full system. IP addresses, communication protocols and a full network topology has been derived for the available equipment. The derived schematic has shown itself to be crucial for development of the common control and monitoring interface.

The main part of this project was to develop a common control and monitoring interface. This required a general communication platform for the embedded PC, which was assign responsibility of direct communication with the connected equipment. A development of a HMI has been conducted, this allows for control of the equipment through a graphical user interface. Control signals and monitoring signals are sent between the development computer and the PLC. This configuration enables the PLC to run as a real-time system, and allows the user to analyze the data without interfering the communication configuration.

Throughout the development of the control interface, Python was used as a programming platform. The project gave a broad experience working with object oriented programming and open source libraries. As the program evolved with features and functionality, the importance of code structure and management became clear. Validation and testing of the interface configuration was of high importance during the process of development. For this project a prototype of the HMI has been designed, and can be used as a platform for further development. The configuration provides for easy implementation and extension of additional features and functionality.

The opportunity to work as a student research assistant in the Norwegian Motion Laboratory has provided the student with a broad experience in the field of mechatronics engineering. The project gave an insight in the infrastructure of Motion-Lab, and proved to be a valuable platform for both independent and collaborative learning. The project resulted in a proposal for a Master-Project, for which the student will conduct over period of the spring, 2018.


  • [1] S. S. Tørdal and G. Hovland, "Relative vessel motion tracking using sensor fusion, aruco markers,
    and mru sensors" 2017.
  • [2] S. S. Tordal, P.-O. Løvsland, and G. Hovland "Testing of wireless sensor performance in vessel-tovessel
    motion compensation", in Industrial Electronics Society, IECON 2016-42nd Annual Con-
    ference of the IEEE. IEEE, 2016, pp. 654-659.
  • [3] S. S. Tørdal, G. Hovland, and I. Tyapin, "Efficient implementation of inverse kinematics on a
    6-dof industrial robot using conformal geometric algebra", Advances in Applied Cli ord Algebras,
    vol. 27, no. 3, pp. 2067-2082, 2017.
  • [4] Norwegian Motion Laboratory, motion-lab