public async Task TakeSampleFromTheCellAsync(short cellNum, CancellationToken ct) { var _dp = new DiskParams(PairedDetector, cellNum); var pos = GetAboveAndNearPositions(_dp.DiskName); pos.Near.C = pos.Near.C.Value + (_dp.CellNum - _dp.InitCellNum) * _dp.Gap; if (PinnedPosition != PinnedPositions.NearInternalDisk && PinnedPosition != PinnedPositions.NearExternalDisk) { MoveToY(MaxY); } if (PinnedPosition == PinnedPositions.NearExternalDisk && cellNum > 30) { MoveToY(CurrentPosition.Y + 3000); } if (PinnedPosition == PinnedPositions.NearInternalDisk && cellNum <= 30) { MoveToY(CurrentPosition.Y + 3000); } await MoveToPositionAsync(pos.Near, Axes.X, ct).ConfigureAwait(false); MoveToX(pos.Above.X); IsSampleCaptured = true; if (cellNum > 30) { PinnedPosition = PinnedPositions.AboveInternalDisk; } else { PinnedPosition = PinnedPositions.AboveExternalDisk; } }
public async Task PutSampleToTheDiskAsync(short cellNum, CancellationToken ct) { var _dp = new DiskParams(PairedDetector, cellNum); var pos = GetAboveAndNearPositions(_dp.DiskName); // pos.Above.C = pos.Above.C.Value + (_dp.CellNum - _dp.InitCellNum) * _dp.Gap; //if (PinnedPosition == PinnedPositions.InsideDetShield) MoveToY(MaxY); await MoveToPositionAsync(pos.Above, Axes.X, ct).ConfigureAwait(false); // release sample pos.Near.C = null; await MoveToPositionAsync(pos.Near, Axes.X, ct).ConfigureAwait(false); if (cellNum > 30) { PinnedPosition = PinnedPositions.NearInternalDisk; } else { PinnedPosition = PinnedPositions.NearExternalDisk; } IsSampleCaptured = false; }
public void TakeSampleFromTheCell(short cellNum) { var _dp = new DiskParams(PairedDetector, cellNum); var pos = GetAboveAndNearPositions(_dp.DiskName); pos.Near.C = pos.Near.C.Value + (_dp.CellNum - _dp.InitCellNum) * _dp.Gap; if (PinnedPosition != PinnedPositions.NearInternalDisk && PinnedPosition != PinnedPositions.NearExternalDisk) { MoveToY(MaxY); } if (PinnedPosition == PinnedPositions.NearExternalDisk && cellNum > 30) { MoveToY(CurrentPosition.Y + 3000); } if (PinnedPosition == PinnedPositions.NearInternalDisk && cellNum <= 30) { MoveToY(CurrentPosition.Y + 3000); } MoveToPosition(pos.Near, Axes.X); MoveToX(pos.Above.X); IsSampleCaptured = true; if (cellNum > 30) { PinnedPosition = PinnedPositions.AboveInternalDisk; } else { PinnedPosition = PinnedPositions.AboveExternalDisk; } }
public void PutSampleToTheDisk(short cellNum) { var _dp = new DiskParams(PairedDetector, cellNum); var pos = GetAboveAndNearPositions(_dp.DiskName); pos.Above.C = pos.Above.C.Value + (_dp.CellNum - _dp.InitCellNum) * _dp.Gap; //if (PinnedPosition == PinnedPositions.InsideDetShield) MoveToY(MaxY); MoveToPosition(pos.Above, Axes.X); MoveToX(pos.Near.X); IsSampleCaptured = false; if (cellNum > 30) { PinnedPosition = PinnedPositions.NearInternalDisk; } else { PinnedPosition = PinnedPositions.NearExternalDisk; } }