Commit dbf9a7a6 ke.sun

1

1 个父辈 764d3101
...@@ -64,10 +64,10 @@ namespace URSoldering.DeviceLibrary ...@@ -64,10 +64,10 @@ namespace URSoldering.DeviceLibrary
} }
Status = RobotStatus.Reset; Status = RobotStatus.Reset;
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH); //KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW); //KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
IsInProcess = false; IsInProcess = false;
ledTimer.Enabled = true; ledTimer.Enabled = true;
...@@ -117,10 +117,10 @@ namespace URSoldering.DeviceLibrary ...@@ -117,10 +117,10 @@ namespace URSoldering.DeviceLibrary
{ {
LogUtil.info(RobotName + "复位完成"); LogUtil.info(RobotName + "复位完成");
Status = RobotStatus.Runing; Status = RobotStatus.Runing;
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH); //KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.HIGH); //KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.HIGH);
} }
} }
else if (Status.Equals(RobotStatus.Runing)) else if (Status.Equals(RobotStatus.Runing))
...@@ -176,7 +176,7 @@ namespace URSoldering.DeviceLibrary ...@@ -176,7 +176,7 @@ namespace URSoldering.DeviceLibrary
private void StopMove() private void StopMove()
{ {
KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW); //KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
WeldRobotBean.StopMove(); WeldRobotBean.StopMove();
this.Status = RobotStatus.Runing; this.Status = RobotStatus.Runing;
} }
...@@ -186,10 +186,10 @@ namespace URSoldering.DeviceLibrary ...@@ -186,10 +186,10 @@ namespace URSoldering.DeviceLibrary
mainTimer.Enabled = false; mainTimer.Enabled = false;
StopMove(); StopMove();
WeldRobotBean.StopRun(); WeldRobotBean.StopRun();
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW); //KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
this.Status = RobotStatus.Wait; this.Status = RobotStatus.Wait;
LogUtil.info(RobotName + "停止运行"); LogUtil.info(RobotName + "停止运行");
......
...@@ -59,7 +59,7 @@ namespace URSoldering.DeviceLibrary ...@@ -59,7 +59,7 @@ namespace URSoldering.DeviceLibrary
this.alarmType = alarmType; this.alarmType = alarmType;
if (AlarmType.SuddenStop.Equals(alarmType)) if (AlarmType.SuddenStop.Equals(alarmType))
{ {
KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.HIGH); //KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.HIGH);
WarnMsg = "收到急停信号"; WarnMsg = "收到急停信号";
WeldRobotBean.Alarm(AlarmType.SuddenStop); WeldRobotBean.Alarm(AlarmType.SuddenStop);
SendWireManager.Release(); SendWireManager.Release();
......
...@@ -174,19 +174,7 @@ namespace URSoldering.DeviceLibrary ...@@ -174,19 +174,7 @@ namespace URSoldering.DeviceLibrary
LogUtil.info(RobotName + "开始启动:JBC送丝器没有连接上"); LogUtil.info(RobotName + "开始启动:JBC送丝器没有连接上");
return "JBC送丝器没有连接上!"; return "JBC送丝器没有连接上!";
} }
//if (URRobotControl.IsRun)
//{
// URPointValue lastPoint = URRobotControl.GetLastPosition();
// TimeSpan span = lastPoint.UpdateTime - DateTime.Now; ;
// if (span.TotalSeconds <= 60 && (lastPoint.Z != 0) && (lastPoint.X != 0))
// {
// string msg = CheckEpsonPoint(lastPoint);
// if (!msg.Equals(""))
// {
// return msg;
// }
// }
//}
IsInSudden = false; IsInSudden = false;
IsNoAir = false; IsNoAir = false;
//开始运行 //开始运行
...@@ -288,7 +276,10 @@ namespace URSoldering.DeviceLibrary ...@@ -288,7 +276,10 @@ namespace URSoldering.DeviceLibrary
{ {
CheckSendWireAlarm(); CheckSendWireAlarm();
} }
CheckRobotAlarm(); if (!WeldMoveStep.moveType.Equals(MoveType.GoHome))
{
CheckRobotAlarm();
}
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -302,6 +293,7 @@ namespace URSoldering.DeviceLibrary ...@@ -302,6 +293,7 @@ namespace URSoldering.DeviceLibrary
{ {
return; return;
} }
if (URRobotControl.WarnMsg.Equals("")) if (URRobotControl.WarnMsg.Equals(""))
{ {
if (URRobotControl.IsRun.Equals(false)) if (URRobotControl.IsRun.Equals(false))
......
...@@ -424,7 +424,7 @@ namespace URSoldering.DeviceLibrary ...@@ -424,7 +424,7 @@ namespace URSoldering.DeviceLibrary
{ {
if (URRobotControl.MoveOK(wait.UrPoint, WeldMoveStep.LastSetpTime).Equals(false)) if (URRobotControl.MoveOK(wait.UrPoint, WeldMoveStep.LastSetpTime).Equals(false))
{ {
NotOkMsg = "机械臂移动到位"; NotOkMsg = "机械臂移动到位"+wait.UrPoint.ToShowStr();
isOk = false; isOk = false;
break; break;
} }
...@@ -558,24 +558,24 @@ namespace URSoldering.DeviceLibrary ...@@ -558,24 +558,24 @@ namespace URSoldering.DeviceLibrary
{ {
if (NotOkMsg.Equals("")) if (NotOkMsg.Equals(""))
{ {
WarnMsg = "等待超时[" + WeldMoveStep.moveType + "][" + WeldMoveStep.moveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalMinutes, 1) + "]分钟";
}
else
{
WarnMsg = "等待超时[" + WeldMoveStep.moveType + "][" + WeldMoveStep.moveStep + "]已等待[" + Math.Round(span.TotalMinutes, 1) + "]分钟,"; WarnMsg = "等待超时[" + WeldMoveStep.moveType + "][" + WeldMoveStep.moveStep + "]已等待[" + Math.Round(span.TotalMinutes, 1) + "]分钟,";
foreach (WaitResultInfo wait in list) foreach (WaitResultInfo wait in list)
{ {
WarnMsg = WarnMsg + "\r\n" + wait.ToStr(); WarnMsg = WarnMsg + "\r\n" + wait.ToStr();
} }
} }
else
{
WarnMsg = "等待超时[" + WeldMoveStep.moveType + "][" + WeldMoveStep.moveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalMinutes, 1) + "]分钟";
}
Alarm(AlarmType.StepTimeOut); Alarm(AlarmType.StepTimeOut);
LogUtil.error(LOGGER, WarnMsg, 12); LogUtil.error(LOGGER, WarnMsg, 12);
//Alarm(StoreAlarmType.IoSingleTimeOut); //Alarm(StoreAlarmType.IoSingleTimeOut);
} }
//else if (span.TotalSeconds > 5&&WeldMoveStep.moveStep<MoveStep.W4_WeldWait&&WeldMoveStep.moveType.Equals(MoveType.Weld)) else if (span.TotalSeconds > 5 && WeldMoveStep.moveType.Equals(MoveType.Weld))
//{ {
// LogUtil.info("焊接[" + WeldMoveStep.moveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒"); LogUtil.info("焊接[" + WeldMoveStep.moveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒");
//} }
} }
} }
else else
......
...@@ -50,50 +50,50 @@ namespace URSoldering.DeviceLibrary ...@@ -50,50 +50,50 @@ namespace URSoldering.DeviceLibrary
/// </summary> /// </summary>
private void LedTimer_Elapsed(object sender, ElapsedEventArgs e) private void LedTimer_Elapsed(object sender, ElapsedEventArgs e)
{ {
if (Status.Equals(RobotStatus.Reset)) //if (Status.Equals(RobotStatus.Reset))
{ //{
if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.LOW)) // if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.LOW))
{ // {
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH); // KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
} // }
if (KNDIOValue(IO_Type.WaitSingle).Equals(IO_VALUE.HIGH)) // if (KNDIOValue(IO_Type.WaitSingle).Equals(IO_VALUE.HIGH))
{ // {
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); // KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
} // }
else // else
{ // {
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.HIGH); // KNDIOMove(IO_Type.WaitSingle, IO_VALUE.HIGH);
} // }
} //}
else if (Status.Equals(RobotStatus.Busy) ) //else if (Status.Equals(RobotStatus.Busy) )
{ //{
//忙碌或转动,绿灯常亮,黄灯灭,红灯亮时绿灯不亮 // //忙碌或转动,绿灯常亮,黄灯灭,红灯亮时绿灯不亮
if (KNDIOValue(IO_Type.WaitSingle).Equals(IO_VALUE.HIGH)) // if (KNDIOValue(IO_Type.WaitSingle).Equals(IO_VALUE.HIGH))
{ // {
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); // KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
} // }
if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.LOW)) // if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.LOW))
{ // {
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH); // KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
} // }
} //}
else if (Status.Equals(RobotStatus.Runing)) //else if (Status.Equals(RobotStatus.Runing))
{ //{
//等待状态,黄灯灭,绿灯闪烁,红灯亮时绿灯不亮 // //等待状态,黄灯灭,绿灯闪烁,红灯亮时绿灯不亮
if (KNDIOValue(IO_Type.WaitSingle).Equals(IO_VALUE.HIGH)) // if (KNDIOValue(IO_Type.WaitSingle).Equals(IO_VALUE.HIGH))
{ // {
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); // KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
} // }
if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.HIGH)) // if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.HIGH))
{ // {
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW); // KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
} // }
else // else
{ // {
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH); // KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
} // }
} //}
} }
protected virtual void mainTimer_Elapsed(object sender, ElapsedEventArgs e) protected virtual void mainTimer_Elapsed(object sender, ElapsedEventArgs e)
...@@ -233,15 +233,15 @@ namespace URSoldering.DeviceLibrary ...@@ -233,15 +233,15 @@ namespace URSoldering.DeviceLibrary
/// <param name="status"></param> /// <param name="status"></param>
public void UpdateShowLight(RobotStatus status) public void UpdateShowLight(RobotStatus status)
{ {
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); //KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW); //KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
if (status > RobotStatus.Wait) //if (status > RobotStatus.Wait)
{ //{
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH); // KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.HIGH); // KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.HIGH);
} //}
} }
#endregion #endregion
......
...@@ -196,7 +196,7 @@ namespace URSoldering.DeviceLibrary ...@@ -196,7 +196,7 @@ namespace URSoldering.DeviceLibrary
IsInPorcess = true; IsInPorcess = true;
try try
{ {
if (IsStartConnect) if (IsRun&& IsStartConnect)
{ {
TimeSpan span = DateTime.Now - preCheckTime; TimeSpan span = DateTime.Now - preCheckTime;
if (span.TotalSeconds > 30) if (span.TotalSeconds > 30)
...@@ -468,12 +468,12 @@ namespace URSoldering.DeviceLibrary ...@@ -468,12 +468,12 @@ namespace URSoldering.DeviceLibrary
} }
if (!URRobotClient.LastMoveCMD.Equals("")) if (!URRobotClient.LastMoveCMD.Equals(""))
{ {
LogUtil.info(LogName + "试图移动到" + point.ToShowStr() + ",清除上次未发送指令:【" + URRobotClient.LastMoveCMD + "】"); LogUtil.info(LogName+ ",清除上次未发送指令:【" + URRobotClient.LastMoveCMD + "】" + "新坐标" + point.ToShowStr());
URRobotClient.LastMoveCMD = ""; URRobotClient.LastMoveCMD = "";
} }
else else
{ {
LogUtil.info(LogName + "试图移动到:" + point.ToShowStr()); //LogUtil.info(LogName + "试图移动到:" + point.ToShowStr());
} }
URRobotClient.LastMoveCMD = moveCmd; URRobotClient.LastMoveCMD = moveCmd;
} }
...@@ -504,7 +504,7 @@ namespace URSoldering.DeviceLibrary ...@@ -504,7 +504,7 @@ namespace URSoldering.DeviceLibrary
double rxCha = Math.Abs(p1.RX - p2.RX); double rxCha = Math.Abs(p1.RX - p2.RX);
double ryCha = Math.Abs(p1.RY - p2.RY); double ryCha = Math.Abs(p1.RY - p2.RY);
double rzCha = Math.Abs(p1.RZ - p2.RZ); double rzCha = Math.Abs(p1.RZ - p2.RZ);
if (xCha < 1 && yCha < 1 && zCha < 1 && rxCha < 0.001 && ryCha < 0.001 && rzCha < 0.001) if (xCha < 1 && yCha < 1 && zCha < 1 && rxCha < 0.01 && ryCha < 0.01 && rzCha < 0.01)
{ {
return true; return true;
} }
......
...@@ -40,23 +40,23 @@ namespace URSoldering.LoadCSVLibrary ...@@ -40,23 +40,23 @@ namespace URSoldering.LoadCSVLibrary
} }
return TypeList; return TypeList;
} }
/// <summary> ///// <summary>
/// DO 自动指示灯(绿色) AutoRunSingle DO-14 ///// DO 自动指示灯(绿色) AutoRunSingle DO-14
/// </summary> ///// </summary>
public static string AutoRunSingle = "AutoRunSingle"; //public static string AutoRunSingle = "AutoRunSingle";
/// <summary> ///// <summary>
/// DO 故障指示灯(红色) AlarmSingleDO-15 ///// DO 故障指示灯(红色) AlarmSingleDO-15
/// </summary> ///// </summary>
public static string AlarmSingle = "AlarmSingle"; //public static string AlarmSingle = "AlarmSingle";
/// <summary> ///// <summary>
/// DO 待机指示灯(黄色) WaitSingle DO-16 ///// DO 待机指示灯(黄色) WaitSingle DO-16
/// </summary> ///// </summary>
public static string WaitSingle = "WaitSingle"; //public static string WaitSingle = "WaitSingle";
/// <summary> ///// <summary>
/// DO 设备运转ON DeviceRunON Y04 DO-04 ///// DO 设备运转ON DeviceRunON Y04 DO-04
/// </summary> ///// </summary>
public static string DeviceRunON = "DeviceRunON"; //public static string DeviceRunON = "DeviceRunON";
/// <summary> /// <summary>
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
this.groupBox5.Location = new System.Drawing.Point(1155, 499); this.groupBox5.Location = new System.Drawing.Point(1155, 499);
this.groupBox5.MaximumSize = new System.Drawing.Size(800, 500); this.groupBox5.MaximumSize = new System.Drawing.Size(800, 500);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(618, 157); this.groupBox5.Size = new System.Drawing.Size(102, 157);
this.groupBox5.TabIndex = 316; this.groupBox5.TabIndex = 316;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
// //
...@@ -139,9 +139,9 @@ ...@@ -139,9 +139,9 @@
this.hWVideo.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); this.hWVideo.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480);
this.hWVideo.Location = new System.Drawing.Point(4, 44); this.hWVideo.Location = new System.Drawing.Point(4, 44);
this.hWVideo.Name = "hWVideo"; this.hWVideo.Name = "hWVideo";
this.hWVideo.Size = new System.Drawing.Size(610, 108); this.hWVideo.Size = new System.Drawing.Size(94, 108);
this.hWVideo.TabIndex = 301; this.hWVideo.TabIndex = 301;
this.hWVideo.WindowSize = new System.Drawing.Size(610, 108); this.hWVideo.WindowSize = new System.Drawing.Size(94, 108);
// //
// label4 // label4
// //
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
this.groupBox3.Controls.Add(this.lblRobot); this.groupBox3.Controls.Add(this.lblRobot);
this.groupBox3.Location = new System.Drawing.Point(16, 3); this.groupBox3.Location = new System.Drawing.Point(16, 3);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(1756, 67); this.groupBox3.Size = new System.Drawing.Size(1240, 67);
this.groupBox3.TabIndex = 272; this.groupBox3.TabIndex = 272;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
// //
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
this.logBox.Location = new System.Drawing.Point(6, 38); this.logBox.Location = new System.Drawing.Point(6, 38);
this.logBox.Name = "logBox"; this.logBox.Name = "logBox";
this.logBox.ReadOnly = true; this.logBox.ReadOnly = true;
this.logBox.Size = new System.Drawing.Size(1747, 24); this.logBox.Size = new System.Drawing.Size(1231, 24);
this.logBox.TabIndex = 272; this.logBox.TabIndex = 272;
this.logBox.Text = ""; this.logBox.Text = "";
// //
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
this.lblRobot.ForeColor = System.Drawing.Color.Green; this.lblRobot.ForeColor = System.Drawing.Color.Green;
this.lblRobot.Location = new System.Drawing.Point(89, 13); this.lblRobot.Location = new System.Drawing.Point(89, 13);
this.lblRobot.Name = "lblRobot"; this.lblRobot.Name = "lblRobot";
this.lblRobot.Size = new System.Drawing.Size(1287, 19); this.lblRobot.Size = new System.Drawing.Size(771, 19);
this.lblRobot.TabIndex = 3; this.lblRobot.TabIndex = 3;
this.lblRobot.Text = "未启动"; this.lblRobot.Text = "未启动";
// //
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
this.groupBox2.Location = new System.Drawing.Point(1155, 62); this.groupBox2.Location = new System.Drawing.Point(1155, 62);
this.groupBox2.MaximumSize = new System.Drawing.Size(800, 500); this.groupBox2.MaximumSize = new System.Drawing.Size(800, 500);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(615, 436); this.groupBox2.Size = new System.Drawing.Size(99, 436);
this.groupBox2.TabIndex = 269; this.groupBox2.TabIndex = 269;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
// //
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
this.axCKVisionCtrl1.Location = new System.Drawing.Point(4, 43); this.axCKVisionCtrl1.Location = new System.Drawing.Point(4, 43);
this.axCKVisionCtrl1.Name = "axCKVisionCtrl1"; this.axCKVisionCtrl1.Name = "axCKVisionCtrl1";
this.axCKVisionCtrl1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axCKVisionCtrl1.OcxState"))); this.axCKVisionCtrl1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axCKVisionCtrl1.OcxState")));
this.axCKVisionCtrl1.Size = new System.Drawing.Size(607, 389); this.axCKVisionCtrl1.Size = new System.Drawing.Size(91, 389);
this.axCKVisionCtrl1.TabIndex = 306; this.axCKVisionCtrl1.TabIndex = 306;
// //
// lblCodeResult // lblCodeResult
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
this.groupBox1.Controls.Add(this.chbHigh); this.groupBox1.Controls.Add(this.chbHigh);
this.groupBox1.Location = new System.Drawing.Point(17, 657); this.groupBox1.Location = new System.Drawing.Point(17, 657);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(1754, 77); this.groupBox1.Size = new System.Drawing.Size(1238, 77);
this.groupBox1.TabIndex = 268; this.groupBox1.TabIndex = 268;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
...@@ -342,7 +342,7 @@ ...@@ -342,7 +342,7 @@
this.panel2.Controls.Add(this.lblRobotWarnMsg); this.panel2.Controls.Add(this.lblRobotWarnMsg);
this.panel2.Location = new System.Drawing.Point(518, 11); this.panel2.Location = new System.Drawing.Point(518, 11);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1066, 59); this.panel2.Size = new System.Drawing.Size(550, 59);
this.panel2.TabIndex = 270; this.panel2.TabIndex = 270;
// //
// lblRobotWarnMsg // lblRobotWarnMsg
...@@ -353,7 +353,7 @@ ...@@ -353,7 +353,7 @@
this.lblRobotWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblRobotWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblRobotWarnMsg.Location = new System.Drawing.Point(4, 3); this.lblRobotWarnMsg.Location = new System.Drawing.Point(4, 3);
this.lblRobotWarnMsg.Name = "lblRobotWarnMsg"; this.lblRobotWarnMsg.Name = "lblRobotWarnMsg";
this.lblRobotWarnMsg.Size = new System.Drawing.Size(1056, 51); this.lblRobotWarnMsg.Size = new System.Drawing.Size(540, 51);
this.lblRobotWarnMsg.TabIndex = 4; this.lblRobotWarnMsg.TabIndex = 4;
// //
// btnStart // btnStart
...@@ -371,7 +371,7 @@ ...@@ -371,7 +371,7 @@
// //
this.btnBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnBack.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(1596, 16); this.btnBack.Location = new System.Drawing.Point(1080, 16);
this.btnBack.Name = "btnBack"; this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(150, 52); this.btnBack.Size = new System.Drawing.Size(150, 52);
this.btnBack.TabIndex = 267; this.btnBack.TabIndex = 267;
...@@ -799,7 +799,7 @@ ...@@ -799,7 +799,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoSize = true; this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(1792, 741); this.ClientSize = new System.Drawing.Size(1276, 741);
this.Controls.Add(this.gbBoardInfo); this.Controls.Add(this.gbBoardInfo);
this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox5); this.Controls.Add(this.groupBox5);
......
...@@ -390,35 +390,35 @@ namespace URSoldering.Client ...@@ -390,35 +390,35 @@ namespace URSoldering.Client
private int dHeight = 0; private int dHeight = 0;
private void UsbTimer_Elapsed(object sender, ElapsedEventArgs e) private void UsbTimer_Elapsed(object sender, ElapsedEventArgs e)
{ {
try //try
{ //{
if (WeldRobotBean.ISRun && // if (WeldRobotBean.ISRun &&
(WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.Weld)|| // (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.Weld)||
WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.GoHome))) // WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.GoHome)))
{ // {
if (UsbCameraHDevelop.IsOpen(VideoCameraName)) // if (UsbCameraHDevelop.IsOpen(VideoCameraName))
{ // {
HObject ho_Image = UsbCameraHDevelop.GrabImage(VideoCameraName); // HObject ho_Image = UsbCameraHDevelop.GrabImage(VideoCameraName);
if (ho_Image != null) // if (ho_Image != null)
{ // {
if (dWidth <= 0) // if (dWidth <= 0)
{ // {
HTuple width, height; // HTuple width, height;
HOperatorSet.GetImageSize(ho_Image, out width, out height); // HOperatorSet.GetImageSize(ho_Image, out width, out height);
dWidth = (int)width.D; // dWidth = (int)width.D;
dHeight = (int)height.D; // dHeight = (int)height.D;
hWVideo.HalconWindow.SetPart(0, 0, dHeight, dWidth); // hWVideo.HalconWindow.SetPart(0, 0, dHeight, dWidth);
} // }
HOperatorSet.DispObj(ho_Image, hWVideo.HalconWindow); // HOperatorSet.DispObj(ho_Image, hWVideo.HalconWindow);
} // }
} // }
} // }
} //}
catch (Exception ex) //catch (Exception ex)
{ //{
LogUtil.error("获取实时出错:" + ex.ToString()); // LogUtil.error("获取实时出错:" + ex.ToString());
} //}
} }
private void ClearMsg() private void ClearMsg()
...@@ -496,15 +496,12 @@ namespace URSoldering.Client ...@@ -496,15 +496,12 @@ namespace URSoldering.Client
} }
return; return;
} }
////如果报警,需要显示报警
//bool epsonIsAlarm = URRobotControl.HasError(); if (WeldRobotBean.WarnMsg.Equals("").Equals(false))
//if ((!WeldRobotBean.WarnMsg.Equals("")) || (!epsonIsAlarm)) {
//{ lblMsg.Text = WeldRobotBean.WarnMsg;
// string epsonAlarm = epsonIsAlarm ? "机械臂报警" : ""; }
// lblMsg.ForeColor = Color.Red; else if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.GoHome))
// lblMsg.Text = WeldRobotBean.WarnMsg + " " + epsonAlarm;
//}
if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.GoHome))
{ {
lblMsg.ForeColor = Color.Green; lblMsg.ForeColor = Color.Green;
lblMsg.Text = "复位中"; lblMsg.Text = "复位中";
...@@ -669,24 +666,21 @@ namespace URSoldering.Client ...@@ -669,24 +666,21 @@ namespace URSoldering.Client
} }
private void OpenUsbCamera() private void OpenUsbCamera()
{ {
UsbCameraHDevelop.CloseCamera(VideoCameraName); //UsbCameraHDevelop.CloseCamera(VideoCameraName);
if (UsbCameraHDevelop.OpenCamera(VideoCameraName)) //if (UsbCameraHDevelop.OpenCamera(VideoCameraName))
{ //{
usbTimer.Enabled = true; // usbTimer.Enabled = true;
} //}
else //else
{ //{
LogUtil.error("打开焊接监控摄像机失败!"); // LogUtil.error("打开焊接监控摄像机失败!");
usbTimer.Enabled = false; // usbTimer.Enabled = false;
} //}
//UsbCameraHDevelop.CloseCamera(CodeCameraName);
//UsbCameraHDevelop.OpenCamera(CodeCameraName);
} }
private void CloseUsbCamera() private void CloseUsbCamera()
{ {
UsbCameraHDevelop.CloseCamera(VideoCameraName); //UsbCameraHDevelop.CloseCamera(VideoCameraName);
usbTimer.Close(); //usbTimer.Close();
//UsbCameraHDevelop.CloseCamera(CodeCameraName);
} }
private void GetCode() private void GetCode()
...@@ -789,7 +783,7 @@ namespace URSoldering.Client ...@@ -789,7 +783,7 @@ namespace URSoldering.Client
if (result.Equals(1)) if (result.Equals(1))
{ {
LogUtil.info("AOI检测OK"); LogUtil.info("AOI检测OK");
RobotBean.KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW); //RobotBean.KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
lblAOIResult.ForeColor = Color.Blue; lblAOIResult.ForeColor = Color.Blue;
lblAOIResult.Text = "检测OK"; lblAOIResult.Text = "检测OK";
WorkCountManager.AddOKCount(); WorkCountManager.AddOKCount();
...@@ -797,7 +791,7 @@ namespace URSoldering.Client ...@@ -797,7 +791,7 @@ namespace URSoldering.Client
else else
{ {
LogUtil.info("AOI检测NG"); LogUtil.info("AOI检测NG");
RobotBean.KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.HIGH); //RobotBean.KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.HIGH);
lblAOIResult.ForeColor = Color.Red; lblAOIResult.ForeColor = Color.Red;
lblAOIResult.Text = "检测NG"; lblAOIResult.Text = "检测NG";
WorkCountManager.AddNGCount(); WorkCountManager.AddNGCount();
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJQAAAAIB ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJQAAAAIB
AAAAAQAAAAAAAAAAAAAAABAAAAAAAAEAvD4AADQoAAAAAAAACw== AAAAAQAAAAAAAAAAAAAAABAAAAAAAAEAaAkAADQoAAAAAAAACw==
</value> </value>
</data> </data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!