Example #1
0
        /// <summary>
        /// 分液
        /// </summary>
        public void Distribute()
        {
            int[] absorbs = { (int)DistributeVol, (int)DistributeVol, (int)DistributeVol, (int)DistributeVol };
            var   act     = Sequence.create(InjectAbsorb.create(3000, injectorDevice.GetSeleteced(), DistributeSpeed, absorbs, IMask.Gen(0)));

            act.runAction(injectorDevice);
        }
Example #2
0
        /// <summary>
        /// 吸液
        /// </summary>
        public void Absorb()
        {
            int[] absorbs = { -(int)AbsorbVol, -(int)AbsorbVol, -(int)AbsorbVol, -(int)AbsorbVol };
            var   act     = Sequence.create(InjectAbsorb.create(30000, injectorDevice.GetSeleteced(), AbsorbSpeed, absorbs, IMask.Gen(0)));

            act.runAction(injectorDevice);
        }
        //按小组生成动作
        public Sequence GenerateAction(List <T_GelStep> act_group, SampleInfo sample_info)
        {
            //更新坐标计算针头个数
            int zt_count = 0;

            foreach (var act in act_group)
            {
                zt_count += act.InjectCount;
                act.UpdataPoints(sample_info);
            }
            var resmanager = ResManager.getInstance();

            Enterclose[] enters = new Enterclose[zt_count];//使用加样器个数
            for (int i = 0; i < zt_count; i++)
            {
                enters[i] = injectorDevice.Injector.Entercloses[i];
            }
            //生成装帧动作
            var tip_seat = resmanager.GetFreeTip(zt_count);

            int [] absorbs =
            {
                (int)injectorDevice.Injector.Entercloses[0].PumpMotor.Maximum.SetValue,
                (int)injectorDevice.Injector.Entercloses[1].PumpMotor.Maximum.SetValue,
                (int)injectorDevice.Injector.Entercloses[2].PumpMotor.Maximum.SetValue,
                (int)injectorDevice.Injector.Entercloses[3].PumpMotor.Maximum.SetValue
            };
            var sequ_taketip = Sequence.create(
                InjectTakeTip.create(30000, tip_seat.Z, 0, 0, tip_seat),
                InjectAbsorbMove.create(30000, enters, 100, absorbs));
            //生成加样动作
            var sequ_takesample = Sequence.create();
            var act_tree        = DivideXIntoGroups(act_group);
            int inject_beg      = 0;

            int[] point = { 0, 0, 0, 0 };
            for (int i = 0; i < 4; i++)
            {
                point[i] = (int)injectorDevice.Injector.Entercloses[i].YMotor.CurrentDistance;
                if (point[i] == 0)
                {
                    point[i] += (int)injectorDevice.Injector.Entercloses[i].YZero;
                }
            }
            foreach (var act_g in act_tree)
            {
                var   sque_movey = Sequence.create();
                int   index      = 0;
                bool  is_ok      = false;
                int[] tager      = { -1, -1, -1, -1 };
                int[] width      = { 0, 0, 0, 0 };
                for (int i = 0; i < 4; i++)
                {
                    width[i] = (int)injectorDevice.Injector.Entercloses[1].YZero;
                    if (i < act_g.Count())
                    {
                        tager[inject_beg + i] = act_g[i].Abs_Y;
                    }
                }
                GenerateSampleAddAct(ref sque_movey, ref index, ref tager, ref point, ref width, ref is_ok);
                inject_beg += act_g.Count();
                if (is_ok)
                {
                    sequ_takesample.AddAction(MoveTo.create(30000, act_g[0].Abs_X, -1, -1));//移动X
                    sequ_takesample.AddAction(sque_movey);
                }
            }
            //生成混合液体
            var sequ_mixsample = Sequence.create();

            foreach (var act in act_group)
            {
                if (act.IsMix())
                {
                    sequ_mixsample.AddAction(MoveTo.create(30000, act.Mix_X, act.Mix_Y, -1));
                    sequ_mixsample.AddAction(InjectMoveTo.create(30000, enters, -1, IMask.Gen(-1), IMask.Gen(act.Mix_Z)));
                    if (act.StepClass == TestStepEnum.FPXSY)
                    {
                        for (int i = 0; i < 3; i++)
                        {
                            absorbs[0] = 1000;
                            sequ_mixsample.AddAction(InjectAbsorb.create(30000, enters, 100, absorbs));
                            absorbs[0] = -1000;
                            sequ_mixsample.AddAction(InjectAbsorb.create(30000, enters, 100, absorbs));
                        }
                    }
                    if (act.IsSpu() == false)
                    {
                        absorbs[0] = 1000;
                        sequ_mixsample.AddAction(InjectAbsorb.create(30000, enters, 100, absorbs));
                    }
                    sequ_mixsample.AddAction(InjectMoveTo.create(30000, enters, -1, IMask.Gen(-1), IMask.Gen(0)));
                }
            }
            //生成分配动作
            var sequ_putsample = Sequence.create();

            foreach (var act in act_group)
            {
                if (act.IsSpu())
                {
                    sequ_putsample.AddAction(MoveTo.create(30000, act.Spu_X, act.Spu_Y, -1));
                    sequ_putsample.AddAction(InjectMoveTo.create(30000, injectorDevice.GetSeleteced(), -1, IMask.Gen(-1), IMask.Gen(act.Spu_Z)));
                    absorbs[0] = 1000;
                    sequ_putsample.AddAction(InjectAbsorb.create(30000, injectorDevice.GetSeleteced(), 100, absorbs));
                    sequ_putsample.AddAction(InjectMoveTo.create(30000, injectorDevice.GetSeleteced(), -1, IMask.Gen(-1), IMask.Gen(0)));
                }
            }

            var action_list = Sequence.create();
            //生成脱针动作
            var sequ_puttip   = Sequence.create();
            var inject_unload = resmanager.unload_list;

            if (inject_unload.Count() == 1)
            {
                sequ_puttip.AddAction(InjectPutTip.create(30000, (int)inject_unload[0].Z, 800, (int)inject_unload[0].FirstX, 0, new TakeTipData((int)inject_unload[0].X, (int)inject_unload[0].Y, 0, 1)));
                sequ_puttip.AddAction(InitXyz.create(30000, injectorDevice.GetSeleteced(), false, false, true));
            }
            action_list.AddAction(sequ_taketip);
            action_list.AddAction(sequ_takesample);
            action_list.AddAction(sequ_mixsample);
            action_list.AddAction(sequ_putsample);
            action_list.AddAction(sequ_puttip);
            return(action_list);
        }
Example #4
0
        //生成加样移动组合
        public void GenerateInjectActGroup(ref Sequence seque, ref int index, ref ActionPoint[] tager, ref int[] point, ref int[] width, ref bool is_ok, ActionBase move_x = null, Spawn move_zt = null)
        {
            if (index == 4)
            {
                is_ok = true;
                return;
            }
            else if (tager[index].y == point[index] || tager[index].y == -1)
            {
                if (tager[index].y == point[index])
                {
                    var action_point        = tager[index];
                    var move_act            = Sequence.create();
                    List <Enterclose> ents  = new List <Enterclose>();
                    int[]             injz  = IMask.Gen(-1);
                    int[]             injzl = IMask.Gen(-1);
                    int[]             injzd = IMask.Gen(-1);
                    ents.Add(Engine.getInstance().injectorDevice.Injector.Entercloses[index]);
                    move_act.AddAction(SkWaitForAction.create(move_x));
                    if (action_point.type == TestStepEnum.JXZT)
                    {
                        int[] absorbs   = IMask.Gen(-1);
                        var   injact_sp = Spawn.create();
                        injz[index]    = action_point.z;
                        absorbs[index] = (int)ents[0].PumpMotor.Maximum.SetValue;
                        injact_sp.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, 2));
                        injact_sp.AddAction(InjectAbsorbMove.create(3001, ents.ToArray(), 100, absorbs));
                        move_act.AddAction(injact_sp);
                        injz[index] = action_point.zb;
                        move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz));
                    }
                    else if (action_point.type == TestStepEnum.PutTip)
                    {
                        injz[index] = action_point.z;
                        var sequ = Sequence.create();
                        sequ.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, 2));
                        sequ.AddAction(MoveTo.create(3001, action_point.puttip_x, -1, -1));
                        injz[index] = action_point.z - 1000;
                        sequ.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, 100));
                        injz[index] = action_point.zb;
                        sequ.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz));
                        move_act.AddAction(sequ);
                    }
                    else if (action_point.type == TestStepEnum.AbsLiquid)
                    {
                        int[] absorbs = IMask.Gen(-1);
                        absorbs[index] = -(action_point.capacity);
                        move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, 0));
                        injz[index] = action_point.z + action_point.deep;
                        move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, action_point.deepspeed));
                        move_act.AddAction(InjectAbsorb.create(3001, ents.ToArray(), action_point.absbspeed, absorbs));
                        //回吸
                        var back_act = Spawn.create();
                        if (action_point.backcapacity != 0)
                        {
                            absorbs[index] = -(action_point.backcapacity);
                            back_act.AddAction(Sequence.create(SKSleep.create(500), InjectAbsorb.create(3001, ents.ToArray(), action_point.backspeed, absorbs)));
                        }
                        injz[index] = action_point.zb;
                        back_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz));
                        move_act.AddAction(back_act);
                    }
                    else if (action_point.type == TestStepEnum.FollowAbsLiquid)
                    {
                        int[] absorbs = IMask.Gen(-1);
                        injz[index]    = action_point.z;
                        injzl[index]   = action_point.z + action_point.detectordeep;
                        injzd[index]   = action_point.deep;
                        absorbs[index] = -(action_point.capacity);
                        move_act.AddAction(InjectDetector.create(3001, ents.ToArray(), injz, injzl, injzd, 2, 1));
                        move_act.AddAction(InjectAbsorb.create(3001, ents.ToArray(), action_point.absbspeed, absorbs));
                        //回吸
                        var back_act = Spawn.create();
                        if (action_point.backcapacity != 0)
                        {
                            absorbs[index] = -(action_point.backcapacity);
                            back_act.AddAction(Sequence.create(SKSleep.create(500), InjectAbsorb.create(3001, ents.ToArray(), action_point.backspeed, absorbs)));
                        }
                        injz[index] = action_point.zb;
                        back_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz));
                        move_act.AddAction(back_act);
                    }
                    else if (action_point.type == TestStepEnum.SpuLiquid)
                    {
                        int[] absorbs = IMask.Gen(-1);
                        injz[index]    = action_point.z;
                        absorbs[index] = action_point.spucapacity + action_point.backcapacity;
                        move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, 2));
                        move_act.AddAction(InjectAbsorb.create(3001, ents.ToArray(), action_point.spuspeed, absorbs));
                        //回吸
                        var back_act = Spawn.create();
                        if (action_point.backcapacity != 0)
                        {
                            absorbs[index] = -(action_point.backcapacity);
                            back_act.AddAction(Sequence.create(SKSleep.create(100), InjectAbsorb.create(3001, ents.ToArray(), action_point.backcapacity, absorbs)));
                        }
                        injz[index] = action_point.zb;
                        back_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz));
                        move_act.AddAction(back_act);
                    }
                    else if (action_point.type == TestStepEnum.MixLiquid)
                    {
                        int[] absorbs = IMask.Gen(-1);
                        injz[index] = action_point.z;
                        move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, 2));
                        absorbs[index] = action_point.capacity;
                        move_act.AddAction(InjectAbsorb.create(3001, ents.ToArray(), 100, absorbs));//把稀释液放进去
                        //混合操作
                        if (action_point.mixtimes != 0)
                        {
                            for (int i = 0; i < action_point.mixtimes * 2; i++)
                            {
                                int mixz = action_point.z - action_point.mixdeep;//混合高度
                                if (mixz <= 0)
                                {
                                    mixz = action_point.z;
                                }
                                absorbs[index] = i % 2 == 0 ? -action_point.capacity : action_point.capacity;
                                injz[index]    = i % 2 == 0 ? action_point.z: mixz;
                                move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, 2));
                                move_act.AddAction(InjectAbsorb.create(3001, ents.ToArray(), 100, absorbs));
                            }
                            injz[index] = action_point.z;
                            move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz, 2));
                            absorbs[index] = (int)ents[0].PumpMotor.Maximum.SetValue;
                            move_act.AddAction(InjectAbsorbMove.create(3001, ents.ToArray(), 100, absorbs));
                            absorbs[index] = -(action_point.GetTubeList().Count *action_point.spucapacity);
                            move_act.AddAction(InjectAbsorb.create(3001, ents.ToArray(), 100, absorbs));
                        }
                        //回吸
                        if (action_point.backcapacity != 0)
                        {
                            injz[index] = action_point.z;
                            move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz));
                            absorbs[index] = -(action_point.backcapacity);
                            move_act.AddAction(InjectAbsorb.create(3001, ents.ToArray(), action_point.backspeed, absorbs));
                        }
                        injz[index] = action_point.zb;
                        move_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, IMask.Gen(-1), injz));
                    }
                    //查找前面的
                    if (move_zt != null)
                    {
                        move_zt.AddAction(move_act);
                    }
                    else
                    {
                        seque.AddAction(move_act);
                    }
                }
                index++;
                GenerateInjectActGroup(ref seque, ref index, ref tager, ref point, ref width, ref is_ok, move_x, move_zt);
            }
            else
            {
                List <int[]> node_list = new List <int[]>();
                for (int i = 0; i < 4; i++)
                {
                    for (int j = i; j < 4; j++)
                    {
                        for (int k = j; k < 4; k++)
                        {
                            for (int l = k; l < 4; l++)
                            {
                                int[] point_tem = { 0, 0, 0, 0 };
                                point_tem[i] = tager[i].y;
                                point_tem[j] = tager[j].y;
                                point_tem[k] = tager[k].y;
                                point_tem[l] = tager[l].y;
                                for (int n = 0; n < 4; n++)
                                {
                                    if (point_tem[n] < 0)
                                    {
                                        point_tem[n] = 0;
                                    }
                                }
                                bool ispass = true;
                                int  frist  = 0;
                                for (int n = 0; n < 4; n++)
                                {
                                    if (point_tem[n] != 0)
                                    {
                                        frist = n;
                                        break;
                                    }
                                }
                                for (int n = frist; n < 4; n++)
                                {
                                    if (point_tem[n] == 0 && n - 1 >= 0)
                                    {
                                        point_tem[n] = point_tem[n - 1] + width[n];
                                    }
                                }
                                for (int n = 0; n < frist; n++)
                                {
                                    if (point_tem[n] == 0 && n + 1 <= 3)
                                    {
                                        point_tem[n] = point_tem[frist] - width[n] * (frist - n);
                                    }
                                }
                                for (int n = 0; n < 4; n++)
                                {
                                    bool isforward = n - 1 >= 0 ? point_tem[n] >= point_tem[n - 1] + width[n - 1] : true;
                                    bool isback    = n + 1 <= 3 ? point_tem[n] + width[n] <= point_tem[n + 1] : true;

                                    ispass = isforward && isforward;
                                    if (!ispass)
                                    {
                                        break;
                                    }
                                }
                                if (ispass && point_tem[index] == tager[index].y)
                                {
                                    node_list.Add(point_tem);
                                }
                            }
                        }
                    }
                }
                int[] minnode = node_list[0];
                foreach (var node in node_list)
                {
                    if (GetLoss(tager, node) < GetLoss(tager, minnode))
                    {
                        minnode = node;
                    }
                }
                List <int> left  = new List <int>();
                List <int> right = new List <int>();
                for (int i = 0; i < 4; i++)
                {
                    if (point[i] - minnode[i] < 0)
                    {
                        left.Add(i);
                    }
                    else
                    {
                        right.Add(i);
                    }
                }
                left.Sort((a, b) => { return(a < b ? 1 : -1); });
                right.Sort((a, b) => { return(a > b ? 1 : -1); });
                var    movesp_act = Spawn.create();
                var    move_act   = Sequence.create();
                string msg        = "";

                int[]             yy   = { -1, -1, -1, -1 };
                int[]             zz   = { -1, -1, -1, -1 };
                List <Enterclose> ents = new List <Enterclose>();
                for (int i = 0; i < left.Count; i++)
                {
                    int indextem = left[i];
                    if (point[indextem] != minnode[indextem])
                    {
                        ents.Add(Engine.getInstance().injectorDevice.Injector.Entercloses[indextem]);
                        yy[indextem] = minnode[indextem];
                    }
                }
                movesp_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, yy, zz));
                ents.Clear();
                for (int i = 0; i < right.Count; i++)
                {
                    int indextem = right[i];
                    if (point[indextem] != minnode[indextem])
                    {
                        ents.Add(Engine.getInstance().injectorDevice.Injector.Entercloses[indextem]);
                        yy[indextem] = minnode[indextem];
                    }
                }
                movesp_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, yy, zz));
                for (int i = 0; i < 4; i++)
                {
                    point[i] = minnode[i];
                }
                move_act.AddAction(movesp_act);
                //同步Z动作
                var spawz_action = Spawn.create();
                move_act.AddAction(spawz_action);
                seque.AddAction(move_act);
                GenerateInjectActGroup(ref seque, ref index, ref tager, ref point, ref width, ref is_ok, move_x, spawz_action);
            }
        }
Example #5
0
        //生成加样移动组合
        public void GenerateInjectActGroup(ref Sequence seque, int [] hitsort, ref int index, ref ActionPoint[] tager, ref int[] point, ref int[] width, ref double[] width_rate, ref bool is_ok, ActionBase move_x = null)
        {
            int hit_index = 0;

            if (index < 4)
            {
                hit_index = hitsort[index];
            }

            if (index == 4)
            {
                is_ok = true;
                return;
            }
            else if ((tager[hit_index].isdone && tager[hit_index].y == point[hit_index]) || tager[hit_index].y == -1)
            {
                index++;
                GenerateInjectActGroup(ref seque, hitsort, ref index, ref tager, ref point, ref width, ref width_rate, ref is_ok, move_x);
            }
            else
            {
                List <int[]> node_list = new List <int[]>();
                int[]        width_tem = IMask.Gen(0);
                for (int i = 0; i < 4; i++)
                {
                    width_tem[i] = (int)(width[i] * width_rate[hit_index]);
                }
                for (int i = 0; i < 4; i++)
                {
                    for (int j = i; j < 4; j++)
                    {
                        for (int k = j; k < 4; k++)
                        {
                            for (int l = k; l < 4; l++)
                            {
                                int[] point_tem = { 0, 0, 0, 0 };
                                point_tem[i] = tager[i].y;
                                point_tem[j] = tager[j].y;
                                point_tem[k] = tager[k].y;
                                point_tem[l] = tager[l].y;
                                for (int n = 0; n < 4; n++)
                                {
                                    if (point_tem[n] < 0)
                                    {
                                        point_tem[n] = 0;
                                    }
                                }
                                bool ispass = true;
                                int  frist  = 0;
                                for (int n = 0; n < 4; n++)
                                {
                                    if (point_tem[n] != 0)
                                    {
                                        frist = n;
                                        break;
                                    }
                                }
                                for (int n = frist; n < 4; n++)
                                {
                                    if (point_tem[n] == 0 && n - 1 >= 0)
                                    {
                                        point_tem[n] = point_tem[n - 1] + width_tem[n];
                                    }
                                }
                                for (int n = 0; n < frist; n++)
                                {
                                    if (point_tem[n] == 0 && n + 1 <= 3)
                                    {
                                        point_tem[n] = point_tem[frist] - width_tem[n] * (frist - n);
                                    }
                                }
                                for (int n = 0; n < 4; n++)
                                {
                                    bool isforward = n - 1 >= 0 ? point_tem[n] >= point_tem[n - 1] + width_tem[n - 1] : true;
                                    bool isback    = n + 1 <= 3 ? point_tem[n] + width_tem[n] <= point_tem[n + 1] : true;

                                    ispass = isforward && isforward;
                                    if (!ispass)
                                    {
                                        break;
                                    }
                                }
                                if (ispass && point_tem[hit_index] == tager[hit_index].y)
                                {
                                    node_list.Add(point_tem);
                                }
                            }
                        }
                    }
                }
                int[] minnode = node_list[0];
                foreach (var node in node_list)
                {
                    if (GetLoss(tager, node) < GetLoss(tager, minnode))
                    {
                        minnode = node;
                    }
                }
                List <int> left  = new List <int>();
                List <int> right = new List <int>();
                for (int i = 0; i < 4; i++)
                {
                    if (point[i] - minnode[i] < 0)
                    {
                        left.Add(i);
                    }
                    else
                    {
                        right.Add(i);
                    }
                }
                left.Sort((a, b) => { return(a < b ? 1 : -1); });
                right.Sort((a, b) => { return(a > b ? 1 : -1); });
                var    movesp_act = Spawn.create();
                var    move_act   = Sequence.create();
                string msg        = "";

                int[]             yy   = IMask.Gen(-1);
                int[]             zz   = IMask.Gen(-1);
                List <Enterclose> ents = new List <Enterclose>();
                for (int i = 0; i < left.Count; i++)
                {
                    int indextem = left[i];
                    if (point[indextem] != minnode[indextem])
                    {
                        ents.Add(Engine.getInstance().injectorDevice.Injector.Entercloses[indextem]);
                        yy[indextem] = minnode[indextem];
                    }
                }
                for (int i = 0; i < right.Count; i++)
                {
                    int indextem = right[i];
                    if (point[indextem] != minnode[indextem])
                    {
                        ents.Add(Engine.getInstance().injectorDevice.Injector.Entercloses[indextem]);
                        yy[indextem] = minnode[indextem];
                    }
                }
                movesp_act.AddAction(InjectMoveTo.create(3001, ents.ToArray(), -1, yy, zz));
                for (int i = 0; i < 4; i++)
                {
                    point[i] = minnode[i];
                }
                move_act.AddAction(movesp_act);

                //得到到达的点
                List <ActionPoint> done_points = new List <ActionPoint>();
                List <Enterclose>  entcloses   = new List <Enterclose>();
                for (int i = 0; i < 4; i++)
                {
                    if (tager[i].y == point[i] && tager[i].isdone == false)
                    {
                        done_points.Add(tager[i]);
                        entcloses.Add(Engine.getInstance().injectorDevice.Injector.Entercloses[i]);
                        tager[i].isdone = true;
                    }
                }
                var run_act = Sequence.create();
                //对到达的点进行分类生成
                int[] injz    = IMask.Gen(-1);
                int[] injzl   = IMask.Gen(-1);
                int[] injzd   = IMask.Gen(-1);
                int[] absorbs = IMask.Gen(-1);
                run_act.AddAction(SkWaitForAction.create(move_x));
                if (done_points.Count != 0)
                {
                    if (done_points[0].type == TestStepEnum.JXZT)
                    {
                        var injact_sp = Spawn.create();
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index]    = done_points[i].z;
                            absorbs[entcloses[i].Index] = (int)entcloses[0].PumpMotor.Maximum.SetValue;
                        }
                        injact_sp.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz, 2));
                        injact_sp.AddAction(InjectAbsorbMove.create(3001, entcloses.ToArray(), 100, absorbs));
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index] = done_points[i].zb;
                        }
                        run_act.AddAction(injact_sp);
                        run_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz));
                    }
                    else if (done_points[0].type == TestStepEnum.PutTip)
                    {
                        var sequ = Sequence.create();
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index] = done_points[i].z;
                        }
                        sequ.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz, 2));
                        sequ.AddAction(MoveTo.create(3001, done_points[0].puttip_x, -1, -1));
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index] = done_points[i].z - 1000;
                        }
                        sequ.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz, 1));
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index] = done_points[i].zb;
                        }
                        sequ.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz));
                        run_act.AddAction(sequ);
                    }
                    else if (done_points[0].type == TestStepEnum.AbsLiquid)
                    {
                        run_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), IMask.Gen(-1), 0));
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index]    = done_points[i].z + done_points[i].deep;
                            absorbs[entcloses[i].Index] = -(done_points[i].capacity);
                        }
                        run_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz, done_points[0].deepspeed));
                        run_act.AddAction(InjectAbsorb.create(3001, entcloses.ToArray(), done_points[0].absbspeed, absorbs));
                        //回吸
                        var back_act = Spawn.create();
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            if (done_points[i].backcapacity != 0)
                            {
                                absorbs[entcloses[i].Index] = -(done_points[i].backcapacity);
                                List <Enterclose> ent_tem = new List <Enterclose>();
                                ent_tem.Add(entcloses[i]);
                                back_act.AddAction(Sequence.create(SKSleep.create(200), InjectAbsorb.create(3001, ent_tem.ToArray(), done_points[i].backspeed, absorbs)));
                            }
                        }
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index] = done_points[i].zb;
                        }
                        back_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz));
                        run_act.AddAction(back_act);
                    }
                    else if (done_points[0].type == TestStepEnum.FollowAbsLiquid)
                    {
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index]    = done_points[i].z;
                            injzl[entcloses[i].Index]   = done_points[i].z + done_points[i].detectordeep;
                            injzd[entcloses[i].Index]   = done_points[i].deep;
                            absorbs[entcloses[i].Index] = -(done_points[i].capacity);
                        }
                        run_act.AddAction(InjectDetector.create(3001, entcloses.ToArray(), injz, injzl, injzd, 2, 1));
                        run_act.AddAction(InjectAbsorb.create(3001, entcloses.ToArray(), done_points[0].absbspeed, absorbs));
                        //回吸
                        var back_act = Spawn.create();
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            if (done_points[i].backcapacity != 0)
                            {
                                absorbs[entcloses[i].Index] = -(done_points[i].backcapacity);
                                List <Enterclose> ent_tem = new List <Enterclose>();
                                ent_tem.Add(entcloses[i]);
                                back_act.AddAction(Sequence.create(SKSleep.create(200), InjectAbsorb.create(3001, ent_tem.ToArray(), done_points[i].backspeed, absorbs)));
                            }
                        }
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index] = done_points[i].zb;
                        }
                        back_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz));
                        run_act.AddAction(back_act);
                    }
                    else if (done_points[0].type == TestStepEnum.SpuLiquid)
                    {
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index]    = done_points[i].z;
                            absorbs[entcloses[i].Index] = done_points[i].spucapacity + done_points[i].backcapacity;
                        }
                        run_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz, 2));
                        run_act.AddAction(InjectAbsorb.create(3001, entcloses.ToArray(), done_points[0].spuspeed, absorbs));
                        //回吸
                        var back_act = Spawn.create();
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            if (done_points[i].backcapacity != 0)
                            {
                                absorbs[entcloses[i].Index] = -(done_points[i].backcapacity);
                                List <Enterclose> ent_tem = new List <Enterclose>();
                                ent_tem.Add(entcloses[i]);
                                back_act.AddAction(Sequence.create(SKSleep.create(200), InjectAbsorb.create(3001, ent_tem.ToArray(), done_points[i].backspeed, absorbs)));
                            }
                        }
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index] = done_points[i].zb;
                        }
                        back_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz));
                        run_act.AddAction(back_act);
                    }
                    else if (done_points[0].type == TestStepEnum.MixLiquid)
                    {
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index]    = done_points[i].z;
                            absorbs[entcloses[i].Index] = done_points[i].capacity + done_points[i].backcapacity;
                        }
                        run_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz, 2));
                        run_act.AddAction(InjectAbsorb.create(3001, entcloses.ToArray(), 100, absorbs));//把稀释液放进去
                        //混合操作
                        var mix_act = Spawn.create();
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            List <Enterclose> ent_tem = new List <Enterclose>();
                            ent_tem.Add(entcloses[i]);
                            var mix_seq_act = Sequence.create();
                            if (done_points[i].mixtimes != 0)
                            {
                                for (int j = 0; j < done_points[i].mixtimes * 2; j++)
                                {
                                    int mixz = done_points[i].z - done_points[i].mixdeep;//混合高度
                                    if (mixz <= 0)
                                    {
                                        mixz = done_points[i].z;
                                    }
                                    absorbs[entcloses[i].Index] = j % 2 == 0 ? -done_points[i].capacity : done_points[i].capacity;
                                    injz[entcloses[i].Index]    = j % 2 == 0 ? done_points[i].z : mixz;
                                    mix_seq_act.AddAction(InjectMoveTo.create(3001, ent_tem.ToArray(), -1, IMask.Gen(-1), injz, 2));
                                    mix_seq_act.AddAction(InjectAbsorb.create(30001, ent_tem.ToArray(), 100, absorbs));
                                }
                                injz[entcloses[i].Index] = done_points[i].z;
                                mix_seq_act.AddAction(InjectMoveTo.create(3001, ent_tem.ToArray(), -1, IMask.Gen(-1), injz, 2));
                                absorbs[entcloses[i].Index] = (int)ent_tem[0].PumpMotor.Maximum.SetValue;
                                mix_seq_act.AddAction(InjectAbsorbMove.create(3001, ent_tem.ToArray(), 100, absorbs));
                                absorbs[entcloses[i].Index] = -(done_points[i].GetTubeList().Count *done_points[i].spucapacity);
                                mix_seq_act.AddAction(InjectAbsorb.create(3001, ent_tem.ToArray(), 100, absorbs));
                            }

                            mix_act.AddAction(mix_seq_act);
                        }
                        run_act.AddAction(mix_act);
                        var zb_act = Spawn.create();
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            injz[entcloses[i].Index] = done_points[i].zb;
                        }
                        zb_act.AddAction(InjectMoveTo.create(3001, entcloses.ToArray(), -1, IMask.Gen(-1), injz));
                        //回吸
                        var back_act = Spawn.create();
                        for (int i = 0; i < done_points.Count; i++)
                        {
                            List <Enterclose> ent_tem = new List <Enterclose>();
                            ent_tem.Add(entcloses[i]);
                            if (done_points[i].backcapacity != 0 && done_points[i].mixtimes != 0)
                            {
                                absorbs[entcloses[i].Index] = -(done_points[i].backcapacity);
                                back_act.AddAction(Sequence.create(SKSleep.create(500), InjectAbsorb.create(3001, ent_tem.ToArray(), done_points[i].backspeed, absorbs)));
                            }
                        }
                        zb_act.AddAction(back_act);
                        run_act.AddAction(zb_act);
                    }
                }
                move_act.AddAction(run_act);
                seque.AddAction(move_act);
                GenerateInjectActGroup(ref seque, hitsort, ref index, ref tager, ref point, ref width, ref width_rate, ref is_ok, move_x);
            }
        }