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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
using FLY.FeedbackRenZiJia.Common;
using FObjBase;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
namespace FLY.FeedbackRenZiJia.IService
{
public interface IHeatBuf: INotifyPropertyChanged
{
#region 参数
/// <summary>
/// 加热生效曲线 [2,5,8,5,2]
/// </summary>
List<int> HeatEffectCurve { get; set; }
/// <summary>
/// 厚度稳定范围 %, 偏差在范围内,都是稳定的
/// </summary>
int StableRange { get; set; }
/// <summary>
/// 厚度稳定范围 %, 加热量变化为0时,偏差在范围内,都是稳定的
/// </summary>
int StableRange0 { get; set; }
/// <summary>
/// 对位模式, 加热与厚度相关性阀值, 相关性 >=0.7
/// </summary>
double ThresholdR { get; set; }
/// <summary>
/// 对位模式 厚度%差 的极差 >= +4%-4%=8%, 单位%
/// </summary>
int ThresholdMaxMin { get; set; }
/// <summary>
/// %
/// 最大sigma, 只有当前的sigma 在 最大sigma 与 最小 sigma 内,才能控制
/// </summary>
int ThresholdSigmaMax { get; set; }
/// <summary>
/// 使用这里独立的Kp, 与 HeatCell 不一样
/// </summary>
bool IsUsedLocalKp { get; set; }
/// <summary>
/// 本地Kp, 用于判断稳定性
/// </summary>
double LocalKp { get; set; }
#endregion
#region 状态
/// <summary>
/// 延时
/// </summary>
TimeSpan Delay { get; }
#region 对位
/// <summary>
/// 进入了对位模式
/// </summary>
bool IsIntoAutoONo { get; }
/// <summary>
/// 对位模式结果
/// </summary>
EAutoONoResult AutoONoResult { get; }
/// <summary>
/// 计算的最佳复位区号
/// </summary>
int BestOrgBoltNo { get; }
/// <summary>
/// 计算的最佳复位区号 对应的 加热/厚度
/// </summary>
double BestKp { get; }
/// <summary>
/// 计算的最佳复位区号 对应的 加热与厚度相关性
/// </summary>
double MaxR { get; }
/// <summary>
/// 计算的最佳复位区号 对应的 厚度%变化极差 单位%
/// </summary>
double MaxMin { get; }
#endregion
#region 稳定性
/// <summary>
/// 当前检测出来的厚度数据 稳定状态
/// </summary>
STABILITY Stability { get; }
/// <summary>
/// 当前检测出来的厚度数据 的稳定性
/// </summary>
double CurrR { get; }
/// <summary>
/// 当前检测出来的厚度数据 2Sigma
/// </summary>
double Curr2Sigma { get; }
/// <summary>
/// 当前检测出来的厚度数据,时间
/// </summary>
DateTime CurrTime { get; }
/// <summary>
/// 当前检测出来的厚度数据,方向
/// </summary>
Misc.DIRECTION CurrDirection { get; }
/// <summary>
/// 当前打散程度。
/// 连续N点都在平均值同一侧为一个块;
/// 这些块的长度平均值/总长度, 为打散度;
/// 打散度越小越好, 最小为 1/NBolts
/// </summary>
double CurrBreakUp { get; }
#endregion
#region 列表
/// <summary>
/// 列表最后1个BM
/// </summary>
int LastBM { get; }
/// <summary>
/// 列表第1个BM
/// </summary>
int FirstBM { get; }
#endregion
#region 每个分区状态
bool[] BoltIsStable { get; }
#endregion
#endregion
#region 功能
/// <summary>
/// 参数应用
/// </summary>
void Apply();
/// <summary>
/// 获取记录历史 返回类型为 FlyData_FeedbackHeat
/// </summary>
/// <param name="bookmark">记录点</param>
/// <param name="AsyncDelegate"></param>
/// <param name="AsyncState"></param>
void GetHeatsData(int bookmark, AsyncCBHandler AsyncDelegate, object AsyncState);
/// <summary>
/// 清空每个分区的加热记录
/// </summary>
void ClearBoltHeat();
/// <summary>
/// 获取每个分区的加热历史 返回 FlyData_BoltHeatRecord
/// </summary>
/// <param name="no">分区号</param>
/// <param name="AsyncDelegate"></param>
/// <param name="AsyncState"></param>
void GetBoltHeatRecord(int no, AsyncCBHandler AsyncDelegate, object AsyncState);
#endregion
}
/// <summary>
/// 自动对位模式结果
/// </summary>
public enum EAutoONoResult
{
/// <summary>
/// 没开始
/// </summary>
Idle,
/// <summary>
/// 计算成功
/// </summary>
OK,
/// <summary>
/// 失败,厚度变化%极差太小
/// </summary>
Err_MaxMin,
/// <summary>
/// 失败,厚度变化% 与 加热变化 相关性 不够大
/// </summary>
Err_MaxR,
/// <summary>
/// 失败,不稳定,被打断
/// </summary>
Err_Break
}
}