I have a temperature sensor value coming from S7-300 PLC. I get the value in a long decimal format, which does not look good on a dashboard. I would like to round it to 1 decimal, like 23,5 Celsius. I have no Java experience, I tried to googled it, but after a few hours I decided to ask for help. At the moment my node looks like this:
I am planning to use a function to round the value to 1 decimal, like 28,6.
In the function I tried several things, without success. My latest attempt looks like the following:
Can somebody give me a good example how to do that from the beggining untill the end?I did not find any good solution. In which tab should I write it? On start or Message?
My other problem is that at the moment the Gauge shows nothing: 0.