| | |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | /// <summary> |
| | | /// é¾é¨ä½ç½®ä½ä¸ä»»å¡ï¼ç¨äºè¯»åå¹¶æ´æ°HåZ轴设å¤çä½ç½®ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 1. ä»JobParamsä¸è·å设å¤åæ° <br/> |
| | | /// 2. 读åH轴设å¤ä½ç½®å¹¶æ´æ°å°OPositions.HPositionsåå
¸ <br/> |
| | | /// 3. 读åZ轴设å¤ä½ç½®å¹¶æ´æ°å°OPositions.ZPositionsåå
¸ <br/> |
| | | /// 4. å¤çè¿ç¨ä¸æè·å¹¶è®°å½å¼å¸¸ |
| | | /// </remarks> |
| | | [DisallowConcurrentExecution] |
| | | public class GantryPositionJob : JobBase, IJob |
| | | { |
| | | |
| | | |
| | | public GantryPositionJob() |
| | | { |
| | | |
| | |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | |
| | | bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value); |
| | | if (flag && value != null && value is OtherDevice) |
| | | if (flag && value != null && value is OtherDevice otherDevice) |
| | | { |
| | | OtherDevice otherDevice = (OtherDevice)value; |
| | | try |
| | | { |
| | | { |
| | |
| | | PositionR = hPositions[i * 4 + 3] |
| | | }; |
| | | |
| | | OPositions.HPositions.TryAdd(hDeviceChildCodes[i], position); |
| | | if(!OPositions.HPositions.TryAdd(hDeviceChildCodes[i], position)) |
| | | { |
| | | OPositions.HPositions[hDeviceChildCodes[i]] = position; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | PositionR = zPositions[i * 4 + 3] |
| | | }; |
| | | |
| | | OPositions.ZPositions.TryAdd(zDeviceChildCodes[i], position); |
| | | if(! OPositions.ZPositions.TryAdd(zDeviceChildCodes[i], position)) |
| | | { |
| | | OPositions.ZPositions[zDeviceChildCodes[i]] = position; |
| | | } |
| | | } |
| | | } |
| | | } |