| | |
| | | List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode); |
| | | foreach (string childDeviceCode in childDeviceCodes) |
| | | { |
| | | ConveyorLineTaskCommand_After command = null; |
| | | if (childDeviceCode == "2236") |
| | | { |
| | | var stationPLC = _stationManagerRepository.QueryFirst(x => x.stationType == 1 && x.stationChildCode == childDeviceCode).stationPLC; |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationPLC); |
| | | CommonConveyorLine_After conveyorLine1 = (CommonConveyorLine_After)device; |
| | | command = conveyorLine1.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | } |
| | | else |
| | | { |
| | | command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | } |
| | | |
| | | //ConveyorLineTaskCommand_After command = null; |
| | | //if (childDeviceCode == "2236") |
| | | //{ |
| | | // var stationPLC = _stationManagerRepository.QueryFirst(x => x.stationType == 1 && x.stationChildCode == childDeviceCode).stationPLC; |
| | | // IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationPLC); |
| | | // CommonConveyorLine_After conveyorLine1 = (CommonConveyorLine_After)device; |
| | | // command = conveyorLine1.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | //} |
| | | //else |
| | | //{ |
| | | // command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | //} |
| | | ConveyorLineTaskCommand_After command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | if (command == null) continue; |
| | | if (command.ConveyorLineBarcode.Trim().Contains("\0")) command.ConveyorLineBarcode = ""; |
| | | |
| | |
| | | /// <param name="command">读取的请求信息</param> |
| | | /// <param name="childDeviceCode">子设备编号</param> |
| | | /// <param name="index">线体当前bool读取偏移地址</param> |
| | | public async void EmptyTrayReturn(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode, int index, WIDESEAWCS_Model.Models.Platform platform) |
| | | public async void EmptyTrayReturn(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode, int index, Platform platform) |
| | | { |
| | | try |
| | | { |