Exemplo n.º 1
0
        private bool RunRomaCommand(ILiquidHandlerCommand machineCommand)
        {
            RomaCommand romaCommand = machineCommand as RomaCommand;
            Labware     srcLabware  = layout.FindLabware(romaCommand.SrcLabware);
            Labware     dstLabware  = layout.FindLabware(romaCommand.DstLabware);
            //srcLabware.PlateVector.Positions

            bool       needBreak     = RunPlateVector(srcLabware.PlateVector);
            ITrackInfo romaTrackInfo = new RomaTrackInfo(srcLabware.Label, dstLabware.Label, false);

            //OnCommandInfo(this,string.Format("Move to source plate:{0}",srcLabware.Label));
            if (needBreak)
            {
                OnCommandExecuted(romaTrackInfo);
                return(true);
            }


            needBreak = RunPlateVector(dstLabware.PlateVector);
            ((RomaTrackInfo)romaTrackInfo).AllFinished = true;
            //OnCommandInfo(this,string.Format("Move to dst plate:{0}",dstLabware.Label));
            OnCommandExecuted(romaTrackInfo);
            return(needBreak);
        }
Exemplo n.º 2
0
        private bool RunLihaCommand(ILiquidHandlerCommand machineCommand)
        {
            if (hardwareController.Liha.IsTipMounted)
            {
                DitiTrackInfo trackInfo = null;
                hardwareController.Liha.DropTip(out trackInfo);
            }


            LihaCommand   lihaCommand    = machineCommand as LihaCommand;
            DitiTrackInfo ditiTrackInfos = null;

            hardwareController.Liha.GetTip(new List <int>()
            {
                1
            }, lihaCommand.ditiType, out ditiTrackInfos);

            OnCommandExecuted(ditiTrackInfos);
            if (NeedPauseOrStop())
            {
                return(true);
            }
            var liquidClass = PipettorElementManager.Instance.LiquidClasses.First(x => x.SaveName == lihaCommand.liquidClass);

            PipettingResult pipettingResult = PipettingResult.ok;

            hardwareController.Liha.Aspirate(lihaCommand.srcLabware, new List <int>()
            {
                lihaCommand.srcWellID
            }, new List <double>()
            {
                lihaCommand.volume
            }, liquidClass, out pipettingResult);
            PipettingTrackInfo aspTrackInfo = new PipettingTrackInfo(lihaCommand.srcLabware, LihaCommand.GetWellDesc(lihaCommand.srcWellID), lihaCommand.volume, pipettingResult, lihaCommand.barcode);

            OnCommandExecuted(aspTrackInfo);

            if (NeedPauseOrStop())
            {
                return(true);
            }
            if (pipettingResult == PipettingResult.ok ||
                pipettingResult == PipettingResult.air ||
                pipettingResult == PipettingResult.clotIgnore ||
                pipettingResult == PipettingResult.zmax)
            {
                pipettingResult = PipettingResult.ok;
                hardwareController.Liha.Dispense(lihaCommand.dstLabware, new List <int>()
                {
                    lihaCommand.dstWellID
                }, new List <double>()
                {
                    lihaCommand.volume
                }, liquidClass, out pipettingResult);
                var dispTrackInfo = new PipettingTrackInfo(lihaCommand.dstLabware, LihaCommand.GetWellDesc(lihaCommand.dstWellID), lihaCommand.volume, pipettingResult, lihaCommand.barcode, false);
                OnCommandExecuted(dispTrackInfo);
            }

            if (NeedPauseOrStop())
            {
                return(true);
            }
            DitiTrackInfo ditiTrackInfo = null;

            hardwareController.Liha.DropTip(out ditiTrackInfo);
            OnCommandExecuted(ditiTrackInfo);
            return(false);
        }