schangxiang@126.com
2025-11-04 f5ed29dc26c7cd952d56ec5721a2efc43cd25992
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using DataEntity.Share;
using DriverLib.Engine;
 
namespace XCore
{
    /// <summary>
    /// 控制移液枪
    /// </summary>
    public class ADPBll
    {
        #region 检查移液枪是否有枪头
        /// <summary>
        /// 检查移液枪是否有枪头
        /// </summary>
        /// <param name="armId">机械臂ID</param>
        /// <param name="isExist">是否存在</param>
        /// <param name="channelId">通道信息</param>
        /// <param name="isSimulator">是否模拟</param>
        /// <returns></returns>
        public static int ExecuteADPCheckTip(out bool isExist, bool isSimulator = false)
        {
            int ret = 0;    // 0:正常; 0以外:异常 
            isExist = false;
 
            if (!isSimulator)
            {
                int[] channelId = null;
                if (Shared.ChannelsId.Length > 1)
                {
                    channelId = Shared.ChannelsId;
                }
 
                ret = MethodAction.Instance.ADPCheckTip(Shared.ChanelArmId, out isExist, channelId);
            }
            else
            {
                ret = 0;
            }
 
            return ret;
        }
        #endregion
 
        #region 检查移液枪是否有枪头
        /// <summary>
        /// 检查移液枪是否有枪头
        /// </summary>
        /// <param name="armId">机械臂ID</param>
        /// <param name="isExist">是否存在Tip头在每一个通道上</param>
        /// <param name="chList">通道数组</param>
        /// <param name="isSimulator">是否模拟</param>
        /// <returns></returns>
        public static int ExecuteADPCheckMultiTip(int armId,int[] chList,out bool[] isExist, bool isSimulator = false)
        {
            int ret = 0;    // 0:正常; 0以外:异常 
            isExist =new bool[chList.Length];
 
            if (!isSimulator)
            {
                //GetOrSetDeviceArmdb getOrSetDeviceArmdb = new GetOrSetDeviceArmdb();
                //ObservableCollection<DeviceArm> deviceArms = getOrSetDeviceArmdb.GetDeviceArmFromdb(Shared.SoftwareInformation.software_device_number);
                ret = MethodAction.Instance.ADPCheckTip(armId, out isExist, chList);
            }
            else
            {
                ret = 0;
            }
 
            return ret;
        }
        #endregion
    }
}