User defined units in mappView - NumericOutput

I have an HW input UINT that represents tenths of mm. This means for example the input is 115 (UINT) and physical value in NumericOutput should be 11,5 mm. The unit system in mappView knows mm as MMT from http://www.opcfoundation.org/UA/units/un/cefact. I defined according AS help my own user unit called 1/10 millimetre.

When I use 1/10 millimetre as an Engineering unit in OpcUaMap.uad file, I got in NumericOutput XX mm. Binding is on node and units are MMT.

In logger is error:

There is an problem with conversion from my own unit to mm unit. But I do not know why. What is wrong?

Thank you for the support.

Maybe compare your configuration with configuration in this post. User unit in mappView

Example of configuration:

  • user unit

  • engineering unit

  • numeric output

  • and the result (right value in variable, left recalculation to mm)

image

I made the same setting you have presented. But I have still XX in NumericOutputs.

image

There is the warning in logger:

image

I use AS 4.12.5.95. My AR is AR C4.93. It runs on X20CP0483.

Here is my SW setting.

I still do not know where the problem is.

Thank you.

UserUnitTest.zip (99.3 KB) sample project in AS4.12.8 and using MV5.24. Tested wtih MV5.21.0 as well and no problem. Hoping my sample will help, otherwise share with me your code (only user unit and simple task please).

Hello!
I don’t want to question your approach, but wouldn’t it be better to use micrometers, or write decimal numbers using the REAL data type? I think that would look better!

Hello,

the mappView system offers OPC UA. This technology can carry units information. It can save to spend new REAL variable in PLC. Why I should to create new variable, if there is system posibility to display the number in correct way? I did it as a temporary solution. But I would like to know, how to use this future.

Agree with you. There is no need to use REAL. Have you reviewed my sample? Is it working for you now? If not, please share with me your reduced project (only variable and unit configuration) and I will check it for you. I’m sure it is something small. Using units in AS is quite simple.

This project works. Thank you. However, I still do not know why at my project is the problem.

This issue is being worked on in the local B&R office. We’ll post a solution here.

1 Like

The issue was the -2144326067 warning in the logger. There were two *.units files with the same Namespace.

There are two options to solve it:

1 Like