修改
This commit is contained in:
@@ -85,6 +85,18 @@ namespace CapMachine.Wpf.Services
|
||||
|
||||
#region 程序驱动CAN
|
||||
|
||||
|
||||
private int _AutoSpeedSv;
|
||||
/// <summary>
|
||||
/// 转速SV
|
||||
/// </summary>
|
||||
public int AutoSpeedSv
|
||||
{
|
||||
get { return _AutoSpeedSv; }
|
||||
set { _AutoSpeedSv = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 转速 指令数据 实例
|
||||
/// </summary>
|
||||
@@ -143,6 +155,8 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
if (SpeedCanCmdData != null)
|
||||
{
|
||||
AutoSpeedSv = (int)SpeedData;
|
||||
|
||||
//首先是否判断是有斜率
|
||||
if (SpeedCanCmdData.LogicRuleDto == null)
|
||||
{
|
||||
@@ -153,7 +167,7 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
//LogicRuleService.ApplyExpressionFast(SpeedData, SpeedCanCmdData.LogicRuleDto);
|
||||
SpeedCanCmdData.SignalCmdValue = LogicRuleService.ApplyExpressionFast(SpeedData, SpeedCanCmdData.LogicRuleDto);
|
||||
Console.WriteLine($"实时转换后转速值:{SpeedCanCmdData.SignalCmdValue}-SV值:{SpeedData}" );
|
||||
Console.WriteLine($"实时转换后转速值:{SpeedCanCmdData.SignalCmdValue}-SV值:{SpeedData}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -80,6 +80,18 @@ namespace CapMachine.Wpf.Services
|
||||
|
||||
#region 程序驱动CAN
|
||||
|
||||
|
||||
private int _AutoSpeedSv;
|
||||
/// <summary>
|
||||
/// 转速SV
|
||||
/// </summary>
|
||||
public int AutoSpeedSv
|
||||
{
|
||||
get { return _AutoSpeedSv; }
|
||||
set { _AutoSpeedSv = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 转速 指令数据 实例
|
||||
/// </summary>
|
||||
@@ -139,6 +151,7 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
if (SpeedLinCmdData != null)
|
||||
{
|
||||
AutoSpeedSv = (int)SpeedData;
|
||||
SpeedLinCmdData.SignalCmdValue = SpeedData;
|
||||
}
|
||||
//if (EnableLinCmdData != null)
|
||||
|
||||
@@ -2285,7 +2285,7 @@ namespace CapMachine.Wpf.Services
|
||||
/// <returns></returns>
|
||||
public bool SysReset()
|
||||
{
|
||||
return true;
|
||||
//return true;
|
||||
|
||||
//取消XXX
|
||||
var FindData = ListHandSwitchData.Where(a => a.Name == "复位");
|
||||
@@ -2310,7 +2310,7 @@ namespace CapMachine.Wpf.Services
|
||||
/// <returns></returns>
|
||||
public bool SysMute()
|
||||
{
|
||||
return true;
|
||||
//return true;
|
||||
|
||||
//取消XXX
|
||||
var FindData = ListHandSwitchData.Where(a => a.Name == "消音");
|
||||
@@ -2336,18 +2336,18 @@ namespace CapMachine.Wpf.Services
|
||||
/// <returns></returns>
|
||||
public bool SysStart()
|
||||
{
|
||||
return true;
|
||||
//return true;
|
||||
|
||||
//取消XXX
|
||||
//var Result = SiemensDrive.Write("M0.4", true);
|
||||
//if (Result.IsSuccess)
|
||||
//{
|
||||
// return true;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return false;
|
||||
//}
|
||||
var Result = SiemensDrive.Write("M0.4", true);
|
||||
if (Result.IsSuccess)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2357,7 +2357,7 @@ namespace CapMachine.Wpf.Services
|
||||
/// <returns></returns>
|
||||
public bool SysEnd()
|
||||
{
|
||||
return true;
|
||||
//return true;
|
||||
|
||||
//取消XXX
|
||||
var Result = SiemensDrive.Write("M0.7", true);
|
||||
@@ -2379,7 +2379,7 @@ namespace CapMachine.Wpf.Services
|
||||
/// <returns></returns>
|
||||
public bool SysPause()
|
||||
{
|
||||
return true;
|
||||
//return true;
|
||||
|
||||
//取消XXX
|
||||
var StateResult = SiemensDrive.ReadBool("M0.6");
|
||||
|
||||
@@ -569,6 +569,28 @@
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="5,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="18"
|
||||
Foreground="LimeGreen"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
Width="auto"
|
||||
Foreground="LimeGreen"
|
||||
Style="{StaticResource TextBlockStyle}"
|
||||
Text="自动转速(rpm)" />
|
||||
<TextBlock
|
||||
Margin="5,0"
|
||||
Foreground="LimeGreen"
|
||||
Style="{StaticResource TextBlockStyle}"
|
||||
Text="{Binding CanDriveService.AutoSpeedSv}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -573,6 +573,29 @@
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="5,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="18"
|
||||
Foreground="LimeGreen"
|
||||
Text="" />
|
||||
<TextBlock
|
||||
Width="auto"
|
||||
Foreground="LimeGreen"
|
||||
Style="{StaticResource TextBlockStyle}"
|
||||
Text="自动转速(rpm)" />
|
||||
<TextBlock
|
||||
Margin="5,0"
|
||||
Foreground="LimeGreen"
|
||||
Style="{StaticResource TextBlockStyle}"
|
||||
Text="{Binding LinDriveService.AutoSpeedSv}" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -875,7 +875,7 @@
|
||||
</StackPanel>
|
||||
</Grid>-->
|
||||
<materialDesign:Card Margin="0,0" materialDesign:ElevationAssist.Elevation="Dp2">
|
||||
<ItemsControl IsEnabled="False" ItemsSource="{Binding ListHandSwitchData}">
|
||||
<ItemsControl IsEnabled="True" ItemsSource="{Binding ListHandSwitchData}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical" />
|
||||
|
||||
Reference in New Issue
Block a user