Commit 2998bd6a authored by 潘栩锋's avatar 潘栩锋 🚴

合并

parents 4b382f2f 6b17891b
...@@ -51,6 +51,6 @@ using System.Windows; ...@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.5.0.0")] [assembly: AssemblyVersion("7.3.5.0")]
[assembly: AssemblyFileVersion("7.5.0.0")] [assembly: AssemblyFileVersion("7.3.5.0")]
[assembly: Guid("BD20A921-953E-44CA-8FAB-4619D3CBCD06")] [assembly: Guid("BD20A921-953E-44CA-8FAB-4619D3CBCD06")]
...@@ -8,11 +8,11 @@ using System.Windows; ...@@ -8,11 +8,11 @@ using System.Windows;
// 控制。更改这些特性值可修改 // 控制。更改这些特性值可修改
// 与程序集关联的信息。 // 与程序集关联的信息。
[assembly: AssemblyTitle("枫莱尔数据库浏览")] [assembly: AssemblyTitle("枫莱尔数据库浏览")]
[assembly: AssemblyDescription("枫莱尔电池测厚仪 历史数据库浏览器")] [assembly: AssemblyDescription("枫莱尔流延测厚仪 历史数据库浏览器")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("佛山市枫莱尔自动化技术有限公司")] [assembly: AssemblyCompany("佛山市枫莱尔自动化技术有限公司")]
[assembly: AssemblyProduct("枫莱尔数据库浏览")] [assembly: AssemblyProduct("枫莱尔数据库浏览")]
[assembly: AssemblyCopyright("Copyright © 2020 FlyAutomation")] [assembly: AssemblyCopyright("Copyright © 2021 FlyAutomation")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
...@@ -51,6 +51,6 @@ using System.Windows; ...@@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: : // 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.5.0.0")] [assembly: AssemblyVersion("7.0.0.0")]
[assembly: AssemblyFileVersion("6.5.0.0")] [assembly: AssemblyFileVersion("7.0.0.0")]
[assembly: Guid("5FE5D848-CD2B-42CC-8EBD-2029371CDFE2")] [assembly: Guid("5FE5D848-CD2B-42CC-8EBD-2029371CDFE2")]
...@@ -7,12 +7,12 @@ using System.Windows; ...@@ -7,12 +7,12 @@ using System.Windows;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改 // 控制。更改这些特性值可修改
// 与程序集关联的信息。 // 与程序集关联的信息。
[assembly: AssemblyTitle("FLY.Thick.FilmCasting.UI.Server")] [assembly: AssemblyTitle("枫莱尔--流延测厚仪服务器")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("佛山市枫莱尔自动化技术有限公司")] [assembly: AssemblyCompany("佛山市枫莱尔自动化技术有限公司")]
[assembly: AssemblyProduct("枫莱尔--流延测厚仪服务器")] [assembly: AssemblyProduct("枫莱尔--流延测厚仪服务器")]
[assembly: AssemblyCopyright("Copyright © 2021 FLYAutomation")] [assembly: AssemblyCopyright("Copyright © 2022 FLYAutomation")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
...@@ -51,6 +51,6 @@ using System.Windows; ...@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.3.2")] [assembly: AssemblyVersion("7.3.5")]
[assembly: AssemblyFileVersion("7.3.2")] [assembly: AssemblyFileVersion("7.3.5")]
[assembly: Guid("E7D930E0-C871-4001-A31A-DC748ED5817C")] [assembly: Guid("E7D930E0-C871-4001-A31A-DC748ED5817C")]
...@@ -56,6 +56,16 @@ ...@@ -56,6 +56,16 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding BoltCnt}" /> <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding BoltCnt}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="个"/> <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="个"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Separator}"/>
<StackPanel>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
模头总长=<Run Text="{Binding DieLength,StringFormat={}{0:F0},Mode=OneWay}"/>mm
</TextBlock>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
机架总长=<Run Text="{Binding FrameLength,StringFormat={}{0:F0},Mode=OneWay}"/>mm
</TextBlock>
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" > <StackPanel Margin="{StaticResource ControlMargin}" >
......
...@@ -73,7 +73,15 @@ namespace FLY.Thick.FilmCasting.UI ...@@ -73,7 +73,15 @@ namespace FLY.Thick.FilmCasting.UI
public int Smooth { get; set; } public int Smooth { get; set; }
#endregion #endregion
/// <summary>
/// 模头总长 mm BoltCnt*BoltWidth
/// </summary>
public double DieLength { get; private set; }
/// <summary>
/// 扫描架总长 mm
/// </summary>
public double FrameLength { get; private set; }
#region profile #region profile
/// <summary> /// <summary>
...@@ -118,21 +126,21 @@ namespace FLY.Thick.FilmCasting.UI ...@@ -118,21 +126,21 @@ namespace FLY.Thick.FilmCasting.UI
} }
public void Init( public void Init(
IBoltMapFilmCastingService boltMapCalenderService, IBoltMapFilmCastingService _boltMapFilmCastingService,
IInitParamService initParamService, IInitParamService _initParamService,
IBorderSearchService borderSearchService, IBorderSearchService _borderSearchService,
IFilmCastingProfileService filmCastingProfileService) IFilmCastingProfileService _filmCastingProfileService)
{ {
this.boltMapFilmCastingService = boltMapCalenderService; this.boltMapFilmCastingService = _boltMapFilmCastingService;
this.initParamService = initParamService; this.initParamService = _initParamService;
this.borderSearchService = borderSearchService; this.borderSearchService = _borderSearchService;
this.filmCastingProfileService = filmCastingProfileService; this.filmCastingProfileService = _filmCastingProfileService;
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.IsReversed), this, nameof(IsReversed)); Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.IsReversed), this, nameof(IsReversed));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.BoltWidth), this, nameof(BoltWidth)); Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.BoltWidth), this, nameof(BoltWidth));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.BoltCnt), this, nameof(BoltCnt)); Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.BoltCnt), this, nameof(BoltCnt));
Misc.BindingOperations.SetBinding(boltMapCalenderService, nameof(boltMapCalenderService.Smooth), this, nameof(Smooth)); Misc.BindingOperations.SetBinding(boltMapFilmCastingService, nameof(IBoltMapFilmCastingService.Smooth), this, nameof(Smooth));
var param = this.filmCastingProfileService.Param; var param = this.filmCastingProfileService.Param;
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.LeftEmptyBolts), this, nameof(LeftEmptyBolts)); Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.LeftEmptyBolts), this, nameof(LeftEmptyBolts));
...@@ -140,7 +148,15 @@ namespace FLY.Thick.FilmCasting.UI ...@@ -140,7 +148,15 @@ namespace FLY.Thick.FilmCasting.UI
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.UniformShrinkPercent), this, nameof(UniformShrinkPercent)); Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.UniformShrinkPercent), this, nameof(UniformShrinkPercent));
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.MidOffset), this, nameof(MidOffset)); Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.MidOffset), this, nameof(MidOffset));
Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.PName), this, nameof(PName)); Misc.BindingOperations.SetBinding(param, nameof(FilmCastingProfileParam.PName), this, nameof(PName));
Misc.BindingOperations.SetBinding(this, new string[] { nameof(BoltWidth), nameof(BoltCnt) },()=>{
DieLength = BoltWidth * BoltCnt;
});
Misc.BindingOperations.SetBinding(initParamService, new string[] { nameof(IInitParamService.PosLength), nameof(IInitParamService.Encoder1_mmpp) }, () =>
{
FrameLength = initParamService.PosLength * initParamService.Encoder1_mmpp;
});
} }
private void Apply() private void Apply()
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<Style TargetType="GroupBox"/>
<common:FilmCastingProfileParam x:Key="param" /> <common:FilmCastingProfileParam x:Key="param" />
</ResourceDictionary> </ResourceDictionary>
</Page.Resources> </Page.Resources>
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid > <Grid >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" /> <ColumnDefinition />
<ColumnDefinition Width="338*" /> <ColumnDefinition MaxWidth="400"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid x:Name="grid_dynarea" d:DataContext="{Binding DynArea}"/> <Grid x:Name="grid_dynarea" d:DataContext="{Binding DynArea}"/>
<ScrollViewer MinWidth="550" d:DataContext="{StaticResource param}" DataContext="{Binding Param}"> <ScrollViewer MinWidth="550" d:DataContext="{StaticResource param}" DataContext="{Binding Param}">
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
<ListBox Margin="{StaticResource ControlMargin}" MinWidth="400" Grid.Column="1" Background="{StaticResource Brushes.Activity}" <ListBox Margin="{StaticResource ControlMargin}" Grid.Column="1" Background="{StaticResource Brushes.Activity}"
SelectedItem="{Binding SelectedItem}" SelectedItem="{Binding SelectedItem}"
ItemsSource="{Binding ProfileList}"> ItemsSource="{Binding ProfileList}">
<ListBox.Resources> <ListBox.Resources>
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/GraphStyle.xaml"/> <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/GraphStyle.xaml"/>
<!--<ResourceDictionary Source="GraphStyle.xaml"/>-->
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
\ No newline at end of file
...@@ -577,7 +577,7 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -577,7 +577,7 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
bulkDb.GetFrame( bulkDb.GetFrame(
new Pack_GetFrameRequest() { Id = Number, Mix = graphparam.Mix }, new Pack_GetFrameRequest() { Id = Number, Mix = graphparam.Mix },
(object AsyncContext, object retData) => (object asyncContext, object retData) =>
{ {
Pack_GetFrameReponse reponse = retData as Pack_GetFrameReponse; Pack_GetFrameReponse reponse = retData as Pack_GetFrameReponse;
......
...@@ -26,16 +26,20 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -26,16 +26,20 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
void SimuData() void SimuData()
{ {
graphparam = new ScanGraphItemParam(); graphparam = new ScanGraphItemParam
graphparam.IsPercent = true; {
graphparam.IsAutoTarget = true; IsPercent = true,
graphparam.YRangePercent = 3; IsAutoTarget = true,
graphparam.IsLineMode = false; YRangePercent = 3,
profileParam = new Common.FilmCastingProfileParam(); IsLineMode = false
profileParam.ScanRange = new RangeStruct(10, 110); };
profileParam.DataRange = new RangeStruct(30, 90); profileParam = new Common.FilmCastingProfileParam
profileParam.Target = 150; {
profileParam.TolerancePercent = 0.02; ScanRange = new RangeStruct(10, 110),
DataRange = new RangeStruct(30, 90),
Target = 150,
TolerancePercent = 0.02
};
#region 数据 #region 数据
......
...@@ -14,12 +14,11 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -14,12 +14,11 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
{ {
public class TrendGraphVm : ITrendGraphVm public class TrendGraphVm : ITrendGraphVm
{ {
const int MARKNO_TEXTUP = 1;
/// <summary> /// <summary>
/// 自动切换为 最新视图模式 倒计时 初始值 /// 自动切换为 最新视图模式 倒计时 初始值
/// </summary> /// </summary>
const int AutoKeepTotalSec = 60; const int AutoKeepTotalSec = 60;
const int Len = 100; protected const int Len = 100;
/// <summary> /// <summary>
/// Y轴%显示,最小的中值 /// Y轴%显示,最小的中值
/// </summary> /// </summary>
...@@ -116,9 +115,9 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -116,9 +115,9 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
public object MapperNegative { get; protected set; } public object MapperNegative { get; protected set; }
public object MapperValue { get; protected set; } public object MapperValue { get; protected set; }
TrendGraphItemParam graphparam; protected TrendGraphItemParam graphparam;
IBulkDbService bulkDb; IBulkDbService bulkDb;
FilmCastingProfileParam profileParam; protected FilmCastingProfileParam profileParam;
DispatcherTimer timer; DispatcherTimer timer;
public TrendGraphVm() public TrendGraphVm()
{ {
...@@ -268,7 +267,7 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -268,7 +267,7 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
UpdateY(); UpdateY();
} }
} }
void UpdateY() protected void UpdateY()
{ {
double tolerance = this.profileParam.TolerancePercent; double tolerance = this.profileParam.TolerancePercent;
if (tolerance < MIN_TOLERANCE) { if (tolerance < MIN_TOLERANCE) {
...@@ -282,7 +281,7 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -282,7 +281,7 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
YMax = tolerance * graphparam.YRangePercent; YMax = tolerance * graphparam.YRangePercent;
YMin = -tolerance * graphparam.YRangePercent; YMin = -tolerance * graphparam.YRangePercent;
} }
void UpdateX() protected void UpdateX()
{ {
XMax = Len; XMax = Len;
} }
...@@ -321,7 +320,7 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -321,7 +320,7 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
return 2 * v.Sigma / v.Value; return 2 * v.Sigma / v.Value;
} }
} }
void UpdateAverage() protected void UpdateAverage()
{ {
var sigma2s = this.Values.Select(v => ToSigma2Percent(v)); var sigma2s = this.Values.Select(v => ToSigma2Percent(v));
......
...@@ -14,107 +14,19 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -14,107 +14,19 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
{ {
public TrendGraphVmUt() public TrendGraphVmUt()
{ {
#region 与数据无关界面参数
AreaColors = new List<Brush>();
AreaColors.AddRange(FLY.ControlLibrary.Themes.Styles.AreaColors);
YFormatter = (y) =>
{
double percent = y * 100;
string text = "";
if (percent == 0d)
{
text = "0.0%";
}
else if (percent > 0)
{
text = $"+{Math.Abs(percent):F1}%";
}
else
{
text = $"-{Math.Abs(percent):F1}%";
}
return $"{text,6}";
};
XFormatter = (x) =>
{
int index = (int)x;
if (index < Values.Count() && index >= 0)
return Values[index].Time.ToString("HH:mm");
else
return "";
};
MapperPositive = Mappers.Xy<TrendValue>()
.X((value, index) =>
{
return index;
})
.Y(value => value.Sigma / value.Value)
.Fill((value) =>
{
double percent = value.Sigma / value.Value;
if ((percent > Tolerance2YMax) || (percent < -Tolerance2YMax))
{
return AreaColors[0];
}
else if ((percent > ToleranceYMax) || (percent < -ToleranceYMax))
{
return AreaColors[1];
}
else
{
return AreaColors[2];
}
});
MapperNegative = Mappers.Xy<TrendValue>()
.X((value, index) =>
{
return index;
})
.Y(value => -value.Sigma / value.Value)
.Fill((value) =>
{
double percent = value.Sigma / value.Value;
if ((percent > Tolerance2YMax) || (percent < -Tolerance2YMax))
{
return AreaColors[0];
}
else if ((percent > ToleranceYMax) || (percent < -ToleranceYMax))
{
return AreaColors[1];
}
else
{
return AreaColors[2];
}
});
MapperValue = Mappers.Xy<TrendValue>()
.X((value, index) =>
{
return index;
})
.Y(value => value.Value);
#endregion
Values.Clear();
#region 数据 #region 数据
double target = 150; double target = 150;
double tolerancePercent = 0.05; double tolerancePercent = 0.05;
double yRangePercent = 3; double yRangePercent = 3;
int len = 200; int len = Len;
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
TimeSpan tsInterval = TimeSpan.FromSeconds(30); TimeSpan tsInterval = TimeSpan.FromSeconds(30);
DateTime time = startTime; DateTime time = startTime;
int id = 312456; int id = 312456;
Random random = new Random(); Random random = new Random();
List<TrendValue> tvs = new List<TrendValue>();
for (int i = 0; i < len; i++, time += tsInterval) for (int i = 0; i < len; i++, time += tsInterval)
{ {
TrendValue tv = new TrendValue(); TrendValue tv = new TrendValue();
...@@ -122,30 +34,36 @@ namespace FLY.Thick.FilmCasting.UI.UiModule ...@@ -122,30 +34,36 @@ namespace FLY.Thick.FilmCasting.UI.UiModule
tv.Value = target + (random.NextDouble() - 0.5) * target * tolerancePercent * 0.5; tv.Value = target + (random.NextDouble() - 0.5) * target * tolerancePercent * 0.5;
tv.Sigma = (Math.Sin(i * Math.PI / len) * 3) * target * tolerancePercent * random.NextDouble(); tv.Sigma = (Math.Sin(i * Math.PI / len) * 3) * target * tolerancePercent * random.NextDouble();
Values.Add(tv); tvs.Add(tv);
} }
Values.AddRange(tvs);
#endregion #endregion
profileParam = new Common.FilmCastingProfileParam()
{
ScanRange = new RangeStruct(10, 110),
DataRange = new RangeStruct(30, 90),
Target = target,
TolerancePercent = tolerancePercent
};
graphparam = new TrendGraphItemParam()
{
YRangePercent = yRangePercent,
Mix = 2
};
#region 界面数据 #region 界面数据
XMax = len; UpdateX();
Mix = 2; Mix = 2;
BeginTime = Values.First().Time; BeginTime = Values.First().Time;
EndTime = Values.Last().Time; EndTime = Values.Last().Time;
Id = id; Id = id;
var sigma2Percent = Values.Select(v => 2 * v.Sigma / v.Value);
Average = sigma2Percent.AverageNoNull();
Max = sigma2Percent.Max();
Min = sigma2Percent.Min();
ToleranceYMax = tolerancePercent;
ToleranceYMin = -ToleranceYMax;
Tolerance2YMax = ToleranceYMax * 2;
Tolerance2YMin = -Tolerance2YMax;
YMax = ToleranceYMax * yRangePercent;
YMin = -YMax;
UpdateAverage();
UpdateY();
#endregion #endregion
} }
} }
......
...@@ -47,7 +47,7 @@ namespace FLY.Thick.FilmCasting.Server ...@@ -47,7 +47,7 @@ namespace FLY.Thick.FilmCasting.Server
BoltMapFilmCasting boltmap, BorderSearch bordersearch, Reject reject, BoltMapFilmCasting boltmap, BorderSearch bordersearch, Reject reject,
DynArea dynarea, AD2ThkHandler ad2thk, DynArea dynarea, AD2ThkHandler ad2thk,
FilmCastingProfileParam profileParam, FilmCastingProfile profile, FilmPositionDetect filmPositionDetect, FilmCastingProfileParam profileParam, FilmCastingProfile profile, FilmPositionDetect filmPositionDetect,
HistoryDb historyDB, BulkDb bulkDB HistoryDb historyDb, BulkDb bulkDb
) )
{ {
base.Init(flyAd); base.Init(flyAd);
...@@ -67,8 +67,8 @@ namespace FLY.Thick.FilmCasting.Server ...@@ -67,8 +67,8 @@ namespace FLY.Thick.FilmCasting.Server
this.profile = profile; this.profile = profile;
this.filmPositionDetect = filmPositionDetect; this.filmPositionDetect = filmPositionDetect;
this.historyDb = historyDB; this.historyDb = historyDb;
this.bulkDb = bulkDB; this.bulkDb = bulkDb;
scanMotion.Init(flyAd, gsample, initParam, warningSystem); scanMotion.Init(flyAd, gsample, initParam, warningSystem);
...@@ -196,21 +196,22 @@ namespace FLY.Thick.FilmCasting.Server ...@@ -196,21 +196,22 @@ namespace FLY.Thick.FilmCasting.Server
} }
}; };
bool ret = autoRollDown.CheckAtDataEndEvent(scanData);
if(ret)
autoRollDown.Reset();
//下辊检测 //下辊检测
if (historyDb.localDb.IsProfileFinished) if (historyDb.localDb.IsProfileFinished)
{ {
//已经下辊
FinishProfile();
AddProfile(); AddProfile();
} }
else if(ret) else
{ {
//需要下辊 if (autoRollDown.CheckAtDataEndEvent(scanData)) {
FinishProfile();
AddProfile(); //需要下辊
scanData.FilmPosition = 0; FinishProfile();
AddProfile();
scanData.FilmPosition = 0;
}
} }
historyDb.AddScanData(scanData); historyDb.AddScanData(scanData);
...@@ -291,7 +292,8 @@ namespace FLY.Thick.FilmCasting.Server ...@@ -291,7 +292,8 @@ namespace FLY.Thick.FilmCasting.Server
bulkDb.SetTempFrame(now, now, 0, null); bulkDb.SetTempFrame(now, now, 0, null);
#region sqlite3 历史数据保存 #region sqlite3 历史数据保存
CheckProfile(); //检测是否新开一个profile,或者继续上一次 profile
CheckAddProfile();
profileParam.PropertyChanged += MProfileParam_PropertyChanged; profileParam.PropertyChanged += MProfileParam_PropertyChanged;
#endregion #endregion
...@@ -321,51 +323,50 @@ namespace FLY.Thick.FilmCasting.Server ...@@ -321,51 +323,50 @@ namespace FLY.Thick.FilmCasting.Server
nameof(FilmCastingProfileParam.TolerancePercent), nameof(FilmCastingProfileParam.TolerancePercent),
nameof(FilmCastingProfileParam.ScanRange) nameof(FilmCastingProfileParam.ScanRange)
}; };
void CheckProfile() void CheckAddProfile()
{ {
if (historyDb.localDb.IsProfileFinished) if (historyDb.localDb.IsProfileFinished)
{ {
//上一次已经结束 AddProfile();
return;
}
//复位 膜纵向位置 if (historyDb.localDb.CurrProfile == null)
filmPositionDetect.Reset(0); {
autoRollDown.Reset(); //没生产过
AddProfile();
return;
} }
else
Db_Profile db_Profile = historyDb.localDb.CurrProfile;
//上一次还没结束
if ((db_Profile.PName != profileParam.PName) ||
(db_Profile.Batch != profileParam.Batch) ||
(db_Profile.Number != profileParam.Number))
{ {
Db_Profile db_Profile = historyDb.localDb.CurrProfile; //任何一个不一致
//上一次还没结束 AddProfile();
if ((db_Profile.PName != profileParam.PName) || return;
(db_Profile.Batch != profileParam.Batch) || }
(db_Profile.Number != profileParam.Number))
{
//任何一个不一致
//结束上次的
FinishProfile();
//复位 膜纵向位置
filmPositionDetect.Reset(0);
}
else if (autoRollDown.CheckAtStart())
{
//需要结束上次的
FinishProfile();
//复位 膜纵向位置 if (autoRollDown.CheckAtStart())
filmPositionDetect.Reset(0); {
} //满足要求,下辊
else AddProfile();
{ return;
//继续上一次生产!!!!
UpdateProfile();
}
} }
//继续上一次生产!!!!
UpdateProfile();
} }
void AddProfile() void AddProfile()
{ {
//复位 换profile 检查
autoRollDown.Reset();
//复位 膜纵向位置 //复位 膜纵向位置
filmPositionDetect.Reset(0); filmPositionDetect.Reset(0);
...@@ -403,11 +404,7 @@ namespace FLY.Thick.FilmCasting.Server ...@@ -403,11 +404,7 @@ namespace FLY.Thick.FilmCasting.Server
FObjBase.PollModule.Current.Poll_JustOnce( FObjBase.PollModule.Current.Poll_JustOnce(
() => () =>
{ {
if (!historyDb.localDb.IsProfileFinished) AddProfile();//新
{
FinishProfile();
}
}, this, MARKNO_PROFILE_ADD); }, this, MARKNO_PROFILE_ADD);
} }
else if (profile_propertynames_update.Contains(e.PropertyName)) else if (profile_propertynames_update.Contains(e.PropertyName))
...@@ -415,9 +412,7 @@ namespace FLY.Thick.FilmCasting.Server ...@@ -415,9 +412,7 @@ namespace FLY.Thick.FilmCasting.Server
FObjBase.PollModule.Current.Poll_JustOnce( FObjBase.PollModule.Current.Poll_JustOnce(
() => () =>
{ {
if (!historyDb.localDb.IsProfileFinished) UpdateProfile();//修改
UpdateProfile();//修改
}, this, MARKNO_PROFILE_CHANGED); }, this, MARKNO_PROFILE_CHANGED);
} }
} }
......
...@@ -478,7 +478,6 @@ namespace FLY.Thick.FilmCasting.Server.Model ...@@ -478,7 +478,6 @@ namespace FLY.Thick.FilmCasting.Server.Model
/// <param name="AsyncContext"></param> /// <param name="AsyncContext"></param>
public async void GetTrend(Pack_GetTrendRequest request, AsyncCBHandler asyncDelegate, object asyncContext) public async void GetTrend(Pack_GetTrendRequest request, AsyncCBHandler asyncDelegate, object asyncContext)
{ {
//TODO 需要异步
Pack_GetTrendReponse reponse = new Pack_GetTrendReponse(); Pack_GetTrendReponse reponse = new Pack_GetTrendReponse();
reponse.Request = request; reponse.Request = request;
......
...@@ -100,6 +100,10 @@ namespace FLY.Thick.FilmCasting.Server.Model ...@@ -100,6 +100,10 @@ namespace FLY.Thick.FilmCasting.Server.Model
Db_Profile profile Db_Profile profile
) )
{ {
if (localDb.CurrProfile == null || //没有数据!!!!
localDb.IsProfileFinished == true)//生产已经结束了
return;
//添加 数据库必要的 field //添加 数据库必要的 field
profile.ID = localDb.CurrProfile.ID; profile.ID = localDb.CurrProfile.ID;
profile.StartTime = localDb.CurrProfile.StartTime; profile.StartTime = localDb.CurrProfile.StartTime;
......
...@@ -28,7 +28,7 @@ fi ...@@ -28,7 +28,7 @@ fi
cp -rf install $install_dir cp -rf install $install_dir
#复制 版本描述 #复制 版本描述
cp 版本描述.txt $install_dir cp 版本描述.md $install_dir
install_dir=$install_dir"/佛山市枫莱尔自动化技术有限公司/windows" install_dir=$install_dir"/佛山市枫莱尔自动化技术有限公司/windows"
......
{ {
"InstallZipVersion":"7.5.0", "InstallZipVersion":"7.3.5",
"InstallZipUrl":"http://server.flyautomation.net:8889/download/流延测厚仪安装包_v7.5.0_20220123.7z" "InstallZipUrl":"http://server.flyautomation.net:8889/download/流延测厚仪安装包_v7.3.5_20220217.7z"
} }
\ No newline at end of file
流延测厚仪安装包_v7.5.0_20220123 # 流延测厚仪安装包_v7.3.5_20220217
自动模头
1. 添加 自动模头,使用风环的那套加热PLC ## 流延测厚仪客户端 v7.3.5
1. 添加 分区表显示模头长度,机架长度,方便试机时,不设太多螺丝数量
## 流延测厚仪服务器 v7.3.5
1. 修复 GetGrid 获取的数据长度比 缓存区还长时,输出 AD=0, 扫描图最右边会有很厚的一条
<br/>
<br/>
<br/>
流延测厚仪安装包_v7.3.2_20211113 # 流延测厚仪安装包_v7.3.4_20211224
## 流延测厚仪客户端 v7.3.4
1. 修复 修改AD盒参数出错,原因没有重新编译
<br/>
<br/>
<br/>
# 流延测厚仪安装包_v7.3.3_20211201
## 流延测厚仪服务器 v7.3.3
1. 修复 12月数据库删除bug
## 流延测厚仪客户端 v7.3.0
1. 修复 安装包路径默认下载路径 为 D:\测厚仪软件
<br/>
<br/>
<br/>
# 流延测厚仪安装包_v7.3.2_20211113
1. 修复 流延测厚仪服务器 保存图片 很慢 1. 修复 流延测厚仪服务器 保存图片 很慢
2. 修复 流延测厚仪服务器 删除图片出错(不存在的文件夹) 2. 修复 流延测厚仪服务器 删除图片出错(不存在的文件夹)
3. 优化 AD盒参数保存在电脑。 避免AD盒 i2c 有问题。 3. 优化 AD盒参数保存在电脑。 避免AD盒 i2c 有问题。
流延测厚仪安装包_v7.3.1_20210920 <br/>
<br/>
<br/>
# 流延测厚仪安装包_v7.3.1_20210920
1. 修复 ScanData数据表 EndTime 为 DateTime.Now, 但 Time 为 flyad.Now, 导致时间错乱 1. 修复 ScanData数据表 EndTime 为 DateTime.Now, 但 Time 为 flyad.Now, 导致时间错乱
2. 修复 Reflect_SeviceClient 大量数据 bug 2. 修复 Reflect_SeviceClient 大量数据 bug
3. 修复 测厚仪服务器,保存图片功能, livechart 的控件不会释放资源,导致14小时后,服务器占了 900Mb 内存 3. 修复 测厚仪服务器,保存图片功能, livechart 的控件不会释放资源,导致14小时后,服务器占了 900Mb 内存
流延测厚仪安装包_v7.3.0_20210920 <br/>
<br/>
<br/>
# 流延测厚仪安装包_v7.3.0_20210920
1. 添加 在客户端左下角 “枫莱尔” 进入的界面菜单, 添加 【升级检测】 1. 添加 在客户端左下角 “枫莱尔” 进入的界面菜单, 添加 【升级检测】
2. 修复 样品界面 样品直径无法保存 2. 修复 样品界面 样品直径无法保存
流延测厚仪安装包_v7.2.1_20210918 <br/>
<br/>
<br/>
# 流延测厚仪安装包_v7.2.1_20210918
1. 添加 大混合扫描图 1. 添加 大混合扫描图
2. 添加 在产品中, 公差可以 输入绝对值 2. 添加 在产品中, 公差可以 输入绝对值
流延测厚仪安装包_v7.1.0_20210804 <br/>
<br/>
<br/>
# 流延测厚仪安装包_v7.1.0_20210804
1. 修改 规定经过分区表后的数据,只是进行缩放而已。 数据能恢复到 cm/数据 1. 修改 规定经过分区表后的数据,只是进行缩放而已。 数据能恢复到 cm/数据
2. 添加 扫描图 的测量版 2. 添加 扫描图 的测量版
3. 添加 纵向图 点选某个位置,下方的扫描图 number 就会改为该id 3. 添加 纵向图 点选某个位置,下方的扫描图 number 就会改为该id
......
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