Commit 70f8d803 张东亮

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

1 个父辈 cc9dce93
正在显示 41 个修改的文件 包含 95 行增加52 行删除
文件属性发生变化
文件属性发生变化
文件属性发生变化
文件属性发生变化
文件属性发生变化
......@@ -36,6 +36,7 @@
<add key="IsInDebug" value="1" />
<add key ="Server_Log_Open" value ="1"/>
<add key ="HumidityParam" value ="35"/>
<add key ="UseAlarmBuzzer" value ="1"/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -65,9 +65,6 @@
this.label49 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox();
......@@ -154,6 +151,7 @@
this.btnTempInit = new System.Windows.Forms.Button();
this.tabControl2 = new System.Windows.Forms.TabControl();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.chbUseTrayCheck = new System.Windows.Forms.CheckBox();
this.btnStoreExit = new System.Windows.Forms.Button();
this.btnStoreHome = new System.Windows.Forms.Button();
......@@ -171,6 +169,9 @@
this.button4 = new System.Windows.Forms.Button();
this.btnClearL = new System.Windows.Forms.Button();
this.btnLogDebug = new System.Windows.Forms.Button();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.groupAxis.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupInout.SuspendLayout();
......@@ -679,7 +680,7 @@
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(7, 3);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(545, 511);
this.richTextBox1.Size = new System.Drawing.Size(809, 497);
this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = "";
this.richTextBox1.VisibleChanged += new System.EventHandler(this.richTextBox1_VisibleChanged);
......@@ -715,36 +716,6 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态";
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(135, 44);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(240, 44);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(338, 44);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// label38
//
this.label38.AutoSize = true;
......@@ -1070,7 +1041,7 @@
this.txtJiange.Name = "txtJiange";
this.txtJiange.Size = new System.Drawing.Size(37, 26);
this.txtJiange.TabIndex = 221;
this.txtJiange.Text = "0";
this.txtJiange.Text = "1";
//
// txtInOutP2
//
......@@ -1581,7 +1552,7 @@
this.groupBox3.Controls.Add(this.lblThisSta);
this.groupBox3.Location = new System.Drawing.Point(7, 86);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(1063, 105);
this.groupBox3.Size = new System.Drawing.Size(1327, 105);
this.groupBox3.TabIndex = 268;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "设备状态";
......@@ -1626,7 +1597,7 @@
this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(845, 12);
this.chbDebug.Location = new System.Drawing.Point(1109, 12);
this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(84, 24);
this.chbDebug.TabIndex = 271;
......@@ -1639,7 +1610,7 @@
this.chbAuto.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbAuto.AutoSize = true;
this.chbAuto.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAuto.Location = new System.Drawing.Point(940, 13);
this.chbAuto.Location = new System.Drawing.Point(1204, 13);
this.chbAuto.Name = "chbAuto";
this.chbAuto.Size = new System.Drawing.Size(112, 24);
this.chbAuto.TabIndex = 270;
......@@ -1695,7 +1666,7 @@
this.tabControl1.Location = new System.Drawing.Point(510, 193);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(568, 550);
this.tabControl1.Size = new System.Drawing.Size(832, 550);
this.tabControl1.TabIndex = 272;
//
// tabPage3
......@@ -1703,7 +1674,7 @@
this.tabPage3.Controls.Add(this.richTextBox1);
this.tabPage3.Location = new System.Drawing.Point(4, 29);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(560, 517);
this.tabPage3.Size = new System.Drawing.Size(824, 517);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = " 操作日志 ";
this.tabPage3.UseVisualStyleBackColor = true;
......@@ -1715,7 +1686,7 @@
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(560, 517);
this.tabPage1.Size = new System.Drawing.Size(824, 517);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " 伺服调试 ";
this.tabPage1.UseVisualStyleBackColor = true;
......@@ -1726,7 +1697,7 @@
this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(560, 517);
this.tabPage2.Size = new System.Drawing.Size(824, 517);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 温湿度 ";
this.tabPage2.UseVisualStyleBackColor = true;
......@@ -1860,11 +1831,12 @@
this.tabControl2.Location = new System.Drawing.Point(6, 4);
this.tabControl2.Name = "tabControl2";
this.tabControl2.SelectedIndex = 0;
this.tabControl2.Size = new System.Drawing.Size(1068, 80);
this.tabControl2.Size = new System.Drawing.Size(1332, 80);
this.tabControl2.TabIndex = 271;
//
// tabPage4
//
this.tabPage4.Controls.Add(this.checkBox1);
this.tabPage4.Controls.Add(this.chbUseTrayCheck);
this.tabPage4.Controls.Add(this.btnStoreExit);
this.tabPage4.Controls.Add(this.chbDebug);
......@@ -1876,17 +1848,30 @@
this.tabPage4.Location = new System.Drawing.Point(4, 30);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
this.tabPage4.Size = new System.Drawing.Size(1060, 46);
this.tabPage4.Size = new System.Drawing.Size(1324, 46);
this.tabPage4.TabIndex = 0;
this.tabPage4.Text = " 料仓操作 ";
this.tabPage4.UseVisualStyleBackColor = true;
//
// checkBox1
//
this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox1.AutoSize = true;
this.checkBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBox1.Location = new System.Drawing.Point(876, 13);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(98, 24);
this.checkBox1.TabIndex = 273;
this.checkBox1.Text = "启用蜂鸣器";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// chbUseTrayCheck
//
this.chbUseTrayCheck.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbUseTrayCheck.AutoSize = true;
this.chbUseTrayCheck.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbUseTrayCheck.Location = new System.Drawing.Point(699, 12);
this.chbUseTrayCheck.Location = new System.Drawing.Point(991, 12);
this.chbUseTrayCheck.Name = "chbUseTrayCheck";
this.chbUseTrayCheck.Size = new System.Drawing.Size(112, 24);
this.chbUseTrayCheck.TabIndex = 272;
......@@ -1965,7 +1950,7 @@
this.tabPage5.Location = new System.Drawing.Point(4, 30);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
this.tabPage5.Size = new System.Drawing.Size(1060, 46);
this.tabPage5.Size = new System.Drawing.Size(1324, 46);
this.tabPage5.TabIndex = 1;
this.tabPage5.Text = " 设备调试 ";
this.tabPage5.UseVisualStyleBackColor = true;
......@@ -2049,7 +2034,7 @@
this.tabPage6.Controls.Add(this.btnLogDebug);
this.tabPage6.Location = new System.Drawing.Point(4, 30);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Size = new System.Drawing.Size(1060, 46);
this.tabPage6.Size = new System.Drawing.Size(1324, 46);
this.tabPage6.TabIndex = 2;
this.tabPage6.Text = " 其他 ";
this.tabPage6.UseVisualStyleBackColor = true;
......@@ -2090,11 +2075,41 @@
this.btnLogDebug.UseVisualStyleBackColor = true;
this.btnLogDebug.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click);
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(135, 44);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(240, 44);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(338, 44);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1089, 749);
this.ClientSize = new System.Drawing.Size(1353, 749);
this.Controls.Add(this.tabControl2);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.groupBox3);
......@@ -2282,6 +2297,7 @@
private System.Windows.Forms.Button btnOpenLDoor;
private System.Windows.Forms.ComboBox cmbHumpPort;
private System.Windows.Forms.CheckBox chbUseTrayCheck;
private System.Windows.Forms.CheckBox checkBox1;
}
}
......@@ -43,6 +43,7 @@ namespace OnlineStore.ACSquareStore
LoadStore();
chbDebug.Checked = store.IsDebug;
checkBox1.Checked = store.use_Alarm_Buzzer;
this.ShowInTaskbar = true;
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
// this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title)+"_"+store.StoreID;
......@@ -1317,5 +1318,11 @@ namespace OnlineStore.ACSquareStore
int value = FormUtil.GetIntValue(txtInOutP4);
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
public static string IsInDebug = "IsInDebug";
public static string ACBaudRate = "ACBaudRate";
public static string UseAlarmBuzzer = "UseAlarmBuzzer";
public static string Tool_P3_Offset = "Tool_P3_Offset";
public static string Tool_P4_Offset = "Tool_P4_Offset";
public static string Tool_P5_Offset = "Tool_P5_Offset";
......
文件属性发生变化
文件属性发生变化
文件属性发生变化
文件属性发生变化
......@@ -767,6 +767,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("【" + info + "】 处理完成,耗时:" + stopwatch.Elapsed.ToString());
}
}
public bool use_Alarm_Buzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseAlarmBuzzer,"")==1?true:false;
private void LedProcess()
{
try
......@@ -810,7 +811,24 @@ namespace OnlineStore.DeviceLibrary
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)
......
......@@ -752,7 +752,7 @@ namespace OnlineStore.DeviceLibrary
}
if (storeMoveType.Equals(StoreMoveType.InStore))
{
int newIndex = autoPositionIndex - 1;
int newIndex = autoPositionIndex;
if (newIndex < 0)
{
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
......@@ -790,7 +790,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid);
LogUtil.info(LOGGER, StoreName + "自动出库:posid=" + posid);
autoMsg = "自动出库:" + posid;
StartOutStoreMove(new InOutParam(inoutinfo));
}
......@@ -815,6 +815,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
autoPositionIndex = newIndex;
string posid = PositionNumList[newIndex];
InOutPosInfo inoutinfo = new InOutPosInfo(autoInoutCode, posid);
inoutinfo.ShelfType = autoShelfType;
......
文件属性发生变化
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!