OPC UA and MQTT control interface for RS 232 scales

The challenge for our client (Hexpol Compounding) was to integrate industrial scales with serial (RS-232) interface into their OPC based control system. Therefore, we developed a solution based on a Raspberry Pi 3 which was connected to the scale via a USB-to-serial cable and provided weighing data via Ethernet to the OPC server and a MQTT broker respectively. Since in that case weights need to be confirmed manually by an operator via a push button, a check function for server connection was implemented as well. As this solution will be applied in different production sites around the globe, the client needed the possibility to define fixed IP addresses and MQTT topics from the GUI.