Commit af778d55 刘韬

优化安全管控, 所有门没有关闭不得控制伺服

1 个父辈 0a13027d
...@@ -212,6 +212,14 @@ namespace DeviceLibrary ...@@ -212,6 +212,14 @@ namespace DeviceLibrary
} }
public bool IsAllDoorClosed() { public bool IsAllDoorClosed() {
if (IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.LOW))
{
return false;
}
if (IOValue(IO_Type.Entry_Drawer).Equals(IO_VALUE.LOW))
{
return false;
}
if (IOValue(IO_Type.PrinterDoor_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.PrinterDoor_Check).Equals(IO_VALUE.LOW))
{ {
return false; return false;
......
...@@ -77,6 +77,11 @@ namespace DeviceLibrary ...@@ -77,6 +77,11 @@ namespace DeviceLibrary
private bool CanMove() private bool CanMove()
{ {
if (RobotManage.isRunning) {
MessageBox.Show(crc.GetString("Res0029", "系统正在运行,不能手动控制伺服"), crc.GetString("Res0123", "警告 "), MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (axis == null) if (axis == null)
{ {
MessageBox.Show(crc.GetString("Res0122","请先选择运动轴"), crc.GetString("Res0123","警告 "), MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(crc.GetString("Res0122","请先选择运动轴"), crc.GetString("Res0123","警告 "), MessageBoxButtons.OK, MessageBoxIcon.Error);
......
...@@ -53,11 +53,13 @@ namespace TheMachine ...@@ -53,11 +53,13 @@ namespace TheMachine
this.axisMoveControl1.Size = new System.Drawing.Size(559, 400); this.axisMoveControl1.Size = new System.Drawing.Size(559, 400);
this.axisMoveControl1.TabIndex = 0; this.axisMoveControl1.TabIndex = 0;
this.axisMoveControl1.Tag = "not"; this.axisMoveControl1.Tag = "not";
this.axisMoveControl1.Load += new System.EventHandler(this.axisMoveControl1_Load);
// //
// configControl1 // configControl1
// //
this.configControl1.Config = null;
this.configControl1.Location = new System.Drawing.Point(568, 3); this.configControl1.Location = new System.Drawing.Point(568, 3);
this.configControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.configControl1.Margin = new System.Windows.Forms.Padding(4);
this.configControl1.Name = "configControl1"; this.configControl1.Name = "configControl1";
this.configControl1.Size = new System.Drawing.Size(647, 627); this.configControl1.Size = new System.Drawing.Size(647, 627);
this.configControl1.TabIndex = 1; this.configControl1.TabIndex = 1;
......
...@@ -56,5 +56,10 @@ namespace TheMachine ...@@ -56,5 +56,10 @@ namespace TheMachine
{ {
} }
private void axisMoveControl1_Load(object sender, EventArgs e)
{
}
} }
} }
...@@ -148,7 +148,7 @@ namespace TheMachine ...@@ -148,7 +148,7 @@ namespace TheMachine
NgInfoView.Columns.Add(n1); NgInfoView.Columns.Add(n1);
NgInfoView.Columns.Add(n2); NgInfoView.Columns.Add(n2);
NgInfoView.Columns.Add(n3); NgInfoView.Columns.Add(n3);
NgInfoView.Columns.Add(n4); NgInfoView.Columns.Add(n4);
NgInfoView.Columns.Add(n5); NgInfoView.Columns.Add(n5);
NgInfoView.ColumnWidthChanging += listView_ColumnWidthChanging; NgInfoView.ColumnWidthChanging += listView_ColumnWidthChanging;
#endregion #endregion
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!