| | |
| | | try |
| | | { |
| | | ConveyorLineTaskCommandNew command = conveyorLine.ReadCustomer<ConveyorLineTaskCommandNew>(childDeviceCode); |
| | | if (command == null || command.PLC_STB == 0) |
| | | if (command == null || command.PLC_STB != 1) |
| | | { |
| | | return; |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode); |
| | | if (task.IsNullOrEmpty()) |
| | | if (command.TaskNo > 0) |
| | | { |
| | | _conveyorLineDispatch.RequestInbound(conveyorLine, command, childDeviceCode); |
| | | return; |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode); |
| | | if (task.IsNullOrEmpty()) |
| | | { |
| | | _conveyorLineDispatch.RequestInbound(conveyorLine, command, childDeviceCode); |
| | | return; |
| | | } |
| | | |
| | | // 处理任务状态 |
| | | ProcessTaskState(conveyorLine, command, task, childDeviceCode); |
| | | } |
| | | |
| | | // 处理任务状态 |
| | | ProcessTaskState(conveyorLine, command, task, childDeviceCode); |
| | | } |
| | | catch (Exception innerEx) |
| | | { |
| | |
| | | switch (state) |
| | | { |
| | | case InExecuting: |
| | | if (isTargetAddress) |
| | | _conveyorLineDispatch.ConveyorLineInFinish(conveyorLine, command, childDeviceCode); |
| | | else |
| | | _conveyorLineDispatch.RequestInNextAddress(conveyorLine, command, childDeviceCode); |
| | | //if (isTargetAddress) |
| | | // _conveyorLineDispatch.ConveyorLineInFinish(conveyorLine, command, childDeviceCode); |
| | | //else |
| | | _conveyorLineDispatch.RequestInNextAddress(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | |
| | | case OutExecuting: |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |