Ejemplo n.º 1
0
        public void ResetGantryZ2(MachineStep step)
        {
            if (GantryZ2 != Gantry.None)
            {
                if (GantryCouplingZ2 == GantryCoupling.None)
                {
                    throw new InvalidOperationException("Gantry coupling could not be none!");
                }
                var slaveUnhooked = GantryCouplingZ2 == GantryCoupling.Single;

                if (GantryZ2 == StateData.Axes.Gantry.First)
                {
                    step.Actions.Add(new LinearPositionLinkGantryOffAction()
                    {
                        Name = "Gantry off AB", MasterId = 112, SlaveId = 212, SlaveUnhooked = slaveUnhooked
                    });
                }
                else
                {
                    step.Actions.Add(new LinearPositionLinkGantryOffAction()
                    {
                        Name = "Gantry off AB", MasterId = 212, SlaveId = 112, SlaveUnhooked = slaveUnhooked
                    });
                }

                GantryZ2 = StateData.Axes.Gantry.None;
            }

            GantryCouplingZ2 = GantryCoupling.None;
        }
Ejemplo n.º 2
0
        public void SetGantryZ(double g, MachineStep step, bool slaveUnhooked = false)
        {
            if ((g == 1) || (g == 2))
            {
                var gantry = (g == 1.0) ? Gantry.First : Gantry.Second;
                int master = (g == 1.0) ? 102 : 202;
                int slave  = (g == 1.0) ? 202 : 102;

                step.Actions.Add(new LinearPositionLinkGantryOnAction()
                {
                    Name = "Gantry on ZW", MasterId = master, SlaveId = slave, SlaveUnhooked = slaveUnhooked
                });
                GantryZ          = gantry;
                GantryCouplingZ  = slaveUnhooked ? GantryCoupling.Single : GantryCoupling.Couple;
                GantryZ2         = Gantry.None;
                GantryCouplingZ2 = GantryCoupling.None;
            }
            else if ((g == 3) || (g == 4))
            {
                var gantry = (g == 3.0) ? Gantry.First : Gantry.Second;
                int master = (g == 3.0) ? 112 : 212;
                int slave  = (g == 3.0) ? 212 : 112;

                step.Actions.Add(new LinearPositionLinkGantryOnAction()
                {
                    Name = "Gantry on AB", MasterId = master, SlaveId = slave, SlaveUnhooked = slaveUnhooked
                });
                GantryZ2         = gantry;
                GantryCouplingZ2 = slaveUnhooked ? GantryCoupling.Single : GantryCoupling.Couple;
                GantryZ          = Gantry.None;
                GantryCouplingZ  = GantryCoupling.None;
            }
        }