| | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, taskCommand.ConveyorLineTargetAddress, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, taskCommand.ConveyorLineBarcode, childDeviceCode); |
| | | conveyorLine.Communicator.Write(address, 1); |
| | | |
| | | |
| | | var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == childDeviceCode && x.stationArea == "Call" && x.stationType == 12); |
| | | CommonConveyorLine_BZ? commonConveyorBZ = Storage.Devices.FirstOrDefault(x => x.DeviceCode == station.stationPLC) as CommonConveyorLine_BZ; |
| | | if (commonConveyorBZ != null) |
| | | { |
| | | ConveyorLineTaskCommand_After readSignal = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(station.stationLocation); |
| | | if (readSignal.Reserved5 == 1) |
| | | { |
| | | var tasks = _taskRepository.QueryData(x => x.TargetAddress == childDeviceCode); |
| | | if (tasks.Count == 0) |
| | | { |
| | | commonConveyorBZ.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), station.stationLocation); |
| | | } |
| | | } |
| | | } |
| | | WriteInfo($"{conveyorLine.DeviceName}输送线出库完成", $"子节点【{childDeviceCode}】托盘号:【{command.ConveyorLineBarcode}】"); |
| | | } |
| | | else |
| | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, taskCommand.ConveyorLineTargetAddress, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, taskCommand.ConveyorLineBarcode, childDeviceCode); |
| | | conveyorLine.Communicator.Write(address, 1); |
| | | |
| | | var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == childDeviceCode && x.stationArea == "Call" && x.stationType == 12); |
| | | CommonConveyorLine_BZ? commonConveyorBZ = Storage.Devices.FirstOrDefault(x => x.DeviceCode == station.stationPLC) as CommonConveyorLine_BZ; |
| | | if (commonConveyorBZ != null) |
| | | { |
| | | ConveyorLineTaskCommand_After readSignal = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(station.stationLocation); |
| | | if (readSignal.Reserved5 == 1) |
| | | { |
| | | var tasks = _taskRepository.QueryData(x => x.TargetAddress == childDeviceCode); |
| | | if (tasks.Count == 0) |
| | | { |
| | | commonConveyorBZ.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), station.stationLocation); |
| | | } |
| | | } |
| | | } |
| | | WriteInfo($"{conveyorLine.DeviceName}输送线出库完成", $"子节点【{childDeviceCode}】托盘号:【{command.ConveyorLineBarcode}】"); |
| | | } |
| | | } |