Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Adds support for ups.power.nominal. #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions WinNUT_V2/WinNUT_GUI/UPS_Network.vb
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,13 @@ Public Class UPS_Network
Me.Status = GetUPSVar("ups.status", "OL")
Me.OutPower = Double.Parse((GetUPSVar("ups.realpower.nominal", 0)), ciClone)
If Me.OutPower = 0 Then
Me.InputA = Double.Parse(GetUPSVar("ups.current.nominal", 1), ciClone)
Me.OutPower = Math.Round(Me.UPS_InputV * 0.95 * Me.UPS_InputA * CosPhi)
Me.OutPower = Double.Parse((GetUPSVar("ups.power.nominal", 0)), ciClone)
If Me.OutPower = 0 Then
Me.InputA = Double.Parse(GetUPSVar("ups.current.nominal", 1), ciClone)
Me.OutPower = Math.Round(Me.UPS_InputV * 0.95 * Me.UPS_InputA * CosPhi)
Else
Me.OutPower = Math.Round(Me.UPS_OutPower * (Me.UPS_Load / 100) * CosPhi)
End If
Else
Me.OutPower = Math.Round(Me.UPS_OutPower * (Me.UPS_Load / 100))
End If
Expand Down