|
|
|
|
@ -47,9 +47,13 @@ namespace Khd.Core.Wpf.WindowPage
|
|
|
|
|
private bool taskHandlerFlag = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 提升机当前楼层 写
|
|
|
|
|
/// 提升机当前楼层
|
|
|
|
|
/// </summary>
|
|
|
|
|
private BasePlcpoint currentfloor06;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 提升机步序清0
|
|
|
|
|
/// </summary>
|
|
|
|
|
private BasePlcpoint hoisterStepClear;
|
|
|
|
|
|
|
|
|
|
private DispatcherTimer _timer;
|
|
|
|
|
private int _timeRemaining = 30; // 初始时间为30秒
|
|
|
|
|
@ -101,6 +105,7 @@ namespace Khd.Core.Wpf.WindowPage
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
getCurrentFloor();
|
|
|
|
|
using var scope = _host.Services.CreateScope();
|
|
|
|
|
using var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
|
|
|
|
|
@ -139,8 +144,15 @@ namespace Khd.Core.Wpf.WindowPage
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
///轿厢线步序清0; 等待昆明TODO
|
|
|
|
|
///
|
|
|
|
|
///轿厢线步序清0
|
|
|
|
|
this.hoisterStepClear = SystemData.BasePlcpoints.First(t => t.plcpointNo== "hoisterStepClear");
|
|
|
|
|
SystemData.PlcDic[0].Write(hoisterStepClear.plcpointAddress, 1);
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
|
SystemData.PlcDic[0].Write(hoisterStepClear.plcpointAddress, 0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.HoistClearButton.Background = new SolidColorBrush(Colors.LimeGreen);
|
|
|
|
|
this.Msg.Text = DateTime.Now + " 轿厢线步序清0成功,请等待30s以后,提升机还未动作,请点击任务处理按钮...";
|
|
|
|
|
|