Browse Source

吉香居小料站代码更新

master
pengliangyang 2 years ago
parent
commit
517394a933
12 changed files with 431 additions and 192 deletions
  1. +4
    -2
      BPASmartClient.DosingProject/Model/GVL_SmallStation.cs
  2. +7
    -1
      BPASmartClient.DosingProject/Model/HK_PLC/HKDeviceStatus.cs
  3. +0
    -13
      BPASmartClient.DosingProject/Model/HK_PLC/HKPlcCommAddress.cs
  4. +63
    -0
      BPASmartClient.DosingProject/Model/HK_PLC/HKPlcCommRead.cs
  5. +49
    -0
      BPASmartClient.DosingProject/Model/HK_PLC/HKPlcCommWrite.cs
  6. +32
    -10
      BPASmartClient.DosingProject/Model/ProcessControl.cs
  7. +5
    -21
      BPASmartClient.DosingProject/ViewModel/RecipeReceiveViewModel.cs
  8. +4
    -0
      BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs
  9. +13
    -6
      BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
  10. +220
    -115
      BPASmartClient.JXJFoodSmallStation/View/ManualControlView.xaml
  11. +11
    -0
      BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs
  12. +23
    -24
      SmartClient.sln

+ 4
- 2
BPASmartClient.DosingProject/Model/GVL_SmallStation.cs View File

@@ -1,4 +1,5 @@
using BPASmartClient.DosingHKProject.Model.Siemens;
using BPASmartClient.DosingHKProject.Model.HK_PLC;
using BPASmartClient.DosingHKProject.Model.Siemens;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -75,7 +76,8 @@ namespace BPASmartClient.DosingHKProject.Model
/// </summary>
public bool IsOccupationTray2 { get; set; } = true;


public HKPlcCommRead plcRead = new HKPlcCommRead();
public HKPlcCommWrite plcWrite = new HKPlcCommWrite();
#region 本地模拟配方
/// <summary>
/// 是否使用本地模拟配方


+ 7
- 1
BPASmartClient.DosingProject/Model/HK_PLC/HKDeviceStatus.cs View File

@@ -7,6 +7,7 @@ using System.Text;
using System.Threading.Tasks;
using BPASmartClient.S7Net;
using BPASmartClient.CustomResource.Pages.Model;
using System.Threading;

namespace BPASmartClient.DosingHKProject.Model.HK_PLC
{
@@ -20,7 +21,12 @@ namespace BPASmartClient.DosingHKProject.Model.HK_PLC
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
var res = this.HK_PLC_S7.ReadClass<HKPlcCommRead>(1);
if (res != null && res is HKPlcCommRead data)
{
GVL_SmallStation.GetInstance.plcRead = data;
}
Thread.Sleep(10);
}),"信号交互");
}
}


+ 0
- 13
BPASmartClient.DosingProject/Model/HK_PLC/HKPlcCommAddress.cs View File

@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.DosingHKProject.Model.HK_PLC
{
public class HKPlcCommAddress
{
}
}

+ 63
- 0
BPASmartClient.DosingProject/Model/HK_PLC/HKPlcCommRead.cs View File

@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.DosingHKProject.Model.HK_PLC
{
/// <summary>
/// DB1 ReadOnly模块
/// </summary>
public class HKPlcCommRead
{
public bool LocalEStop { get; set; }
public bool RemoteEStop { get; set; }
public bool Sensor_Load { get; set; }
public bool Sensor_Station1 { get; set; }
public bool Sensor_Station2 { get; set; }
public bool Sensor_Station3 { get; set; }
public bool Sensor_Station4 { get; set; }
public bool Sensor_Station5 { get; set; }
public bool Sensor_Station6 { get; set; }
public bool Sensor_Unload { get; set; }
public bool Reserve1 { get; set; }
public bool Reserve2 { get; set; }
public bool Reserve3 { get; set; }
public bool Reserve4 { get; set; }
public bool Reserve5 { get; set; }
public bool Reserve6 { get; set; }
public bool Cylinder_LoadBase { get; set; }
public bool Cylinder_Station1Base { get; set; }
public bool Cylinder_Station2Base { get; set; }
public bool Cylinder_Station3Base { get; set; }
public bool Cylinder_Station4Base { get; set; }
public bool Cylinder_Station5Base { get; set; }
public bool Cylinder_Station6Base { get; set; }
public bool Cylinder_UnloadBase { get; set; }
public bool Cylinder_LoadWork { get; set; }
public bool Cylinder_Station1Work { get; set; }
public bool Cylinder_Station2Work { get; set; }
public bool Cylinder_Station3Work { get; set; }
public bool Cylinder_Station4Work { get; set; }
public bool Cylinder_Station5Work { get; set; }
public bool Cylinder_Station6Work { get; set; }
public bool Cylinder_UnloadWork { get; set; }
public bool Reserve7 { get; set; }
public bool Reserve8 { get; set; }
public bool Reserve9 { get; set; }
public bool Reserve10 { get; set; }
public bool Reserve11 { get; set; }
public bool Reserve12 { get; set; }
public bool Reserve13 { get; set; }
public bool Reserve14 { get; set; }
public bool Axis1_Alarm { get; set; }
public bool Axis2_Alarm { get; set; }
public bool Reserve15 { get; set; }
public bool Reserve16 { get; set; }
public bool Reserve17 { get; set; }
public bool Reserve18 { get; set; }
public bool Reserve19 { get; set; }
public bool Reserve20 { get; set; }
}
}

+ 49
- 0
BPASmartClient.DosingProject/Model/HK_PLC/HKPlcCommWrite.cs View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.DosingHKProject.Model.HK_PLC
{
/// <summary>
/// DB1 Write模块
/// </summary>
public class HKPlcCommWrite
{
public bool Reserve1 { get; set; }
public bool Reserve2{ get; set; }
public bool Cylinder_LoadOutput{ get; set; }
public bool Cylinder_Station1Output{ get; set; }
public bool Cylinder_Station2Output{ get; set; }
public bool Cylinder_Station3Output{ get; set; }
public bool Cylinder_Station4Output{ get; set; }
public bool Cylinder_Station5Output{ get; set; }
public bool Cylinder_Station6Output{ get; set; }
public bool Cylinder_UnloadOutput{ get; set; }
public bool Reserve3{ get; set; }
public bool Reserve4{ get; set; }
public bool Reserve5{ get; set; }
public bool Reserve6{ get; set; }
public bool Reserve7{ get; set; }
public bool Reserve8{ get; set; }
public bool TriColourLight_Yellow{ get; set; }
public bool TriColourLight_Green{ get; set; }
public bool TriColourLight_Red{ get; set; }
public bool Buzzer{ get; set; }
public bool Reserve9{ get; set; }
public bool Reserve10{ get; set; }
public bool Reserve11{ get; set; }
public bool Reserve12{ get; set; }
public bool Axis1_Start{ get; set; }
public bool Axis2_Start{ get; set; }
public bool Axis1_Stop{ get; set; }
public bool Axis2_Stop{ get; set; }
public bool Axis1_Reset{ get; set; }
public bool Axis2_Reset{ get; set; }
public bool Reserve13{ get; set; }
public bool Reserve14{ get; set; }
public short Axis1_Speed{ get; set; }
public short Axis2_Speed{ get; set; }
}
}

+ 32
- 10
BPASmartClient.DosingProject/Model/ProcessControl.cs View File

@@ -202,20 +202,24 @@ namespace BPASmartClient.DosingHKProject.Model
int trayCode = RemoteRecipes.ElementAt(index).TrayCode;
string recipeName = RemoteRecipes.ElementAt(index).RecipeName;
string windSend = RemoteRecipes.ElementAt(index).ToString();
if (GVL_SmallStation.GetInstance.RecipeStatusID == 0)
if (GVL_SmallStation.GetInstance.RecipeStatusID == 0)
{
HKDevice.HK_PLC_S7.Write("DB4.DBX1.3", true);
GVL_SmallStation.GetInstance.RecipeStatusID = 1;
MessageLog.GetInstance.ShowRunLog($"托盘1,配方:{recipeName},下发完成");
HKDevice.HK_PLC_S7.Write("DB3.DBX1.3", true);
RunInit();
}
if (HKDevice.HK_PLC_S7.Read<bool>("DB3.DBX1.3") && GVL_SmallStation.GetInstance.RecipeStatusID == 1)
if (GVL_SmallStation.GetInstance.RecipeStatusID == 1)
{
HKDevice.HK_PLC_S7.Write("DB3.DBX1.3", false);
HKDevice.HK_PLC_S7.Write<bool>("DB2.DBX3.0", true);
HKDevice.HK_PLC_S7.Write<bool>("DB2.DBX3.1", true);
GVL_SmallStation.GetInstance.RecipeStatusID = 2;
MessageLog.GetInstance.ShowRunLog($"托盘1,{ recipeName}plc端 配方接收完成");
}
if (GVL_SmallStation.GetInstance.RecipeStatusID == 2)
if (HKDevice.HK_PLC_S7.Read<bool>("DB2.DBX3.0") && HKDevice.HK_PLC_S7.Read<bool>("DB2.DBX3.1") && GVL_SmallStation.GetInstance.RecipeStatusID == 2)
{
if (GVL_SmallStation.GetInstance.plcRead.Sensor_Load)
{
}
}
if (GVL_SmallStation.GetInstance.RecipeStatusID == 3)
{
if (RTrig.GetInstance("DB3.DBX50.0").Start(HKDevice.HK_PLC_S7.Read<bool>("DB3.DBX50.0")))
{
@@ -223,7 +227,6 @@ namespace BPASmartClient.DosingHKProject.Model
MessageLog.GetInstance.ShowRunLog($"托盘1,配方:{recipeName},1号桶,{res}料仓,允许配料");
if (res > 0 && res is float loc)
{
//int decimalNum = Convert.ToInt32(loc.ToString().Substring(loc.ToString().IndexOf(".") + 1));
int loc_index = Array.FindIndex(RemoteRecipes.ElementAt(index).RawMaterial.ToArray(), p => p.RawMaterialLocation == loc);
float weight = RemoteRecipes.ElementAt(index).RawMaterial.ElementAt(loc_index).RawMaterialWeight;
if (loc_index >= 0)
@@ -324,5 +327,24 @@ namespace BPASmartClient.DosingHKProject.Model
}
}
}
private int RunInit()
{
if (HKDevice.IsConnected)
{
try
{
HKPlcCommWrite signReset = new HKPlcCommWrite();
HKDevice.HK_PLC_S7.WriteClass<HKPlcCommWrite>(signReset, 2);
return 1;
}
catch (Exception ex)
{
return 2;
}
}else
{
return 2;
}
}
}
}

+ 5
- 21
BPASmartClient.DosingProject/ViewModel/RecipeReceiveViewModel.cs View File

@@ -28,9 +28,6 @@ namespace BPASmartClient.DosingHKProject.ViewModel
//ObservableCollection<RemoteRecipeRawMaterial> RawMaterials { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>();
public RecipeReceiveViewModel()
{
IsUseLocalRecipe = GVL_SmallStation.GetInstance.IsUseLocalRecipe;
IsUseWindSendDosing = GVL_SmallStation.GetInstance.IsUseLocalRecipe;
//Json<LocaPar>.Read();
Recipes = Json<LocalRecipeDataColl>.Data.Recipes;
NewRecipe = new RelayCommand(() =>
@@ -67,20 +64,13 @@ namespace BPASmartClient.DosingHKProject.ViewModel
});
IssueRecipe = new RelayCommand<object>((o) =>
{
if (IsUseLocalRecipe == false)
{
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, App.MainWindow, "错误", $"未处于本地模拟配方状态!");
return;
}
else
if (o != null && o is string cnt)
{
if (o != null && o is string cnt)
var res = Json<LocalRecipeDataColl>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == cnt);
if (res != null)
{
var res = Json<LocalRecipeDataColl>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == cnt);
if (res != null)
{
MessageLog.GetInstance.ShowUserLog($"下发配方——{res.RecipeName}");
}
Json<RemoteRecipeDataColl>.Data.Recipes.Add(res);
MessageLog.GetInstance.ShowUserLog($"下发配方——{res.RecipeName}");
}
}
});
@@ -126,12 +116,6 @@ namespace BPASmartClient.DosingHKProject.ViewModel
Json<LocalRecipeDataColl>.Data.Recipes.Clear();
});
}
public bool IsUseLocalRecipe { get { return _mIsUseLocalRecipe; }set { _mIsUseLocalRecipe = value; OnPropertyChanged(); } }
private bool _mIsUseLocalRecipe = GVL_SmallStation.GetInstance.IsUseLocalRecipe;

public bool IsUseWindSendDosing { get { return _mIsUseWindSendDosing; } set { _mIsUseWindSendDosing = value;OnPropertyChanged(); } }
private bool _mIsUseWindSendDosing = GVL_SmallStation.GetInstance.IsUseLocalRecipe;

public RelayCommand<object> DetailsCommand { get; set; }
public RelayCommand<object> IssueRecipe { get; set; }
public RelayCommand<object> RemoveRecipe { get; set; }


+ 4
- 0
BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs View File

@@ -85,6 +85,10 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
/// </summary>
public bool IsOccupationTray2 { get; set; } = true;

/// <summary>
/// 顶升气缸的信号
/// </summary>
public bool[] Cylinder_JackInfo = new bool[15];

#region 本地模拟配方
/// <summary>


+ 13
- 6
BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs View File

@@ -80,7 +80,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
else
{
//报警,配方的原料名称下发和设备不一致
MessageLog.GetInstance.AlarmLog("配方名称与本地不符合");
}
}
Json<RemoteRecipeDataColl>.Data.Recipes.Add(new RemoteRecipeData()
@@ -101,7 +101,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
ActionManage.GetInstance.CancelRegister("LocalSimulationRecipeIssue");
ActionManage.GetInstance.Register(new Action<Object>((res) =>
{
if (res!=null && res is RemoteRecipeData recipe)
if (res != null && res is RemoteRecipeData recipe)
{
Json<RemoteRecipeDataColl>.Data.Recipes.Add(recipe);
}
@@ -167,12 +167,20 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
{
for (int i = 0; i < 8; i++)
{
HKDevice.HK_PLC_S7.Read<bool>("DB5.DBX0." + i);
GVL_SmallStation.GetInstance.Cylinder_JackInfo[i] = HKDevice.HK_PLC_S7.Read<bool>("DB5.DBX0." + i);
}
for (int i = 0; i < 8; i++)
for (int i = 0; i < 7; i++)
{
HKDevice.HK_PLC_S7.Read<bool>("DB5.DBX1." + i);
GVL_SmallStation.GetInstance.Cylinder_JackInfo[i + 8] = HKDevice.HK_PLC_S7.Read<bool>("DB5.DBX0." + i);
}
ActionManage.GetInstance.Register(new Action(() =>
{
HKDevice.HK_PLC_S7.Write<bool>("M10.0", true);
}), "ManualEStop", true);
ActionManage.GetInstance.Register(new Action(() =>
{
HKDevice.HK_PLC_S7.Write<bool>("M10.0", false);
}), "ManualEReset", true);
}
private void ManualOpen()
{
@@ -674,7 +682,6 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
MessageLog.GetInstance.ShowRunLog($"托盘1,配方:{recipeName},1号桶,{res}料仓,允许配料");
if (res > 0 && res is float loc)
{
//int decimalNum = Convert.ToInt32(loc.ToString().Substring(loc.ToString().IndexOf(".") + 1));
int loc_index = Array.FindIndex(RemoteRecipes.ElementAt(index).RawMaterial.ToArray(), p => p.RawMaterialLocation == loc);
float weight = RemoteRecipes.ElementAt(index).RawMaterial.ElementAt(loc_index).RawMaterialWeight;
if (loc_index >= 0)


+ 220
- 115
BPASmartClient.JXJFoodSmallStation/View/ManualControlView.xaml View File

@@ -55,8 +55,8 @@

<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
@@ -83,37 +83,46 @@
FontSize="16"
Foreground="Aqua"
Text="总控制" />
<Grid Grid.Row="1">
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="4*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="24" Foreground="Aqua" Text="当前系统模式:"/>
<RadioButton Content="Auto模式" IsChecked="True" Margin="15" FontSize="16"
Foreground="Aqua" Command="{Binding AutoMode}"></RadioButton>
<RadioButton Content="Debug模式" IsChecked="false" Margin="15" FontSize="16"
Foreground="Aqua" Command="{Binding DebugMode}"></RadioButton>
</WrapPanel>
<Grid
Grid.Column="3" >
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<pry:IcoButton
Command="{Binding EStopCommand}"
Grid.Column="0"
Margin="15"
Content="急停"
FontSize="40"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
Command="{Binding EResetCommand}"
Grid.Column="1"
Margin="15"
Content="复位"
FontSize="40"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
</Grid>
</Grid>
<RadioButton
Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType={x:Type ListView}, Mode=FindAncestor}}"
CommandParameter="{Binding Name}"
Content="启动"
Foreground="Aqua"
IsChecked="False"
Style="{StaticResource radioButtonStyle}" />
<RadioButton
Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType={x:Type ListView}, Mode=FindAncestor}}"
CommandParameter="{Binding Name}"
Content="停止"
Foreground="Aqua"
IsChecked="False"
Style="{StaticResource radioButtonStyle}" />
</Grid>

<!--#region 升降气缸-->
<Grid
Name="cy"
Name="zd"
Grid.Row="1"
Margin="5">
<Grid.RowDefinitions>
@@ -122,8 +131,8 @@
</Grid.RowDefinitions>
<pry:ImageBorder
Grid.RowSpan="2"
Width="{Binding ElementName=cy, Path=ActualWidth}"
Height="{Binding ElementName=cy, Path=ActualHeight}" />
Width="{Binding ElementName=zd, Path=ActualWidth}"
Height="{Binding ElementName=zd, Path=ActualHeight}" />

<Image
Margin="2,3,0,0"
@@ -134,88 +143,180 @@
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="升降气缸控制" />
<ListView
Grid.Row="1"
Background="Transparent"
BorderBrush="#00BEFA"
BorderThickness="0"
ItemsSource="{Binding cylinderModels}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid
HorizontalAlignment="Left"
VerticalAlignment="Top"
Columns="8" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>

<ListView.ItemTemplate>
<DataTemplate>
<Grid
Width="200"
Height="100"
Margin="0,0,0,15"
Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*" />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>

<TextBlock
Grid.Column="1"
Grid.ColumnSpan="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="Aqua"
Text="{Binding Name}" />

<pry:Cylinder
Grid.Row="1"
Grid.ColumnSpan="3"
Width="200"
Height="50"
HorizontalAlignment="Center"
VerticalAlignment="Center"
LeftTogIsChecked="{Binding LeftTog}"
RightTogIsChecked="{Binding RightTog}" />

<RadioButton
Grid.Row="2"
Grid.Column="1"
Command="{Binding DataContext.Open, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
CommandParameter="{Binding Name}"
Content="伸出"
Foreground="Aqua"
IsChecked="True"
Style="{StaticResource radioButtonStyle}" />

<RadioButton
Grid.Row="2"
Grid.Column="2"
Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
CommandParameter="{Binding Name}"
Content="缩回"
Foreground="Aqua"
IsChecked="False"
Style="{StaticResource radioButtonStyle}" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Text="线体控制" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="16" Foreground="Aqua" Text="进桶侧调速电机"/>
<pry:IcoButton
Margin="10"
Grid.Row="1"
Grid.Column="0"
Command="{Binding StartCommand}"
Content="启动"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
Grid.Row="1"
Grid.Column="1"
Margin="10"
Command="{Binding CloseCommand}"
Content="停止"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
</Grid>


<Border
BorderThickness="1,0,1,0" />
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="16" Foreground="Aqua" Text="过渡段调速电机"/>
<pry:IcoButton
Margin="10"
Grid.Row="1"
Grid.Column="0"
Command="{Binding StartCommand}"
CommandParameter="{Binding }"
Content="启动"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
Grid.Row="1"
Grid.Column="1"
Margin="10"
Command="{Binding StopCommand}"
Content="停止"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
</Grid>
<Grid Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="16" Foreground="Aqua" Text="出桶侧调速电机"/>
<pry:IcoButton
Margin="10"
Grid.Row="1"
Grid.Column="0"
Command="{Binding StartCommand}"
Content="启动"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
Grid.Row="1"
Grid.Column="1"
Margin="10"
Command="{Binding CloseCommand}"
Content="停止"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
</Grid>
<Border
BorderThickness="1,0,1,0" />
<Grid Grid.Column="3">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="16" Foreground="Aqua" Text="伺服1调速电机"/>
<pry:IcoButton
Margin="10"
Grid.Row="1"
Grid.Column="0"
Command="{Binding StartCommand}"
Content="启动"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
Grid.Row="1"
Grid.Column="1"
Margin="10"
Command="{Binding CloseCommand}"
Content="停止"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
</Grid>
<Grid Grid.Column="4">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.ColumnSpan="2" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="16" Foreground="Aqua" Text="伺服2调速电机"/>
<pry:IcoButton
Margin="10"
Grid.Row="1"
Grid.Column="0"
Command="{Binding StartCommand}"
Content="启动"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
Grid.Row="1"
Grid.Column="1"
Margin="10"
Command="{Binding CloseCommand}"
Content="停止"
FontSize="16"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
</Grid>
</Grid>
</Grid>
<!--#endregion-->

<!--#region 阻挡气缸-->
<!--#region 升降气缸-->
<Grid
Name="zd"
Name="cy"
Grid.Row="2"
Margin="5">
<Grid.RowDefinitions>
@@ -224,8 +325,8 @@
</Grid.RowDefinitions>
<pry:ImageBorder
Grid.RowSpan="2"
Width="{Binding ElementName=zd, Path=ActualWidth}"
Height="{Binding ElementName=zd, Path=ActualHeight}" />
Width="{Binding ElementName=cy, Path=ActualWidth}"
Height="{Binding ElementName=cy, Path=ActualHeight}" />

<Image
Margin="2,3,0,0"
@@ -236,14 +337,13 @@
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="阻挡气缸控制" />
Text="升降气缸控制" />
<ListView
Grid.Row="1"
Margin="10"
Background="Transparent"
BorderBrush="#00BEFA"
BorderThickness="0"
ItemsSource="{Binding BlockCylinders}"
ItemsSource="{Binding cylinderModels}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
@@ -299,6 +399,7 @@
Foreground="Aqua"
IsChecked="True"
Style="{StaticResource radioButtonStyle}" />

<RadioButton
Grid.Row="2"
Grid.Column="2"
@@ -315,6 +416,10 @@
</Grid>
<!--#endregion-->

<!--#region 阻挡气缸-->
<!--#endregion-->

<!--#region 托盘气缸-->
<Grid
Name="tp"


+ 11
- 0
BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs View File

@@ -78,6 +78,14 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
ActionManage.GetInstance.Send("ManualClose", o);
});
EStopCommand = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("ManualEStop");
});
EResetCommand = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("ManualEReset");
});
}

/// <summary>
@@ -100,6 +108,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel

public RelayCommand<object> Close { get; set; }

public RelayCommand EStopCommand { get; set; }
public RelayCommand EResetCommand { get; set; }

}

public class CylinderModel : ObservableObject


+ 23
- 24
SmartClient.sln View File

@@ -173,13 +173,12 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.PageLoad", "BPASmart.PageLoad\BPASmart.PageLoad.csproj", "{2DB084E8-B951-4D71-A203-FD0902EBA2C6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.CustomResource", "BPASmart.CustomResource\BPASmart.CustomResource.csproj", "{E7CC45BF-7393-4BA7-A9AD-B1A1F5B265F3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.SmallBatchingSystem", "BPASmartClient.SmallBatchingSystem\BPASmartClient.SmallBatchingSystem.csproj", "{BA588F22-87FB-4124-AF62-CA8DC492ED7D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkMOC", "BPASmartClient.MorkMOC\BPASmartClient.MorkMOC.csproj", "{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.SmallBatchingSystem", "BPASmartClient.SmallBatchingSystem\BPASmartClient.SmallBatchingSystem.csproj", "{BA588F22-87FB-4124-AF62-CA8DC492ED7D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.DosingHKProject", "BPASmartClient.DosingProject\BPASmartClient.DosingHKProject.csproj", "{6763F73A-555C-41E2-91F7-ADF26C59A946}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.DosingHKProject", "BPASmartClient.DosingProject\BPASmartClient.DosingHKProject.csproj", "{6763F73A-555C-41E2-91F7-ADF26C59A946}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -1635,26 +1634,6 @@ Global
{E7CC45BF-7393-4BA7-A9AD-B1A1F5B265F3}.Release|x64.Build.0 = Release|Any CPU
{E7CC45BF-7393-4BA7-A9AD-B1A1F5B265F3}.Release|x86.ActiveCfg = Release|Any CPU
{E7CC45BF-7393-4BA7-A9AD-B1A1F5B265F3}.Release|x86.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|ARM.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|ARM64.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|x64.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|x64.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|x86.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|x86.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|Any CPU.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|ARM.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|ARM.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|ARM64.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|ARM64.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|x64.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|x64.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|x86.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|x86.Build.0 = Release|Any CPU
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -1675,6 +1654,26 @@ Global
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|x64.Build.0 = Release|Any CPU
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|x86.ActiveCfg = Release|Any CPU
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|x86.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|ARM.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|ARM64.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|x64.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|x64.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|x86.ActiveCfg = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Debug|x86.Build.0 = Debug|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|Any CPU.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|ARM.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|ARM.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|ARM64.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|ARM64.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|x64.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|x64.Build.0 = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|x86.ActiveCfg = Release|Any CPU
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}.Release|x86.Build.0 = Release|Any CPU
{6763F73A-555C-41E2-91F7-ADF26C59A946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6763F73A-555C-41E2-91F7-ADF26C59A946}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6763F73A-555C-41E2-91F7-ADF26C59A946}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -1775,8 +1774,8 @@ Global
{06F30619-AD37-4CA0-838F-0431867E0932} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{2DB084E8-B951-4D71-A203-FD0902EBA2C6} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{E7CC45BF-7393-4BA7-A9AD-B1A1F5B265F3} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086}
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{BA588F22-87FB-4124-AF62-CA8DC492ED7D} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{6763F73A-555C-41E2-91F7-ADF26C59A946} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution


Loading…
Cancel
Save