Commit 84177858 authored by 潘栩锋's avatar 潘栩锋 🚴

修复 AD盒模拟器 出错

parent cabcd8ec
......@@ -229,7 +229,7 @@ namespace FLY.Simulation.Blowing
AngleDecTime = 5;//减速时间5s
AngleCoolTime = 5;//正反转延迟时间5s
FilmWidth = 2300;//膜宽2300mm
FilmWidth = 1500;//膜宽1500mm
FilmVelocity = 20;//线速度m/min
FilmDistance = 26;//膜距离m
......
......@@ -17,7 +17,7 @@ namespace FLY.Simulation.Blowing
/// <summary>
/// 机架总长 mm
/// </summary>
public int TotalLength { get; set; } = 3000;
public int TotalLength { get; set; } = 2440;
public Blowing mBlowing;
......@@ -35,11 +35,10 @@ namespace FLY.Simulation.Blowing
/// </summary>
public int SenserWidth;
public int[] AirDatas;
CurveCollection curve;
double ppmm;
public GageAD()
{
curve = new CurveCollection();
......@@ -49,18 +48,8 @@ namespace FLY.Simulation.Blowing
FilmWidth = (int)mBlowing.FilmWidth;
FilmBegin = 300;
SenserWidth = 30;
AirDatas = new int[TotalLength];
NewAirDatas();
}
void NewAirDatas()
{
int a = 20;
Random r = new Random();
for (int i = 0; i < AirDatas.Count(); i++)
{
AirDatas[i] = r.Next(a) - a/2;
}
}
public void OnPoll(DateTime now)
{
//NewAirDatas();
......@@ -70,12 +59,12 @@ namespace FLY.Simulation.Blowing
public int GetAD(int mm)
{
return GetAD_1(mm);
//return GetAD_2(pos);
//return GetAD_2(mm);
}
int GetAD_1(int mm)
{
Random r = new Random();
int data = r.Next(50) - 25;
int data = r.Next(30*2) - 30;// 单位 0.01um, ±0.3um波动
if ((mm >= FilmBegin) && (mm<(FilmBegin+FilmWidth)))
{
......@@ -95,7 +84,7 @@ namespace FLY.Simulation.Blowing
{
int[] datas = new int[SenserWidth];
for (int i = 0; i < SenserWidth; i++)
for (int i = 0; i < SenserWidth; i+=5)
{
datas[i] = GetAD_1(mm - SenserWidth / 2 + i);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment