| | |
| | | /// </summary> |
| | | /// <param name="speStackerCrane"></param> |
| | | /// <returns></returns> |
| | | public int WorkCommandValue() => _speStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkCommand); |
| | | //public int WorkCommandValue() => _speStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkCommand); |
| | | |
| | | /// <summary> |
| | | /// è·åå åæºè®¾å¤ç¶æ |
| | |
| | | |
| | | private string GetStatus(string protocolParamType) |
| | | { |
| | | List<DeviceProDTO> devicePros = _speStackerCrane.DeviceProDTOs.Where(x => x.DeviceProParamType == protocolParamType).ToList(); |
| | | List<DeviceProDTO> devicePros = _speStackerCrane.DeviceProDTOs.Where(x => x.DeviceProParamName == protocolParamType).ToList(); |
| | | if (devicePros.Count == 0) |
| | | { |
| | | throw new Exception("æªè·åå°å议信æ¯"); |
| | |
| | | { |
| | | object readStatus = _speStackerCrane.Communicator.ReadAsObj(devicePros[i].DeviceProAddress, devicePros[i].DeviceDataType); |
| | | DeviceProtocolDetailDTO? deviceProtocolDetail = _speStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePros[i].DeviceProParamName) ?? throw new Exception(); |
| | | deviceProtocolDetail = _speStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePros[i].DeviceProParamType && x.ProtocalDetailValue.Equals(readStatus.ToString())); |
| | | deviceProtocolDetail = _speStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePros[i].DeviceProParamName && x.ProtocalDetailValue.Equals(readStatus.ToString())); |
| | | if (deviceProtocolDetail != null) |
| | | { |
| | | return deviceProtocolDetail.ProtocolDetailType; |
| | |
| | | _speStackerCrane.SetValue(StackerCraneDBName.EndRow, command.EndRow); |
| | | _speStackerCrane.SetValue(StackerCraneDBName.EndColumn, command.EndColumn); |
| | | _speStackerCrane.SetValue(StackerCraneDBName.EndLayer, command.EndLayer); |
| | | _speStackerCrane.SetValue(StackerCraneDBName.Barcode, command.Barcode); |
| | | //_speStackerCrane.SetValue(StackerCraneDBName.Barcode, command.Barcode); |
| | | _speStackerCrane.SetValue(StackerCraneDBName.WorkType, command.WorkType); |
| | | _speStackerCrane.SetValue(StackerCraneDBName.TrayType, command.TrayType); |
| | | //_speStackerCrane.SetValue(StackerCraneDBName.WorkType, command.TrayType); |
| | | return true; |
| | | } |
| | | return false; |