MDS90A power supply unit
To query an MDS90A power supply unit, the 24 V current and the DC link current must be read out via the corresponding contacts of the MDS90A (see associated manual). The 24 V output current and the input current into MDS90A from the DC link are available via two 4..20 mA interfaces.
A driver module must first be instantiated for automatic query. It is available preconfigured for "SEW IO" modules (when using the OAI42C module):
fbMDSSEW:SEW_MK_PES_PowerMode.SEW_PwrMon.DriverMDS24V_SEW;
Alternatively, there is a "manual" driver where the 4..20 mA current can be entered directly via 2 VAR_INPUTs if no SEW terminal is used for reading in:
fbMDSManual:SEW_MK_PES_PowerMode.SEW_PwrMon.DriverMDS24V_Manual
The SEW driver modules serves as an example here:
- To do this, create a local instance of the driver module.
fbMDSSEW:SEW_MK_PES_PowerMode.SEW_PwrMon.DriverMDS24V_SEW;- Link the local instance with the function block of the software module (in this case: MDP92A), for example in the init action of SEW User_PRG by calling the LinkMDS24VSupplyPM() method on the software module.
MDP92A.LinkMDS24VSupplyPM(itfMDS:=fbMDSSEW);- On the "SEW OIA42C" terminal, insert the two input variables at the corresponding terminal positions:
- The terminal is evaluated and converted internally.

- The driver module automatically converts the digital value of the terminal into the 4..20 mA current and then calculates the respective MDS current. (For conversion, see the tables in the MDS manual.)
- The MDS90A current on the 24 V level is then permanently multiplied by 24 V to calculate the power. If the 24 V voltage is set differently, this value has to be corrected. The rActual24VValue property is used for this purpose. The real 24 V voltage, which is set at the MDS or which was determined by measurement (here e.g. 24.5 V instead of 24 V), can be transmitted to the driver module via the property (e.g. during initialization in USER_PRG.Init):
fbMDSSEW.rActual24VValue:=REAL#24.5; - The DC link current is internally multiplied by the current DC link voltage of the connected device, resulting in the power that the MDS90A consumes at the DC link level.
