Commit da5c0d70 张东亮

灯光定义但不亮问题

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