Commit da5c0d70 张东亮

灯光定义但不亮问题

1 个父辈 1be3eaa4
using ConfigHelper; using ConfigHelper;
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChangeConfigKey namespace ChangeConfigKey
{ {
......
...@@ -135,72 +135,75 @@ namespace DeviceLibrary ...@@ -135,72 +135,75 @@ namespace DeviceLibrary
if (SafetyLightStop) if (SafetyLightStop)
{ {
ProcessLefCfg(MachineLedStateE.SafetyLightCurtains); ProcessLefCfg(MachineLedStateE.SafetyLightCurtains);
return;
}
//回原 绿闪
if (runStatus == RunStatus.HomeReset)
{
ProcessLefCfg(MachineLedStateE.HomeReset);
} }
//正常 绿亮 else
else if (runStatus == RunStatus.Running)
{ {
ProcessLefCfg(MachineLedStateE.Running); //回原 绿闪
if (runStatus == RunStatus.HomeReset)
//出入库 绿闪 黄闪
if (ClampMoveInfo.MoveStep > MoveStep.Wait
|| StoreMoveInfo.MoveStep > MoveStep.Wait
|| (StringMoveInfo.MoveStep > MoveStep.Wait && StringMoveInfo.MoveStep != MoveStep.StringReadyPut && StringMoveInfo.MoveStep <= MoveStep.StringOut_01))
{ {
ProcessLefCfg(MachineLedStateE.InOut); ProcessLefCfg(MachineLedStateE.HomeReset);
} }
//温度超限 绿亮 黄闪 //正常 绿亮
if (IsTHoutRange()) else if (runStatus == RunStatus.Running)
{ {
ProcessLefCfg(MachineLedStateE.THoutRange); ProcessLefCfg(MachineLedStateE.Running);
}
//温度超限30分钟 绿亮 黄闪 红闪 //出入库 绿闪 黄闪
if (IsTHoutRangeOver30m()) if (ClampMoveInfo.MoveStep > MoveStep.Wait
{ || StoreMoveInfo.MoveStep > MoveStep.Wait
ProcessLefCfg(MachineLedStateE.THoutRangeOver30m); || (StringMoveInfo.MoveStep > MoveStep.Wait && StringMoveInfo.MoveStep != MoveStep.StringReadyPut && StringMoveInfo.MoveStep <= MoveStep.StringOut_01))
{
ProcessLefCfg(MachineLedStateE.InOut);
}
//温度超限 绿亮 黄闪
if (IsTHoutRange())
{
ProcessLefCfg(MachineLedStateE.THoutRange);
}
//温度超限30分钟 绿亮 黄闪 红闪
if (IsTHoutRangeOver30m())
{
ProcessLefCfg(MachineLedStateE.THoutRangeOver30m);
}
if (AutoInOutTest)
{
ProcessLefCfg(MachineLedStateE.Debug);
}
//系统暂停,说明书未定义, 绿闪, 红闪
if (!canRunning || UserPause)
{
ProcessLefCfg(MachineLedStateE.SystemPause);
}
} }
if (AutoInOutTest) else if (runStatus == RunStatus.Stop)
{ {
ProcessLefCfg(MachineLedStateE.Debug); //系统停止时有报警, 红亮
if (hasAlarm)
{
ProcessLefCfg(MachineLedStateE.AlarmStop);
}
} }
//系统暂停,说明书未定义, 绿闪, 红闪 //系统运行时报警, 绿亮,红闪
if (!canRunning || UserPause) if (runStatus != RunStatus.Stop && hasAlarm)
{ {
ProcessLefCfg(MachineLedStateE.SystemPause); ProcessLefCfg(MachineLedStateE.Alarm);
}
}
else if (runStatus == RunStatus.Stop)
{
//系统停止时有报警, 红亮
if (hasAlarm)
{
ProcessLefCfg(MachineLedStateE.AlarmStop);
}
}
//系统运行时报警, 绿亮,红闪
if (runStatus != RunStatus.Stop && hasAlarm)
{
ProcessLefCfg(MachineLedStateE.Alarm);
//if (UserPause) { //if (UserPause) {
// RunningLed.LedState = LedState.blink; // RunningLed.LedState = LedState.blink;
// StandbyLed.LedState = LedState.blink; // StandbyLed.LedState = LedState.blink;
//} //}
//if (ResetMoveInfo.MoveStep >= MoveStep.H13_HomeReset && ResetMoveInfo.MoveStep <= MoveStep.H14_HomeReset) //if (ResetMoveInfo.MoveStep >= MoveStep.H13_HomeReset && ResetMoveInfo.MoveStep <= MoveStep.H14_HomeReset)
//{ //{
// StandbyLed.LedState = LedState.blink; // StandbyLed.LedState = LedState.blink;
//} //}
//if (ClampMoveInfo.MoveStep >= MoveStep.NGOUT_02 && ClampMoveInfo.MoveStep <= MoveStep.NGOUT_03) //if (ClampMoveInfo.MoveStep >= MoveStep.NGOUT_02 && ClampMoveInfo.MoveStep <= MoveStep.NGOUT_03)
//{ //{
// StandbyLed.LedState = LedState.blink; // StandbyLed.LedState = LedState.blink;
//} //}
}
} }
Led.LedGroup.ForEach((x) => { x.run(); }); Led.LedGroup.ForEach((x) => { x.run(); });
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!