Commit 842184f9 几米阳光

1

1 个父辈 55bad263
......@@ -71,6 +71,9 @@
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();
......@@ -89,7 +92,6 @@
this.label42 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblTemp = new System.Windows.Forms.Label();
this.btnClearLog = new System.Windows.Forms.Button();
this.lblMsg = new System.Windows.Forms.Label();
this.btnSavePosition = new System.Windows.Forms.Button();
this.btnStartAuTo = new System.Windows.Forms.Button();
......@@ -131,6 +133,7 @@
this.btnUpDownP6 = new System.Windows.Forms.Button();
this.btnUpDownP3 = new System.Windows.Forms.Button();
this.btnUpDownP4 = new System.Windows.Forms.Button();
this.btnClearLog = new System.Windows.Forms.Button();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.料仓操作ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.启动ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
......@@ -231,9 +234,6 @@
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.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
......@@ -803,7 +803,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, 9);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(545, 295);
this.richTextBox1.Size = new System.Drawing.Size(545, 481);
this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = "";
//
......@@ -838,6 +838,36 @@
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(127, 40);
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(329, 40);
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(224, 40);
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;
......@@ -983,7 +1013,6 @@
// groupBox2
//
this.groupBox2.Controls.Add(this.lblTemp);
this.groupBox2.Controls.Add(this.btnClearLog);
this.groupBox2.Controls.Add(this.lblMsg);
this.groupBox2.Controls.Add(this.btnSavePosition);
this.groupBox2.Controls.Add(this.btnStartAuTo);
......@@ -1043,17 +1072,6 @@
this.lblTemp.TabIndex = 270;
this.lblTemp.Text = "当前温度--,当前湿度--";
//
// btnClearLog
//
this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearLog.Location = new System.Drawing.Point(251, 446);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 38);
this.btnClearLog.TabIndex = 224;
this.btnClearLog.Text = "清理日志";
this.btnClearLog.UseVisualStyleBackColor = true;
this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click);
//
// lblMsg
//
this.lblMsg.AutoSize = true;
......@@ -1675,6 +1693,17 @@
this.btnUpDownP4.UseVisualStyleBackColor = true;
this.btnUpDownP4.Click += new System.EventHandler(this.btnUpDownP4_Click);
//
// btnClearLog
//
this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearLog.Location = new System.Drawing.Point(313, 515);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 38);
this.btnClearLog.TabIndex = 224;
this.btnClearLog.Text = "清理日志";
this.btnClearLog.UseVisualStyleBackColor = true;
this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click);
//
// menuStrip1
//
this.menuStrip1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -2258,6 +2287,7 @@
// tabPage3
//
this.tabPage3.Controls.Add(this.btnCloseLed);
this.tabPage3.Controls.Add(this.btnClearLog);
this.tabPage3.Controls.Add(this.btnOpenLed);
this.tabPage3.Controls.Add(this.btnCloseDoor);
this.tabPage3.Controls.Add(this.btnOpenDoor);
......@@ -2272,9 +2302,9 @@
// btnCloseLed
//
this.btnCloseLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseLed.Location = new System.Drawing.Point(144, 470);
this.btnCloseLed.Location = new System.Drawing.Point(149, 568);
this.btnCloseLed.Name = "btnCloseLed";
this.btnCloseLed.Size = new System.Drawing.Size(102, 34);
this.btnCloseLed.Size = new System.Drawing.Size(105, 38);
this.btnCloseLed.TabIndex = 260;
this.btnCloseLed.Text = "关闭照明";
this.btnCloseLed.UseVisualStyleBackColor = true;
......@@ -2283,9 +2313,9 @@
// btnOpenLed
//
this.btnOpenLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenLed.Location = new System.Drawing.Point(27, 470);
this.btnOpenLed.Location = new System.Drawing.Point(32, 568);
this.btnOpenLed.Name = "btnOpenLed";
this.btnOpenLed.Size = new System.Drawing.Size(102, 34);
this.btnOpenLed.Size = new System.Drawing.Size(105, 38);
this.btnOpenLed.TabIndex = 259;
this.btnOpenLed.Text = "打开照明";
this.btnOpenLed.UseVisualStyleBackColor = true;
......@@ -2294,9 +2324,9 @@
// btnCloseDoor
//
this.btnCloseDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDoor.Location = new System.Drawing.Point(144, 419);
this.btnCloseDoor.Location = new System.Drawing.Point(149, 515);
this.btnCloseDoor.Name = "btnCloseDoor";
this.btnCloseDoor.Size = new System.Drawing.Size(102, 34);
this.btnCloseDoor.Size = new System.Drawing.Size(105, 38);
this.btnCloseDoor.TabIndex = 258;
this.btnCloseDoor.Text = "关闭仓门";
this.btnCloseDoor.UseVisualStyleBackColor = true;
......@@ -2304,9 +2334,9 @@
// btnOpenDoor
//
this.btnOpenDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDoor.Location = new System.Drawing.Point(27, 419);
this.btnOpenDoor.Location = new System.Drawing.Point(32, 515);
this.btnOpenDoor.Name = "btnOpenDoor";
this.btnOpenDoor.Size = new System.Drawing.Size(102, 34);
this.btnOpenDoor.Size = new System.Drawing.Size(105, 38);
this.btnOpenDoor.TabIndex = 257;
this.btnOpenDoor.Text = "打开仓门";
this.btnOpenDoor.UseVisualStyleBackColor = true;
......@@ -2662,36 +2692,6 @@
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(127, 40);
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(329, 40);
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(224, 40);
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);
......
......@@ -169,6 +169,10 @@ namespace OnlineStore.ACSingleStore
private DateTime preReadModblsTime = DateTime.Now;
private void timer1_Tick(object sender, EventArgs e)
{
if (!this.Visible)
{
return;
}
//HumitureServer.RandomData(store.Config.GetTempAddrList());
lblTemp.Text = store.currTempStr;
//验证运动是否完成
......@@ -1250,17 +1254,23 @@ namespace OnlineStore.ACSingleStore
private void 显示ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmPwd fw = new FrmPwd(10);
DialogResult result = fw.ShowDialog();
if (!result.Equals(DialogResult.OK))
try
{
LogUtil.info("切换界面显示时,没有正确输入密码");
return;
FrmPwd fw = new FrmPwd(10);
DialogResult result = fw.ShowDialog();
if (!result.Equals(DialogResult.OK))
{
LogUtil.info("切换界面显示时,没有正确输入密码");
return;
}
this.Visible = true;
this.WindowState = FormWindowState.Maximized;
this.notifyIcon1.Visible = false;
this.ShowInTaskbar = true;
}catch(Exception ex)
{
LogUtil.error("显示界面出错:"+ex.ToString());
}
this.Visible = true;
this.WindowState = FormWindowState.Maximized;
this.notifyIcon1.Visible = false;
this.ShowInTaskbar = true;
}
private void ExitApp()
{
......
......@@ -1263,7 +1263,7 @@
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
<value>169</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
......
......@@ -303,7 +303,7 @@ namespace OnlineStore.DeviceLibrary
//if (isHomeEnd.Equals(1))
//{
int value = 2000;
LogUtil.info("轴【" + portName + "】原点返回时发现原点已亮且回过原点,需要先相对走" + value);
LogUtil.info("轴【" + portName + "_" + slvAddr + "】原点返回时发现原点已亮且回过原点,需要先相对走" + value);
RelMove(portName, slvAddr, value);
bool isStop = false;
for (int i = 0; i <= 10; i++)
......@@ -312,13 +312,13 @@ namespace OnlineStore.DeviceLibrary
if (GetBusyStatus(portName, slvAddr).Equals(0))
{
isStop = true;
LogUtil.info("轴【" + portName + "相对走" + value + "已结束");
LogUtil.info("轴【" + portName + "_" + slvAddr + "】相对走" + value + "已结束");
break;
}
}
if (!isStop)
{
LogUtil.info("轴【" + portName + "相对走" + value + "已等待2分钟,直接停止");
LogUtil.info("轴【" + portName + "_" + slvAddr + "】相对走" + value + "已等待2分钟,直接停止");
SuddenStop(portName, slvAddr);
}
//}
......@@ -326,7 +326,7 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("轴【" + portName + "】原点返回前验证是否在原点出错:" + ex.StackTrace);
LogUtil.error("轴【" + portName + "_" + slvAddr + "】原点返回前验证是否在原点出错:" + ex.StackTrace);
}
UpdateBlock(portName, slvAddr, ACCMDManager.Block_HomeMove1);
LogUtil.debug("回原点:反方向");
......@@ -341,7 +341,7 @@ namespace OnlineStore.DeviceLibrary
if ((preSpeed.Equals(-1)) || (!preSpeed.Equals(Math.Abs(speed))))
{
string v1 = slvAddr + "064601 " + ACServerManager.SpeedToStr(speed, 4) + " ffff";
LogUtil.debug("轴【" + portName + "】更新速度为【" + speed + "】,发送数据【" + v1 + "】");
LogUtil.debug("轴【" + portName + "_" + slvAddr + "】更新速度为【" + speed + "】,发送数据【" + v1 + "】");
SendStrAndSleep(portName, v1, SleepMSendons);
UpdateAddrValue(portName,slvAddr, ACCMDManager.Speed_Addr, Math.Abs(speed));
Thread.Sleep(SleepMSendons);
......
......@@ -1101,19 +1101,9 @@ namespace OnlineStore.DeviceLibrary
{
isWaitScan = false;
IsScanCode = true;
//BeginScannering();
//判断料盘尺寸
if (GetSize() <= 7)
{
LogUtil.info(StoreName + "检测到寸料盘,开始扫码");
GetCameraCode();
}
else
{
LogUtil.info(StoreName + "检测到大于7寸的料盘,请放入正确的料盘");
IsScanCode = false;
}
LogUtil.info(StoreName + "检测到寸料盘,开始扫码");
GetCameraCode();
}
}
else
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!