public bool IsEESReadyForRem(EESData objEESData) { bool isReady = false; if (objEESDaoService == null) { objEESDaoService = new EESDaoImp(); } using (OpcOperationsService opcd = new OpcOperationsImp(OpcConnection.GetOPCServerConnection())) { if (opcd.IsMachineHealthy(objEESData.machineChannel + "." + objEESData.machineCode + "." + OpcTags.EES_Auto_Ready)) { isReady = opcd.ReadTag <bool>(objEESData.machineChannel, objEESData.machineCode, OpcTags.EES_Ready_for_REM_Lock); isReady = isReady && !opcd.ReadTag <bool>(objEESData.machineChannel, objEESData.machineCode, OpcTags.EES_Car_At_EES); isReady = isReady && objEESDaoService.IsPSNotGettingFromEES(objEESData.machineCode); isReady = isReady && !objEESDaoService.IsEESDisabled(objEESData.machineCode); } } return(isReady); }
public bool CheckEESHealthy(EESData objEESData) { bool isHealthy = false; objEESDaoService = new EESDaoImp(); using (OpcOperationsService opcd = new OpcOperationsImp(OpcConnection.GetOPCServerConnection())) { if (opcd.IsMachineHealthy(objEESData.machineChannel + "." + objEESData.machineCode + "." + OpcTags.EES_Auto_Ready)) { isHealthy = opcd.ReadTag <bool>(objEESData.machineChannel, objEESData.machineCode, OpcTags.EES_Auto_Ready); isHealthy = isHealthy && !objEESDaoService.IsEESDisabled(objEESData.machineCode); // isHealthy = isHealthy && !objEESDaoService.IsEESSwitchOff(objEESData.machineCode); } } return(isHealthy); }