| | |
| | | [JsonIgnore] |
| | | public bool IsEmptyTrayTaskAssigned { get; set; } |
| | | |
| | | [Browsable(false)] |
| | | [JsonIgnore] |
| | | //[Browsable(false)] |
| | | //[JsonIgnore] |
| | | //public ManualResetEvent FullTrayFullHandle { get; set; } = new ManualResetEvent(false); |
| | | |
| | | //[Browsable(false)] |
| | | //[JsonIgnore] |
| | | //public ManualResetEvent FullTrayEmptyHandle { get; set; } = new ManualResetEvent(false); |
| | | |
| | | public ManualResetEvent RobotIOHandle { get; set; } = new ManualResetEvent(false); |
| | | |
| | | public AGVBindUnit() |
| | |
| | | //TaskList.CollectionChanged += TaskList_CollectionChanged; |
| | | } |
| | | |
| | | object agvStatusLock = new object(); |
| | | public bool SetAGVStatus(TaskStatus status) |
| | | { |
| | | lock (agvStatusLock) |
| | | { |
| | | switch (status) |
| | | { |
| | | case TaskStatus.Available: |
| | | break; |
| | | case TaskStatus.Running: |
| | | if (AGVStatus == TaskStatus.Available) |
| | | { |
| | | AGVStatus = status; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | case TaskStatus.Warning: |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | AGVStatus = status; |
| | | return true; |
| | | } |
| | | } |
| | | //private void TaskList_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) |
| | | //{ |
| | | // if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add) |
| | |
| | | { |
| | | ProcessConfig config = scope.Resolve<ProcessConfig>(); |
| | | |
| | | config.RobotConfigCollection.ForEach(plc => |
| | | config.RobotConfigCollection.ForEach(robot => |
| | | { |
| | | _hash[plc.ID] = plc.Name; |
| | | _hash[robot.ID] = robot.Name; |
| | | }); |
| | | } |
| | | } |
| | |
| | | { |
| | | ProcessConfig config = scope.Resolve<ProcessConfig>(); |
| | | |
| | | config.CameraConfigCollection.ForEach(plc => |
| | | config.CameraConfigCollection.ForEach(camera => |
| | | { |
| | | _hash[plc.ID] = plc.Name; |
| | | _hash[camera.ID] = camera.Name; |
| | | }); |
| | | } |
| | | } |