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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
using FLY.Thick.Base.IService;
using FObjBase;
using Misc;
using System;
namespace FLY.Thick.Base.Client
{
/// <summary>
/// 边界查找服务 客户代理
/// </summary>
public class BorderSearchServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IBorderSearchService
{
protected override Type InterfaceType => typeof(IBorderSearchService);
/// <summary>
/// 边界查找服务 构造
/// </summary>
/// <param name="id"></param>
public BorderSearchServiceClient(UInt32 id) : base(id) { }
/// <summary>
/// 边界查找服务 构造
/// </summary>
/// <param name="serviceId">服务id</param>
/// <param name="connName">连接器</param>
public BorderSearchServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }
#region IBorderSearchService 成员
public bool Enable { get; set; }
/// <summary>
/// 单一材料,找空气与膜均值的 中间位置
/// </summary>
public bool IsOneMaterial { get; set; }
/// <summary>
/// 边界拐点检测,找到的边界更加精确
/// </summary>
public bool IsBreakDetect { get; set; } = true;
public RangeStruct Valid { get; set; }
public Range Border_Backw { get; set; } = new Range();
public Range Border_Forw { get; set; } = new Range();
public RangeStruct Border { get; set; }
/// <summary>
/// 当前膜宽,测量出来的,单位是 脉冲
/// </summary>
public int Width { get; set; }
/// <summary>
/// 膜中间位置 单位 脉冲
/// </summary>
public int Mid { get; set; }
/// <summary>
/// 调试数据更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 手动设置温修AD值
/// </summary>
public bool TempADBySet { get; set; }
public int TempAD { get; set; }
public int TempRange { get; set; }
/// <summary>
/// 温修范围是温修的百分比
/// </summary>
public bool IsTempRangeByPercent { get; set; } = true;
/// <summary>
/// 温修范围百分比
/// </summary>
public double TempRangePercent { get; set; } = 0.02;
public int N { get; set; }
/// <summary>
/// 探头直径,单位脉冲, 膜宽 = 边界范围 - 探头直径
/// </summary>
public int SensorWidth { get; set; }
public int N2 { get; set; }
public int N3 { get; set; }
/// <summary>
/// 产品宽度,设置值 单位:脉冲
/// 当膜超过范围(没有经过阀值),就使用它,猜边界在哪
/// </summary>
public int ProductWidth { get; set; }
#endregion
public void GetView(AsyncCBHandler asyncDelegate, object asyncContext)
{
Call(nameof(GetView), null, asyncDelegate, asyncContext);
}
public void Apply()
{
Call(nameof(Apply));
}
}
}