| | |
| | | /// <summary> |
| | | /// 自定义堆垛机 |
| | | /// </summary> |
| | | /// <typeparam name="T1">堆垛机状态1泛型</typeparam> |
| | | /// <typeparam name="T2">堆垛机状态2泛型</typeparam> |
| | | /// <typeparam name="T3">堆垛机状态3泛型</typeparam> |
| | | [Description("堆垛机")] |
| | | [Description("堆垛机2")] |
| | | public class SpeStackerCrane : IStackerCrane |
| | | { |
| | | #region Private Member |
| | |
| | | |
| | | public bool SendCommand<T>(T command) where T : IDataTransfer, new() |
| | | { |
| | | if(Communicator is SiemensS7) |
| | | if (Communicator is SiemensS7) |
| | | { |
| | | if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | /// <summary> |
| | | /// 监测堆垛机任务是否完成(防止任务完成事件监测超时,定义手动触发功能) |
| | | /// </summary> |
| | | void CheckStackerCraneTaskCompleted() |
| | | void CheckStackerCraneTaskCompleted() |
| | | { |
| | | if (_isChecked) |
| | | return; |