| | |
| | | } |
| | | } |
| | | } |
| | | //else |
| | | //{ |
| | | // //当前地址请求 寻找当前地址的托盘号 任务号的任务,如存在任务则重新再次写入新目标地址 |
| | | // Dt_Task currentTask = _taskService.QueryExecutingCurrentConveyorLineTask(command.ConveyorLineTaskNum, childDeviceCode, command.ConveyorLineBarcode); |
| | | // if (currentTask != null) |
| | | // { |
| | | // conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, Convert.ToInt16(currentTask.TargetAddress), childDeviceCode); |
| | | // } |
| | | //} |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | if (command.ConveyorLineBarcode == taskCommand.ConveyorLineBarcode && command.ConveyorLineTaskNum == taskCommand.ConveyorLineTaskNum && command.ConveyorLineTargetAddress == taskCommand.ConveyorLineTargetAddress) |
| | | { |
| | | WriteInfo(conveyorLine.DeviceName, $"写入任务成功写入次数{i}写入任务【{JsonConvert.SerializeObject(taskCommand)}】"); |
| | | return true; |
| | | } |
| | | if (command.ConveyorLineTargetAddress != taskCommand.ConveyorLineTargetAddress) |
| | |
| | | |
| | | } |
| | | } |
| | | WriteInfo(conveyorLine.DeviceName, $"写入任务失败任务号【{taskCommand.ConveyorLineTaskNum}】托盘号【{taskCommand.ConveyorLineBarcode}】目标地址【{taskCommand.ConveyorLineTargetAddress}】当前节点【{childDeviceCode}】"); |
| | | return false; |
| | | } |
| | | } |