Commit ac4214b8 刘韬

贴标异常蜂鸣器报警

1 个父辈 df26cf7a
using CodeLibrary; using OnlineStore.LoadCSVLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
namespace DeviceLibrary namespace DeviceLibrary
{ {
...@@ -19,7 +13,7 @@ namespace DeviceLibrary ...@@ -19,7 +13,7 @@ namespace DeviceLibrary
private void LedProcessInit() private void LedProcessInit()
{ {
AlarmLed = new Led(Config.DOList[IO_Label_Type.Alarm_Led].GetIOAddr(),DeviceName); AlarmLed = new Led(Config.DOList[IO_Label_Type.Alarm_Led].GetIOAddr(), DeviceName);
RunningLed = new Led(Config.DOList[IO_Label_Type.Run_Led].GetIOAddr(), DeviceName); RunningLed = new Led(Config.DOList[IO_Label_Type.Run_Led].GetIOAddr(), DeviceName);
ledtimer = new System.Threading.Timer(new TimerCallback(LedProcess), null, 0, 1000); ledtimer = new System.Threading.Timer(new TimerCallback(LedProcess), null, 0, 1000);
GC.KeepAlive(ledtimer); GC.KeepAlive(ledtimer);
...@@ -40,9 +34,10 @@ namespace DeviceLibrary ...@@ -40,9 +34,10 @@ namespace DeviceLibrary
RunningLed.LedState = LedState.off; RunningLed.LedState = LedState.off;
} }
if (MoveInfo.MoveStep == MoveStep.Lbl_WaitCheckLabel) if (MoveInfo.MoveStep == MoveStep.Lbl_WaitCheckLabel || MoveInfo.MoveStep == MoveStep.Lbl_WaitCheckLabel2)
{ {
AlarmLed.LedState = LedState.blink; AlarmLed.LedState = LedState.blink;
AlarmBuzzer.ON();
} }
else else
{ {
......
...@@ -359,6 +359,7 @@ namespace DeviceLibrary ...@@ -359,6 +359,7 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.Lbl_BeginOut); MoveInfo.NextMoveStep(MoveStep.Lbl_BeginOut);
IOMove(IO_Label_Type.LabelCylinder_Work, IO_VALUE.LOW); IOMove(IO_Label_Type.LabelCylinder_Work, IO_VALUE.LOW);
RobotManage.Line2.LineRun("label", 999, "Lbl_WaitCheckLabel"); RobotManage.Line2.LineRun("label", 999, "Lbl_WaitCheckLabel");
AlarmBuzzer.OFF();
MoveInfo.log("人工完成贴标."); MoveInfo.log("人工完成贴标.");
} }
break; break;
...@@ -375,6 +376,7 @@ namespace DeviceLibrary ...@@ -375,6 +376,7 @@ namespace DeviceLibrary
MoveInfo.NewMove(MoveStep.Lbl_01_Wait_ATray); MoveInfo.NewMove(MoveStep.Lbl_01_Wait_ATray);
// IOMove(IO_Label_Type.LabelCylinder_Work, IO_VALUE.LOW); // IOMove(IO_Label_Type.LabelCylinder_Work, IO_VALUE.LOW);
//RobotManage.Line2.LineRun("label", 999, "Lbl_WaitCheckLabel"); //RobotManage.Line2.LineRun("label", 999, "Lbl_WaitCheckLabel");
AlarmBuzzer.OFF();
MoveInfo.log("人工取走料盘."); MoveInfo.log("人工取走料盘.");
} }
break; break;
......
...@@ -90,7 +90,7 @@ namespace DeviceLibrary ...@@ -90,7 +90,7 @@ namespace DeviceLibrary
AlarmBuzzer.ON(); AlarmBuzzer.ON();
else else
{ {
AlarmBuzzer.OFF();
} }
} }
Led.LedGroup[DeviceName].ForEach((x) => { x.run(); }); Led.LedGroup[DeviceName].ForEach((x) => { x.run(); });
......
...@@ -126,6 +126,7 @@ namespace DeviceLibrary ...@@ -126,6 +126,7 @@ namespace DeviceLibrary
{ {
MoveInfo.log("用户确认继续1"); MoveInfo.log("用户确认继续1");
MoveInfo.NextMoveStep(MoveStep.XRay_07_TryAgain); MoveInfo.NextMoveStep(MoveStep.XRay_07_TryAgain);
AlarmBuzzer.OFF();
} }
break; break;
case MoveStep.XRay_07_TryAgain: case MoveStep.XRay_07_TryAgain:
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!