MpComUnit FB missing in MpCom library — How to implement MpComUnit conversion in MappView NumericInput widget

I am trying to implement metric to imperial unit conversion in my MappView HMI application. When operator selects Imperial from MeasurementSystemSelector widget, all length values should convert from mm to inch with correct converted values (e.g. 100mm should display as 3.937 inch, not 100 inch).
What I Have Configured

1. OPC UA Engineering Unit

  • Variable: ::HSVis:strVisSetVal.strFormat.rLengthMM
  • Engineering Unit: millimetre, Unit ID: 5066068

2. UnitSystem Translation formula

  • Input: millimetre (5066068)
  • Output: inch (4804168)
  • Formula: m × Input + n, m=0.03937, n=0.0

3. Config_11.mpcomunit (MpLink: gGroup)

  • Datapoint 1 → variable mapped
  • Metric → MMT, Translation: empty
  • Imperial → INH, Translation: UnitTranslation
  • ImperialUS → INH, Translation: UnitTranslation

4. MappView NumericInput widget

value : opcUa()::HSVis:strVisSetVal.strFormat.rLengthMM
unit  : {'metric':'MMT','imperial':'INH','imperial-us':'INH'}

5. MeasurementSystemSelector widget

selectedValue binding: opcUa()::AsGlobalPV:gMeasurementSystem


The Problem

When I search for MpComUnit FB and MpComUnitConfig data type in my project, they do not exist in my MpCom library.

My MpCom.fun only contains:

  • MpComConfigManager
  • MpComLoggerUI
  • MpComLink
  • MpComLinkToParent
  • MpComDump
  • MpComGetLink

MpComUnit and MpComUnitConfig are completely missing.

What I Need to Know

  • Whether MpComUnit FB call is mandatory or optional
  • Which mapp version to update to get MpComUnit
  • Whether widget-level unit property works standalone without MpComUnit
  • Correct binding path for MeasurementSystemSelector

The MpComUnit configuration is purely that, a configuration. It does not have and will never have a function or function block attached to it. The values entered there are purely for mapp Services components like MpAlarmX, MpAudit, MpReport, … to display values in different units, they will always work with the engineering unit.

Please also note that for common units you don’t have to specify a translation (that is only necessary when using “uncommon” units). For mm to in it should not be necessary.

As to why your NumericInput widget does not show any unit (or do the translation), I can only guess (not an expert with widgets)… According to the help, it seems you must do a “Node-Binding” in order for the unit to work, but other than that, I could not find more information. But keep in mind that NumericInput (and similar Widgets) are completely unrelated to MpComUnit. There is no possibility to connect these together.