Esempio n. 1
0
 public bool MovePlateFromIncubatorToVictor(int PlateSlot, AdditionalMethodArguments eargs)
 {
     IncubatorServ Incubator = eargs.InstrumentCollection.ReturnInstrumentType<IncubatorServ>();
     TransferStation TransStation = eargs.InstrumentCollection.ReturnInstrumentType<TransferStation>();
     Twister Robot = eargs.InstrumentCollection.ReturnInstrumentType<Twister>();
     //First to unload the plate
     Incubator.UnloadPlate(PlateSlot);
     TransStation.TurnOnVacuumAndLiftLid();
     TransStation.MoveStationOut();
     Robot.MovePlateFromTransferStationToPlateReader(eargs);
     TransStation.MoveStationIn();
     TransStation.TurnOffVacuumAndReturnLid();
     return true;
 }
Esempio n. 2
0
 public bool CreateProtocol(string ExpName, int Slot,AdditionalMethodArguments eargs)
 {
     Protocol toModify = eargs.CallingProtocol;
     CreateProtocolItems(ExpName, Slot);
     toModify.ProtocolName = OD_OutDirec;
     toModify.Instructions.Clear();
     toModify.Instructions.Add(toVictorInstruction);
     toModify.Instructions.Add(ODReadInstruction);
     toModify.Instructions.Add(awayFromVictorInstruction);
     toModify.Instructions.Add(ReturnInstruction);
     toModify.Instructions.Add(DT);
     toModify.NextItemToRun = 0;
     return true;
 }
Esempio n. 3
0
        public bool AttemptToReseatLid(Protocol toModify, AdditionalMethodArguments eargs)
        {
            IncubatorServ Incubator = eargs.InstrumentCollection.ReturnInstrumentType<IncubatorServ>();
            TransferStation TransStation = eargs.InstrumentCollection.ReturnInstrumentType<TransferStation>();
            Twister Robot = eargs.InstrumentCollection.ReturnInstrumentType<Twister>();

            TransStation.TurnOnVacuumAndLiftLid();
            TransStation.MoveStationOut();
            Robot.MovePlateFromTransferStationToPlateReader(eargs);
            TransStation.MoveStationIn();
            TransStation.TurnOffVacuumAndReturnLid();

            TransStation.TurnOnVacuumAndLiftLid();
            TransStation.MoveStationOut();
            Robot.MovePlateFromPlateReaderToIncubator();
            TransStation.MoveStationIn();
            TransStation.TurnOffVacuumAndReturnLid();
            return true;
        }
Esempio n. 4
0
 private IncubatorServ GetIncubator(AdditionalMethodArguments eargs)
 {
     return eargs.InstrumentCollection.ReturnInstrumentType<IncubatorServ>();
 }
Esempio n. 5
0
 public void PlaceItemOnTransferStation(AdditionalMethodArguments eargs)
 {
     IncubatorServ Incubator = GetIncubator(eargs);
     //This method assumes that a plate with a lid on it is outside the transfer station
     if (Incubator.CheckIfSomethingOnTransferOutStation())
     {
         throw new InstrumentError("Something already on transfer station", true, this);
     }
     try
     {
         MoveToPosition(IncubatorSafe);
         MoveToPosition(IncubatorOverPlate);
         FindMaterialAndReleaseGrip();
         MoveToPosition(IncubatorOverPlate);
         MoveToPosition(IncubatorSafe);
     }
     catch(Exception thrown)
     {
         //if it fails, try to move the arm back to a safe position
         RobotServ.Abort();
         RobotServ.SpeedAsPercentMax = (short)5;
         throw new InstrumentError("Failed to put item on plate\n\n" + thrown.Message, false, this);
     }
 }
Esempio n. 6
0
        public void MovePlateFromTransferStationToPlateReader(AdditionalMethodArguments eargs)
        {
            IncubatorServ Incubator = GetIncubator(eargs);
            //first to move to the incubator an pick up the plate
            if (!Incubator.CheckIfSomethingOnTransferOutStation())
            {

                throw new InstrumentError("Nothing on plate reader", true, this);
            }
            try
            {
                MoveToPosition(IncubatorSafe);
                MoveToPosition(IncubatorOverPlate);
                FindMaterialAndGripIt();
                MoveToPosition(IncubatorOverPlate);
                MoveToPosition(IncubatorSafe);
            }
            catch(Exception thrown)
            {
                //if it fails, try to move the arm back to a safe position
                //RobotServ.Abort();
                MoveToPosition(IncubatorOverPlate, (short)5);
               // RobotServ.SpeedAsPercentMax = (short)5;
                //RobotServ.MoveAbsolute(IncubatorOverPlate.Rotary, IncubatorOverPlate.Reach, IncubatorOverPlate.Vertical, IncubatorOverPlate.Wrist, IncubatorOverPlate.Track);
                throw new InstrumentError("Could not get material from plate", this,thrown);
            }
            try
            {
                MoveToPosition(ReaderSafe);
                MoveToPosition(ReaderOverPlate);
                //MoveToPosition(ReaderPlate);
                //RobotServ.GripOpen();
                FindMaterialAndReleaseGrip();
                MoveToPosition(ReaderOverPlate);
                MoveToPosition(ReaderSafe);
            }
            catch(Exception thrown)
            {
                //if it fails, try to move the arm back to a safe position
                RobotServ.Abort();
                RobotServ.SpeedAsPercentMax = (short)5;
                throw new InstrumentError("Could not get material from plate",this,thrown);
            }
        }
Esempio n. 7
0
 public bool MovePlateFromVictorToIncubatorWithLidOnTransferStation(int PlateSlot, AdditionalMethodArguments eargs)
 {
     IncubatorServ Incubator = eargs.InstrumentCollection.ReturnInstrumentType<IncubatorServ>();
     TransferStation TransStation = eargs.InstrumentCollection.ReturnInstrumentType<TransferStation>();
     Twister Robot = eargs.InstrumentCollection.ReturnInstrumentType<Twister>();
     //First to unload the plate
     //first to make sure something is on the dang slider thing
     bool HASLID = false;
     if (Incubator.CheckIfSomethingOnTransferOutStation())
     {
         HASLID = true;
         TransStation.TurnOnVacuumAndLiftLid();
     }
     TransStation.MoveStationOut();
     Robot.MovePlateFromPlateReaderToIncubator();
     TransStation.MoveStationIn();
     if (HASLID)
     {
         TransStation.TurnOffVacuumAndReturnLid();
     }
     Incubator.LoadPlate(PlateSlot);
     return true;
 }
Esempio n. 8
0
        public bool ModifyGrowthProtocol(string ExpName, int Slot, AdditionalMethodArguments eargs)
        {
            try
            {
                Protocol toModify = eargs.CallingProtocol;
                CreateProtocolItems(ExpName, Slot);
                toModify.Instructions.Clear();
                toModify.Instructions.Add(DT);
                toModify.Instructions.Add(toVictorInstruction);

                string fname;
                try
                {
                    fname = ReturnLastFileName(@"C:\Growth_Curve_Data\\" + OD_OutDirec);
                }
                catch (Exception thrown)
                {
                    throw new Exception("Could not find most recent file. " + thrown.Message);
                }
                double medVal;
                try
                {
                    medVal = FindLastMedianReading(fname);
                }
                catch (Exception thrown)
                {
                    throw new Exception("Could not detemine median reading. " + thrown.Message);
                }
                //move from incubator to platereader
                if (medVal > pMedianODToStartMeasurement)
                {
                    toModify.Instructions.Add(VenusReadInstruction);
                }
                else {
                    toModify.Instructions.Add(ODReadInstruction);
                }
                toModify.Instructions.Add(awayFromVictorInstruction);
                toModify.Instructions.Add(ReturnInstruction);
                toModify.NextItemToRun = 0;

            }
            catch (Exception thrown)
            {
                throw new InstrumentError("General Problem:" +thrown.Message,true,this);
            }
                return true;
        }