| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && x.IsOccupied == 0); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt()); |
| | | //è·ååè®® |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(W_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | #endregion |
| | | //ç åç¶æ |
| | | short PackState = device.GetValue<R_MDDB, short>(GetPackStateEnum(item.StackerCraneStationCode), item.StackerCraneCode); |
| | | short PackSendState = device.GetValue<W_MDDB, short>(GetPackSendEnum(item.StackerCraneStationCode), item.StackerCraneCode); |
| | | //ç åæ°é |
| | | short PackNum = device.GetValue<R_MDDB, short>(GetPackNumEnum(item.StackerCraneStationCode), item.StackerCraneCode); |
| | | if ((R_MDStatus1 == 1 || R_MDStatus2 == 1 || R_MDStatus3 == 1 || R_MDStatus4 == 1) && Allow == 4) |
| | |
| | | } |
| | | continue; |
| | | } |
| | | if (PackState == 2) |
| | | if (PackState == 2 && PackSendState == 2) |
| | | { |
| | | Thread.Sleep(200); |
| | | device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 0); |
| | | WriteInfo(item.StationName, $"{item.StationName}æ¸
é¤å·¥ä½ç»æä¿¡å·"); |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 4); |
| | | WriteInfo(item.StationName, $"{item.StationName}åå
¥æ¸
æä¿¡å·"); |
| | | continue; |
| | | } |
| | | if (PackState == 4 && PackSendState == 4) |
| | | { |
| | | Thread.Sleep(200); |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 0); |
| | | WriteInfo(item.StationName, $"{item.StationName}æ¸
æä¿¡å·å¤ä½"); |
| | | continue; |
| | | } |
| | | //è·åå½åå·¥ä½ç åæ§è¡ä¸æ°æ® |