Beispiel #1
0
        private void Never_Call_initializeTwisterPositions()
        {
            ListOfSpots = new List<Twister.TwisterPosition>();
            //These positions will change in the new location, you can find them by using the twister software from caliper
            //that software trains a position, and by typing them here you are a-ok, trying to get them programmatically was a pain
            ReaderSafe = new Twister.TwisterPosition("Reader Safe", "Absolute", 2955, -1938, 76960, 137482, 80);
            ListOfSpots.Add(ReaderSafe);
            ReaderOverPlate = new Twister.TwisterPosition("Reader Clearance", "Absolute", 2825, 97301, 76954, 137781, 60);
            ListOfSpots.Add(ReaderOverPlate);
            ReaderPlate = new Twister.TwisterPosition("Reader Place", "Absolute", -86579, 97301, 76954, 137781, 15);
            ListOfSpots.Add(ReaderPlate);
            //now for the incubator, actually the process incubator in Clara
            IncubatorSafe = new Twister.TwisterPosition("Incubator Safe", "Absolute", 2818, -1938, 118087, -23783, 80);
            ListOfSpots.Add(IncubatorSafe);
            IncubatorOverPlate = new Twister.TwisterPosition("Incubator Clearance", "Absolute", 2825, 84559, 117459, -21274,60);
            ListOfSpots.Add(IncubatorOverPlate);
            //IncubatorOverPlate = new TwisterPosition("PlaceClearance1", "Absolute", 2825, 85560, 117905, -21274, 60);
            IncubatorPlate = new Twister.TwisterPosition("Incubator Place", "Absolute", -70000, 84559, 117459, -21274, 15);
            ListOfSpots.Add(IncubatorPlate);
            //IncubatorPlate = new TwisterPosition("Place1", "Absolute", -70000, 85560, 117905, -21274, 15);

            //Now for the Garbage Location
            GarbageLocation = new Twister.TwisterPosition("Garbage Safe", "Absolute", 2900, 49999, 209223, -5121, 20);
            ListOfSpots.Add(GarbageLocation);
            //Now for a safe spot
            GlobalSafe = new Twister.TwisterPosition("Global Safe", "Absolute", 2900, -5732, 179861, -5121, 45);
            ListOfSpots.Add(GlobalSafe);
            //Now to give all the coordinates of the rack positions
            RackPositions = new Twister.TwisterPosition[6, 2];
            short RackMoveSpeed = 30;
            RackPositions[0, 0] = new Twister.TwisterPosition("Rack 1 Clearance", "Absolute", 3000, -2435, 150443, -4285, RackMoveSpeed);
            RackPositions[0, 1] = new Twister.TwisterPosition("Rack 1", "Absolute", -54329, -2435, 150443, -4285, RackMoveSpeed);
            RackPositions[1, 0] = new Twister.TwisterPosition("Rack 2 Clearance", "Absolute", 3000, 61010, 176446, -4076, RackMoveSpeed);
            RackPositions[1, 1] = new Twister.TwisterPosition("Rack 2", "Absolute", -49473, 61010, 176446, -4076, RackMoveSpeed);
            RackPositions[2, 0] = new Twister.TwisterPosition("Rack 3 Clearance", "Absolute", 3000, -1582, 202995, -5644, RackMoveSpeed);
            RackPositions[2, 1] = new Twister.TwisterPosition("Rack 3", "Absolute", -54628, -1582, 202995, -5644, RackMoveSpeed);
            //fourth positions are on the other side
            RackPositions[3, 0] = new Twister.TwisterPosition("Rack 4 Clearance", "Absolute", 3000, -2939, 22129, -3137, RackMoveSpeed);
            RackPositions[3, 1] = new Twister.TwisterPosition("Rack 4", "Absolute", -54171, -2939, 22129, -3137, RackMoveSpeed);
            RackPositions[4, 0] = new Twister.TwisterPosition("Rack 5 Clearance", "Absolute", 3000, 61478, -3754, -4289, RackMoveSpeed);
            RackPositions[4, 1] = new Twister.TwisterPosition("Rack 5", "Absolute", -54361, 61478, -3754, -4289, RackMoveSpeed);
            RackPositions[5, 0] = new Twister.TwisterPosition("Rack 6 Clearance", "Absolute", 3000, -1856, -29650, -2875, RackMoveSpeed);
            RackPositions[5, 1] = new Twister.TwisterPosition("Rack 6", "Absolute", -54107, -1856, -29650, -2875, RackMoveSpeed);
            foreach (Twister.TwisterPosition pos in RackPositions)
            {
                ListOfSpots.Add(pos);
            }
            //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 = new Twister.TwisterPosition("Sci Safe", "Absolute", 2825, -1938, 274934, -23783, 30);
            ListOfSpots.Add(ScicloneSafe);

            //SciCloneSpots = new Twister.TwisterPosition[4, 2];
            //SciCloneSpots[0, 0] = new Twister.TwisterPosition("SciClone 1 Clearance", "Absolute", 2759, 210403, 239658, -93685, 20);
            //SciCloneSpots[0, 1] = new Twister.TwisterPosition("SciClone 1", "Absolute", -85132, 210403, 239658, -93685, 5);
            //SciCloneSpots[1, 0] = new Twister.TwisterPosition("SciClone 2 Clearance", "Absolute", -48051, 160782, 255749, -115764, 20);
            //SciCloneSpots[1, 1] = new Twister.TwisterPosition("SciClone 2", "Absolute", -125830, 1160782, 255749, -115764, 20);
            //SciCloneSpots[2, 0] = new Twister.TwisterPosition("SciClone 3 Clearance", "Absolute", -53682, 153407, 273898, -142338, 20);
            //SciCloneSpots[2, 1] = new Twister.TwisterPosition("SciClone 3", "Absolute", -128136, 153407, 273898, -142338, 5);
            ////Now the shaker
            //SciCloneSpots[3, 0] = new Twister.TwisterPosition("SciClone 4 Clearance", "Absolute", -48057, 192265, 290704, -166918, 20);
            //SciCloneSpots[3, 1] = new Twister.TwisterPosition("SciClone 4", "Absolute", -95143, 192265, 290704, -166918, 5);
            //foreach(Twister.TwisterPosition pos in SciCloneSpots)
            //{
            //    ListOfSpots.Add(pos);
            //}
            TwistDict = new Dictionary<string, Twister.TwisterPosition>();
            foreach (Twister.TwisterPosition pos in ListOfSpots)
            {
                lstPositions.Items.Add(pos);
                TwistDict[pos.Name]= pos;
            }
        }
Beispiel #2
0
 private void DeSerializeList()
 {
     TwistDict=new Dictionary<string,Twister.TwisterPosition>();
         FileStream f=new FileStream(FilePath,FileMode.Open);
         BinaryFormatter b=new BinaryFormatter();
         TwistDict = (Dictionary<string,Twister.TwisterPosition>)b.Deserialize(f);
         f.Close();
         foreach(Twister.TwisterPosition pos in TwistDict.Values)
         {
             lstPositions.Items.Add(pos);
         }
         Twister.TwisterPosition TestPos = new Twister.TwisterPosition("Test", "Absolute", 0, 0, 0, 0, 15);
         lstPositions.Items.Add(TestPos);
 }