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

添加 吹膜测厚 添加 信号0,信号1,辊速 输入口自定义

parent 496486c5
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<local:OnOffConverter x:Key="onOffConv"/> <local:OnOffConverter x:Key="onOffConv"/>
<local:InNoConverter x:Key="inNoConv"/>
<local:PgBlowingVmUt x:Key="viewModel" IsRPosMode ="False"/> <local:PgBlowingVmUt x:Key="viewModel" IsRPosMode ="False"/>
</ResourceDictionary> </ResourceDictionary>
</Page.Resources> </Page.Resources>
...@@ -144,14 +146,14 @@ ...@@ -144,14 +146,14 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="膜距离" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="膜距离" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox HorizontalAlignment="Left" MaxWidth="150" Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding FilmLength,StringFormat={}{0:F1}}" /> <TextBox HorizontalAlignment="Left" MaxWidth="150" Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding FilmLength,StringFormat={}{0:F1}}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="m" /> <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="m" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="辊周长" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="辊周长" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox HorizontalAlignment="Left" MaxWidth="150" Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding RollPerimeter}" /> <TextBox HorizontalAlignment="Left" MaxWidth="150" Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding RollPerimeter}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="mm" /> <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="mm" />
...@@ -355,6 +357,27 @@ ...@@ -355,6 +357,27 @@
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="信号缺少模式" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="信号缺少模式" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding IsLackSignMode}" /> <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding IsLackSignMode}" />
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="信号0&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Limit0,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="信号1&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Limit1,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="辊速&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Roll,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
......
...@@ -70,6 +70,27 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -70,6 +70,27 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
} }
} }
public class InNoConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is int)
{
return ((int)value + 1).ToString();
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is string)
{
if (!int.TryParse((string)value, out int no))
return null;
return no - 1;
}
return null;
}
}
} }
...@@ -92,6 +92,20 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -92,6 +92,20 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
/// </summary> /// </summary>
public int RPosOfR { get; set; } public int RPosOfR { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public int InNo_Limit0 { get; set; } = 9-1;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 { get; set; } = 10-1;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll { get; set; } = 11-1;
#endregion #endregion
#region 分区设定 #region 分区设定
/// <summary> /// <summary>
...@@ -178,6 +192,11 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -178,6 +192,11 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.RPosOfR), this, nameof(RPosOfR)); Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.RPosOfR), this, nameof(RPosOfR));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Limit0), this, nameof(InNo_Limit0));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Limit1), this, nameof(InNo_Limit1));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Roll), this, nameof(InNo_Roll));
Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.IsProbeRight), this, nameof(IsProbeRight)); Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.IsProbeRight), this, nameof(IsProbeRight));
Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.ChannelCnt), this, nameof(ChannelCnt)); Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.ChannelCnt), this, nameof(ChannelCnt));
...@@ -350,6 +369,10 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -350,6 +369,10 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
bDetect.IsRPosMode = this.IsRPosMode; bDetect.IsRPosMode = this.IsRPosMode;
bDetect.RPosOfR = this.RPosOfR; bDetect.RPosOfR = this.RPosOfR;
bDetect.InNo_Limit0 = this.InNo_Limit0;
bDetect.InNo_Limit1 = this.InNo_Limit1;
bDetect.InNo_Roll = this.InNo_Roll;
bDetect.Apply(); bDetect.Apply();
renZiJiaService.ChannelCnt=this.ChannelCnt; renZiJiaService.ChannelCnt=this.ChannelCnt;
......
...@@ -168,6 +168,9 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -168,6 +168,9 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
public int RSpeed { get; set; } public int RSpeed { get; set; }
public DateTime DefaultTime { get; set; } public DateTime DefaultTime { get; set; }
public int InNo_Limit0 { get; set; } = 9 - 1;
public int InNo_Limit1 { get; set; } = 10 - 1;
public int InNo_Roll { get; set; } = 11 - 1;
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
......
...@@ -103,6 +103,22 @@ namespace FLY.Thick.Blowing.Client ...@@ -103,6 +103,22 @@ namespace FLY.Thick.Blowing.Client
/// 通过看 转向信号列表,可以看到 /// 通过看 转向信号列表,可以看到
/// </summary> /// </summary>
public int RPosOfR { get; set; } public int RPosOfR { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public int InNo_Limit0 { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 { get; set; }
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll { get; set; }
#endregion #endregion
#region 状态 #region 状态
......
...@@ -88,8 +88,20 @@ namespace FLY.Thick.Blowing.IService ...@@ -88,8 +88,20 @@ namespace FLY.Thick.Blowing.IService
/// </summary> /// </summary>
int RPosOfR { get; set; } int RPosOfR { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
int InNo_Limit0 { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
int InNo_Limit1 { get; set; }
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
int InNo_Roll { get; set; }
#endregion #endregion
#region 状态 #region 状态
......
...@@ -28,21 +28,21 @@ namespace FLY.Thick.Blowing.Server ...@@ -28,21 +28,21 @@ namespace FLY.Thick.Blowing.Server
/// <summary> /// <summary>
/// 限位0 对应输入位 /// 限位0 对应输入位
/// </summary> /// </summary>
const int Limit0_bit = 9; const int Limit0_bit = 9-1;
/// <summary> /// <summary>
/// 限位1 对应输入位 /// 限位1 对应输入位
/// </summary> /// </summary>
const int Limit1_bit = 10; const int Limit1_bit = 10-1;
/// <summary> /// <summary>
/// 辊信号 对应输入位 /// 辊信号 对应输入位
/// </summary> /// </summary>
const int Roll_bit = 11; const int Roll_bit = 11-1;
#endregion #endregion
...@@ -132,11 +132,21 @@ namespace FLY.Thick.Blowing.Server ...@@ -132,11 +132,21 @@ namespace FLY.Thick.Blowing.Server
/// </summary> /// </summary>
public int RPosOfR { get; set; } = 50000; public int RPosOfR { get; set; } = 50000;
/// <summary> /// <summary>
/// 刚开机,信号列表一个信号都没有,创造一个时间点,作为信号点 /// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary> /// </summary>
public DateTime DefaultTime { get; set; } public int InNo_Limit0 { get; set; } = Limit0_bit;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 { get; set; } = Limit1_bit;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll { get; set; } = Roll_bit;
#endregion #endregion
#region 状态 #region 状态
...@@ -194,6 +204,10 @@ namespace FLY.Thick.Blowing.Server ...@@ -194,6 +204,10 @@ namespace FLY.Thick.Blowing.Server
/// </summary> /// </summary>
public int RSpeed { get; protected set; } public int RSpeed { get; protected set; }
/// <summary>
/// 刚开机,信号列表一个信号都没有,创造一个时间点,作为信号点
/// </summary>
public DateTime DefaultTime { get; protected set; }
#endregion #endregion
...@@ -483,20 +497,20 @@ namespace FLY.Thick.Blowing.Server ...@@ -483,20 +497,20 @@ namespace FLY.Thick.Blowing.Server
bool status = false;//信号的状态 true开始, false结束 bool status = false;//信号的状态 true开始, false结束
int position2 = e.Position2; int position2 = e.Position2;
if (Misc.MyBase.CHECKBIT(e.IChanged, Limit0_bit - 1))//信号0 发生变化 if (Misc.MyBase.CHECKBIT(e.IChanged, InNo_Limit0))//信号0 发生变化
{ {
bchanged = true; bchanged = true;
no = 0; no = 0;
if (!Misc.MyBase.CHECKBIT(e.IStatus, Limit0_bit - 1)) if (!Misc.MyBase.CHECKBIT(e.IStatus, InNo_Limit0))
{ {
status = true; status = true;
} }
} }
else if (Misc.MyBase.CHECKBIT(e.IChanged, Limit1_bit - 1))//信号1 发生变化 else if (Misc.MyBase.CHECKBIT(e.IChanged, InNo_Limit1))//信号1 发生变化
{ {
bchanged = true; bchanged = true;
no = 1; no = 1;
if (!Misc.MyBase.CHECKBIT(e.IStatus, Limit1_bit - 1)) if (!Misc.MyBase.CHECKBIT(e.IStatus, InNo_Limit1))
{ {
status = true; status = true;
} }
...@@ -574,11 +588,11 @@ namespace FLY.Thick.Blowing.Server ...@@ -574,11 +588,11 @@ namespace FLY.Thick.Blowing.Server
{ {
//---------------------------------------------------------------------- //----------------------------------------------------------------------
//更新辊信号 //更新辊信号
if (!Misc.MyBase.CHECKBIT(e.IChanged, Roll_bit - 1)) if (!Misc.MyBase.CHECKBIT(e.IChanged, InNo_Roll))
return;//没有信号更新 return;//没有信号更新
//信号的状态 //信号的状态
bool status = !Misc.MyBase.CHECKBIT(e.IStatus, Roll_bit - 1); bool status = !Misc.MyBase.CHECKBIT(e.IStatus, InNo_Roll);
if (status)//1->0 触发!!! if (status)//1->0 触发!!!
{ {
...@@ -2070,7 +2084,20 @@ namespace FLY.Thick.Blowing.Server ...@@ -2070,7 +2084,20 @@ namespace FLY.Thick.Blowing.Server
/// </summary> /// </summary>
public int RPosOfR=50000; public int RPosOfR=50000;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public int InNo_Limit0 = 9 - 1;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 = 10 - 1;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll = 11 - 1;
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<local:OnOffConverter x:Key="onOffConv"/> <local:OnOffConverter x:Key="onOffConv"/>
<local:InNoConverter x:Key="inNoConv"/>
<local:PgBlowingVmUt x:Key="viewModel" IsRPosMode ="False"/> <local:PgBlowingVmUt x:Key="viewModel" IsRPosMode ="False"/>
</ResourceDictionary> </ResourceDictionary>
...@@ -296,7 +297,41 @@ ...@@ -296,7 +297,41 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ScrollViewer CanContentScroll="True" PanningMode="Both" >
<StackPanel>
<Border Style="{StaticResource Styles.Card.Border}" >
<StackPanel >
<TextBlock Style="{StaticResource Styles.Card.Title}" Text="转向信号"/>
<StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="信号0&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Limit0,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="信号1&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Limit1,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="辊速&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Roll,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
<Border Style="{StaticResource Styles.Card.Border}" Grid.Column="1"> <Border Style="{StaticResource Styles.Card.Border}" Grid.Column="1">
<Grid > <Grid >
<Grid.RowDefinitions> <Grid.RowDefinitions>
......
...@@ -70,6 +70,27 @@ namespace FLY.Thick.Blowing360.UI ...@@ -70,6 +70,27 @@ namespace FLY.Thick.Blowing360.UI
} }
} }
public class InNoConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is int)
{
return ((int)value + 1).ToString();
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is string)
{
if (!int.TryParse((string)value, out int no))
return null;
return no - 1;
}
return null;
}
}
} }
...@@ -56,6 +56,21 @@ namespace FLY.Thick.Blowing360.UI ...@@ -56,6 +56,21 @@ namespace FLY.Thick.Blowing360.UI
/// </summary> /// </summary>
public int RPosOfR { get; set; } public int RPosOfR { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public int InNo_Limit0 { get; set; } = 9 - 1;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 { get; set; } = 10 - 1;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll { get; set; } = 11 - 1;
#endregion #endregion
#region 分区设定 #region 分区设定
/// <summary> /// <summary>
...@@ -134,6 +149,10 @@ namespace FLY.Thick.Blowing360.UI ...@@ -134,6 +149,10 @@ namespace FLY.Thick.Blowing360.UI
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.IsRPosMode), this, nameof(IsRPosMode)); Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.IsRPosMode), this, nameof(IsRPosMode));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.RPosOfR), this, nameof(RPosOfR)); Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.RPosOfR), this, nameof(RPosOfR));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Limit0), this, nameof(InNo_Limit0));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Limit1), this, nameof(InNo_Limit1));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Roll), this, nameof(InNo_Roll));
Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.IsProbeRight), this, nameof(IsProbeRight)); Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.IsProbeRight), this, nameof(IsProbeRight));
...@@ -299,6 +318,10 @@ namespace FLY.Thick.Blowing360.UI ...@@ -299,6 +318,10 @@ namespace FLY.Thick.Blowing360.UI
bDetect.IsRPosMode = this.IsRPosMode; bDetect.IsRPosMode = this.IsRPosMode;
bDetect.RPosOfR = this.RPosOfR; bDetect.RPosOfR = this.RPosOfR;
bDetect.InNo_Limit0 = this.InNo_Limit0;
bDetect.InNo_Limit1 = this.InNo_Limit1;
bDetect.InNo_Roll = this.InNo_Roll;
bDetect.Apply(); bDetect.Apply();
renZiJiaService.ChannelCnt=this.ChannelCnt; renZiJiaService.ChannelCnt=this.ChannelCnt;
......
...@@ -99,7 +99,20 @@ namespace FLY.Thick.Blowing360.UI ...@@ -99,7 +99,20 @@ namespace FLY.Thick.Blowing360.UI
/// </summary> /// </summary>
public int RPosOfR { get; set; } public int RPosOfR { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public int InNo_Limit0 { get; set; } = 9 - 1;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 { get; set; } = 10 - 1;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll { get; set; } = 11 - 1;
#endregion #endregion
......
...@@ -141,6 +141,21 @@ namespace FLY.Thick.Blowing360.Server ...@@ -141,6 +141,21 @@ namespace FLY.Thick.Blowing360.Server
/// </summary> /// </summary>
double MofR => RollPerimeter / 1000.0; double MofR => RollPerimeter / 1000.0;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public int InNo_Limit0 { get; set; } = 9 - 1;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 { get; set; } = 10 - 1;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll { get; set; } = 11 - 1;
#endregion #endregion
#region 状态 #region 状态
...@@ -435,20 +450,20 @@ namespace FLY.Thick.Blowing360.Server ...@@ -435,20 +450,20 @@ namespace FLY.Thick.Blowing360.Server
bool status = false;//信号的状态 true开始, false结束 bool status = false;//信号的状态 true开始, false结束
int position2 = e.Position2; int position2 = e.Position2;
if (Misc.MyBase.CHECKBIT(e.IChanged, Limit0_bit - 1))//信号0 发生变化 if (Misc.MyBase.CHECKBIT(e.IChanged, InNo_Limit0))//信号0 发生变化
{ {
bchanged = true; bchanged = true;
no = 0; no = 0;
if (!Misc.MyBase.CHECKBIT(e.IStatus, Limit0_bit - 1)) if (!Misc.MyBase.CHECKBIT(e.IStatus, InNo_Limit0))
{ {
status = true; status = true;
} }
} }
else if (Misc.MyBase.CHECKBIT(e.IChanged, Limit1_bit - 1))//信号1 发生变化 else if (Misc.MyBase.CHECKBIT(e.IChanged, InNo_Limit1))//信号1 发生变化
{ {
bchanged = true; bchanged = true;
no = 1; no = 1;
if (!Misc.MyBase.CHECKBIT(e.IStatus, Limit1_bit - 1)) if (!Misc.MyBase.CHECKBIT(e.IStatus, InNo_Limit1))
{ {
status = true; status = true;
} }
...@@ -565,11 +580,11 @@ namespace FLY.Thick.Blowing360.Server ...@@ -565,11 +580,11 @@ namespace FLY.Thick.Blowing360.Server
{ {
//---------------------------------------------------------------------- //----------------------------------------------------------------------
//更新辊信号 //更新辊信号
if (!Misc.MyBase.CHECKBIT(e.IChanged, Roll_bit - 1)) if (!Misc.MyBase.CHECKBIT(e.IChanged, InNo_Roll))
return;//没有信号更新 return;//没有信号更新
//信号的状态 //信号的状态
bool status = !Misc.MyBase.CHECKBIT(e.IStatus, Roll_bit - 1); bool status = !Misc.MyBase.CHECKBIT(e.IStatus, InNo_Roll);
if (status)//1->0 触发!!! if (status)//1->0 触发!!!
{ {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<local:OnOffConverter x:Key="onOffConv"/> <local:OnOffConverter x:Key="onOffConv"/>
<local:InNoConverter x:Key="inNoConv"/>
<local:PgBlowingVmUt x:Key="viewModel" IsRPosMode ="False"/> <local:PgBlowingVmUt x:Key="viewModel" IsRPosMode ="False"/>
</ResourceDictionary> </ResourceDictionary>
...@@ -383,17 +384,38 @@ ...@@ -383,17 +384,38 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</WrapPanel> </WrapPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Margin="{StaticResource ControlMargin}"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="信号滤波" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="信号滤波" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding IsSignFilter}" /> <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding IsSignFilter}" />
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="信号缺少模式" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="信号缺少模式" />
<ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding IsLackSignMode}" /> <ToggleButton Style="{StaticResource Styles.ToggleButton.YESNO}" HorizontalAlignment="Left" IsChecked="{Binding IsLackSignMode}" />
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="信号0&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Limit0,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="信号1&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Limit1,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable.Row2}" Text="辊速&#13;输入号" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="i"/>
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding InNo_Roll,Converter={StaticResource inNoConv}}" />
</StackPanel>
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel>
</StackPanel> </StackPanel>
</Border> </Border>
</StackPanel> </StackPanel>
......
...@@ -83,4 +83,27 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -83,4 +83,27 @@ namespace FLY.Thick.BlowingScan.UI.Client
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
public class InNoConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is int)
{
return ((int)value + 1).ToString();
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is string)
{
if (!int.TryParse((string)value, out int no))
return null;
return no - 1;
}
return null;
}
}
} }
...@@ -90,6 +90,21 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -90,6 +90,21 @@ namespace FLY.Thick.BlowingScan.UI.Client
/// </summary> /// </summary>
public int RPosOfR { get; set; } public int RPosOfR { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public int InNo_Limit0 { get; set; } = 9 - 1;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 { get; set; } = 10 - 1;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll { get; set; } = 11 - 1;
#endregion #endregion
#region 分区设定 #region 分区设定
/// <summary> /// <summary>
...@@ -198,6 +213,9 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -198,6 +213,9 @@ namespace FLY.Thick.BlowingScan.UI.Client
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.IsRPosMode), this, nameof(IsRPosMode)); Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.IsRPosMode), this, nameof(IsRPosMode));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.RPosOfR), this, nameof(RPosOfR)); Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.RPosOfR), this, nameof(RPosOfR));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Limit0), this, nameof(InNo_Limit0));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Limit1), this, nameof(InNo_Limit1));
Misc.BindingOperations.SetBinding(bDetect, nameof(bDetect.InNo_Roll), this, nameof(InNo_Roll));
Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.IsProbeRight), this, nameof(IsProbeRight)); Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.IsProbeRight), this, nameof(IsProbeRight));
Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.ChannelCnt), this, nameof(ChannelCnt)); Misc.BindingOperations.SetBinding(renZiJiaService, nameof(renZiJiaService.ChannelCnt), this, nameof(ChannelCnt));
...@@ -390,6 +408,10 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -390,6 +408,10 @@ namespace FLY.Thick.BlowingScan.UI.Client
bDetect.IsRPosMode = this.IsRPosMode; bDetect.IsRPosMode = this.IsRPosMode;
bDetect.RPosOfR = this.RPosOfR; bDetect.RPosOfR = this.RPosOfR;
bDetect.InNo_Limit0 = this.InNo_Limit0;
bDetect.InNo_Limit1 = this.InNo_Limit1;
bDetect.InNo_Roll = this.InNo_Roll;
bDetect.Apply(); bDetect.Apply();
renZiJiaService.ChannelCnt = this.ChannelCnt; renZiJiaService.ChannelCnt = this.ChannelCnt;
......
...@@ -99,7 +99,20 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -99,7 +99,20 @@ namespace FLY.Thick.BlowingScan.UI.Client
public int RPosOfR { get; set; } public int RPosOfR { get; set; }
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认9-1
/// </summary>
public int InNo_Limit0 { get; set; } = 9 - 1;
/// <summary>
/// 自定义 转向信号 输入口序号 从0开始 默认10-1
/// </summary>
public int InNo_Limit1 { get; set; } = 10 - 1;
/// <summary>
/// 自定义 辊速度 输入口序号 从0开始 默认11-1
/// </summary>
public int InNo_Roll { get; set; } = 11 - 1;
#endregion #endregion
#region 状态 #region 状态
......
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