private void InlineEfficiencyMonitor(ALINE line) { VehicleBLL vehicleBLL = scApp.VehicleBLL; CMDBLL cmdBLL = scApp.CMDBLL; line.CurrntVehicleModeAutoRemoteCount = vehicleBLL.cache.getVhCurrentModeInAutoRemoteCount(); line.CurrntVehicleModeAutoLoaclCount = vehicleBLL.cache.getVhCurrentModeInAutoLocalCount(); line.CurrntVehicleStatusIdelCount = vehicleBLL.cache.getVhCurrentStatusInIdleCount(); line.CurrntVehicleStatusErrorCount = vehicleBLL.cache.getVhCurrentStatusInErrorCount(); var host_cmds = cmdBLL.loadACMD_MCSIsUnfinished(); var cst = scApp.CassetteDataBLL.loadCassetteData(); UInt16 carrier_transferring_count = (UInt16)cst. Where(x => x.CSTState == E_CSTState.Alternate || x.CSTState == E_CSTState.WaitIn || x.CSTState == E_CSTState.WaitOut || x.CSTState == E_CSTState.Transferring). Count(); UInt16 carrier_watting_count = (UInt16)cst. Where(x => x.CSTState == E_CSTState.Installed || x.CSTState == E_CSTState.Completed). Count(); UInt16 host_cmd_assigned_count = (UInt16)host_cmds. Where(cmd => cmd.TRANSFERSTATE >= E_TRAN_STATUS.Transferring). Count(); UInt16 host_cmd_watting_count = (UInt16)host_cmds. Where(cmd => cmd.TRANSFERSTATE < E_TRAN_STATUS.Transferring). Count(); line.CurrntCSTStatueTransferCount = carrier_transferring_count; line.CurrntCSTStatueWaitingCount = carrier_watting_count; line.CurrntHostCommandTransferStatueAssignedCount = host_cmd_assigned_count; line.CurrntHostCommandTransferStatueWaitingCounr = host_cmd_watting_count; }
public void start(SCApplication app) { vehicleBLL = app.VehicleBLL; vehicleService = app.VehicleService; segmentBLL = app.SegmentBLL; addressesBLL = app.AddressesBLL; guideBLL = app.GuideBLL; cmdBLL = app.CMDBLL; unitBLL = app.UnitBLL; commObjCacheManager = app.getCommObjCacheManager(); var vhs = app.getEQObjCacheManager().getAllVehicle(); lineService = app.LineService; foreach (AVEHICLE vh in vhs) { vh.CommandComplete += Vh_CommandComplete; vh.BatteryLevelChange += Vh_BatteryLevelChange; vh.BatteryCapacityChange += Vh_BatteryCapacityChange; } //註冊各個Coupler的Status變化,在有其中一個有變化的時候要通知AGV目前所有coupler的狀態 List <AUNIT> chargers = unitBLL.OperateCatch.loadUnits(); foreach (AUNIT charger in chargers) { //charger.CouplerStatusChanged += Charger_CouplerStatusChanged; charger.CouplerHPSafetyChaged += Charger_CouplerHPSafetyChaged; } }
private void InlineEfficiencyMonitor() { ALINE line = scApp.getEQObjCacheManager().getLine(); VehicleBLL vehicleBLL = scApp.VehicleBLL; CMDBLL cmdBLL = scApp.CMDBLL; line.CurrntVehicleModeAutoRemoteCount = vehicleBLL.cache.getVhCurrentModeInAutoRemoteCount(); line.CurrntVehicleModeAutoLoaclCount = vehicleBLL.cache.getVhCurrentModeInAutoLocalCount(); line.CurrntVehicleStatusIdelCount = vehicleBLL.cache.getVhCurrentStatusInIdleCount(); line.CurrntVehicleStatusErrorCount = vehicleBLL.cache.getVhCurrentStatusInErrorCount(); var host_cmds = cmdBLL.loadACMD_MCSIsUnfinished(); UInt16 carrier_transferring_count = (UInt16)host_cmds. Where(cmd => cmd.TRANSFERSTATE == E_TRAN_STATUS.Transferring). Count(); UInt16 carrier_watting_count = (UInt16)host_cmds. Where(cmd => cmd.TRANSFERSTATE < E_TRAN_STATUS.Transferring). Count(); UInt16 host_cmd_assigned_count = (UInt16)host_cmds. Where(cmd => cmd.TRANSFERSTATE >= E_TRAN_STATUS.Initial). Count(); UInt16 host_cmd_watting_count = (UInt16)host_cmds. Where(cmd => cmd.TRANSFERSTATE < E_TRAN_STATUS.Initial). Count(); line.CurrntCSTStatueTransferCount = carrier_transferring_count; line.CurrntCSTStatueWaitingCount = carrier_watting_count; line.CurrntHostCommandTransferStatueAssignedCount = host_cmd_assigned_count; line.CurrntHostCommandTransferStatueWaitingCounr = host_cmd_watting_count; }
public APORTSTATION getAGVPortStationWaitOutOK(CMDBLL cmdBLL, string zoneID) { var port_stations = loadAGVPortStation(); return(port_stations.Where(port => port.IncludeCycleTest && port.IsOutPutMode && port.PortReady && port.PortWaitOut && SCUtility.isMatche(port.ZONE_ID, zoneID) && !cmdBLL.hasExcuteCMDBySourcePort(port.PORT_ID)).FirstOrDefault()); }
public List <APORTSTATION> loadAGVPortStationCanUnload(CMDBLL cmdBLL, string zoneID) { var port_stations = loadAGVPortStation(); return(port_stations.Where(port => port.IsInPutMode && port.PortReady && !port.CSTPresenceMismatch && !port.IsCSTPresence && SCUtility.isMatche(port.ZONE_ID, zoneID) && !cmdBLL.hasExcuteCMDByDestinationPort(port.PORT_ID)).ToList()); }
public bool SysExecQityfinish(string mcs_cmd_id, CompleteStatus completeStatus, int total_cmd_dis) { var cmdFinishStatus = CMDBLL.CompleteStatusToECmdStatus(completeStatus); bool is_success = updateSysExecQity_CmdFinish(mcs_cmd_id, cmdFinishStatus, completeStatus, total_cmd_dis, out ASYSEXCUTEQUALITY quality); if (quality != null) { SCUtility.TrimAllParameter(quality); LogManager.GetLogger("SysExcuteQuality").Info(quality.ToString()); } return(is_success); }
public APORTSTATION getAGVPortStationCanUnloadForCycleRun(CMDBLL cmdBLL, string zoneID) { var port_stations = loadAGVPortStation(); return(port_stations.Where(port => port.IncludeCycleTest && port.IsInPutMode && port.PortReady && !port.CSTPresenceMismatch && !port.IsCSTPresence && SCUtility.isMatche(port.ZONE_ID, zoneID) && !cmdBLL.hasExcuteCMDByDestinationPort(port.PORT_ID)).FirstOrDefault()); }
public void start(SCApplication app) { vehicleBLL = app.VehicleBLL; vehicleService = app.VehicleService; segmentBLL = app.SegmentBLL; addressesBLL = app.AddressesBLL; guideBLL = app.GuideBLL; cmdBLL = app.CMDBLL; unitBLL = app.UnitBLL; commObjCacheManager = app.getCommObjCacheManager(); var vhs = app.getEQObjCacheManager().getAllVehicle(); foreach (AVEHICLE vh in vhs) { vh.CommandComplete += Vh_CommandComplete; vh.BatteryLevelChange += Vh_BatteryLevelChange; vh.BatteryCapacityChange += Vh_BatteryCapacityChange; } }
public void askVhToChargerForWaitByManual(string vhID) { CMDBLL.CommandCheckResult check_result = CMDBLL.getOrSetCallContext <CMDBLL.CommandCheckResult>(CMDBLL.CALL_CONTEXT_KEY_WORD_OHTC_CMD_CHECK_RESULT); try { AVEHICLE vh = vehicleBLL.cache.getVehicle(vhID); LogHelper.Log(logger: logger, LogLevel: LogLevel.Info, Class: nameof(VehicleChargerModule), Device: DEVICE_NAME, Data: $"ask vh:{vh.VEHICLE_ID} to charger idle.", VehicleID: vh.VEHICLE_ID); var ask_result = askVhToCharging(vh); check_result.Result.AppendLine(ask_result.msg); check_result.IsSuccess &= ask_result.isSuccess; } catch (Exception ex) { logger.Error(ex, "Exception:"); check_result.Result.AppendLine(ex.ToString()); check_result.IsSuccess = false; } }