Explorar el Código

代码更新

master
pengliangyang hace 1 año
padre
commit
32037eada5
Se han modificado 14 ficheros con 260 adiciones y 43 borrados
  1. +13
    -1
      BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs
  2. +3
    -0
      BPASmartClient.JXJFoodSmallStation/Model/Par/ConnectParMode.cs
  3. +101
    -29
      BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
  4. +6
    -0
      BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
  5. +13
    -0
      BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendRawMaterial.cs
  6. +35
    -2
      BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Read.cs
  7. +19
    -1
      BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Write.cs
  8. +18
    -2
      BPASmartClient.JXJFoodSmallStation/View/ManualFlowView.xaml
  9. +16
    -0
      BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml
  10. +10
    -0
      BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml
  11. +9
    -5
      BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs
  12. +6
    -2
      BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs
  13. +4
    -0
      BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs
  14. +7
    -1
      BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs

+ 13
- 1
BPASmartClient.JXJFoodSmallStation/Model/GVL_SmallStation.cs Ver fichero

@@ -1,6 +1,7 @@
using BPASmartClient.JXJFoodSmallStation.Model.GVL;
using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC;
using BPASmartClient.JXJFoodSmallStation.Model.Siemens;
using BPASmartClient.JXJFoodSmallStation.Model.WindSend;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -18,6 +19,11 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
private GVL_SmallStation() { }

public PlcReadAddressDB3 plcReadDataDB3 { get; set; } = new PlcReadAddressDB3();


public WindSend_Write WindSendDB95 { get; set; } = new WindSend_Write();

public WindSend_Read WindSendDB94 { get; set; } = new WindSend_Read();
/// <summary>
/// 配料站料仓数目
/// </summary>
@@ -161,11 +167,17 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
/// </summary>
public bool HeartBeatToPlc { get; set; } = false;

[VarComm("Global", "来自plc的心跳")]
[VarComm("Global", "屏蔽小料站料仓不足15个报警")]


public bool DisEnableStockAlarm { get; set; } = false;

[VarComm("Global", "配方制作完成数量")]
/// <summary>
/// 配方制作完成数量
/// </summary>
public int RecipeDosingCompleNum { get; set; } = 0;

[VarComm("Global", "来自plc的心跳")]




+ 3
- 0
BPASmartClient.JXJFoodSmallStation/Model/Par/ConnectParMode.cs Ver fichero

@@ -15,6 +15,9 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.Par
private bool _mWindSendConnect;
public bool HKPlcConnect { get { return _mHKPlcConnect; } set { _mHKPlcConnect = value; OnPropertyChanged(); } }
private bool _mHKPlcConnect;
public bool ShieldStockbinAlarm { get { return _mShieldStockbinAlarm; } set { _mShieldStockbinAlarm = value; OnPropertyChanged(); } }
private bool _mShieldStockbinAlarm;

public short AxisLoadSpeed { get { return _mAxisLoadSpeed; } set { _mAxisLoadSpeed = value; OnPropertyChanged(); } }
private short _mAxisLoadSpeed;


+ 101
- 29
BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs Ver fichero

@@ -85,6 +85,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
//Json<RemoteRecipeDataColl>.Data.Recipes = TestData.GetInstance.Recipes;//添加测试数据
ThreadManage.GetInstance().StartLong(new Action(() =>
{
GVL_SmallStation.GetInstance.DisEnableStockAlarm = Json<DevicePar>.Data.deviceConnectPar.ShieldStockbinAlarm;
if (HKDevice.IsConnected)
{
GVL_SmallStation.GetInstance.HeartBeatToPlc = !GVL_SmallStation.GetInstance.HeartBeatToPlc;
@@ -195,6 +196,59 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
}
}
if (WindSendDevice.IsConnected)
{
foreach (PropertyInfo item in typeof(WindSend_Write).GetProperties())
{
int index = Array.FindIndex(CommData.ToArray(), p => p.Name == item.Name);
if (index >= 0)
{
if (item.PropertyType.IsArray)
{
CommData.ElementAt(index).Value = "";
Array array = (Array)item.GetValue(GVL_SmallStation.GetInstance.plcReadDataDB3, null);
foreach (var values in array)
{
string data = values.ToString();
if (data.ToLower() == "false")
data = "0";
if (data.ToLower() == "true")
data = "1";
CommData.ElementAt(index).Value = CommData.ElementAt(index).Value + data + ",";
}
}
else
{
CommData.ElementAt(index).Value = GVL_SmallStation.GetInstance.WindSendDB95.GetType().GetProperty(item.Name).GetValue(GVL_SmallStation.GetInstance.WindSendDB95, null).ToString();
}
}
}
foreach (PropertyInfo item in typeof(WindSend_Read).GetProperties())
{
int index = Array.FindIndex(CommData.ToArray(), p => p.Name == item.Name);
if (index >= 0)
{
if (item.PropertyType.IsArray)
{
CommData.ElementAt(index).Value = "";
Array array = (Array)item.GetValue(GVL_SmallStation.GetInstance.plcReadDataDB3, null);
foreach (var values in array)
{
string data = values.ToString();
if (data.ToLower() == "false")
data = "0";
if (data.ToLower() == "true")
data = "1";
CommData.ElementAt(index).Value = CommData.ElementAt(index).Value + data + ",";
}
}
else
{
CommData.ElementAt(index).Value = GVL_SmallStation.GetInstance.WindSendDB94.GetType().GetProperty(item.Name).GetValue(GVL_SmallStation.GetInstance.WindSendDB94, null).ToString();
}
}
}
}
foreach (PropertyInfo item in typeof(GVL_SmallStation).GetProperties())
{
int index = Array.FindIndex(ProcessVar.ToArray(), p => p.Name == item.Name);
@@ -701,60 +755,42 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
{
if (GVL_SmallStation.GetInstance.WindSendDosingStatus == 1)
{
WindSendReset();
WindSendData.TargetRecipeCode = code;
WindSendData.IsAllowDosing = true;
WindSend_Write WindSendData111 = new WindSend_Write();
WindSendDevice.Siemens_PLC_S7.WriteClass<WindSend_Write>(WindSendData111, 95);
Thread.Sleep(200);
WindSendData111.TargetRecipeCode = code;
WindSendData111.IsAllowDosing = true;
foreach (var item in RemoteRecipes.ElementAt(index).WindSend)
{
if (item.RawMaterialName == Json<DevicePar>.Data.windSendRawMaterial.ElementAt(0).RawMaterialName || item.Location == 1)
{
WindSendData.RawMaterial1_SetWeight = item.RawMaterialWeight;
WindSendData111.RawMaterial1_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
else
{
WindSendData.RawMaterial1_SetWeight = 0;
}
if (item.RawMaterialName == Json<DevicePar>.Data.windSendRawMaterial.ElementAt(1).RawMaterialName || item.Location == 2)
{
WindSendData.RawMaterial2_SetWeight = item.RawMaterialWeight;
WindSendData111.RawMaterial2_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
else
{
WindSendData.RawMaterial2_SetWeight = 0;
}
if (item.RawMaterialName == Json<DevicePar>.Data.windSendRawMaterial.ElementAt(2).RawMaterialName || item.Location == 3)
{
WindSendData.RawMaterial3_SetWeight = item.RawMaterialWeight;
WindSendData111.RawMaterial3_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
else
{
WindSendData.RawMaterial3_SetWeight = 0;
}
if (item.RawMaterialName == Json<DevicePar>.Data.windSendRawMaterial.ElementAt(3).RawMaterialName || item.Location == 4)
{
WindSendData.RawMaterial4_SetWeight = item.RawMaterialWeight;
WindSendData111.RawMaterial4_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
else
{
WindSendData.RawMaterial4_SetWeight = 0;
}
if (item.RawMaterialName == Json<DevicePar>.Data.windSendRawMaterial.ElementAt(4).RawMaterialName || item.Location == 5)
{
WindSendData.RawMaterial5_SetWeight = item.RawMaterialWeight;
WindSendData111.RawMaterial5_SetWeight = item.RawMaterialWeight;
MessageNotify.GetInstance.ShowRunLog($"风送料仓{item.RawMaterialName},设定重量{item.RawMaterialWeight}");
}
else
{
WindSendData.RawMaterial5_SetWeight = 0;
}
}
GVL_SmallStation.GetInstance.WindSendDosing = true;
GVL_SmallStation.GetInstance.WindSendDosingStatus = 2;
WindSendDevice.Siemens_PLC_S7.WriteClass<WindSend_Write>(WindSendData, 95);
WindSendDevice.Siemens_PLC_S7.WriteClass<WindSend_Write>(WindSendData111, 95);
}
}
else
@@ -891,6 +927,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
bool DosingComple = HKDevice.HK_PLC_S7.Read<bool>("DB3.DBX6." + recipeNum);
if ((RTrig.GetInstance("配方配料完成").Start(DosingComple)) || (GVL_SmallStation.GetInstance.StockBinDosingIssue[recipeNum] > 0 && DosingComple))
{
GVL_SmallStation.GetInstance.RecipeDosingCompleNum = GVL_SmallStation.GetInstance.RecipeDosingCompleNum + 1;
GVL_SmallStation.GetInstance.StockBinDosingIssue[recipeNum] = 0;
if (GVL_SmallStation.GetInstance.RecipeStockBinDosing[recipeNum] > 0)
{
@@ -1008,6 +1045,40 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
}

foreach (PropertyInfo item in typeof(WindSend_Read).GetProperties())
{
if (Attribute.IsDefined(item, typeof(VarCommAttribute)))
{
string type = item.PropertyType.ToString();
CommData.Add(new PlcInfos()
{
Count = CommData.Count + 1,
Name = item.Name,
Address = item.GetCustomAttribute<VarCommAttribute>().Address,
Type = type.Substring(type.IndexOf(".") + 1),
Describe = item.GetCustomAttribute<VarCommAttribute>().Describe,
Value = item.GetValue(GVL_SmallStation.GetInstance.WindSendDB94).ToString(),
});
}
}

foreach (PropertyInfo item in typeof(WindSend_Write).GetProperties())
{
if (Attribute.IsDefined(item, typeof(VarCommAttribute)))
{
string type = item.PropertyType.ToString();
CommData.Add(new PlcInfos()
{
Count = CommData.Count + 1,
Name = item.Name,
Address = item.GetCustomAttribute<VarCommAttribute>().Address,
Type = type.Substring(type.IndexOf(".") + 1),
Describe = item.GetCustomAttribute<VarCommAttribute>().Describe,
Value = item.GetValue(GVL_SmallStation.GetInstance.WindSendDB95).ToString(),
});
}
}

foreach (PropertyInfo item in typeof(GVL_SmallStation).GetProperties())
{
if (Attribute.IsDefined(item, typeof(VarCommAttribute)))
@@ -1518,6 +1589,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD4", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD8", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD12", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD16", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBX38.1", false);
}
public void RawMaterialNameWithCode()


+ 6
- 0
BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs Ver fichero

@@ -24,9 +24,15 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
{
if (IsConnected)
{
var res0 = this.Siemens_PLC_S7.ReadClass<WindSend_Write>(95);
if (res0 != null && res0 is WindSend_Write WriteData)
{
GVL_SmallStation.GetInstance.WindSendDB95 = WriteData;
}
var res1 = this.Siemens_PLC_S7.ReadClass<WindSend_Read>(94);
if (res1 != null && res1 is WindSend_Read readData)
{
GVL_SmallStation.GetInstance.WindSendDB94 = readData;
GVL_SmallStation.GetInstance.WindSendAllowAGVPutGet = readData.HoodLiftInPlace;
Siemens_PLC_S7.Write<bool>("DB95.DBX38.2", GVL_SmallStation.GetInstance.Station1HaveTray);//工站1有托盘
switch (GVL_SmallStation.GetInstance.WindSendDosingStatus)


+ 13
- 0
BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendRawMaterial.cs Ver fichero

@@ -30,5 +30,18 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
/// </summary>
public float DosingCompleWeight { get { return _mDosingCompleWeight; } set { _mDosingCompleWeight = value; OnPropertyChanged(); } }
private float _mDosingCompleWeight;


/// <summary>
/// 原料对应的桶号
/// </summary>
public short RawMaterialBarrelNum { get { return _mRawMaterialBarrelNum; } set { _mRawMaterialBarrelNum = value; OnPropertyChanged(); } }
private short _mRawMaterialBarrelNum;
/// <summary>
/// 原料类型
/// </summary>

public string RawMaterialType { get { return _mRawMaterialType; } set { _mRawMaterialType = value; OnPropertyChanged(); } }
private string _mRawMaterialType;
}
}

+ 35
- 2
BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Read.cs Ver fichero

@@ -1,4 +1,5 @@
using BPASmartClient.S7Net;
using BPASmartClient.JXJFoodSmallStation.Model.GVL;
using BPASmartClient.S7Net;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,74 +8,106 @@ using System.Threading.Tasks;

namespace BPASmartClient.JXJFoodSmallStation.Model.WindSend
{
internal class WindSend_Read
public class WindSend_Read
{
[VarComm("DB94.DBX0.0", "吸风罩提升到位")]
/// <summary>
/// 吸风罩提升到位
/// </summary>
public bool HoodLiftInPlace { get; set; }

[VarComm("DB94.DBX0.1", "配方接收完成")]
/// <summary>
/// 配方接收完成
/// </summary>
public bool RecipeReceiveFinish { get; set; }

[VarComm("DB94.DBX0.2", "制作完成信号")]
/// <summary>
/// 制作完成信号
/// </summary>
public bool CurrentCompleteSign { get; set; }

[VarComm("DB94.DBX0.3", "允许下发信号")]
/// <summary>
/// 允许下发信号
/// </summary>
public bool IsAllowIssue { get; set; }

[VarComm("DB94.DBX0.4", "排料完成信号")]
/// <summary>
/// 排料完成信号
/// </summary>
public bool DisChargeComple { get; set; }

[VarComm("DB94.DBW2", "当前配方编码")]
/// <summary>
/// 当前配方编码
/// </summary>
[Siemens(16)]
public string CurrentRecipeCode { get; set; } = "";

[VarComm("DB94.DBW20", "系统状态")]
/// <summary>
/// 系统状态
/// </summary>
public short SystemRunStatus { get; set; }

[VarComm("DB94.DBD22", "原料1下料完成重量")]
/// <summary>
/// 原料1下料完成重量
/// </summary>
public float RawMaterial1_FinishWeight { get; set; }

[VarComm("DB94.DBD26", "原料2下料完成重量")]
/// <summary>
/// 原料2下料完成重量
/// </summary>
public float RawMaterial2_FinishWeight { get; set; }

[VarComm("DB94.DBD30", "原料3下料完成重量")]
/// <summary>
/// 原料3下料完成重量
/// </summary>
public float RawMaterial3_FinishWeight { get; set; }

[VarComm("DB94.DBD34", "原料4下料完成重量")]
/// <summary>
/// 原料4下料完成重量
/// </summary>
public float RawMaterial4_FinishWeight { get; set; }

[VarComm("DB94.DBD38", "原料5下料完成重量")]
/// <summary>
/// 原料5下料完成重量
/// </summary>
public float RawMaterial5_FinishWeight { get; set; }

[VarComm("DB94.DBD42", "原料1料仓重量")]
/// <summary>
/// 原料1料仓重量
/// </summary>
public float RawMaterial1_StockBinWeight { get; set; }

[VarComm("DB94.DBD46", "原料2料仓重量")]
/// <summary>
/// 原料2料仓重量
/// </summary>
public float RawMaterial2_StockBinWeight { get; set; }

[VarComm("DB94.DBD50", "原料3料仓重量")]
/// <summary>
/// 原料3料仓重量
/// </summary>
public float RawMaterial3_StockBinWeight { get; set; }

[VarComm("DB94.DBD54", "原料4料仓重量")]
/// <summary>
/// 原料4料仓重量
/// </summary>
public float RawMaterial4_StockBinWeight { get; set; }

[VarComm("DB94.DBD58", "原料5料仓重量")]
/// <summary>
/// 原料5料仓重量
/// </summary>


+ 19
- 1
BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Write.cs Ver fichero

@@ -1,4 +1,5 @@
using BPASmartClient.S7Net;
using BPASmartClient.JXJFoodSmallStation.Model.GVL;
using BPASmartClient.S7Net;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,39 +10,56 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.WindSend
{
public class WindSend_Write
{
[VarComm("DB95.DBD0", "原料1设定重量")]
/// <summary>
/// 原料1设定重量
/// </summary>
public float RawMaterial1_SetWeight { get; set; }

[VarComm("DB95.DBD4", "原料2设定重量")]
/// <summary>
/// 原料2设定重量
/// </summary>
public float RawMaterial2_SetWeight { get; set; }

[VarComm("DB95.DBD8", "原料3设定重量")]
/// <summary>
/// 原料3设定重量
/// </summary>
public float RawMaterial3_SetWeight { get; set; }

[VarComm("DB95.DBD12", "原料4设定重量")]
/// <summary>
/// 原料4设定重量
/// </summary>
public float RawMaterial4_SetWeight { get; set; }

[VarComm("DB95.DBD16", "原料5设定重量")]
/// <summary>
/// 原料5设定重量
/// </summary>
public float RawMaterial5_SetWeight { get; set; }

[VarComm("DB95.DBW20", "目标配方编码")]
/// <summary>
/// 目标配方编码
/// </summary>
[Siemens(16)]
public string TargetRecipeCode { get; set; } = "";

[VarComm("DB95.DBX38.0", "允许配料")]
/// <summary>
/// 允许配料
/// </summary>
public bool IsAllowDosing { get; set; }

[VarComm("DB95.DBX38.1", "配方制作完成接收")]
/// <summary>
/// 配方制作完成接收
/// </summary>
public bool RecipeCompleRec { get; set; }

[VarComm("DB95.DBX38.2", "工位1有信号")]
/// <summary>
/// 工位1有信号
/// </summary>


+ 18
- 2
BPASmartClient.JXJFoodSmallStation/View/ManualFlowView.xaml Ver fichero

@@ -66,7 +66,7 @@
VerticalAlignment="Center"
FontSize="25"
Foreground="#FF2AB2E7" />
<Button
<!--<Button
Width="200"
Height="40"
Margin="5"
@@ -74,7 +74,7 @@
Command="{Binding Test5Command}"
Content="粉料仓提升到位"
FontSize="20"
Style="{StaticResource ImageButtonStyle}" />
Style="{StaticResource ImageButtonStyle}" />-->
<Button
Width="200"
Height="40"
@@ -454,6 +454,22 @@
FontSize="20"
Style="{StaticResource ImageButtonStyle}" />
</WrapPanel>
<WrapPanel Grid.Row="2" Grid.Column="2">
<TextBlock
Margin="10,0,5,0"
VerticalAlignment="Center"
FontSize="25"
Foreground="#FF2AB2E7"
Text="配方制作完成数目:" />
<TextBlock
Width="150"
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="25"
Foreground="#FF2AB2E7"
Text="{Binding RecipeDosingCompleNum}" />
</WrapPanel>
</Grid>
</Grid>
</Grid>


+ 16
- 0
BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml Ver fichero

@@ -145,6 +145,7 @@
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
@@ -174,6 +175,13 @@
FontSize="16">
原料重量
</TextBlock>
<TextBlock
Grid.Column="4"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="16">
原料类型
</TextBlock>
</Grid>
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden">
<ItemsControl Width="548" ItemsSource="{Binding RawMaterialsInfo}">
@@ -185,6 +193,7 @@
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
@@ -214,6 +223,13 @@
FontSize="20"
Foreground="#FF2AB2E7"
Text="{Binding RawMaterialWeight}" />
<TextBlock
Grid.Column="4"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="20"
Foreground="#FF2AB2E7"
Text="{Binding RawMaterialType}" />
</Grid>
<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">


+ 10
- 0
BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml Ver fichero

@@ -184,6 +184,16 @@
Foreground="Aqua"
IsChecked="{Binding HKPlcConnect}" />


<CheckBox
Margin="0,10,10,0"
VerticalAlignment="Center"
Content="屏蔽小料仓数量读取报警"
FontFamily="楷体"
FontSize="20"
Foreground="Aqua"
IsChecked="{Binding ShieldStockbinAlarm}" />

</StackPanel>
<Grid
Grid.Row="1"


+ 9
- 5
BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs Ver fichero

@@ -72,11 +72,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
MessageNotify.GetInstance.ShowUserLog("手动点击按钮,气缸收紧错位复位");
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,气缸收紧错位复位");
});
Test5Command = new RelayCommand(() =>
{
GVL_SmallStation.GetInstance.WindSendAllowAGVPutGet = true;
MessageNotify.GetInstance.ShowUserLog("手动点击按钮,粉料仓提升到位");
});
//Test5Command = new RelayCommand(() =>
//{
// GVL_SmallStation.GetInstance.WindSendAllowAGVPutGet = true;
// MessageNotify.GetInstance.ShowUserLog("手动点击按钮,粉料仓提升到位");
//});
Test6Command = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("AGVPutTrayFinish");
@@ -149,6 +149,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
});
ThreadManage.GetInstance().StartLong(new Action(() =>
{
RecipeDosingCompleNum = GVL_SmallStation.GetInstance.RecipeDosingCompleNum;
Recipe1DosingComplete = GVL_SmallStation.GetInstance.RecipeStockBinDosing[0].ToBinString();
Recipe2DosingComplete = GVL_SmallStation.GetInstance.RecipeStockBinDosing[1].ToBinString();
Recipe3DosingComplete = GVL_SmallStation.GetInstance.RecipeStockBinDosing[2].ToBinString();
@@ -326,6 +327,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
public static int StockbinDosingCompleNum { get { return _StockbinDosingCompleNum; } set { _StockbinDosingCompleNum = value; OnStaticPropertyChanged(); } }


private static int _RecipeDosingCompleNum { get; set; }
public static int RecipeDosingCompleNum { get { return _RecipeDosingCompleNum; } set { _RecipeDosingCompleNum = value; OnStaticPropertyChanged(); } }

public static Visibility VisibilityBtn1 { get { return _VisibilityBtn1; } set { _VisibilityBtn1 = value; OnStaticPropertyChanged(); } }
private static Visibility _VisibilityBtn1 = Visibility.Visible;
public static Visibility VisibilityBtn2 { get { return _VisibilityBtn2; } set { _VisibilityBtn2 = value; OnStaticPropertyChanged(); } }


+ 6
- 2
BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs Ver fichero

@@ -35,11 +35,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
AllRawMaterial.Add(new RemoteRecipeRawMaterial()
{
RawMaterialType = "粉料",
RawMaterialType = item1.RawMaterialType,
RawMaterialName = item1.RawMaterialName,
RawMaterialWeight = item1.RawMaterialWeight,
RawMaterialLocation = item1.Location,
RawMaterialBarrelNum = 3,
RawMaterialBarrelNum = item1.RawMaterialBarrelNum,
});
}
}
@@ -156,6 +156,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
RawMaterialName = item.RawMaterialName,
RawMaterialWeight = item.RawMaterialWeight,
Location = item.RawMaterialLocation,
RawMaterialType =item.RawMaterialType,
RawMaterialBarrelNum=item.RawMaterialBarrelNum,
});
}
}
@@ -188,6 +190,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
RawMaterialName = item.RawMaterialName,
RawMaterialWeight = item.RawMaterialWeight,
Location = item.RawMaterialLocation,
RawMaterialType = item.RawMaterialType,
RawMaterialBarrelNum = item.RawMaterialBarrelNum,
});
}
}


+ 4
- 0
BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs Ver fichero

@@ -29,6 +29,10 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
RawMaterialsInfo.Add(item);
}
foreach (var item1 in rm.WindSend)
{
RawMaterialsInfo.Add(new RemoteRecipeRawMaterial() { RawMaterialName= item1.RawMaterialName, RawMaterialLocation= item1.Location,RawMaterialBarrelNum= item1.RawMaterialBarrelNum,RawMaterialWeight= item1.RawMaterialWeight,RawMaterialType=item1.RawMaterialType});
}
}
}), "RecipeInfo");



+ 7
- 1
BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs Ver fichero

@@ -24,6 +24,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
SiemensConnect = Json<DevicePar>.Data.deviceConnectPar.SiemensConnect;
WindSendConnect = Json<DevicePar>.Data.deviceConnectPar.WindSendConnect;
HKPlcConnect = Json<DevicePar>.Data.deviceConnectPar.HKPlcConnect;
ShieldStockbinAlarm = Json<DevicePar>.Data.deviceConnectPar.ShieldStockbinAlarm;

AxisLoadSpeed = Json<DevicePar>.Data.deviceConnectPar.AxisLoadSpeed;
AxisMidSpeed = Json<DevicePar>.Data.deviceConnectPar.AxisMidSpeed;
AxisUnLoadSpeed = Json<DevicePar>.Data.deviceConnectPar.AxisUnLoadSpeed;
@@ -35,6 +37,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
Json<DevicePar>.Data.deviceConnectPar.SiemensConnect = SiemensConnect;
Json<DevicePar>.Data.deviceConnectPar.WindSendConnect = WindSendConnect;
Json<DevicePar>.Data.deviceConnectPar.HKPlcConnect = HKPlcConnect;
Json<DevicePar>.Data.deviceConnectPar.ShieldStockbinAlarm = ShieldStockbinAlarm;

Json<DevicePar>.Data.deviceConnectPar.AxisLoadSpeed = AxisLoadSpeed;
Json<DevicePar>.Data.deviceConnectPar.AxisMidSpeed = AxisMidSpeed;
Json<DevicePar>.Data.deviceConnectPar.AxisUnLoadSpeed = AxisUnLoadSpeed;
@@ -69,7 +73,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
private bool _mWindSendConnect;
public bool HKPlcConnect { get { return _mHKPlcConnect; } set { _mHKPlcConnect = value; OnPropertyChanged(); } }
private bool _mHKPlcConnect;

public bool ShieldStockbinAlarm { get { return _mShieldStockbinAlarm; } set { _mShieldStockbinAlarm = value; OnPropertyChanged(); } }
private bool _mShieldStockbinAlarm;
public short AxisLoadSpeed { get { return _mAxisLoadSpeed; } set { _mAxisLoadSpeed = value; OnPropertyChanged(); } }
private short _mAxisLoadSpeed;
public short AxisMidSpeed { get { return _mAxisMidSpeed; } set { _mAxisMidSpeed = value; OnPropertyChanged(); } }


Cargando…
Cancelar
Guardar