| | |
| | | { |
| | | if (stationManager.stationChildCode == "3002") |
| | | { |
| | | |
| | | var newTask = _taskRepository.QueryFirst(x => x.TargetAddress == "3004"); |
| | | if (newTask != null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationManager.stationChildCode && x.DeviceProParamName == "ConveyorLineBarcode").FirstOrDefault(); |
| | | var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress,10); |
| | | |
| | | string Barcode = Encoding.UTF8.GetString(x); |
| | | |
| | | if (Barcode == null) |
| | | if (Barcode == null || Barcode==""|| Barcode.Trim().Contains("\0")) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(3), stationManager.stationChildCode); |
| | | } |
| | |
| | | var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 10); |
| | | |
| | | string Barcode = Encoding.UTF8.GetString(x); |
| | | if (Barcode == "") |
| | | if (Barcode == null || Barcode == "" || Barcode.Trim().Contains("\0")) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(3), stationManager.stationChildCode); |
| | | } |