修正PM未安装时,仍然会触发报警的问题。

This commit is contained in:
DESKTOP-1N1NK8A\auvkk 2023-04-20 16:10:41 +08:00
parent c89c1ca41b
commit 70e11bc6b0
4 changed files with 28 additions and 26 deletions

View File

@ -580,7 +580,7 @@ namespace SicModules.PMs
public void InitDevice()
{
if (IsInstalled)
if (IsInstalled) // 如果未安装不要初始化Module中的Device以免触发不必要的报警
{
if (SC.GetValue<bool>("System.IsSimulatorMode"))
{
@ -594,7 +594,7 @@ namespace SicModules.PMs
(Plc as SicAds).Initialize();
}
}
if (Plc != null)
{
@ -625,11 +625,13 @@ namespace SicModules.PMs
pi.SetValue(this, convertedValue);
});
if (_pmInterLock == null)
{
_pmInterLock = DEVICE.GetDevice<IoInterLock>($"{Module}.PMInterLock");
}
}
}
private void StopRamp()
{