The Silent Room is where the largest amount of TIA engineering takes place. With testing kits and customer equipment lingering around, TIA Team decided that a better, more efficient way of working, needs to be implemented. Not only for testing but also for demonstration purposes. After a brainstorming session, the idea was born. Let us introduce – The TIA Smart Wall!

TIA Wall Components

TIA wall consists of several regular CPUs and one failsafe CPU, a managed switch and a regular switch, and a remote IO station. Furthermore, the remote IO station consists of analog inputs and outputs and a SIWAREX WP321 with a loadcell simulator. We connected an RTD input to a PT1000 and a 4-20 mA to a temperature transmitter.

TIA Wall CoNet

Figure 1 – TIA Smart Wall!

Temperature Monitoring and Siemens Library

As a team, we wanted to monitor the temperature in the Silent Room and store that information in a MindSphere database directly from an S7-1500 CPU. After research, a standard library from Siemens that uses the MQTT (Message Queuing Telemetry Transport) protocol was found to communicate with the MindConnect IoT Extension app from MindSphere.

Moreover, within this library, a function block is available which connects to a broker. MQTT broker is a server that receives all messages from the clients and routes them to the appropriate client destination. The S7-1500 CPU is a client that can publish a topic with data towards the MindConnect IoT Extension app which acts as a broker. The LMindConn_MQTT is the function block in charge and it handles everything – publish messages towards a topic and subscribe to a topic to receive the messages. See Figure 2 – LMindConn_MQTT function block. Finally, in the backend, it is done with the standard Open User Communication blocks of an S7-1500 CPU.

LMindConn_MQTT function block

Figure 2 – LMindConn_MQTT function block

MQTT Datastring

Siemens manuals tend to explain everything beautifully, however, with the exception of how to actually connect to a broker and how to handle potential faults. Therefore, after some digging through the code and half a night of debugging we finally made it work! The connection started to work, the topic was published, and the values were updated.

The connection can be non-encrypted and encrypted; for the Silent Room temperature logging, an encrypted connection is used. The two temperature values are sent to the broker every 5 seconds which is done by sending a WSTRING with the right MQTT specification. That specific string is created by a function called the MindSphereDataStringCollector and looks like Figure 3 – MQTT data string.

MQTT data string

Figure 3 – MQTT data string

The MQTT Datastring, created by the MindSphereDataStringCollector function, can consist of 50 data points, and the string can be configured in a separate DB that is connected to the function.

Datapoints configuration DB

Figure 4 – datapoints configuration DB

With the datapoint configuration in place, we only have cyclically to call the DataStringCollector, but only when we have a connection with MindSphere, to ensure we update the temperature values. Figure 5 – Call of the MindSphereDataStringCollector shows the call of the function.

Call of the MindSphereDataStringCollector

Figure 5 – Call of the MindSphereDataStringCollector

TIA CoNet Library Demo

Finally, with the connection in place and a periodic message send time of 5 seconds we get great insights about the temperature in the Silent Room.

MindSphere temperature measurements

Figure 6 – MindSphere temperature measurements

In the future, we would like to add all the data from the TIA CoNet Library Demo project to MindSphere to have a general use-case to present. See Figure 7 – TIA CoNet Library Demo WinCC Screen for an indication.

TIA CoNet Library Demo WinCC Screen

Figure 7 – TIA CoNet Library Demo WinCC Screen