Node Bind Missing Units

Hello,

I am developing in mappView 6.7.0 and I’m running into an issue getting units to show up for node-bound numeric inputs. I didn’t run into this issue when doing previous work with 4.12.

Here are some code snippets that I hope will help diagnose:

The widget is pretty basic:

<Widget xsi:type="widgets.brease.NumericInput" id="NmiCard0Field0" top="98" left="10" width="122" height="32" zIndex="3" unitAlign="right" value="3000" borderWidth="2px" backColor="rgba(238, 241, 244, 1)" borderColor="rgba(197, 205, 214, 1)" textColor="rgba(12, 35, 64, 1)" textAlign="left" fontSize="14px" unitFontSize="12px" padding="0px 12px 0px 12px" />

Binding is through a list, using a session variable as the index and with the list and target being designated “node”:

<Binding mode="twoWay">
	<Source xsi:type="listElement">
		<Selector xsi:type="session" refId="RobIndex" attribute="value" />
		<be:List xmlns:be="http://www.br-automation.com/iat2015/bindingListEmbedded/engineering/v2" xsi:type="be:opcUa" attribute="node" >				
			<bt:Element index="0" refId="::AsGlobalPV:gRobots[1].Param.SpeedTune.ProductSpeed" />
			<bt:Element index="1" refId="::AsGlobalPV:gRobots[2].Param.SpeedTune.ProductSpeed" />
		</be:List>
	</Source>
	<Target xsi:type="brease" contentRefId="ConTuneRobSpeedTune" widgetRefId="NmiCard0Field0" attribute="node" />
</Binding>

And things in the *.uad mapping seem correct (I’ll cut out a bunch for brevity):

<EURangesAliases>
 <EURanges Id="1">
    <EURange>
      <Low ValueProvider="Const">1</Low>
      <High ValueProvider="PV">::Globals.Limits.MaxLinVel[1]</High>
    </EURange>
  </EURanges>
</EURangesAliases>
<EngineeringUnitAliases>
      <EngineeringUnit Id="1" UnitId="4403510" NameSpaceUri="http://www.opcfoundation.org/UA/units/un/cefact" Name="millimetre per second" Symbol="mm/s" />
 </EngineeringUnitAliases>
[...]            
<Variable Name="SpeedTune">
  <Variable Name="ProductSpeed" EURangesId="1" EngineeringUnitId="1" />
</Variable>

Everything seems correct to me.

What does work:

  • List Bind (I can change between the two values)
  • Min/Max values as determined by the EuRange
  • Write permissions as determined by OpcUa role

What doesn’t work:

  • Units

Thanks in advance for any help! I hope I’m just missing something obvious.
As a sanity check, I did downgrade to mappview 6.6 (as I saw a few posts while looking about regressions, but no change in the behavior for this).

Hi Jonathan,

what version of the OpcUa C/S are you running? There are several post about the latest version having some strange behavior. I, myself just downgraded OpcUa from 6.7.0 to 6.5.0 because I was seeing things that did not work anymore in the mappFramework project.

Hey Jonathan, additionally to Marcel’s suggestion, can you please try binding the NumericInput directly to one of the two nodes in your List Binding? So delete the List Binding and instead just bind directly to the node “::AsGlobalPV:gRobots[1].Param.SpeedTune.ProductSpeed”, for example. If this works, this would confirm that the connection to the OPC UA nodes and engineering units seems to be ok, but that there may be some issue in how the List Binding is being processed.

Also, please make sure that showUnit is set to its default value of true in the properties of the NumericInput widget.

I was on OpcUa C/S 6.7.0, but downgraded to 6.5.0 with no change.

Before I posted this, I did try without the Link Binding. There was no change in behavior.

As you say, showUnit is defaulted to true and there are no other styles applied to this widget. I explicitly set it to true in the XML as well to test, and there’s no change in behavior.

You are missing your desired display unit in the widget configuration. Example below, easy to set via the graphical editor.

unit="{'metric':'CEL','imperial':'FAH','imperial-us':'FAH'}"

Automation Help: Units and limits

Hi Jonathan,

Unfortunately, it is not possible to directly display the unit configured in OPC UA within mappView.

As @tommi.piiparinen says, the unit must be specified on the widget.

The unit defined in OPC UA is used only for unit conversion.

Thank you both! I forgot OPC UA was only for conversion.