public void CheckTieBreaker() { VcSubstationInfomation VcSubInfo = new VcSubstationInfomation(); VcSubstationAlarmDevice VcSubAlarm = new VcSubstationAlarmDevice(); BellyUps BU = new BellyUps(); // tie_v = sw_db::read_and_verify_point(farm_dev_id, tie_230_id, @Zquit_bits); VcSubInfo.TieV = 1; if (VcSubInfo.TieV != 0) // "Value Type" in .NET (int) cannot, by definition, be null. { //if (tie_v != CLOSE) //{ // ibal = 0; // can not balance mvrs tie open //} } else { BU.BellyUp(string.Format("undefed bits set or {0} = prog_stat", VcSubAlarm.LtcProgram)); } }
private void CheckIfControlDoneLastCycle(int i) { VoltVarController VC = new VoltVarController(); VcSubstationInfomation VcSubInfo = new VcSubstationInfomation(); ProgLogMessage PM = new ProgLogMessage(); BellyUps BU = new BellyUps(); LtcLogMessages LM = new LtcLogMessages(); VcLtcStatus LTC = new VcLtcStatus(); if (VC.ControlTransformers[i].CtlDone != 0) { double TapMove = Math.Abs(VC.ControlTransformers[i].StTapV - VC.ControlTransformers[i].TapV); double MvrMove = Math.Abs(VC.ControlTransformers[i].StMvrV - VC.ControlTransformers[i].MvrV); if (TapMove < 0.2 && MvrMove < 0.2) { LM.LtcLogMessage(string.Format("Control Failed {0} {1} {2} {3}", VC.ControlTransformers[i].DeviceId, VC.ControlTransformers[i].LtcCtlId, VC.ControlTransformers[i].PrevCtl, VC.ControlTransformers[i].TapV)); LTC.Cfail++; } VC.ControlTransformers[i].CtlDone = 0; } }
public void VerifyProgramControl(string ProgStat) { ProgLogMessage ProgLogMsg = new ProgLogMessage(); VcSubstationAlarmDevice VcSubAlarm = new VcSubstationAlarmDevice(); BellyUps BU = new BellyUps(); if (ProgStat != null) { //// Good Verify no bits set //string messageInput = string.Format("Program {0} {1} LTC state: {2}", VcSubAlarm.LtcDevice, VcSubAlarm.LtcProgram, ProgStat); //ProgLogMsg.PrintProgLogMessage(messageInput); //ProgLogMsg.LogMessage = messageInput; //ProgLogMsg.SerializeToXml(logFolderName); if (ProgStat == "ON") { m_messageInput += string.Format("{0} {1} Program control is {2} |", VcSubAlarm.LtcDevice, VcSubAlarm.LtcProgram, ProgStat); } } else { m_messageInput += string.Format("Undefed bits set or {0} = {1} | ", VcSubAlarm.LtcProgram, ProgStat); } }