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); } }