Commit 70f8d803 张东亮

添加蜂鸣器,自动出入库问题修复

1 个父辈 cc9dce93
正在显示 41 个修改的文件 包含 31 行增加4 行删除
文件属性发生变化
文件属性发生变化
文件属性发生变化
文件属性发生变化
文件属性发生变化
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<add key="IsInDebug" value="1" /> <add key="IsInDebug" value="1" />
<add key ="Server_Log_Open" value ="1"/> <add key ="Server_Log_Open" value ="1"/>
<add key ="HumidityParam" value ="35"/> <add key ="HumidityParam" value ="35"/>
<add key ="UseAlarmBuzzer" value ="1"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -43,6 +43,7 @@ namespace OnlineStore.ACSquareStore ...@@ -43,6 +43,7 @@ namespace OnlineStore.ACSquareStore
LoadStore(); LoadStore();
chbDebug.Checked = store.IsDebug; chbDebug.Checked = store.IsDebug;
checkBox1.Checked = store.use_Alarm_Buzzer;
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title); this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
// this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title)+"_"+store.StoreID; // this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title)+"_"+store.StoreID;
...@@ -1317,5 +1318,11 @@ namespace OnlineStore.ACSquareStore ...@@ -1317,5 +1318,11 @@ namespace OnlineStore.ACSquareStore
int value = FormUtil.GetIntValue(txtInOutP4); int value = FormUtil.GetIntValue(txtInOutP4);
AxisABSMove(store.Config.InOut_Axis, value, store.Config.InOutAxis_P4_Speed); AxisABSMove(store.Config.InOut_Axis, value, store.Config.InOutAxis_P4_Speed);
} }
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
store.use_Alarm_Buzzer = checkBox1.Checked;
ConfigAppSettings.SaveValue(Setting_Init.UseAlarmBuzzer, store.use_Alarm_Buzzer ? 1 : 0);
}
} }
} }
文件属性发生变化
...@@ -81,8 +81,8 @@ namespace OnlineStore.Common ...@@ -81,8 +81,8 @@ namespace OnlineStore.Common
public static string IsInDebug = "IsInDebug"; public static string IsInDebug = "IsInDebug";
public static string ACBaudRate = "ACBaudRate"; public static string ACBaudRate = "ACBaudRate";
public static string UseAlarmBuzzer = "UseAlarmBuzzer";
public static string Tool_P3_Offset = "Tool_P3_Offset"; public static string Tool_P3_Offset = "Tool_P3_Offset";
public static string Tool_P4_Offset = "Tool_P4_Offset"; public static string Tool_P4_Offset = "Tool_P4_Offset";
public static string Tool_P5_Offset = "Tool_P5_Offset"; public static string Tool_P5_Offset = "Tool_P5_Offset";
......
文件属性发生变化
文件属性发生变化
文件属性发生变化
文件属性发生变化
...@@ -767,6 +767,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -767,6 +767,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("【" + info + "】 处理完成,耗时:" + stopwatch.Elapsed.ToString()); LogUtil.info("【" + info + "】 处理完成,耗时:" + stopwatch.Elapsed.ToString());
} }
} }
public bool use_Alarm_Buzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseAlarmBuzzer,"")==1?true:false;
private void LedProcess() private void LedProcess()
{ {
try try
...@@ -810,7 +811,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -810,7 +811,24 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW); IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
} }
} }
if(use_Alarm_Buzzer)
{
if (isNeedAlarmLed && IOManager.IOValue(IO_Type.Alarm_Buzzer).Equals(IO_VALUE.LOW))
{
IOManager.IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH);
}
else
{
if (IOManager.IOValue(IO_Type.Alarm_Buzzer).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW);
}
}
}
else
{
IOManager.IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW);
}
//报警时绿灯和黄灯灭 //报警时绿灯和黄灯灭
if (isNeedAlarmLed) if (isNeedAlarmLed)
......
...@@ -752,7 +752,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -752,7 +752,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (storeMoveType.Equals(StoreMoveType.InStore)) if (storeMoveType.Equals(StoreMoveType.InStore))
{ {
int newIndex = autoPositionIndex - 1; int newIndex = autoPositionIndex;
if (newIndex < 0) if (newIndex < 0)
{ {
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count) if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
...@@ -790,7 +790,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -790,7 +790,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid); LogUtil.info(LOGGER, StoreName + "自动出库:posid=" + posid);
autoMsg = "自动出库:" + posid; autoMsg = "自动出库:" + posid;
StartOutStoreMove(new InOutParam(inoutinfo)); StartOutStoreMove(new InOutParam(inoutinfo));
} }
...@@ -815,6 +815,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -815,6 +815,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
autoPositionIndex = newIndex;
string posid = PositionNumList[newIndex]; string posid = PositionNumList[newIndex];
InOutPosInfo inoutinfo = new InOutPosInfo(autoInoutCode, posid); InOutPosInfo inoutinfo = new InOutPosInfo(autoInoutCode, posid);
inoutinfo.ShelfType = autoShelfType; inoutinfo.ShelfType = autoShelfType;
......
文件属性发生变化
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!