Commit 2caca8bf authored by 潘栩锋's avatar 潘栩锋 🚴

添加 内标加热

parent 51fcbec2
...@@ -235,19 +235,6 @@ ...@@ -235,19 +235,6 @@
<ItemGroup> <ItemGroup>
<Resource Include="Images\checkmark.png" /> <Resource Include="Images\checkmark.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Images\close1.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\download.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\upload.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\connect.png" />
<Resource Include="Images\disconnect.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Images\up.png" /> <Resource Include="Images\up.png" />
</ItemGroup> </ItemGroup>
...@@ -285,18 +272,7 @@ ...@@ -285,18 +272,7 @@
<Resource Include="Images\cancel.png" /> <Resource Include="Images\cancel.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Images\add_gray.png" />
<Resource Include="Images\aim_gray.png" />
<Resource Include="Images\cancel_gray.png" />
<Resource Include="Images\close_gray.png" />
<Resource Include="Images\down_gray.png" />
<Resource Include="Images\nurse_gray.png" /> <Resource Include="Images\nurse_gray.png" />
<Resource Include="Images\open_folder_gray.png" />
<Resource Include="Images\previous_gray.png" />
<Resource Include="Images\up_gray.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\checkmark_gray.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Converter\" /> <Folder Include="Converter\" />
...@@ -321,6 +297,9 @@ ...@@ -321,6 +297,9 @@
<ItemGroup> <ItemGroup>
<Resource Include="Images\apache_server.png" /> <Resource Include="Images\apache_server.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Images\push_pin.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -91,8 +91,7 @@ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr ...@@ -91,8 +91,7 @@ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr
<TextBlock Text="设置" /> <TextBlock Text="设置" />
</StackPanel> </StackPanel>
</Button> </Button>
<StackPanel Orientation="Horizontal" Grid.Column="1" Visibility="{Binding FeedbackHeat.CheckEnable, Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}" >
<StackPanel Orientation="Horizontal" Grid.Column="1" Visibility="{Binding CheckEnable, Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}" >
<Button Command="{Binding BaseUpCmd}" > <Button Command="{Binding BaseUpCmd}" >
<StackPanel> <StackPanel>
<Image Source="/FLY.FilmCasting.AutoDie.UI.Client;component/Images/up.png"/> <Image Source="/FLY.FilmCasting.AutoDie.UI.Client;component/Images/up.png"/>
...@@ -200,7 +199,12 @@ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr ...@@ -200,7 +199,12 @@ xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc1="clr
<TextBlock Text="读取" /> <TextBlock Text="读取" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button Command="{Binding LocationCmd}" >
<StackPanel>
<Image Source="/FLY.FilmCasting.AutoDie.UI.Client;component/Images/push_pin.png" />
<TextBlock Text="定位" />
</StackPanel>
</Button>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="3"> <StackPanel Orientation="Horizontal" Grid.Column="3">
......
...@@ -60,6 +60,24 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule ...@@ -60,6 +60,24 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
/// 当前选择加热通道数量 /// 当前选择加热通道数量
/// </summary> /// </summary>
public int SelectBoltNoWidth { get; set; } = 0; public int SelectBoltNoWidth { get; set; } = 0;
public RelayCommand AddCmd { get; private set; }
public RelayCommand SubCmd { get; private set; }
public RelayCommand UndoCmd { get; private set; }
public RelayCommand CalCmd { get; private set; }
public RelayCommand BaseUpCmd { get; private set; }
public RelayCommand BaseDownCmd { get; private set; }
public RelayCommand ApplyCmd { get; private set; }
public RelayCommand SaveCmd { get; private set; }
public RelayCommand LoadCmd { get; private set; }
public RelayCommand EnableCmd { get; private set; }
public RelayCommand CheckCmd { get; private set; }
public RelayCommand SmoothCmd { get; private set; }
public RelayCommand ClearCmd { get; private set; }
public RelayCommand LocationCmd { get; private set; }
/// <summary> /// <summary>
/// 长按驱动器 /// 长按驱动器
/// </summary> /// </summary>
...@@ -152,9 +170,10 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule ...@@ -152,9 +170,10 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
CheckCmd = new RelayCommand(Check); CheckCmd = new RelayCommand(Check);
SmoothCmd = new RelayCommand(() => mHeatCell.Smooth()); SmoothCmd = new RelayCommand(() => mHeatCell.Smooth());
ClearCmd = new RelayCommand(Clear); ClearCmd = new RelayCommand(Clear);
LocationCmd = new RelayCommand(Location);
} }
public void Init( public void Init(
IFeedbackHeatService feedback, IFeedbackHeatService feedback,
...@@ -285,20 +304,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule ...@@ -285,20 +304,7 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
} }
public RelayCommand AddCmd { get; }
public RelayCommand SubCmd { get; }
public RelayCommand UndoCmd { get; }
public RelayCommand CalCmd { get; }
public RelayCommand BaseUpCmd { get; }
public RelayCommand BaseDownCmd { get; }
public RelayCommand ApplyCmd { get; }
public RelayCommand SaveCmd { get; }
public RelayCommand LoadCmd { get; }
public RelayCommand EnableCmd { get; }
public RelayCommand CheckCmd { get; }
public RelayCommand SmoothCmd { get; }
public RelayCommand ClearCmd { get; }
private void Save() private void Save()
{ {
...@@ -395,7 +401,10 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule ...@@ -395,7 +401,10 @@ namespace FLY.FilmCasting.AutoDie.UI.Client.UiModule
} }
} }
} }
private void Location()
{
mFeedback.Location();
}
/// <summary> /// <summary>
/// 设置选择范围。 在ScanMmGraph 中调用 /// 设置选择范围。 在ScanMmGraph 中调用
......
...@@ -187,7 +187,13 @@ namespace FLY.FilmCasting.AutoDie.Client ...@@ -187,7 +187,13 @@ namespace FLY.FilmCasting.AutoDie.Client
#endregion #endregion
/// <summary>
/// 对位加热
/// </summary>
public void Location()
{
Call(nameof(Location));
}
} }
} }
...@@ -135,6 +135,12 @@ namespace FLY.FilmCasting.AutoDie.IService ...@@ -135,6 +135,12 @@ namespace FLY.FilmCasting.AutoDie.IService
/// <param name="filename"></param> /// <param name="filename"></param>
void LoadHeatsFile(string productname); void LoadHeatsFile(string productname);
/// <summary>
/// 对位加热
/// </summary>
void Location();
#region 撤销 #region 撤销
/// <summary> /// <summary>
......
...@@ -79,6 +79,7 @@ namespace FLY.FilmCasting.AutoDie.IService ...@@ -79,6 +79,7 @@ namespace FLY.FilmCasting.AutoDie.IService
/// 参数应用 /// 参数应用
/// </summary> /// </summary>
void Apply(); void Apply();
/// <summary> /// <summary>
/// 手动调整加热增量 /// 手动调整加热增量
/// </summary> /// </summary>
......
...@@ -471,8 +471,48 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -471,8 +471,48 @@ namespace FLY.FilmCasting.AutoDie.Server
resetUndo(); resetUndo();
} }
//int[] getSingleHeat_100(int channelcnt, int index)
//{
// int[] heats = new int[channelcnt];
// Array.Clear(heats, 0, heats.Count());
// heats[index] = 100;
// return heats;
//}
public void Location()
{
if (lastLcThickHeat == null)
return;
//加热 2/3 位置
int midBoltIndex = (lastLcThickHeat.DataEnd + lastLcThickHeat.DataBegin) / 2;
int dis = (int)((lastLcThickHeat.DataEnd - lastLcThickHeat.DataBegin) * 0.7) / 2;
int boltIndex1 = midBoltIndex - dis;
int boltIndex2 = midBoltIndex + dis; ;
if (boltIndex1 < 0 || boltIndex1 >= ChannelCnt)
return;//异常
if (boltIndex2 < 0 || boltIndex2 >= ChannelCnt)
return;//异常
//定位加热
int[] heats = new int[mHeatCell.ChannelCnt];
Array.Clear(heats, 0, heats.Count());
heats[boltIndex1-1] = 80;
heats[boltIndex1] = 80;
heats[boltIndex1+1] = 80;
heats[boltIndex2 - 1] = 80;
heats[boltIndex2] = 80;
heats[boltIndex2 + 1] = 80;
mHeatCell.ModifyPreHeats(heats);
mHeatCell.HeatApply();
}
void mHeatCell_PropertyChanged(object sender, PropertyChangedEventArgs e) void mHeatCell_PropertyChanged(object sender, PropertyChangedEventArgs e)
{ {
...@@ -681,17 +721,20 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -681,17 +721,20 @@ namespace FLY.FilmCasting.AutoDie.Server
if (lc_ScanData.Thicks.Count() != ChannelCnt) if (lc_ScanData.Thicks.Count() != ChannelCnt)
return;//非常异常!!! return;//非常异常!!!
//检测数据有效性 //把数据范围外 的全部删除
int invalid_cnt = lc_ScanData.Thicks.Count( for (int i = 0; i < lc_ScanData.DataBegin; i++)
(_d) => { return double.IsNaN(_d); } lc_ScanData.Thicks[i] = double.NaN;
);
//工作的螺丝数
int workBolts = lc_ScanData.BoltMapInfo.BoltCnt - (lc_ScanData.BoltMapInfo.LeftEmptyBolts + lc_ScanData.BoltMapInfo.RightEmptyBolts);
//if (invalid_cnt > workBolts / 2)//有一半数据都是无效的 for (int i = lc_ScanData.DataEnd+1; i < ChannelCnt; i++)
// return; lc_ScanData.Thicks[i] = double.NaN;
//检测数据有效性,其中一个无效
for (int i = lc_ScanData.DataBegin; i <= lc_ScanData.DataEnd; i++)
{
if (double.IsNaN(lc_ScanData.Thicks[i]))
return;
}
if (lc_ScanData.FilmVelocity < INVALID_VELOCITY) if (lc_ScanData.FilmVelocity < INVALID_VELOCITY)
{ {
//速度太慢,异常 //速度太慢,异常
...@@ -712,6 +755,8 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -712,6 +755,8 @@ namespace FLY.FilmCasting.AutoDie.Server
FilmVelocity = lc_ScanData.FilmVelocity, FilmVelocity = lc_ScanData.FilmVelocity,
FilmWidth = lc_ScanData.FilmWidth, FilmWidth = lc_ScanData.FilmWidth,
Avg = lc_ScanData.Avg, Avg = lc_ScanData.Avg,
DataBegin = lc_ScanData.DataBegin,
DataEnd = lc_ScanData.DataEnd,
Thicks = lc_ScanData.Thicks, Thicks = lc_ScanData.Thicks,
SampleADs = lc_ScanData.SampleADs, SampleADs = lc_ScanData.SampleADs,
BoltMapInfo = lc_ScanData.BoltMapInfo, BoltMapInfo = lc_ScanData.BoltMapInfo,
......
...@@ -381,7 +381,6 @@ namespace FLY.FilmCasting.AutoDie.Server ...@@ -381,7 +381,6 @@ namespace FLY.FilmCasting.AutoDie.Server
Offsets = offsets; Offsets = offsets;
UpdatePreHeats(); UpdatePreHeats();
} }
#region PreHeats 平滑处理 #region PreHeats 平滑处理
double[] GetHeatSigmas(int[] heats) double[] GetHeatSigmas(int[] heats)
{ {
......
...@@ -74,43 +74,55 @@ namespace FLY.FilmCasting.AutoDie.Server.Model ...@@ -74,43 +74,55 @@ namespace FLY.FilmCasting.AutoDie.Server.Model
[PropertyIndex(12)] [PropertyIndex(12)]
public double Avg { get; set; } public double Avg { get; set; }
/// <summary>
/// 数据范围 开始
/// </summary>
[PropertyIndex(13)] [PropertyIndex(13)]
public string Thicks { get; set; } public int DataBegin { get; set; }
/// <summary>
/// 数据范围 结束
/// </summary>
[PropertyIndex(14)] [PropertyIndex(14)]
public string SampleADs { get; set; } public int DataEnd { get; set; }
[PropertyIndex(15)] [PropertyIndex(15)]
public string Thicks { get; set; }
[PropertyIndex(16)]
public string SampleADs { get; set; }
[PropertyIndex(17)]
public string BoltMapInfo { get; set; } public string BoltMapInfo { get; set; }
/// <summary> /// <summary>
/// 膜距离 m /// 膜距离 m
/// </summary> /// </summary>
[PropertyIndex(16)] [PropertyIndex(18)]
public double FilmLength { get; set; } public double FilmLength { get; set; }
/// <summary> /// <summary>
/// 分区表, Thicks 是还没分区前的数据 /// 分区表, Thicks 是还没分区前的数据
/// </summary> /// </summary>
[PropertyIndex(17)] [PropertyIndex(19)]
public string Boltmap { get; set; } public string Boltmap { get; set; }
/// <summary> /// <summary>
/// 加热生效 /// 加热生效
/// </summary> /// </summary>
[PropertyIndex(18)] [PropertyIndex(20)]
public bool IsStable { get; set; } public bool IsStable { get; set; }
/// <summary> /// <summary>
/// 开始改变加热时间 /// 开始改变加热时间
/// </summary> /// </summary>
[PropertyIndex(19)] [PropertyIndex(21)]
public DateTime HTime { get; set; } public DateTime HTime { get; set; }
/// <summary> /// <summary>
/// 1幅加热数据 % /// 1幅加热数据 %
/// </summary> /// </summary>
[PropertyIndex(20)] [PropertyIndex(22)]
public string Heats { get; set; } public string Heats { get; set; }
} }
} }
...@@ -53,6 +53,16 @@ namespace FLY.FilmCasting.AutoDie.Server.Model ...@@ -53,6 +53,16 @@ namespace FLY.FilmCasting.AutoDie.Server.Model
/// 厚度均值 /// 厚度均值
/// </summary> /// </summary>
public double Avg { get; set; } public double Avg { get; set; }
/// <summary>
/// 数据范围 开始
/// </summary>
public int DataBegin { get; set; }
/// <summary>
/// 数据范围 结束
/// </summary>
public int DataEnd { get; set; }
public double[] Thicks { get; set; } public double[] Thicks { get; set; }
......
Subproject commit 998a571336d5903963f36090a026501467e90f68 Subproject commit cabcd8ecbb065fad133c7fb786fb771bfe1c2fe0
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