My problem is that I receive integers via OPC UA and I would like to display these integers with a decimal part in MappView.

Example: I receive the position 156964 and I would like to display 1569.64.

Is there a trick for this?

My problem is that I receive integers via OPC UA and I would like to display these integers with a decimal part in MappView.

Example: I receive the position 156964 and I would like to display 1569.64.

Is there a trick for this?

HI Romain,

you could use unit conversion.

How it works is descriped in here:

B&R Online Help (br-automation.com)

Define an own unit for your output and assign it to the NumericOutput widget.

Don’t forget to use NodeBinding.

2 Likes

Hi Simon,

Thank you very much for your response!

Unfortunately, this solution does not work. I tried to implement it this afternoon. I can subtract 10 from my variable by setting 10 for the variable n, but I must admit that I don’t quite understand. Which formula is used? The normal or the inverted one? ^^

In my case, I want to divide by 10, but none of the attempts were successful. For your information, the OPC UA variables come from a SIEMENS PLC that I have declared in OpcUaServer.

And if I understand correctly, this method will only work for a display, right? Because I also have numeric inputs to process. I need to type 15.6 on the keyboard, and the OPC UA value should be equal to 156.

Thank you for your time.

Salut Romain,

first of all you have to define a unit translation:

I used some fake units. You can also define your own units.

In next step you have to set input unit to your OpcUa value. I did this in Automation Studio. Don’t know how to do this for Siemens OpcUaServer:

Last step is to do a node binding in mappView and select right output unit and translation formula:

As result I got this:

Maybe there is a possibility to do this without any (fake) units. But I don’t know how to do this.

Hope, this is a solution for you and also works with Siemens OpcUaServer.

6 Likes