Commit 2fefbbdf LN

1

2 个父辈 542bbf90 da5c0d70
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
{ {
......
...@@ -65,6 +65,12 @@ namespace DeviceLibrary ...@@ -65,6 +65,12 @@ namespace DeviceLibrary
public void DefaultLedCfg() public void DefaultLedCfg()
{ {
MachineLedState.Clear(); MachineLedState.Clear();
//安全光栅触发报警,红亮
MachineLedStateName[MachineLedStateE.SafetyLightCurtains] = crc.GetString("ledstate_SafetyLightCurtains", "安全光栅触发");
MachineLedState.Add(MachineLedStateE.SafetyLightCurtains, nls(LedState.on, LedState.off, LedState.off));
//系统停止,红亮
MachineLedStateName[MachineLedStateE.Stop] = crc.GetString("ledstate_Stop", "停机");
MachineLedState.Add(MachineLedStateE.Stop, nls(LedState.on, LedState.off, LedState.off));
//系统报警并停止,红亮 //系统报警并停止,红亮
MachineLedStateName[MachineLedStateE.AlarmStop] = crc.GetString("ledstate_AlarmStop", "停机报警"); MachineLedStateName[MachineLedStateE.AlarmStop] = crc.GetString("ledstate_AlarmStop", "停机报警");
MachineLedState.Add(MachineLedStateE.AlarmStop, nls(LedState.on, LedState.off, LedState.off)); MachineLedState.Add(MachineLedStateE.AlarmStop, nls(LedState.on, LedState.off, LedState.off));
...@@ -77,6 +83,9 @@ namespace DeviceLibrary ...@@ -77,6 +83,9 @@ namespace DeviceLibrary
//系统正常运行 //系统正常运行
MachineLedStateName[MachineLedStateE.Running] = crc.GetString("ledstate_Running", "运行"); MachineLedStateName[MachineLedStateE.Running] = crc.GetString("ledstate_Running", "运行");
MachineLedState.Add(MachineLedStateE.Running, nls(LedState.none, LedState.none, LedState.on)); MachineLedState.Add(MachineLedStateE.Running, nls(LedState.none, LedState.none, LedState.on));
//调试,红亮
MachineLedStateName[MachineLedStateE.Debug] = crc.GetString("ledstate_Debug", "调试");
MachineLedState.Add(MachineLedStateE.Debug, nls(LedState.on, LedState.off, LedState.off));
//系统暂停, 绿闪,红闪 //系统暂停, 绿闪,红闪
MachineLedStateName[MachineLedStateE.SystemPause] = crc.GetString("ledstate_SystemPause", "暂停"); MachineLedStateName[MachineLedStateE.SystemPause] = crc.GetString("ledstate_SystemPause", "暂停");
MachineLedState.Add(MachineLedStateE.SystemPause, nls(LedState.blink, LedState.off, LedState.blink)); MachineLedState.Add(MachineLedStateE.SystemPause, nls(LedState.blink, LedState.off, LedState.blink));
...@@ -123,6 +132,12 @@ namespace DeviceLibrary ...@@ -123,6 +132,12 @@ namespace DeviceLibrary
StandbyLed.LedState = LedState.off; StandbyLed.LedState = LedState.off;
AlarmLed.LedState = LedState.off; AlarmLed.LedState = LedState.off;
RunningLed.LedState = LedState.off; RunningLed.LedState = LedState.off;
if (SafetyLightStop)
{
ProcessLefCfg(MachineLedStateE.SafetyLightCurtains);
}
else
{
//回原 绿闪 //回原 绿闪
if (runStatus == RunStatus.HomeReset) if (runStatus == RunStatus.HomeReset)
{ {
...@@ -150,6 +165,10 @@ namespace DeviceLibrary ...@@ -150,6 +165,10 @@ namespace DeviceLibrary
{ {
ProcessLefCfg(MachineLedStateE.THoutRangeOver30m); ProcessLefCfg(MachineLedStateE.THoutRangeOver30m);
} }
if (AutoInOutTest)
{
ProcessLefCfg(MachineLedStateE.Debug);
}
//系统暂停,说明书未定义, 绿闪, 红闪 //系统暂停,说明书未定义, 绿闪, 红闪
if (!canRunning || UserPause) if (!canRunning || UserPause)
{ {
...@@ -183,6 +202,8 @@ namespace DeviceLibrary ...@@ -183,6 +202,8 @@ namespace DeviceLibrary
// StandbyLed.LedState = LedState.blink; // StandbyLed.LedState = LedState.blink;
//} //}
} }
}
Led.LedGroup.ForEach((x) => { x.run(); }); Led.LedGroup.ForEach((x) => { x.run(); });
} }
} }
...@@ -245,6 +266,7 @@ namespace DeviceLibrary ...@@ -245,6 +266,7 @@ namespace DeviceLibrary
} }
public enum MachineLedStateE public enum MachineLedStateE
{ {
Stop,
AlarmStop, AlarmStop,
Alarm, Alarm,
HomeReset, HomeReset,
...@@ -253,5 +275,7 @@ namespace DeviceLibrary ...@@ -253,5 +275,7 @@ namespace DeviceLibrary
THoutRangeOver30m, THoutRangeOver30m,
THoutRange, THoutRange,
InOut, InOut,
SafetyLightCurtains,
Debug
} }
} }
...@@ -32,9 +32,12 @@ namespace TheMachine ...@@ -32,9 +32,12 @@ namespace TheMachine
private void RobotManage_LoadFinishEvent(bool state, string msg) private void RobotManage_LoadFinishEvent(bool state, string msg)
{ {
if (RobotManage.Config != null)
{
uC_LedConfig1.Config = RobotManage.Config;
}
if (!state) if (!state)
return; return;
uC_LedConfig1.Config = RobotManage.Config;
if (!RobotManage.haveFixpos) if (!RobotManage.haveFixpos)
cb_usefixpos.Visible = false; cb_usefixpos.Visible = false;
} }
......
...@@ -482,4 +482,7 @@ UC_LedConfig_tableLayoutPanel1_THoutRangeOver30m_Text 温湿度超限30分钟 Te ...@@ -482,4 +482,7 @@ UC_LedConfig_tableLayoutPanel1_THoutRangeOver30m_Text 温湿度超限30分钟 Te
UC_LedConfig_tableLayoutPanel1_THoutRange_Text 温湿度超限 Temperature and humidity exceeded limits UC_LedConfig_tableLayoutPanel1_THoutRange_Text 温湿度超限 Temperature and humidity exceeded limits
UC_LedConfig_tableLayoutPanel1_InOut_Text 出入库中 In storage/retrieval process UC_LedConfig_tableLayoutPanel1_InOut_Text 出入库中 In storage/retrieval process
PEnterPwd 请输入密码 Please enter the password PEnterPwd 请输入密码 Please enter the password
ledstate_Debug 调试 Debug
ledstate_SafetyLightCurtains 安全光栅 Safety light curtain
ledstate_AlarmStop 停机 Shut Down
...@@ -482,5 +482,8 @@ UC_LedConfig_tableLayoutPanel1_THoutRangeOver30m_Text 貂ゥ貉ソ蠎ヲ雜剞30蛻帖 貂 ...@@ -482,5 +482,8 @@ UC_LedConfig_tableLayoutPanel1_THoutRangeOver30m_Text 貂ゥ貉ソ蠎ヲ雜剞30蛻帖 貂
UC_LedConfig_tableLayoutPanel1_THoutRange_Text 温湿度超限 温湿度超過 UC_LedConfig_tableLayoutPanel1_THoutRange_Text 温湿度超限 温湿度超過
UC_LedConfig_tableLayoutPanel1_InOut_Text 出入库中 入出庫中 UC_LedConfig_tableLayoutPanel1_InOut_Text 出入库中 入出庫中
PEnterPwd 请输入密码 パスワードを入力してください PEnterPwd 请输入密码 パスワードを入力してください
ledstate_Debug 调试 デバック
ledstate_SafetyLightCurtains 安全光栅 ライトカーテン
ledstate_AlarmStop 停机 ていし
...@@ -482,3 +482,6 @@ UC_LedConfig_tableLayoutPanel1_THoutRangeOver30m_Text 温湿度超限30分钟 ...@@ -482,3 +482,6 @@ UC_LedConfig_tableLayoutPanel1_THoutRangeOver30m_Text 温湿度超限30分钟
UC_LedConfig_tableLayoutPanel1_THoutRange_Text 温湿度超限 UC_LedConfig_tableLayoutPanel1_THoutRange_Text 温湿度超限
UC_LedConfig_tableLayoutPanel1_InOut_Text 出入库中 UC_LedConfig_tableLayoutPanel1_InOut_Text 出入库中
PEnterPwd 请输入密码 PEnterPwd 请输入密码
ledstate_Debug 调试
ledstate_SafetyLightCurtains 安全光栅
ledstate_AlarmStop 停机
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!