liulb@mesnac.com 1 year ago
parent 57478af4d8
commit 37f12ac83a

@ -10,7 +10,7 @@ namespace Admin.Core.Model
/// <summary>
/// 完成记录
///</summary>
[SugarTable("RECORD_SIDEPANEL_COMPLAte", "AUCMA_SCADA")]
[SugarTable("RECORD_SIDEPANEL_COMPLATE", "AUCMA_SCADA")]
public class RecordSidePanelComplate
{
/// <summary>

@ -76,7 +76,7 @@ namespace Aucma.Core.HwPLc
/// <returns></returns>
public bool Connect(string iP, int port)
{
melsecMcNet.IpAddress = iP;//正式环境开启
//melsecMcNet.IpAddress = iP;//正式环境开启
melsecMcNet.Port = port;
// 如果网络不太理想,配置了两个端口,一个有问题,立即切换另一个的话,可以配置如下的代码

@ -110,6 +110,7 @@ public class SheetMetalPlanTaskHandle
{
do
{
//D6030
//计划编号D6030-D6039物料编号D6040-D6049计划完成数D6050计划下线数D6051设备状态D6052-D6056,生产节拍D6057-D6058
byte[] info = obj.plc.Read("D6030", 59);
//计划编号

@ -23,6 +23,8 @@ using LiveCharts.Defaults;
using Aucma.Core.SheetMetal.Business;
using static Aucma.Core.SheetMetal.Business.SheetMetalPlanTaskHandle;
using System.Threading;
using NetTaste;
using Aucma.Core.HwPLc;
/*
*
*
@ -46,7 +48,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
TypeName="自动"
}};
public Func<double, string> Formatter { get; set; }
public HwPLc.PlcModel obj = null;
#region 构造函数
public IndexPageViewModel()
{
@ -68,7 +70,20 @@ namespace Aucma.Core.SheetMetal.ViewModels
Task.Run(() =>
{
Thread.Sleep(5000);
//_taskHandle.SendPlanTaskToDevice();
while (true)
{
obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldTypePlc1"));
if (obj!=null)
{
if (obj.plc.IsConnected)
{
_taskHandle.ReadDeviceComplate_WB(obj);
_taskHandle.ReadDeviceComplate_BB(obj);
}
}
}
});
}
#endregion
@ -188,13 +203,13 @@ namespace Aucma.Core.SheetMetal.ViewModels
#region 加载DataGrid数据
private async Task LoadData()
{
string productLineCode = Appsettings.app("StoreInfo", "ProductLineCode");
var list = await _taskExecutionPlanInfoServices.QueryAsync(d => d.ProductLineCode.Contains(productLineCode));
string productLineCode = Appsettings.app("StationInfo", "ProductLineCode");
string stationCode = Appsettings.app("StationInfo", "StationCode");
var list = await _taskExecutionPlanInfoServices.QueryAsync(d => d.ProductLineCode.Contains(stationCode));
if (list == null) return;
var execList = list.OrderBy(d => d.ExecuteOrder);
int i = 1;
string planType = string.Empty;
foreach (var item in execList)
{
TaskExecModel task = new TaskExecModel();

@ -48,7 +48,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
{
MaterialDataGrid.Clear();
int i = 1;
string station = Appsettings.app("StoreInfo", "StationCode");
string station = Appsettings.app("StationInfo", "StationCode");
var planlist = await _productPlanInfoServices.QueryAsync(d => d.ProductLineCode.Equals(station));
var execList = await _executePlanInfoServices.QueryAsync(d => d.ProductLineCode.Equals(station));
foreach (var item in planlist)

@ -119,7 +119,7 @@
"ShellStoreCode": "XKJCK-001",
"LinerStoreCode": "NDJCK-001",
"FoamBeforeStoreCode": "PBSCK-001",
"ProductLineCode": "1001"
"ProductLineCode": "CX_01"
},
"PLCServer": [
{

Loading…
Cancel
Save