|
|
|
@ -1084,6 +1084,109 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 除尘机
|
|
|
|
|
|
|
|
|
|
private void StartDustButton_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
bool result = StartDust();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void StopDustButton_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
StopDust();
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 除尘启动
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
private bool StartDust()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (plc.readBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("除尘报警")) == true)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("除尘故障报警,请先点击除尘机变频器复位按钮");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//1除尘远程启动
|
|
|
|
|
plc.writeBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("除尘远程启动"), true);
|
|
|
|
|
Thread.Sleep(50);
|
|
|
|
|
//2.除尘风机启动
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX166.1", true);
|
|
|
|
|
Thread.Sleep(50);
|
|
|
|
|
//3 清灰启停
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX166.2",true);
|
|
|
|
|
//震打电机启停1-6
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.3",true);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.4",true);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.5",true);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.6",true);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.7",true);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX167.0", true);
|
|
|
|
|
// 阀门启停1-7
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.1", true);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.2", true);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.3", true);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.4", true);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.5", true);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.6", true);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.7", true);
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"除尘启动:{ex.Message}");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 除尘停止
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
private bool StopDust()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//2.除尘风机停止
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX166.1", false);
|
|
|
|
|
Thread.Sleep(50);
|
|
|
|
|
//3 清灰启停
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX166.2", false);
|
|
|
|
|
//震打电机启停1-6
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.3", false);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.4", false);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.5", false);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.6", false);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX166.7", false);
|
|
|
|
|
//plc.writeBoolByAddress("DB4.DBX167.0", false);
|
|
|
|
|
// 阀门启停1-7
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.1", false);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.2", false);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.3", false);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.4", false);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.5", false);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.6", false);
|
|
|
|
|
plc.writeBoolByAddress("DB4.DBX167.7", false);
|
|
|
|
|
Thread.Sleep(50);
|
|
|
|
|
//1除尘远程启动停止
|
|
|
|
|
plc.writeBoolByAddress(baseBusiness.GetPlcAddressByConfigKey("除尘远程启动"), false);
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"除尘停止异常:{ex.Message}");
|
|
|
|
|
_logger.LogError($"除尘停止异常:{ex.Message}");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 螺旋机
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 螺旋1启动
|
|
|
|
@ -2186,5 +2289,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
InputDialogWindow window = new InputDialogWindow();
|
|
|
|
|
window.ShowDialog();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|