pry 1 년 전
부모
커밋
b464d785ae
2개의 변경된 파일31개의 추가작업 그리고 3개의 파일을 삭제
  1. +24
    -0
      DosingSystem/Model/SiemensPlc/SensorInfo.cs
  2. +7
    -3
      DosingSystem/ViewModel/RecipeControlViewModel.cs

+ 24
- 0
DosingSystem/Model/SiemensPlc/SensorInfo.cs 파일 보기

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

namespace BPASmartClient.DosingSystem.Model.SiemensPlc
{
public class SensorInfo
{
public bool LocalEStop { get; set; }
public bool RemoteEStop {get; set; }

public bool[] Sensor { get; set; } = new bool[8];

public bool[] Standby1 { get; set; } = new bool[6];
public bool[] CylinderBase { get; set; } = new bool[8];
public bool[] CylinderWork { get; set; } = new bool[8];

public bool[] Standby2 { get; set; } = new bool[8];
public bool AlarmAxis1 { get; set; }
public bool AlarmAxis2 { get; set; }
}
}

+ 7
- 3
DosingSystem/ViewModel/RecipeControlViewModel.cs 파일 보기

@@ -117,14 +117,18 @@ namespace BPASmartClient.DosingSystem.ViewModel
Stopwatch sw = new Stopwatch();
App.Current.Dispatcher.Invoke(() => { recipeProcesses.Add(Recipes.ElementAt(index)); });
sw.Restart();
while (!GlobalDevice.PlcData.ResComplete)
while (true)
{
if (sw.ElapsedMilliseconds >= 3000)
if (sw.ElapsedMilliseconds >= 3000 && !GlobalDevice.PlcData.ResComplete)
{
MessageNotify.GetInstance.ShowRunLog("获取配方下发反馈超时");
break;
}
if (GlobalDevice.PlcData.ResComplete) SiemensDevice.GetInstance.MySiemens.Write("DB3.DBX0.1", false);
if (GlobalDevice.PlcData.ResComplete)
{
SiemensDevice.GetInstance.MySiemens.Write("DB3.DBX0.1", false);
break;
}
Thread.Sleep(100);
}
#endregion


불러오는 중...
취소
저장