领胜LDS 键盘AOI检测项目
wells.liu
2020-07-02 9ff922bb630ed1cbcea7bc43357f66bb9cf90371
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using Bro.Common.Helper;
using Bro.Common.Interface;
using Bro.Common.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Bro.Common.Base
{
    /// <summary>
    /// 运动机构接口 具体由PLC/板卡实现
    /// </summary>
    public interface IMotion
    {
        List<AxisInfo> GetCurrentAxisInfo(params string[] axisName);
 
        /// <summary>
        /// 运动机构点到点移动
        /// </summary>
        /// <param name="opConfig">运动配置</param>
        /// <returns>true:正常结束 false:异常结束</returns>
        ResponseMessage MoveToPoint(IOperationConfig opConfig);
    }
 
    /// <summary>
    /// 板卡接口
    /// </summary>
    public interface IMotionCard : IMotion
    {
        /// <summary>
        /// 板卡执行动作 除了运动动作外还包含IO操作
        /// </summary>
        /// <param name="config"></param>
        /// <returns></returns>
        ResponseMessage Run(IOperationConfig config);
    }
 
    public class AxisInfo : IComplexDisplay
    {
        public string AxisName { get; set; }
        public double AxisLocation { get; set; }
 
        public string GetDisplayText()
        {
            return $"{AxisName}:{AxisLocation}";
        }
    }
}