Пример #1
0
        /// <summary>
        /// 顶升
        /// </summary>
        /// <param name="data"></param>
        /// <param name="site"></param>
        private void SimulationDS(RFIDData data, EnumPSite site)
        {
            switch (site)
            {
            case EnumPSite.S1:
                My.Work_Simulation.Send(new DSJ01(data, DSJ01.EnumActionType.物料顶升));
                break;

            case EnumPSite.S2:
                My.Work_Simulation.Send(new DSJ02(data, DSJ02.EnumActionType.物料顶升));
                break;

            case EnumPSite.S3:
                My.Work_Simulation.Send(new DSJ03(data, DSJ03.EnumActionType.物料顶升));
                break;

            case EnumPSite.S4:
                My.Work_Simulation.Send(new DSJ04(data, DSJ04.EnumActionType.物料顶升));
                break;

            case EnumPSite.S5_Assemble:
                My.Work_Simulation.Send(new DSJ05(data, DSJ05.EnumActionType.物料顶升));
                break;

            case EnumPSite.S6_Alignment:
                My.Work_Simulation.Send(new XLW(data, XLW.EnumActionType.物料顶升));
                break;

            default:
                break;
            }
        }
Пример #2
0
        private void buttonRFIDRead_Click(object sender, EventArgs e)
        {
            buttonRFIDRead.Enabled = false;
            var item = comboBoxRFIDs.SelectedValue as RFIDReader;

            if (item != null)
            {
                var data = item.ReadBytes();
                if (data != null)
                {
                    var str = RFIDReader.BytesToHexString(data);
                    for (int i = 2; i < str.Length; i += 3)
                    {
                        str = str.Insert(i, i == 65 ? "+" : "_");
                    }
                    Data = RFIDData.Deserialize(data);
                    textBoxRFIDData.Text            = str;
                    comboBoxWorkpiece.SelectedValue = Data.Workpiece;
                    comboBoxClean.SelectedValue     = Data.Clean;
                    comboBoxGauge.SelectedValue     = Data.Gauge;
                    comboBoxAssemble.SelectedValue  = Data.Assemble;
                }
            }
            buttonRFIDRead.Enabled = true;
        }
Пример #3
0
        private void buttonRKX_Click(object sender, EventArgs e)
        {
            buttonRKX.Enabled = false;
            var data = RFIDData.GetDefaut(Guid.NewGuid(), EnumWorkpiece.A);

            My.Work_Simulation.Send(new RKX(data, RKX.EnumActionType.定位台2转移物料至入库检测位));
            My.Work_Simulation.Send(new RKX(data, RKX.EnumActionType.入库检测位转移物料至入库位));
            buttonRKX.Enabled = true;
        }
Пример #4
0
        /// <summary>
        /// 阻挡
        /// </summary>
        /// <param name="data"></param>
        /// <param name="site"></param>
        private void SimulationZD(RFIDData data, EnumPSite site)
        {
            switch (site)
            {
            case EnumPSite.S1:
                My.Work_Simulation.Send(new DSJ01(data, DSJ01.EnumActionType.正阻挡位转移物料至顶升机2前阻挡位));
                My.Work_Simulation.Send(new DSJ02(data, DSJ02.EnumActionType.前阻挡位到位));
                break;

            case EnumPSite.S2:
                My.Work_Simulation.Send(new DSJ02(data, DSJ02.EnumActionType.正阻挡位转移物料至顶升机3前阻挡位));
                My.Work_Simulation.Send(new DSJ03(data, DSJ03.EnumActionType.前阻挡位到位));
                break;

            case EnumPSite.S3:
                My.Work_Simulation.Send(new DSJ03(data, DSJ03.EnumActionType.正阻挡位转移物料至顶升机4前阻挡位));
                My.Work_Simulation.Send(new DSJ04(data, DSJ04.EnumActionType.前阻挡位到位));
                break;

            case EnumPSite.S4:
                My.Work_Simulation.Send(new DSJ04(data, DSJ04.EnumActionType.正阻挡位转移物料至顶升机5前阻挡位));
                My.Work_Simulation.Send(new DSJ05(data, DSJ05.EnumActionType.前阻挡位到位));
                break;

            case EnumPSite.S5_Assemble:
                My.Work_Simulation.Send(new DSJ05(data, DSJ05.EnumActionType.正阻挡位转移物料至下料位前阻挡位));
                My.Work_Simulation.Send(new XLW(data, XLW.EnumActionType.前阻挡位到位));
                break;

            case EnumPSite.S6_Alignment:
                My.Work_Simulation.Send(new XLW(data, XLW.EnumActionType.正阻挡位转移物料至升降机2));
                break;

            default:
                break;
            }
        }
Пример #5
0
 public ZPT(RFIDData data, EnumActionType type = EnumActionType.激光雕刻)
     : base(data)
 {
     ActionType      = (int)type;
     ActionParameter = EnumActionParameter.物料信息;
 }
Пример #6
0
 public JQR05(RFIDData data, EnumActionType type)
     : base(data)
 {
     ActionType      = (int)type;
     ActionParameter = EnumActionParameter.物料信息;
 }
Пример #7
0
 public JQR03(RFIDData data, EnumActionType type = EnumActionType.抓取下料位物料至定位台4)
     : base(data)
 {
     ActionType      = (int)type;
     ActionParameter = EnumActionParameter.料盘信息 | EnumActionParameter.物料信息;
 }
Пример #8
0
 public JQR01(RFIDData data, EnumActionType type = EnumActionType.抓取定位台物料至流水线上料位)
     : base(data)
 {
     ActionType      = (int)type;
     ActionParameter = EnumActionParameter.料盘信息 | EnumActionParameter.物料信息;
 }
Пример #9
0
 public SJJ02(RFIDData data, EnumActionType type)
     : base(data)
 {
     ActionType      = (int)type;
     ActionParameter = EnumActionParameter.料盘信息 | EnumActionParameter.物料信息;
 }
Пример #10
0
 public DWT04(RFIDData data, EnumActionType type = EnumActionType.定位台4转移物料至AGV)
     : base(data)
 {
     ActionType      = (int)type;
     ActionParameter = EnumActionParameter.料盘信息 | EnumActionParameter.物料信息;
 }
Пример #11
0
 protected Equipment(RFIDData data)
 {
     RFIDData        = data;
     ActionType      = 1;
     ActionParameter = EnumActionParameter.料盘信息 | EnumActionParameter.物料信息;
 }
Пример #12
0
        /// <summary>
        /// 获取动作参数
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        protected string GetActionParameterString(RFIDData data)
        {
            if (data == null)
            {
                return(string.Empty);
            }
            StringBuilder sb = new StringBuilder();

            if (ActionParameter.HasFlag(EnumActionParameter.料盘信息))
            {
                sb.Append(data.Guid.ToString());
                sb.Append("|");
            }
            switch (data.Workpiece)
            {
            case EnumWorkpiece.A:
                if (ActionParameter.HasFlag(EnumActionParameter.料盘信息))
                {
                    sb.Append("4|");
                }
                switch (data.GetProcessSite())
                {
                case EnumPSite.S1:
                    sb.Append("A1");
                    break;

                case EnumPSite.S3:
                    sb.Append("A2");
                    break;

                case EnumPSite.S2:
                    sb.Append("A3");
                    break;

                case EnumPSite.None:
                    sb.Append("A4");
                    break;

                default:
                    break;
                }
                break;

            case EnumWorkpiece.B:
                if (ActionParameter.HasFlag(EnumActionParameter.料盘信息))
                {
                    sb.Append("3|");
                }
                if (data.Assemble == EnumAssemble.Successed)
                {
                    sb.Append("B4");
                }
                else
                {
                    switch (data.GetProcessSite())
                    {
                    case EnumPSite.S1:
                        sb.Append("B1");
                        break;

                    case EnumPSite.S3:
                        sb.Append("B2");
                        break;

                    case EnumPSite.None:
                        sb.Append("B3");
                        break;

                    default:
                        break;
                    }
                }
                break;

            case EnumWorkpiece.C:
                if (ActionParameter.HasFlag(EnumActionParameter.料盘信息))
                {
                    sb.Append("2|");
                }
                if (data.Assemble == EnumAssemble.Successed)
                {
                    sb.Append("C4");
                }
                else
                {
                    switch (data.GetProcessSite())
                    {
                    case EnumPSite.S1:
                        sb.Append("C1");
                        break;

                    case EnumPSite.S3:
                        sb.Append("C2");
                        break;

                    case EnumPSite.None:
                        sb.Append("C3");
                        break;

                    default:
                        break;
                    }
                }
                break;

            case EnumWorkpiece.D:
                if (ActionParameter.HasFlag(EnumActionParameter.料盘信息))
                {
                    sb.Append("1|");
                }
                switch (data.GetProcessSite())
                {
                case EnumPSite.S4:
                    sb.Append("D1");
                    break;

                case EnumPSite.None:
                    sb.Append("D2");
                    break;

                default:
                    break;
                }
                break;

            case EnumWorkpiece.E:
                if (ActionParameter.HasFlag(EnumActionParameter.料盘信息))
                {
                    sb.Append("5|");
                }
                if (data.Assemble == EnumAssemble.Successed)
                {
                    sb.Append("E1");
                }
                else
                {
                    sb.Append("");    //仿真未定义
                }
                break;

            default:
                break;
            }
            return(sb.ToString());
        }