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

修改 由于线速度变化,导致加热一直被复位的bug

parent c50d3c7f
......@@ -380,17 +380,26 @@ namespace FLY.FeedbackRenZiJia.Server
{
if (hmi.CurrUpdate != CurrsUpdate)
{
CurrsUpdate = hmi.CurrUpdate;
bool isupdate = false;
//更新了
for (int i = 0; i < ChannelCnt; i++)
{
if (Currs[i] != hmi.GetCurr(i))
{
Currs[i] = hmi.GetCurr(i);
isupdate = true;
}
}
if (isupdate)
{
NotifyPropertyChanged("Currs");
//把Currs 复制到 HeatCell.Heats
mHeatCell.ModifyHeats(Currs);
}
}
}
else if (e.PropertyName == "Errno")
{
if (hmi.Errno == -1)
......@@ -571,7 +580,7 @@ namespace FLY.FeedbackRenZiJia.Server
HasFilmVelocity = (mBDetect.FilmVelocity > 3);//大于3m/min 正常生产
//当线速度 很小,肯定是没生产,停止加热,停止自控
if (HasCheckFilmVelocity && HasFilmVelocity)
if (HasCheckFilmVelocity && (!HasFilmVelocity))
{
StopAnyHeating();
//停止自控
......
......@@ -107,35 +107,14 @@ namespace FLY.FeedbackRenZiJia.Server
#region PLCLink 成员
#region 状态
int errno;
/// <summary>
/// -1 HMI 没有连接到 本服务器; -2 串口打开异常
/// </summary>
public int Errno
{
get
{
return errno;
}
set
{
errno = value;
NotifyPropertyChanged("Errno");
}
}
int retcode;
public int RetCode
{
get
{
return retcode;
}
set
{
retcode = value;
NotifyPropertyChanged("RetCode");
}
}
public int Errno { get; set; } = -1;
public int RetCode { get; set; }
#endregion
/// <summary>
......
......@@ -19,121 +19,46 @@ namespace FLY.FeedbackRenZiJia.Server
#region IHeatCell 接口 成员变量
#region 参数
private double kp=3;
/// <summary>
/// HeatOffset = ThickPercent * Kp
/// </summary>
public double Kp{
get { return kp; }
set{
if(kp != value)
{
kp = value;
NotifyPropertyChanged("Kp");
}
}
}
public double Kp { get; set; } = 3;
bool isAutoONo = false;
/// <summary>
/// 自动对位
/// </summary>
public bool IsAutoONo
{
get { return isAutoONo; }
set {
if (isAutoONo != value)
{
isAutoONo = value;
NotifyPropertyChanged("IsAutoONo");
}
}
}
public bool IsAutoONo { get; set; } = false;
double autoONoKp = 5;
/// <summary>
/// 自动对位的Kp
/// </summary>
public double AutoONoKp
{
get { return autoONoKp; }
set
{
if (autoONoKp != value)
{
autoONoKp = value;
NotifyPropertyChanged("AutoONoKp");
}
}
}
public double AutoONoKp { get; set; } = 5;
private double thresholdheatsigma=10;
/// <summary>
/// 平滑的阀值,只有超出阀值,才平滑
/// </summary>
public double ThresholdHeatSigma
{
get{
return thresholdheatsigma;
}
set{
if(thresholdheatsigma != value)
{
thresholdheatsigma = value;
NotifyPropertyChanged("ThresholdHeatSigma");
}
}
}
public double ThresholdHeatSigma { get; set; } = 10;
bool isForbidUpDown = false;
/// <summary>
/// 自控时,不能调整总体上升下降
/// </summary>
public bool IsForbidUpDown
{
get { return isForbidUpDown; }
set {
if (isForbidUpDown != value)
{
isForbidUpDown = value;
NotifyPropertyChanged("IsForbidUpDown");
}
}
}
public bool IsForbidUpDown { get; set; } = false;
int ctrlline=2;
/// <summary>
/// 厚度控制线 , 厚度% 大于 厚度控制线 自动才会加热控制
/// </summary>
public int CtrlLine
{
get { return ctrlline; }
set
{
if (ctrlline != value)
{
ctrlline = value;
NotifyPropertyChanged("CtrlLine");
}
}
}
private bool isBreakUpMode = false;
public int CtrlLine { get; set; } = 2;
/// <summary>
/// 开启打散模式, 打散模式下,以打散度小为目标,控制2sigma在 控制线内
/// </summary>
public bool IsBreakUpMode
{
get { return isBreakUpMode; }
set {
if (isBreakUpMode != value)
{
isBreakUpMode = value;
NotifyPropertyChanged("IsBreakUpMode");
}
}
}
public bool IsBreakUpMode { get; set; } = false;
#endregion
#region 状态
......@@ -171,22 +96,8 @@ namespace FLY.FeedbackRenZiJia.Server
}
}
private int _base=0;
private int Base
{
get
{
return _base;
}
set
{
if (_base != value)
{
_base = value;
NotifyPropertyChanged("Base");
}
}
}
private int Base { get; set; } = 0;
int[] offsets;
......@@ -223,59 +134,22 @@ namespace FLY.FeedbackRenZiJia.Server
}
}
private double maxheatsigma=0;
/// <summary>
/// 加热量 每3个计算的sigma,最大值
/// </summary>
public double MaxHeatSigma
{
private set {
if (maxheatsigma != value)
{
maxheatsigma = value;
NotifyPropertyChanged("MaxHeatSigma");
}
}
get
{
return maxheatsigma;
}
}
public double MaxHeatSigma { get; set; } = 0;
private bool isInAutoONo = false;
/// <summary>
/// 当前正在自动对位模式
/// </summary>
public bool IsInAutoONo
{
get {
return isInAutoONo;
}
protected set {
if (isInAutoONo != value)
{
isInAutoONo = value;
NotifyPropertyChanged("IsInAutoONo");
}
}
}
public bool IsInAutoONo { get; protected set; }
#endregion
#endregion
private int channelcnt;
public int ChannelCnt
{
get { return channelcnt; }
set {
if (channelcnt != value)
{
channelcnt = value;
NotifyPropertyChanged("ChannelCnt");
}
}
}
public int ChannelCnt { get; set; }
int BoltCnt;
HeatBuf mHeatBuf;
......
......@@ -270,14 +270,14 @@
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<TextBlock Text="边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding BagFold0}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_static}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2" Grid.Column="1">
<TextBlock Text="边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<TextBlock Text="边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding BagFold1}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_static}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
......
......@@ -93,7 +93,7 @@
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent}" FontSize="32" Text="测两层"/>
</ComboBoxItem>
<ComboBoxItem IsSelected="{Binding MMode, Converter={StaticResource e2bconv}, ConverterParameter={x:Static common:MeasureMode.Bag}}">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent}" FontSize="32" Text="测袋"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent}" FontSize="32" Text="测风琴袋"/>
</ComboBoxItem>
</ComboBox>
......@@ -158,14 +158,14 @@
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="探头下边" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="探头下边" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding BagFold0}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="另一边边" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="另一边边" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding BagFold1}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" />
......
<#
获取程序包
FLY.Thick.Blowing.UI.Fix.Client
FLY.Thick.Blowing.UI.Fix.Server
FLY.FeedbackRenZiJia.UI.Server
复制到 追边测厚仪安装包\佛山市枫莱尔自动化技术有限公司\WINDOWS
#>
function copy_to($src_dir , $project_name, $other )
{
$install_dir = "和美安装包\佛山市枫莱尔自动化技术有限公司\WINDOWS"
$src_dir = $PSScriptRoot + "\" + $src_dir + "\" + $project_name + "\bin\Debug";
$install_dir = $PSScriptRoot + "\" + $install_dir + "\" + $project_name;
#检测文件夹是否存在
#存在,删除全部数据,再新创建;
#不存在,创建。
if(Test-Path $install_dir )
{
rm -Recurse -Force $install_dir
}
mkdir -p $install_dir
echo 复制 $project_name
#复制全部 xxx.dll 与 $project_name+".exe"
$src = $src_dir + "\*.dll"
#echo $src
cp $src $install_dir
#$src = $src_dir + "\" + $project_name + ".exe"
$src = $src_dir + "\*.exe"
cp $src $install_dir
#删除 *.vshost.exe
$src = $install_dir + "\*.vshost.exe"
rm $src
foreach($f in $other)
{
$src = $src_dir + "\"+$f;
cp -Recurse $src $install_dir
}
}
copy_to "Project.FLY.Thick.Blowing" "FLY.Thick.Blowing.UI.Fix.Client" ("csysparam.xml","layout", "main_module", "music", "版本说明.txt", "测厚仪说明书.pdf")
copy_to "Project.FLY.Thick.Blowing" "FLY.Thick.Blowing.UI.Fix.Server" ("Gage1")
copy_to "Project.FLY.FeedbackRenZiJia" "FLY.FeedbackRenZiJia.UI.Server" ("Gage1")
echo 复制成功
pause
\ No newline at end of file
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