Exemplo n.º 1
0
 private void MoveToPosition(TwisterPosition Position, short MoveSpeed)
 {
     if (!RobotServ.Vertical.get_MotorEnabled())
     {
         EnableVerticalMotor();
     }
     RobotServ.SpeedAsPercentMax = MoveSpeed;
     RobotServ.MoveAbsolute(Position.Rotary, Position.Reach, Position.Vertical, Position.Wrist, Position.Track);
 }
Exemplo n.º 2
0
 //Private methods
 private void MoveToPosition(TwisterPosition Position)
 {
     MoveToPosition(Position, Position.SpeedToMoveAt);
 }
Exemplo n.º 3
0
        public void PlaceItemInRack(int RackNumber)
        {
            try
            {
                TwisterPosition Safe = RackPositions[RackNumber - 1, 0];
                TwisterPosition Poised = RackPositions[RackNumber - 1, 1];
                TwisterPosition[] ToMoveTo = new TwisterPosition[2] { Safe, Poised };
                foreach (TwisterPosition Position in ToMoveTo)
                {
                    MoveToPosition(Position);
                    //RobotServ.SpeedAsPercentMax = Position.SpeedToMoveAt;
                   // RobotServ.MoveAbsolute(Position.Rotary, Position.Reach, Position.Vertical, Position.Wrist, Position.Track);
                }
                //now to place the item
                FindMaterialAndReleaseGrip();

                ToMoveTo = new TwisterPosition[2] { Poised, Safe };
                foreach (TwisterPosition Position in ToMoveTo)
                {
                    MoveToPosition(Position);
                    //RobotServ.SpeedAsPercentMax = Position.SpeedToMoveAt;
                    //RobotServ.MoveAbsolute(Position.Rotary, Position.Reach, Position.Vertical, Position.Wrist, Position.Track);
                }
            }
            catch (Exception thrown)
            {
                RobotServ.Abort();
                throw new InstrumentError("Could not place item in rack\n\n" + thrown.Message, false, this);
            }
        }
Exemplo n.º 4
0
        private void initializeTwisterPositions()
        {
            //First to adjust positions
            Dictionary<string, Twister.TwisterPosition> TwistDict = new Dictionary<string, Twister.TwisterPosition>();
            FileStream f = new FileStream(IncubatorPositionsFile, FileMode.Open);
            BinaryFormatter b = new BinaryFormatter();
            TwistDict = (Dictionary<string, Twister.TwisterPosition>)b.Deserialize(f);
            f.Close();

            ReaderSafe = TwistDict["Reader Safe"];
            ReaderOverPlate =TwistDict["Reader Clearance"];
            ReaderPlate = TwistDict["Reader Place"];

            //now for the incubator, actually the process incubator in Clara
            IncubatorSafe = TwistDict["Incubator Safe"];
            IncubatorOverPlate = TwistDict["Incubator Clearance"];
            IncubatorPlate = TwistDict["Incubator Place"];
            //Now for the Garbage Location
            GarbageLocation = TwistDict["Garbage Safe"];
            GlobalSafe = TwistDict["Global Safe"];
            //now for twister rest spots
            RestSafe = TwistDict["Rest Safe"];
            RestLocation = TwistDict["Rest Position"];

            //Now to give all the coordinates of the rack positions
            //RackPositions = new Twister.TwisterPosition[6, 2];
            //for (int i = 0; i < 6; i++)
            //{
            //    string Key2 = "Rack " + (i+1).ToString();
            //    string Key1 = Key2+ " Clearance";
            //    RackPositions[i, 0] = TwistDict[Key1];
            //    RackPositions[i, 1] = TwistDict[Key2];
            //}
            //Now for the SciClonePositions
            //Very important!!! This will hold the positions labelled 1-5, with 1 being closest
            //to the computer.  Position 1 is for the pippette tips, and so will have a special location,
            //while position 4 holdsthe shaker.
            //only position one will have the move absolute rule enforced
            //Note that the first spot is the "safe" position, and the second is the "down" position
            //also note that I am defining one "safety position" for all sciclone moves"
            //ScicloneSafe = TwistDict["Sci Safe"];
            //SciCloneSpots = new Twister.TwisterPosition[4, 2];
            //for (int i = 0; i < 4; i++)
            //{
            //    string Key2 = "SciClone " + (i + 1).ToString();
            //    string Key1 = Key2 + " Clearance";
            //    SciCloneSpots[i, 0] = TwistDict[Key1];
            //    SciCloneSpots[i, 1] = TwistDict[Key2];
            //}
        }
Exemplo n.º 5
0
        public void GrabItemFromRack(int RackNumber)
        {
            try
            {
                TwisterPosition Safe = RackPositions[RackNumber - 1, 0];
                TwisterPosition Poised = RackPositions[RackNumber - 1, 1];

                TwisterPosition[] ToMoveTo = new TwisterPosition[2] { Safe, Poised };
                foreach (TwisterPosition Position in ToMoveTo)
                {
                    MoveToPosition(Position);
                    //RobotServ.SpeedAsPercentMax = Position.SpeedToMoveAt;
                    //RobotServ.MoveAbsolute(Position.Rotary, Position.Reach, Position.Vertical, Position.Wrist, Position.Track);
                }
                //now to get the item
                FindMaterialAndGripIt();

                ToMoveTo = new TwisterPosition[2] { Poised, Safe };
                foreach (TwisterPosition Position in ToMoveTo)
                {
                    MoveToPosition(Position);
                    //RobotServ.SpeedAsPercentMax = Position.SpeedToMoveAt;
                    //RobotServ.MoveAbsolute(Position.Rotary, Position.Reach, Position.Vertical, Position.Wrist, Position.Track);
                }
            }
            catch (Exception thrown)
            {
                throw new InstrumentError("Could not get item\n\n" + thrown.Message, this,thrown);
            }
        }