Commit 52a58a0b 张东亮

光栅暂停功能添加

1 个父辈 ffd8084d
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
this.btnOpenRobotService = new System.Windows.Forms.Button(); this.btnOpenRobotService = new System.Windows.Forms.Button();
this.ucRobot1 = new JAKA.UCRobot(); this.ucRobot1 = new JAKA.UCRobot();
this.panBase = new System.Windows.Forms.Panel(); this.panBase = new System.Windows.Forms.Panel();
this.chbMoveStop = new System.Windows.Forms.CheckBox(); this.btnMoveStop = new System.Windows.Forms.Button();
this.lblName = new System.Windows.Forms.Label(); this.lblName = new System.Windows.Forms.Label();
this.chbDebug = new System.Windows.Forms.CheckBox(); this.chbDebug = new System.Windows.Forms.CheckBox();
this.lblStoreStatus = new System.Windows.Forms.Label(); this.lblStoreStatus = new System.Windows.Forms.Label();
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
this.txtDOIndex.Location = new System.Drawing.Point(436, 25); this.txtDOIndex.Location = new System.Drawing.Point(436, 25);
this.txtDOIndex.MaxLength = 10; this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex"; this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(40, 23); this.txtDOIndex.Size = new System.Drawing.Size(40, 27);
this.txtDOIndex.TabIndex = 276; this.txtDOIndex.TabIndex = 276;
this.txtDOIndex.Text = "0"; this.txtDOIndex.Text = "0";
this.txtDOIndex.Visible = false; this.txtDOIndex.Visible = false;
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
this.txtDoName.Location = new System.Drawing.Point(410, 25); this.txtDoName.Location = new System.Drawing.Point(410, 25);
this.txtDoName.MaxLength = 10; this.txtDoName.MaxLength = 10;
this.txtDoName.Name = "txtDoName"; this.txtDoName.Name = "txtDoName";
this.txtDoName.Size = new System.Drawing.Size(27, 23); this.txtDoName.Size = new System.Drawing.Size(27, 27);
this.txtDoName.TabIndex = 275; this.txtDoName.TabIndex = 275;
this.txtDoName.Text = "0"; this.txtDoName.Text = "0";
this.txtDoName.Visible = false; this.txtDoName.Visible = false;
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
this.lblAddr.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblAddr.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblAddr.Location = new System.Drawing.Point(286, 28); this.lblAddr.Location = new System.Drawing.Point(286, 28);
this.lblAddr.Name = "lblAddr"; this.lblAddr.Name = "lblAddr";
this.lblAddr.Size = new System.Drawing.Size(35, 17); this.lblAddr.Size = new System.Drawing.Size(43, 20);
this.lblAddr.TabIndex = 274; this.lblAddr.TabIndex = 274;
this.lblAddr.Text = "设备:"; this.lblAddr.Text = "设备:";
this.lblAddr.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblAddr.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
this.txtWriteTime.Location = new System.Drawing.Point(84, 69); this.txtWriteTime.Location = new System.Drawing.Point(84, 69);
this.txtWriteTime.MaxLength = 10; this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime"; this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(58, 23); this.txtWriteTime.Size = new System.Drawing.Size(58, 27);
this.txtWriteTime.TabIndex = 271; this.txtWriteTime.TabIndex = 271;
this.txtWriteTime.Text = "0"; this.txtWriteTime.Text = "0";
// //
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(18, 72); this.label5.Location = new System.Drawing.Point(18, 72);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 17); this.label5.Size = new System.Drawing.Size(74, 20);
this.label5.TabIndex = 270; this.label5.TabIndex = 270;
this.label5.Text = "定时(ms):"; this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
this.txtSlaveId.Location = new System.Drawing.Point(492, 25); this.txtSlaveId.Location = new System.Drawing.Point(492, 25);
this.txtSlaveId.MaxLength = 10; this.txtSlaveId.MaxLength = 10;
this.txtSlaveId.Name = "txtSlaveId"; this.txtSlaveId.Name = "txtSlaveId";
this.txtSlaveId.Size = new System.Drawing.Size(18, 23); this.txtSlaveId.Size = new System.Drawing.Size(18, 27);
this.txtSlaveId.TabIndex = 255; this.txtSlaveId.TabIndex = 255;
this.txtSlaveId.Text = "0"; this.txtSlaveId.Text = "0";
this.txtSlaveId.Visible = false; this.txtSlaveId.Visible = false;
...@@ -312,9 +312,9 @@ ...@@ -312,9 +312,9 @@
// tabPage3 // tabPage3
// //
this.tabPage3.Controls.Add(this.groupBox6); this.tabPage3.Controls.Add(this.groupBox6);
this.tabPage3.Location = new System.Drawing.Point(4, 26); this.tabPage3.Location = new System.Drawing.Point(4, 29);
this.tabPage3.Name = "tabPage3"; this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(985, 521); this.tabPage3.Size = new System.Drawing.Size(985, 518);
this.tabPage3.TabIndex = 2; this.tabPage3.TabIndex = 2;
this.tabPage3.Text = " 设备状态 "; this.tabPage3.Text = " 设备状态 ";
this.tabPage3.UseVisualStyleBackColor = true; this.tabPage3.UseVisualStyleBackColor = true;
...@@ -363,7 +363,7 @@ ...@@ -363,7 +363,7 @@
this.lblMoveInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblMoveInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblMoveInfo.Location = new System.Drawing.Point(5, 44); this.lblMoveInfo.Location = new System.Drawing.Point(5, 44);
this.lblMoveInfo.Name = "lblMoveInfo"; this.lblMoveInfo.Name = "lblMoveInfo";
this.lblMoveInfo.Size = new System.Drawing.Size(68, 17); this.lblMoveInfo.Size = new System.Drawing.Size(84, 20);
this.lblMoveInfo.TabIndex = 280; this.lblMoveInfo.TabIndex = 280;
this.lblMoveInfo.Text = "运动信息:"; this.lblMoveInfo.Text = "运动信息:";
// //
...@@ -399,9 +399,9 @@ ...@@ -399,9 +399,9 @@
this.tabPage5.Controls.Add(this.groupBox2); this.tabPage5.Controls.Add(this.groupBox2);
this.tabPage5.Controls.Add(this.checkBoxEdit); this.tabPage5.Controls.Add(this.checkBoxEdit);
this.tabPage5.Controls.Add(this.axisMoveControl1); this.tabPage5.Controls.Add(this.axisMoveControl1);
this.tabPage5.Location = new System.Drawing.Point(4, 26); this.tabPage5.Location = new System.Drawing.Point(4, 29);
this.tabPage5.Name = "tabPage5"; this.tabPage5.Name = "tabPage5";
this.tabPage5.Size = new System.Drawing.Size(985, 521); this.tabPage5.Size = new System.Drawing.Size(985, 518);
this.tabPage5.TabIndex = 5; this.tabPage5.TabIndex = 5;
this.tabPage5.Text = "伺服信息"; this.tabPage5.Text = "伺服信息";
this.tabPage5.UseVisualStyleBackColor = true; this.tabPage5.UseVisualStyleBackColor = true;
...@@ -624,7 +624,7 @@ ...@@ -624,7 +624,7 @@
this.checkBoxEdit.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.checkBoxEdit.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBoxEdit.Location = new System.Drawing.Point(666, 370); this.checkBoxEdit.Location = new System.Drawing.Point(666, 370);
this.checkBoxEdit.Name = "checkBoxEdit"; this.checkBoxEdit.Name = "checkBoxEdit";
this.checkBoxEdit.Size = new System.Drawing.Size(93, 26); this.checkBoxEdit.Size = new System.Drawing.Size(114, 31);
this.checkBoxEdit.TabIndex = 3; this.checkBoxEdit.TabIndex = 3;
this.checkBoxEdit.Text = "启用编辑"; this.checkBoxEdit.Text = "启用编辑";
this.checkBoxEdit.UseVisualStyleBackColor = true; this.checkBoxEdit.UseVisualStyleBackColor = true;
...@@ -642,10 +642,10 @@ ...@@ -642,10 +642,10 @@
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.groupBox3); this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.groupBox4); this.tabPage1.Controls.Add(this.groupBox4);
this.tabPage1.Location = new System.Drawing.Point(4, 26); this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(985, 521); this.tabPage1.Size = new System.Drawing.Size(985, 518);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " IO列表 "; this.tabPage1.Text = " IO列表 ";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
...@@ -656,9 +656,9 @@ ...@@ -656,9 +656,9 @@
this.tabPage4.Controls.Add(this.btnColseRobotService); this.tabPage4.Controls.Add(this.btnColseRobotService);
this.tabPage4.Controls.Add(this.btnOpenRobotService); this.tabPage4.Controls.Add(this.btnOpenRobotService);
this.tabPage4.Controls.Add(this.ucRobot1); this.tabPage4.Controls.Add(this.ucRobot1);
this.tabPage4.Location = new System.Drawing.Point(4, 26); this.tabPage4.Location = new System.Drawing.Point(4, 29);
this.tabPage4.Name = "tabPage4"; this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(985, 521); this.tabPage4.Size = new System.Drawing.Size(985, 518);
this.tabPage4.TabIndex = 4; this.tabPage4.TabIndex = 4;
this.tabPage4.Text = "机器人"; this.tabPage4.Text = "机器人";
this.tabPage4.UseVisualStyleBackColor = true; this.tabPage4.UseVisualStyleBackColor = true;
...@@ -669,7 +669,7 @@ ...@@ -669,7 +669,7 @@
this.chkManualRobot.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chkManualRobot.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkManualRobot.Location = new System.Drawing.Point(758, 160); this.chkManualRobot.Location = new System.Drawing.Point(758, 160);
this.chkManualRobot.Name = "chkManualRobot"; this.chkManualRobot.Name = "chkManualRobot";
this.chkManualRobot.Size = new System.Drawing.Size(141, 26); this.chkManualRobot.Size = new System.Drawing.Size(174, 31);
this.chkManualRobot.TabIndex = 3; this.chkManualRobot.TabIndex = 3;
this.chkManualRobot.Text = "手动操作机器人"; this.chkManualRobot.Text = "手动操作机器人";
this.chkManualRobot.UseVisualStyleBackColor = true; this.chkManualRobot.UseVisualStyleBackColor = true;
...@@ -700,7 +700,7 @@ ...@@ -700,7 +700,7 @@
// ucRobot1 // ucRobot1
// //
this.ucRobot1.Location = new System.Drawing.Point(4, 13); this.ucRobot1.Location = new System.Drawing.Point(4, 13);
this.ucRobot1.Margin = new System.Windows.Forms.Padding(4); this.ucRobot1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ucRobot1.Name = "ucRobot1"; this.ucRobot1.Name = "ucRobot1";
this.ucRobot1.Size = new System.Drawing.Size(550, 428); this.ucRobot1.Size = new System.Drawing.Size(550, 428);
this.ucRobot1.TabIndex = 0; this.ucRobot1.TabIndex = 0;
...@@ -710,7 +710,7 @@ ...@@ -710,7 +710,7 @@
this.panBase.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.panBase.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panBase.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panBase.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panBase.Controls.Add(this.chbMoveStop); this.panBase.Controls.Add(this.btnMoveStop);
this.panBase.Controls.Add(this.lblName); this.panBase.Controls.Add(this.lblName);
this.panBase.Controls.Add(this.chbDebug); this.panBase.Controls.Add(this.chbDebug);
this.panBase.Controls.Add(this.lblStoreStatus); this.panBase.Controls.Add(this.lblStoreStatus);
...@@ -721,17 +721,18 @@ ...@@ -721,17 +721,18 @@
this.panBase.Size = new System.Drawing.Size(997, 50); this.panBase.Size = new System.Drawing.Size(997, 50);
this.panBase.TabIndex = 260; this.panBase.TabIndex = 260;
// //
// chbMoveStop // btnMoveStop
// //
this.chbMoveStop.AutoSize = true; this.btnMoveStop.BackColor = System.Drawing.Color.Yellow;
this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnMoveStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.chbMoveStop.Location = new System.Drawing.Point(597, 14); this.btnMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbMoveStop.Name = "chbMoveStop"; this.btnMoveStop.Location = new System.Drawing.Point(414, 3);
this.chbMoveStop.Size = new System.Drawing.Size(84, 24); this.btnMoveStop.Name = "btnMoveStop";
this.chbMoveStop.TabIndex = 262; this.btnMoveStop.Size = new System.Drawing.Size(105, 40);
this.chbMoveStop.Text = "暂停运动"; this.btnMoveStop.TabIndex = 263;
this.chbMoveStop.UseVisualStyleBackColor = true; this.btnMoveStop.Text = "暂停运动";
this.chbMoveStop.Click += new System.EventHandler(this.chbMoveStop_CheckedChanged); this.btnMoveStop.UseVisualStyleBackColor = false;
this.btnMoveStop.Click += new System.EventHandler(this.btnMoveStop_Click);
// //
// lblName // lblName
// //
...@@ -749,9 +750,9 @@ ...@@ -749,9 +750,9 @@
// //
this.chbDebug.AutoSize = true; 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.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(496, 14); this.chbDebug.Location = new System.Drawing.Point(561, 12);
this.chbDebug.Name = "chbDebug"; this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(84, 24); this.chbDebug.Size = new System.Drawing.Size(104, 28);
this.chbDebug.TabIndex = 247; this.chbDebug.TabIndex = 247;
this.chbDebug.Text = "调试状态"; this.chbDebug.Text = "调试状态";
this.chbDebug.UseVisualStyleBackColor = true; this.chbDebug.UseVisualStyleBackColor = true;
...@@ -765,7 +766,7 @@ ...@@ -765,7 +766,7 @@
this.lblStoreStatus.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblStoreStatus.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblStoreStatus.Location = new System.Drawing.Point(701, 15); this.lblStoreStatus.Location = new System.Drawing.Point(701, 15);
this.lblStoreStatus.Name = "lblStoreStatus"; this.lblStoreStatus.Name = "lblStoreStatus";
this.lblStoreStatus.Size = new System.Drawing.Size(65, 20); this.lblStoreStatus.Size = new System.Drawing.Size(82, 24);
this.lblStoreStatus.TabIndex = 245; this.lblStoreStatus.TabIndex = 245;
this.lblStoreStatus.Text = "等待启动"; this.lblStoreStatus.Text = "等待启动";
this.lblStoreStatus.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblStoreStatus.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -798,7 +799,7 @@ ...@@ -798,7 +799,7 @@
// //
// FrmRobotEquip // FrmRobotEquip
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1004, 611); this.ClientSize = new System.Drawing.Size(1004, 611);
this.Controls.Add(this.panBase); this.Controls.Add(this.panBase);
...@@ -853,7 +854,6 @@ ...@@ -853,7 +854,6 @@
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtSlaveId; private System.Windows.Forms.TextBox txtSlaveId;
protected System.Windows.Forms.Panel panBase; protected System.Windows.Forms.Panel panBase;
protected System.Windows.Forms.CheckBox chbMoveStop;
protected System.Windows.Forms.Label lblName; protected System.Windows.Forms.Label lblName;
protected System.Windows.Forms.CheckBox chbDebug; protected System.Windows.Forms.CheckBox chbDebug;
protected System.Windows.Forms.Label lblStoreStatus; protected System.Windows.Forms.Label lblStoreStatus;
...@@ -891,6 +891,7 @@ ...@@ -891,6 +891,7 @@
private System.Windows.Forms.CheckBox checkBoxEdit; private System.Windows.Forms.CheckBox checkBoxEdit;
private System.Windows.Forms.CheckBox chkManualRobot; private System.Windows.Forms.CheckBox chkManualRobot;
private System.Windows.Forms.Label lblrobotTaskInfo; private System.Windows.Forms.Label lblrobotTaskInfo;
protected System.Windows.Forms.Button btnMoveStop;
} }
} }
...@@ -37,7 +37,6 @@ namespace OnlineStore.CarriageClient ...@@ -37,7 +37,6 @@ namespace OnlineStore.CarriageClient
} }
private void FrmStoreIOStatus_Load(object sender, EventArgs e) private void FrmStoreIOStatus_Load(object sender, EventArgs e)
{ {
chbMoveStop.Checked = robotEquip.MoveStop;
lblStoreStatus.Text = DeviceBase.GetRunStr(robotEquip.runStatus); lblStoreStatus.Text = DeviceBase.GetRunStr(robotEquip.runStatus);
lblThisSta.Text = robotEquip.WarnMsg; lblThisSta.Text = robotEquip.WarnMsg;
...@@ -203,10 +202,6 @@ namespace OnlineStore.CarriageClient ...@@ -203,10 +202,6 @@ namespace OnlineStore.CarriageClient
{ {
try try
{ {
if (!this.Visible)
{
return;
}
ReadIOList(); ReadIOList();
//ReadBtnDO(); //ReadBtnDO();
// clampJawControl1.UpdateSta(); // clampJawControl1.UpdateSta();
...@@ -217,6 +212,16 @@ namespace OnlineStore.CarriageClient ...@@ -217,6 +212,16 @@ namespace OnlineStore.CarriageClient
{ {
FormStatus(true); FormStatus(true);
} }
if (robotEquip.MoveStop)
{
btnMoveStop.Text = "恢复运动";
btnMoveStop.BackColor = Color.Green;
}
else
{
btnMoveStop.Text = "暂停运动";
btnMoveStop.BackColor = Color.Yellow;
}
} }
else else
{ {
...@@ -240,7 +245,7 @@ namespace OnlineStore.CarriageClient ...@@ -240,7 +245,7 @@ namespace OnlineStore.CarriageClient
{ {
lblInoutInfo.Text = ""; lblInoutInfo.Text = "";
} }
lblrobotTaskInfo.Text =$"{SServerManager.RobotTaskInfo}\r\n{SServerManager.BoxDoorStatus}" ; lblrobotTaskInfo.Text = $"{SServerManager.RobotTaskInfo}\r\n{SServerManager.BoxDoorStatus}";
lblMoveInfo.Text = robotEquip.GetMoveStr();//+ "料仓类型:" + (boxBean.Config.IsBigTray.Equals(1) ? "大料盘" : "小料盘"); lblMoveInfo.Text = robotEquip.GetMoveStr();//+ "料仓类型:" + (boxBean.Config.IsBigTray.Equals(1) ? "大料盘" : "小料盘");
//string canOut = boxBean.CanOutStore(boxBean.DeviceID) ? "可出库" : "不可出库"; //string canOut = boxBean.CanOutStore(boxBean.DeviceID) ? "可出库" : "不可出库";
lblStoreStatus.Text = DeviceBase.GetRunStr(robotEquip.runStatus);// + "(" + canOut + ")"; lblStoreStatus.Text = DeviceBase.GetRunStr(robotEquip.runStatus);// + "(" + canOut + ")";
...@@ -492,17 +497,6 @@ namespace OnlineStore.CarriageClient ...@@ -492,17 +497,6 @@ namespace OnlineStore.CarriageClient
tabcon.Controls.Add(lineTabPage); tabcon.Controls.Add(lineTabPage);
} }
private void chbMoveStop_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
robotEquip.MoveStop = chbMoveStop.Checked;
LogUtil.info(robotEquip.Name + "用户切换是否暂停: " + robotEquip.MoveStop);
}
private void btnCloseAll_Click(object sender, EventArgs e) private void btnCloseAll_Click(object sender, EventArgs e)
{ {
...@@ -577,9 +571,28 @@ namespace OnlineStore.CarriageClient ...@@ -577,9 +571,28 @@ namespace OnlineStore.CarriageClient
ucRobot1.Update(jAKABean.RobotData); ucRobot1.Update(jAKABean.RobotData);
} }
} }
catch(Exception ex) catch (Exception ex)
{
LogUtil.error("chkManualRobot_CheckedChanged", ex);
}
}
private void btnMoveStop_Click(object sender, EventArgs e)
{
if (robotEquip.runStatus <= RunStatus.Wait)
{
MessageBox.Show(robotEquip.Name + "请先启动设备", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
if (robotEquip.MoveStop)
{
robotEquip.Resume();
LogUtil.info($"用户点击恢复运动按钮");
}
else
{ {
LogUtil.error("chkManualRobot_CheckedChanged",ex); robotEquip.Pause();
LogUtil.info($"用户点击暂停运动按钮");
} }
} }
......
...@@ -63,6 +63,7 @@ DI,1,13寸料盘顶升下降端,Inlet_13InchJackDownSig,9,HC,X09,,,,,,,,,,,, ...@@ -63,6 +63,7 @@ DI,1,13寸料盘顶升下降端,Inlet_13InchJackDownSig,9,HC,X09,,,,,,,,,,,,
DI,3,NG料暂存区料盘检测,NGBox_TrayCheck,10,HC,X10,,,,,,,,,,,, DI,3,NG料暂存区料盘检测,NGBox_TrayCheck,10,HC,X10,,,,,,,,,,,,
DI,3,机械臂料盘检测,RobotArm_TrayCheck,11,HC,X11,,,,,,,,,,,, DI,3,机械臂料盘检测,RobotArm_TrayCheck,11,HC,X11,,,,,,,,,,,,
DI,3,机械臂夹紧检测,RobotArm_ClampingSig,12,HC,X12,,,,,,,,,,,, DI,3,机械臂夹紧检测,RobotArm_ClampingSig,12,HC,X12,,,,,,,,,,,,
DI,3,安全光栅,SafetyLightGrids,18,HC,X18,,,,,,,,,,,,
DI,2,出料线体顶升上升端,Outlet_JackUpSig,13,HC,X13,,,,,,,,,,,, DI,2,出料线体顶升上升端,Outlet_JackUpSig,13,HC,X13,,,,,,,,,,,,
DI,2,出料线体顶升下降端,Outlet_JackDownSig,14,HC,X14,,,,,,,,,,,, DI,2,出料线体顶升下降端,Outlet_JackDownSig,14,HC,X14,,,,,,,,,,,,
DI,2,出料线体料盘检测1,Outlet_TrayCheck1,15,HC,X15,,,,,,,,,,,, DI,2,出料线体料盘检测1,Outlet_TrayCheck1,15,HC,X15,,,,,,,,,,,,
......
...@@ -75,7 +75,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,7 +75,6 @@ namespace OnlineStore.DeviceLibrary
return; return;
} }
if (MoveInfo.MoveType.Equals(MoveType.RHome)) if (MoveInfo.MoveType.Equals(MoveType.RHome))
{ {
ResetProcess(); ResetProcess();
......
...@@ -470,54 +470,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -470,54 +470,21 @@ namespace OnlineStore.DeviceLibrary
} }
} }
#endregion #endregion
#region 门禁 #region 门禁光栅
//门禁状态:0正常。1=安全门禁打开,已停止运动
private int CurrSecurityAccess = 0;
protected void SecurityAccessProcess() protected void SecurityAccessProcess()
{ {
try try
{ {
//if (!baseConfig.DIList.ContainsKey(IO_Type.LeftDoor_Limit)) if(!MoveStop)
//{ {
// return; if (IOValue(IO_Type.SafetyLightGrids).Equals(IO_VALUE.LOW))
//} {
//if (!baseConfig.DIList.ContainsKey(IO_Type.RightDoor_Limit)) Pause();
//{ LogUtil.info("安全光栅触发,停止行走机构和机器人运动");
// return; }
//}
//if (!baseConfig.DIList.ContainsKey(IO_Type.BackDoor_Limit))
//{
// return;
//}
if (CurrSecurityAccess.Equals(0))
{
//if (StoreManager.DisBoxSecurityAccess)
//{
//}
//else if (IOValue(IO_Type.LeftDoor_Limit).Equals(IO_VALUE.LOW))
//{
// SecurityAccessStop("左前门门禁");
//}
//else if (IOValue(IO_Type.RightDoor_Limit).Equals(IO_VALUE.LOW))
//{
// SecurityAccessStop("右前门门禁");
//}
//else if (IOValue(IO_Type.BackDoor_Limit).Equals(IO_VALUE.LOW))
//{
// SecurityAccessStop("后门门禁");
//}
}
else if (CurrSecurityAccess.Equals(1))
{
//if (IOValue(IO_Type.LeftDoor_Limit).Equals(IO_VALUE.HIGH) &&
// IOValue(IO_Type.RightDoor_Limit).Equals(IO_VALUE.HIGH) &&
// IOValue(IO_Type.BackDoor_Limit).Equals(IO_VALUE.HIGH))
//{
// SecurityAccessReset();
//}
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -525,56 +492,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -525,56 +492,19 @@ namespace OnlineStore.DeviceLibrary
} }
} }
public void Pause()
//private void SecurityAccessStop(string doorname) {
//{ MoveStop = true;
// if (!baseConfig.DIList.ContainsKey(IO_Type.LeftDoor_Limit)) CompressAxis.SuddenStop();
// { MoveAxis.SuddenStop();
// return; RobotPause();
// } MoveInfo.CanWhileCount = 5;
// if (!baseConfig.DIList.ContainsKey(IO_Type.RightDoor_Limit)) }
// { public void Resume()
// return; {
// } MoveStop = false;
// if (!baseConfig.DIList.ContainsKey(IO_Type.BackDoor_Limit)) RobotResume();
// { }
// return;
// }
// CurrSecurityAccess = 1;
// if (alarmType > (AlarmType.IoSingleTimeOut))
// {
// return;
// }
// LogUtil.info($"{Name} {doorname}被打开,停止当前运动{MoveInfo.MoveType},MoveStop={MoveStop},报警急停");
// SetWarnMsg($"{doorname}被打开,报警急停");
// Alarm(AlarmType.SuddenStop);
//}
//private void SecurityAccessReset()
//{
// if (!baseConfig.DIList.ContainsKey(IO_Type.LeftDoor_Limit))
// {
// return;
// }
// if (!baseConfig.DIList.ContainsKey(IO_Type.RightDoor_Limit))
// {
// return;
// }
// if (!baseConfig.DIList.ContainsKey(IO_Type.BackDoor_Limit))
// {
// return;
// }
// CurrSecurityAccess = 0;
// MoveStop = false;
// if (alarmType > (AlarmType.IoSingleTimeOut))
// {
// return;
// }
// //光栅恢复处理
//}
#endregion #endregion
......
using CodeLibrary; using CodeLibrary;
using log4net.Util;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -343,6 +344,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -343,6 +344,23 @@ namespace OnlineStore.DeviceLibrary
bean.MotionAbort(); bean.MotionAbort();
} }
} }
public bool RobotPause()
{
if (GetRobotInfo(out JAKA.JAKABean bean))
{
return bean.Pause();
}
return false;
}
public bool RobotResume()
{
if (GetRobotInfo(out JAKA.JAKABean bean))
{
return bean.Resume();
}
return false;
}
#endregion #endregion
#region 行走机构 #region 行走机构
......
...@@ -101,7 +101,10 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -101,7 +101,10 @@ namespace OnlineStore.LoadCSVLibrary
/// DI,2,出料线体允许送料,Outlet_AllowFeedSig,17,HC,X17,,,,,,,,,,,, /// DI,2,出料线体允许送料,Outlet_AllowFeedSig,17,HC,X17,,,,,,,,,,,,
/// </summary> /// </summary>
public static string Outlet_AllowFeedSig = "Outlet_AllowFeedSig"; public static string Outlet_AllowFeedSig = "Outlet_AllowFeedSig";
/// <summary>
/// DI,3,安全光栅,SafetyLightGrids,18,HC,X18,,,,,,,,,,,,
/// </summary>
public static string SafetyLightGrids = "SafetyLightGrids";
/// <summary> /// <summary>
/// DO,1,自动绿色指示灯,RunSign_HddLed,0,HC,Y00,,,,,,,,,,,, /// DO,1,自动绿色指示灯,RunSign_HddLed,0,HC,Y00,,,,,,,,,,,,
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!