diff --git a/TBF/Rig/Modbus/PumpFM/DanfossVLT/Pump.cs b/TBF/Rig/Modbus/PumpFM/DanfossVLT/Pump.cs index b06b5d6d6..1e3d92eb8 100644 --- a/TBF/Rig/Modbus/PumpFM/DanfossVLT/Pump.cs +++ b/TBF/Rig/Modbus/PumpFM/DanfossVLT/Pump.cs @@ -118,7 +118,7 @@ namespace TBF.Rig.Modbus.PumpFM.DanfossVLT } } - readonly GenericDevices.IModbus modbus; + readonly Common.Modbus modbus; readonly IControlBoard controlBoard; int bitNr; /// 0 .. 63 public UInt128 Mask; /// derived from bitPosition in the constructor @@ -137,7 +137,7 @@ namespace TBF.Rig.Modbus.PumpFM.DanfossVLT { pumpCfg = cfg as PumpCfg; - modbus = (GenericDevices.IModbus)TbfComponents.FindComponent(cfg.ParentName, components); + modbus = TbfComponents.FindComponent(cfg.ParentName, components) as Common.Modbus; if (modbus == null) throw new Exception("Cannot find " + Name + " parent"); controlBoard = null; @@ -158,6 +158,7 @@ namespace TBF.Rig.Modbus.PumpFM.DanfossVLT { bitNr = pumpCfg.BitNr; Mask = (((UInt128)1) << bitNr); + modbus.ComponentNames[pumpCfg.ModbusAddress] = Name; TBF.UiBridge.Bridge.SetpointChangeHandler += delegate(object sndr, TBF.UiBridge.SetpointChangeArgs args) {