Commit 637e6ef8 几米阳光

去掉不需要的IO

1 个父辈 ecb4c995
...@@ -341,13 +341,18 @@ namespace URSoldering.Common ...@@ -341,13 +341,18 @@ namespace URSoldering.Common
} }
if (_serialPort.BytesToRead >= ReceiveData.Length) if (_serialPort.BytesToRead >= ReceiveData.Length)
{ {
ReceiveData = new byte[_serialPort.BytesToRead];
ret = _serialPort.Read(ReceiveData, 0, ReceiveData.Length); ret = _serialPort.Read(ReceiveData, 0, _serialPort.BytesToRead);
} }
else else if(_serialPort.BytesToRead>0)
{ {
ret = _serialPort.Read(ReceiveData, 0, _serialPort.BytesToRead); ret = _serialPort.Read(ReceiveData, 0, _serialPort.BytesToRead);
} }
else
{
ReceiveData = new byte[0];
LogUtil.info("");
}
isOk = true ; isOk = true ;
ReceiveEventFlag = false; //打开事件 ReceiveEventFlag = false; //打开事件
return ret; return ret;
......
 
using URSoldering.Common; using URSoldering.Common;
using URSoldering.LoadCSVLibrary; using URSoldering.LoadCSVLibrary;
using log4net;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Timers; using System.Timers;
namespace URSoldering.DeviceLibrary namespace URSoldering.DeviceLibrary
...@@ -39,8 +34,6 @@ namespace URSoldering.DeviceLibrary ...@@ -39,8 +34,6 @@ namespace URSoldering.DeviceLibrary
mainTimer.Enabled = false; mainTimer.Enabled = false;
ledTimer.Enabled = false; ledTimer.Enabled = false;
IsInSuddendown = false; IsInSuddendown = false;
//WaitScanResult = false;
//CanScan = false;
WarnMsg = ""; WarnMsg = "";
if (!ShuddenOK()) if (!ShuddenOK())
...@@ -71,47 +64,19 @@ namespace URSoldering.DeviceLibrary ...@@ -71,47 +64,19 @@ namespace URSoldering.DeviceLibrary
return false; return false;
} }
//MesUtil.SolderInit(MesIp, MesPort);
Status = RobotStatus.Reset; Status = RobotStatus.Reset;
//HDevelopExport.OpenAllCamera();
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);
//InitLineSpeed();
//阻挡气缸上升
StopCylinderUp();
IsInProcess = false; IsInProcess = false;
ledTimer.Enabled = true; ledTimer.Enabled = true;
mainTimer.Enabled = true; mainTimer.Enabled = true;
return true; return true;
} }
public void StopCylinderUpAndWait()
{
KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH);
KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW);
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down, IO_VALUE.LOW));
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Up, IO_VALUE.HIGH));
}
public void StopCylinderDownAndWait()
{
KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.LOW);
KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.HIGH);
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down, IO_VALUE.HIGH));
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Up, IO_VALUE.LOW));
}
public void StopCylinderUp()
{
KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH);
KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW);
}
public void StopCylinderDown()
{
KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.LOW);
KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.HIGH);
}
/// <summary> /// <summary>
/// 急停 处理 /// 急停 处理
/// </summary> /// </summary>
...@@ -151,7 +116,7 @@ namespace URSoldering.DeviceLibrary ...@@ -151,7 +116,7 @@ namespace URSoldering.DeviceLibrary
else if (Status.Equals(RobotStatus.Reset)) else if (Status.Equals(RobotStatus.Reset))
{ {
if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.None) if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.None)
&& KNDIOValue(IO_Type.SendWire_Up).Equals(IO_VALUE.HIGH)) && KNDIOValue(IO_Type.SendWire_Work).Equals(IO_VALUE.HIGH))
{ {
LogUtil.info(RobotName + "复位完成"); LogUtil.info(RobotName + "复位完成");
Status = RobotStatus.Runing; Status = RobotStatus.Runing;
...@@ -164,7 +129,6 @@ namespace URSoldering.DeviceLibrary ...@@ -164,7 +129,6 @@ namespace URSoldering.DeviceLibrary
else if (Status.Equals(RobotStatus.Runing)) else if (Status.Equals(RobotStatus.Runing))
{ {
IOTimeOutProcess(); IOTimeOutProcess();
StartLineCheck();
} }
else if (Status.Equals(RobotStatus.Busy)) else if (Status.Equals(RobotStatus.Busy))
{ {
...@@ -172,7 +136,7 @@ namespace URSoldering.DeviceLibrary ...@@ -172,7 +136,7 @@ namespace URSoldering.DeviceLibrary
} }
else if (Status.Equals(RobotStatus.LineMove)) else if (Status.Equals(RobotStatus.LineMove))
{ {
LineMoveProcess();
} }
} }
}catch(Exception ex) }catch(Exception ex)
...@@ -204,7 +168,6 @@ namespace URSoldering.DeviceLibrary ...@@ -204,7 +168,6 @@ namespace URSoldering.DeviceLibrary
LogUtil.info(RobotName + "之前有IO超时异常,清理信号超时异常!"); LogUtil.info(RobotName + "之前有IO超时异常,清理信号超时异常!");
WarnMsg = ""; WarnMsg = "";
alarmType = AlarmType.None; alarmType = AlarmType.None;
//RobotBean.KNDIOMove(IO_Type.Device_NG, IO_VALUE.HIGH);
} }
} }
} }
...@@ -214,114 +177,12 @@ namespace URSoldering.DeviceLibrary ...@@ -214,114 +177,12 @@ namespace URSoldering.DeviceLibrary
LogUtil.error(LOGGER, "IOTimeOutProcess出错:" + ex.ToString()); LogUtil.error(LOGGER, "IOTimeOutProcess出错:" + ex.ToString());
} }
} }
private void LineMoveProcess()
{
if (LineStep.IsInWait)
{
CheckWait();
}
if (LineStep.IsInWait)
{
return;
}
if (LineStep.moveStep.Equals(MoveStep.L00_CylinderUp))
{
LineLog("流水线转动:阻挡气缸上升到位,转动流水线");
LineStep.NextMoveStep(MoveStep.L01_StartLineMove);
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineWeldCheck, IO_VALUE.HIGH));
//LineStartMove();
}
else if (LineStep.moveStep.Equals(MoveStep.L01_StartLineMove))
{
LineLog("流水线转动:收到焊接信号,等待1秒钟");
LineStep.NextMoveStep(MoveStep.L02_GetWeldSingle);
LineStep.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
else if (LineStep.moveStep.Equals(MoveStep.L02_GetWeldSingle))
{
//LineStopMove();
LineStep.NextMoveStep(MoveStep.L03_GetCode);
LineStep.WaitList.Add(WaitResultInfo.WaitTime(500));
}
else if (LineStep.moveStep.Equals(MoveStep.L03_GetCode))
{
LineStep.NextMoveStep(MoveStep.L04_BeginWeld);
GetCodeFun?.Invoke();
Thread.Sleep(100);
}
else if (LineStep.moveStep.Equals(MoveStep.L04_BeginWeld))
{
TimeSpan span = DateTime.Now - LineStep.LastSetpTime;
if (WareCode.Equals("").Equals(false) || span.TotalSeconds > 15)
{
string str = WeldRobotBean.StartWeld();
if (str.Equals(""))
{
WeldRobotBean.IsInWeld = true;
LineLog("流水线转动:检测到焊接信号,停止流水线,启动焊接成功");
}
else
{
WeldRobotBean.IsInWeld = false ;
LineLog("流水线转动:启动焊接失败:" + str);
}
LastStartWeldTime = DateTime.Now;
IsWeld = true;
LineStep.NewMove(MoveType.WeldEndMove);
LineStep.NextMoveStep(MoveStep.BUSY01_Weld);
Status = RobotStatus.Busy;
}
}
}
private void StartLineCheck()
{
//开始转动
if (KNDIOValue(IO_Type.LineInCheck).Equals(IO_VALUE.HIGH) && KNDIOValue(IO_Type.LineOutCheck).Equals(IO_VALUE.LOW))
{
if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.None))
{
KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
LogUtil.info("检测到入料口信号,阻挡气缸上升");
Status = RobotStatus.LineMove;
LineStep.NewMove(MoveType.LineMove);
LineStep.NextMoveStep(MoveStep.L00_CylinderUp);
StopCylinderUpAndWait();
}
}
}
/// <summary>
/// 收到启动信号,开始转动转台
/// </summary>
private void StartTurn()
{
if (WareCode.Equals(""))
{
WarnMsg = "还未扫描OK";
return;
}
//TODO 开始转动
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
Status = RobotStatus.LineMove;
}
private void StopMove() private void StopMove()
{ {
//IsWaitCode = false;
//IsWaitCheck = false;
//WaitScanResult = false;
//CanScan = false;
//LineStopMove();
KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW); KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
//HDevelopExport.CloseAllCamera();
WeldRobotBean.StopMove(); WeldRobotBean.StopMove();
this.Status = RobotStatus.Runing; this.Status = RobotStatus.Runing;
} }
public void StopRun() public void StopRun()
...@@ -334,8 +195,7 @@ namespace URSoldering.DeviceLibrary ...@@ -334,8 +195,7 @@ namespace URSoldering.DeviceLibrary
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);
//KNDIOMove(IO_Type.DoorStatus, IO_VALUE.HIGH);
//MesUtil.Close();
this.Status = RobotStatus.Wait; this.Status = RobotStatus.Wait;
LogUtil.info(RobotName + "停止运行"); LogUtil.info(RobotName + "停止运行");
} }
......
using URSoldering.Common; using URSoldering.Common;
using URSoldering.LoadCSVLibrary; using URSoldering.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace URSoldering.DeviceLibrary namespace URSoldering.DeviceLibrary
{ {
...@@ -16,8 +12,6 @@ namespace URSoldering.DeviceLibrary ...@@ -16,8 +12,6 @@ namespace URSoldering.DeviceLibrary
public delegate void GetCode(); public delegate void GetCode();
public event GetCode GetCodeFun; public event GetCode GetCodeFun;
public delegate void AOICheck();
public event AOICheck AOICheckFun;
public bool IsAutoRun = false; public bool IsAutoRun = false;
private void LineLog(string msg) private void LineLog(string msg)
{ {
...@@ -25,183 +19,42 @@ namespace URSoldering.DeviceLibrary ...@@ -25,183 +19,42 @@ namespace URSoldering.DeviceLibrary
} }
private void BusyProcess() private void BusyProcess()
{ {
//if (LineStep.IsInWait) if (LineStep.moveStep.Equals(MoveStep.BUSY01_Weld))
//{
// CheckWait();
//}
//if(LineStep.IsInWait)
//{
// return;
//}
//if (LineStep.moveStep.Equals(MoveStep.BUSY01_Weld))
//{
// //if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.None))
// if (WeldRobotBean.IsInWeld.Equals(false))
// {
// LastEndWeldTime = DateTime.Now;
// TimeSpan span = LastEndWeldTime - LastStartWeldTime;
// if (BoardManager.CurrBoard.WeldTime.TotalSeconds <= 0)
// {
// BoardManager.CurrBoard.WeldTime = span;
// }
// else
// {
// BoardManager.CurrBoard.WeldTime = new TimeSpan(0, 0, (int)(BoardManager.CurrBoard.WeldTime.TotalSeconds + span.TotalSeconds) / 2);
// }
// BoardManager.Update(BoardManager.CurrBoard);
// LogUtil.info("Busy处理:" + "焊接结束,焊接耗时"+FormUtil.GetSpanStr(span)+ ",累积平均耗时" + FormUtil.GetSpanStr(BoardManager.CurrBoard.WeldTime) + ",阻挡气缸下降");
// LineStep.NextMoveStep(MoveStep.BUSY03_CylinderDown);
// StopCylinderDownAndWait();
// }
//}
////焊接完成,流水线继续转动,直到出料口检测到信号
//else if (LineStep.moveStep.Equals(MoveStep.BUSY03_CylinderDown))
//{
// LineLog("Busy处理:" + "流水线转动,等待出料口信号");
// LineStep.NextMoveStep(MoveStep.BUSY04_LineMove);
// LineStartMove();
// LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineOutCheck, IO_VALUE.HIGH));
//}
//else if (LineStep.moveStep.Equals(MoveStep.BUSY04_LineMove))
//{
// LineStopMove();
// if (IsAutoRun)
// {
// LineLog("Busy处理:" + "等待3秒钟后流水线倒转");
// LineStep.NextMoveStep(MoveStep.BUSY05_Wait);
// LineStep.WaitList.Add(WaitResultInfo.WaitTime(2000));
// }
// else
// {
// LineLog("Busy处理:" + "停止转动");
// StopCylinderUp();
// Status = RobotStatus.Runing;
// }
//}
//else if (LineStep.moveStep.Equals(MoveStep.BUSY05_Wait))
//{
// LineLog("Busy处理:" + "流水线转动,等待出料口信号");
// LineStep.NextMoveStep(MoveStep.BUSY06_WaitInSingle);
// LineBackMove();
// LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineInCheck, IO_VALUE.HIGH));
//}
//else if (LineStep.moveStep.Equals(MoveStep.BUSY06_WaitInSingle))
//{
// LineLog("Busy处理:" + "板子到达入料口,停止转动");
// LineStopMove();
// StopCylinderUp();
// Status = RobotStatus.Runing;
//}
}
//private void LineBackMove()
//{
// ShuoKeControls.VolMove(Config.Line_Slv, Config.Line_EndSpeed);
// KNDIOMove(IO_Type.LineStart, IO_VALUE.HIGH);
//}
//private void LineStartMove()
//{
// ShuoKeControls.VolMove(Config.Line_Slv, 0- Config.Line_EndSpeed);
// KNDIOMove(IO_Type.LineStart, IO_VALUE.HIGH);
//}
//private void LineStopMove()
//{
// ShuoKeControls.SuddownStop(Config.Line_Slv);
// KNDIOMove(IO_Type.LineStart, IO_VALUE.LOW);
//}
/// <summary>
/// 判断是否还有未完成的工作
/// </summary>
public bool NeedWork()
{
if (Status > RobotStatus.Wait)
{
if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.Weld))
{
return true;
}
}
return false;
}
private void CheckWait()
{
int ioSingleTimeOutSeconds = 30000;
List<WaitResultInfo> list = new List<WaitResultInfo>(LineStep.WaitList);
//当等待超过一分钟时,需要打印提示
TimeSpan span = DateTime.Now - LineStep.LastSetpTime;
string NotOkMsg = "";
if (list.Count > 0)
{
bool isOk = true;
foreach (WaitResultInfo wait in list)
{ {
if (wait.WaitType == 1) if (WeldRobotBean.IsInWeld.Equals(false))
{ {
if (!RobotBean.KNDIOValue(wait.IoType).Equals(wait.IoValue)) LastEndWeldTime = DateTime.Now;
TimeSpan span = LastEndWeldTime - LastStartWeldTime;
if (BoardManager.CurrBoard.WeldTime.TotalSeconds <= 0)
{ {
//一分钟还未检测到 BoardManager.CurrBoard.WeldTime = span;
if (span.TotalMilliseconds > ioSingleTimeOutSeconds)
{
ConfigIO io = RobotBean.getWaitIO(wait.IoType);
NotOkMsg = "信号(" + io.Explain + "=" + wait.IoValue + ")";
WarnMsg = RobotName + " 等待信号(" + io.Explain + "=" + wait.IoValue + ") 超时!";
Alarm(AlarmType.IoSingleTimeOut);
LogUtil.error(LOGGER, WarnMsg, 13);
}
isOk = false;
break;
} }
else if (LineStep.OneWaitOk) else
{ {
isOk = true; BoardManager.CurrBoard.WeldTime = new TimeSpan(0, 0, (int)(BoardManager.CurrBoard.WeldTime.TotalSeconds + span.TotalSeconds) / 2);
break;
} }
BoardManager.Update(BoardManager.CurrBoard);
LogUtil.info("Busy处理:" + "焊接结束,焊接耗时" + FormUtil.GetSpanStr(span) + ",累积平均耗时" + FormUtil.GetSpanStr(BoardManager.CurrBoard.WeldTime) + ",阻挡气缸下降");
LineStep.EndMove();
Status = RobotStatus.Runing;
} }
else if (wait.WaitType == 2)
{
if (span.TotalMilliseconds < wait.TimeMSeconds)
{
NotOkMsg = "时间[" + wait.TimeMSeconds + "]毫秒";
isOk = false;
break;
}
else if (LineStep.OneWaitOk)
{
isOk = true;
break;
} }
} }
}
if (isOk) /// <summary>
{ /// 判断是否还有未完成的工作
LineStep.EndStepWait(); /// </summary>
} public bool NeedWork()
if (LineStep.IsInWait)
{
if (span.TotalMinutes > 1)
{
if (NotOkMsg.Equals(""))
{ {
WarnMsg = "等待超时[" + LineStep.moveType + "][" + LineStep.moveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalMinutes, 1) + "]分钟"; if (Status > RobotStatus.Wait)
}
else
{ {
WarnMsg = "等待超时[" + LineStep.moveType + "][" + LineStep.moveStep + "]已等待[" + Math.Round(span.TotalMinutes, 1) + "]分钟,"; if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.Weld))
foreach (WaitResultInfo wait in list)
{ {
WarnMsg = WarnMsg + "\r\n" + wait.ToStr(); return true;
}
}
Alarm(AlarmType.StepTimeOut);
LogUtil.error(LOGGER, WarnMsg, 12);
}
} }
} }
else return false;
{
LineStep.EndStepWait();
}
} }
private void Alarm(AlarmType alarmType) private void Alarm(AlarmType alarmType)
......
...@@ -192,11 +192,9 @@ namespace URSoldering.DeviceLibrary ...@@ -192,11 +192,9 @@ namespace URSoldering.DeviceLibrary
//锁定轴 //锁定轴
URRobotControl.LockAxis(); URRobotControl.LockAxis();
//InitSendWireSpeed();
//烙铁温度=0, 送丝上升,机器复位 //烙铁温度=0, 送丝上升,机器复位
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); SolderingUp(false);
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); SendWireWork(false);
ISRun = true; ISRun = true;
mainTimer.Enabled = true; mainTimer.Enabled = true;
...@@ -217,9 +215,9 @@ namespace URSoldering.DeviceLibrary ...@@ -217,9 +215,9 @@ namespace URSoldering.DeviceLibrary
LogUtil.info(RobotName + "停止所有运动"); LogUtil.info(RobotName + "停止所有运动");
//烙铁温度=0,烙铁上升,送丝上升,机器复位 //烙铁温度=0,烙铁上升,送丝上升,机器复位
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); SolderingUp(false);
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); SendWireWork(false);
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.LOW);
//硕科 停止 //硕科 停止
SendWireManager.StopSend(); SendWireManager.StopSend();
SolderingManager.Release(); SolderingManager.Release();
...@@ -234,8 +232,7 @@ namespace URSoldering.DeviceLibrary ...@@ -234,8 +232,7 @@ namespace URSoldering.DeviceLibrary
StopMove(); StopMove();
mainTimer.Enabled = false; mainTimer.Enabled = false;
ISRun = false; ISRun = false;
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.LOW);
LogUtil.info(LOGGER, RobotName + "停止运行"); LogUtil.info(LOGGER, RobotName + "停止运行");
} }
private static bool IsTimerProcess = false; private static bool IsTimerProcess = false;
...@@ -361,28 +358,28 @@ namespace URSoldering.DeviceLibrary ...@@ -361,28 +358,28 @@ namespace URSoldering.DeviceLibrary
/// <returns></returns> /// <returns></returns>
public static bool SendWireRecover(bool isNext) public static bool SendWireRecover(bool isNext)
{ {
if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH)) //if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH))
{ //{
LogUtil.info(RobotName + "卡丝恢复失败:仍在卡丝中!"); // LogUtil.info(RobotName + "卡丝恢复失败:仍在卡丝中!");
} //}
else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH)) //else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH))
{ //{
LogUtil.info(RobotName + "卡丝恢复失败:仍在无丝中!"); // LogUtil.info(RobotName + "卡丝恢复失败:仍在无丝中!");
} //}
else //else
{ //{
if (alarmType.Equals(AlarmType.SendWireAlarm) && IsInSudden.Equals(false) && IsNoAir.Equals(false)) // if (alarmType.Equals(AlarmType.SendWireAlarm) && IsInSudden.Equals(false) && IsNoAir.Equals(false))
{ // {
if (WeldMoveStep.moveType.Equals(MoveType.Weld) && (isNext.Equals(false))) // if (WeldMoveStep.moveType.Equals(MoveType.Weld) && (isNext.Equals(false)))
{ // {
LogUtil.info(RobotName + "开始卡丝恢复,重新此焊点的焊接 !"); // LogUtil.info(RobotName + "开始卡丝恢复,重新此焊点的焊接 !");
WeldMoveStep.NextMoveStep(MoveStep.Wait); // WeldMoveStep.NextMoveStep(MoveStep.Wait);
} // }
lastSendWireOkTime = DateTime.Now; // lastSendWireOkTime = DateTime.Now;
LogUtil.info(RobotName + "开始卡丝恢复!"); // LogUtil.info(RobotName + "开始卡丝恢复!");
return true; // return true;
} // }
} //}
return false; return false;
} }
/// <summary>IsNeedMsg /// <summary>IsNeedMsg
...@@ -512,8 +509,8 @@ namespace URSoldering.DeviceLibrary ...@@ -512,8 +509,8 @@ namespace URSoldering.DeviceLibrary
} }
WeldMoveStep.NewWeld(MoveType.GoHome); WeldMoveStep.NewWeld(MoveType.GoHome);
WeldMoveStep.NextMoveStep(MoveStep.Home_Reset); WeldMoveStep.NextMoveStep(MoveStep.Home_Reset);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Down, IO_VALUE.LOW)); SolderingUp(true);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Up, IO_VALUE.HIGH)); SendWireWork(true);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpsonRun()); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpsonRun());
return ""; return "";
} }
...@@ -609,8 +606,8 @@ namespace URSoldering.DeviceLibrary ...@@ -609,8 +606,8 @@ namespace URSoldering.DeviceLibrary
private static void MoveToOrg() private static void MoveToOrg()
{ {
SendWireUp(); SolderingUp(true);
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.LOW); SendWireWork(true);
if (HomePoint.X != 0 && HomePoint.Y != 0 && HomePoint.Z != 0 ) if (HomePoint.X != 0 && HomePoint.Y != 0 && HomePoint.Z != 0 )
{ {
WeldLog("送丝上升,机械臂走到待机点 "); WeldLog("送丝上升,机械臂走到待机点 ");
...@@ -620,9 +617,9 @@ namespace URSoldering.DeviceLibrary ...@@ -620,9 +617,9 @@ namespace URSoldering.DeviceLibrary
} }
private static void SendWireUpToClear1() private static void SendWireUpToClear1()
{ {
SendWireUp(); SolderingUp(true );
SendWireClear(true);
Thread.Sleep(100); Thread.Sleep(100);
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH);
WeldCount = 0; WeldCount = 0;
if (Clear1Point.X != 0 && Clear1Point.Y != 0 && Clear1Point.Z != 0) if (Clear1Point.X != 0 && Clear1Point.Y != 0 && Clear1Point.Z != 0)
{ {
...@@ -633,7 +630,7 @@ namespace URSoldering.DeviceLibrary ...@@ -633,7 +630,7 @@ namespace URSoldering.DeviceLibrary
} }
private static void MoveToClear2(int mSenconds) private static void MoveToClear2(int mSenconds)
{ {
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH, mSenconds);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitTime(mSenconds)); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitTime(mSenconds));
if (Clear2Point.X != 0 && Clear2Point.Y != 0 && Clear2Point.Z != 0) if (Clear2Point.X != 0 && Clear2Point.Y != 0 && Clear2Point.Z != 0)
{ {
......
...@@ -16,12 +16,7 @@ namespace URSoldering.DeviceLibrary ...@@ -16,12 +16,7 @@ namespace URSoldering.DeviceLibrary
public delegate void AOICheck( ); public delegate void AOICheck( );
public static event AOICheck AOICheckFun; public static event AOICheck AOICheckFun;
private static void AfterMove(string result)
{
}
private static void AfterGet(double x, double y, double z, double u, int hand)
{
}
public static string StartWeld() public static string StartWeld()
{ {
return StartWeld(0); return StartWeld(0);
...@@ -210,7 +205,8 @@ namespace URSoldering.DeviceLibrary ...@@ -210,7 +205,8 @@ namespace URSoldering.DeviceLibrary
MoveToPoint(WeldMoveStep.CurrPoint, false); MoveToPoint(WeldMoveStep.CurrPoint, false);
WorkCountManager.AddWeldPint(); WorkCountManager.AddWeldPint();
//第一个点并且送丝下降到位时,可以预送丝 //第一个点并且送丝下降到位时,可以预送丝
if (WeldMoveStep.IsFirstPoint().Equals(false) && RobotBean.KNDIOValue(IO_Type.SendWire_Down).Equals(IO_VALUE.HIGH)) //if (WeldMoveStep.IsFirstPoint().Equals(false) && RobotBean.KNDIOValue(IO_Type.SendWire_Down).Equals(IO_VALUE.HIGH))
if (WeldMoveStep.IsFirstPoint().Equals(false) )
{ {
WeldMoveStep.IsSlowSendWire = true; WeldMoveStep.IsSlowSendWire = true;
SlowSendWire(); SlowSendWire();
...@@ -335,26 +331,51 @@ namespace URSoldering.DeviceLibrary ...@@ -335,26 +331,51 @@ namespace URSoldering.DeviceLibrary
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitTime(ms)); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitTime(ms));
} }
} }
private static void SendWireDown() public static void SolderingDown(bool isWait)
{ {
if(RobotBean.KNDIOValue(IO_Type.SendWire_Down).Equals(IO_VALUE.HIGH)&& if(RobotBean.KNDIOValue(IO_Type.Soldering_Down).Equals(IO_VALUE.HIGH)&&
RobotBean.KNDIOValue(IO_Type.SendWire_Up).Equals(IO_VALUE.LOW)) RobotBean.KNDIOValue(IO_Type.Soldering_Up).Equals(IO_VALUE.LOW))
{ {
return; return;
} }
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.HIGH); RobotBean.KNDIOMove(IO_Type.Soldering_Down, IO_VALUE.HIGH);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.LOW); RobotBean.KNDIOMove(IO_Type.Soldering_Up, IO_VALUE.LOW);
if (isWait)
{
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Soldering_Down, IO_VALUE.HIGH));
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Soldering_Up, IO_VALUE.LOW));
}
}
public static void SolderingUp(bool isWait)
{
RobotBean.KNDIOMove(IO_Type.Soldering_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.Soldering_Up, IO_VALUE.HIGH);
if (isWait)
{
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Soldering_Down, IO_VALUE.LOW));
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Soldering_Up, IO_VALUE.HIGH));
}
}
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Down, IO_VALUE.HIGH)); public static void SendWireWork(bool isWait)
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Up, IO_VALUE.LOW)); {
RobotBean.KNDIOMove(IO_Type.SendWire_Clear, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Work, IO_VALUE.HIGH);
if (isWait)
{
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Clear, IO_VALUE.LOW));
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Work, IO_VALUE.HIGH));
}
} }
private static void SendWireUp() public static void SendWireClear(bool isWait)
{
RobotBean.KNDIOMove(IO_Type.SendWire_Clear, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Work, IO_VALUE.HIGH);
if (isWait)
{ {
//WeldLog(" 送丝上升" ); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Clear, IO_VALUE.LOW));
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Work, IO_VALUE.HIGH));
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); }
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Down, IO_VALUE.LOW));
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SendWire_Up, IO_VALUE.HIGH));
} }
private static DateTime preGetStatusTime = DateTime.Now; private static DateTime preGetStatusTime = DateTime.Now;
private static void CheckWait() private static void CheckWait()
...@@ -459,20 +480,20 @@ namespace URSoldering.DeviceLibrary ...@@ -459,20 +480,20 @@ namespace URSoldering.DeviceLibrary
preCheckSendWireTime = DateTime.Now; preCheckSendWireTime = DateTime.Now;
//如果休眠了不需要处理 //如果休眠了不需要处理
string msg = ""; string msg = "";
if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH)) //if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH))
{ //{
//停止送丝器 // //停止送丝器
SendWireManager.StopSend(); // SendWireManager.StopSend();
msg = " 卡丝"; // msg = " 卡丝";
isAlarm = true; // isAlarm = true;
} //}
else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH)) //else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH))
{ //{
//停止送丝器 // //停止送丝器
SendWireManager.StopSend(); // SendWireManager.StopSend();
msg = "没有锡丝"; // msg = "没有锡丝";
isAlarm = true; // isAlarm = true;
} //}
if (isAlarm) if (isAlarm)
{ {
......
...@@ -107,7 +107,7 @@ namespace URSoldering.DeviceLibrary ...@@ -107,7 +107,7 @@ namespace URSoldering.DeviceLibrary
} }
else else
{ {
weldPointList = (from m in weldPointList where m.pointType.Equals(pointType) && m.pointType.Equals(0) select m).ToList<WeldPointInfo>(); weldPointList = (from m in board.pointList where m.pointType.Equals(pointType) && m.pointType.Equals(0) select m).ToList<WeldPointInfo>();
} }
if (weldPointList.Count <= 0) if (weldPointList.Count <= 0)
{ {
......
...@@ -39,4 +39,4 @@ PRO,焊接多少块板子后,清洗烙铁,ClearCount,1,,,,,, ...@@ -39,4 +39,4 @@ PRO,焊接多少块板子后,清洗烙铁,ClearCount,1,,,,,,
PRO,清洗IO的毫秒数,ClearMSenconds,3000,,,,,, PRO,清洗IO的毫秒数,ClearMSenconds,3000,,,,,,
PRO,JBC烙铁端口号,JBC_Soldering_Port,COM4,,,,,, PRO,JBC烙铁端口号,JBC_Soldering_Port,COM4,,,,,,
PRO,JBC烙铁编号,JBC_Soldering_Num,1,,,,,, PRO,JBC烙铁编号,JBC_Soldering_Num,1,,,,,,
PRO,JBC送丝端口号,JBC_SendWire_Port,COM1,,,,,, PRO,JBC送丝端口号,JBC_SendWire_Port,COM6,,,,,,
...@@ -136,8 +136,9 @@ namespace URSoldering.DeviceLibrary ...@@ -136,8 +136,9 @@ namespace URSoldering.DeviceLibrary
System.Threading.Thread.Sleep(100); System.Threading.Thread.Sleep(100);
} }
} }
//连接上IO模块后就输出DO8 //连接上IO模块后,夹具夹紧
//KNDIOMove(IO_Type.DoorStatus, IO_VALUE.HIGH); KNDIOMove(IO_Type.Fixture_Clamp, IO_VALUE.HIGH);
KNDIOMove(IO_Type.Fixture_Relax, IO_VALUE.LOW);
} }
public static bool ShuddenOK() public static bool ShuddenOK()
......
...@@ -54,13 +54,14 @@ namespace URSoldering.DeviceLibrary ...@@ -54,13 +54,14 @@ namespace URSoldering.DeviceLibrary
if (sb == null) if (sb == null)
{ {
serialPort = port; serialPort = port;
new SerialBean(serialPort, bautRate, parity, dataBits, stopBits); sb = new SerialBean(serialPort, bautRate, parity, dataBits, stopBits);
} }
try try
{ {
if (sb.openPort()) if (sb.openPort())
{ {
bool isOk = true; bool isOk = true;
//parseCommand("WRSP", out isOk);
parseCommand(CMD_WriteMode, out isOk); parseCommand(CMD_WriteMode, out isOk);
if (isOk) if (isOk)
{ {
...@@ -120,7 +121,7 @@ namespace URSoldering.DeviceLibrary ...@@ -120,7 +121,7 @@ namespace URSoldering.DeviceLibrary
} }
public static int getReviceData(byte[] dataArray) public static int getReviceData(byte[] dataArray)
{ {
string temp = ""; string strData = "";
try try
{ {
if (dataArray == null) if (dataArray == null)
...@@ -130,23 +131,24 @@ namespace URSoldering.DeviceLibrary ...@@ -130,23 +131,24 @@ namespace URSoldering.DeviceLibrary
for (int i = 5; i <= 9; i++) for (int i = 5; i <= 9; i++)
{ {
temp += (char)dataArray[i] + ""; strData +=dataArray[i] + "";
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
LOGGER.Info("转换出错:" + ex.ToString()); LOGGER.Info("转换出错:" + ex.ToString());
} }
int tem = 0; ///string rawMsg = Encoding.Default.GetString(dataArray, 0, dataArray.Length);
int data = 0;
try try
{ {
tem = Convert.ToInt32(temp); data = Convert.ToInt32(strData);
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.debug(LOGGER, "转换温度出错:" + temp); LogUtil.debug(LOGGER, "转换出错:" + strData);
} }
return tem; return data;
} }
public static void SendWire(double time, int speed) public static void SendWire(double time, int speed)
{ {
...@@ -184,7 +186,7 @@ namespace URSoldering.DeviceLibrary ...@@ -184,7 +186,7 @@ namespace URSoldering.DeviceLibrary
public static int ReadPortError() public static int ReadPortError()
{ {
bool isOk = false; bool isOk = false;
byte[] reviceData = parseCommand("RECV", out isOk); byte[] reviceData = parseCommand(CMD_GetStatus, out isOk);
return getReviceData(reviceData); return getReviceData(reviceData);
} }
...@@ -202,7 +204,7 @@ namespace URSoldering.DeviceLibrary ...@@ -202,7 +204,7 @@ namespace URSoldering.DeviceLibrary
int value = getReviceData(reviceData); int value = getReviceData(reviceData);
return value; return value;
} }
private static byte[] parseCommand(string commandText, out bool isOk) public static byte[] parseCommand(string commandText, out bool isOk)
{ {
if (sb == null) if (sb == null)
{ {
...@@ -210,12 +212,12 @@ namespace URSoldering.DeviceLibrary ...@@ -210,12 +212,12 @@ namespace URSoldering.DeviceLibrary
return null; return null;
} }
byte[] message = new byte[commandText.Length + 2]; byte[] message = new byte[commandText.Length + 2];
message[0] = (byte)2; message[0] = (byte)0x02;
for (int i = 1; i < commandText.Length + 1; i++) for (int i = 1; i < commandText.Length + 1; i++)
{ {
message[i] = (byte)commandText[i - 1]; message[i] = (byte)commandText[i - 1];
} }
message[message.Length - 1] = (byte)3; message[message.Length - 1] = (byte)0x03;
ushort bcc = 0; ushort bcc = 0;
SerialBean.CalculateBCC(message, message.Length, out bcc); SerialBean.CalculateBCC(message, message.Length, out bcc);
...@@ -235,11 +237,52 @@ namespace URSoldering.DeviceLibrary ...@@ -235,11 +237,52 @@ namespace URSoldering.DeviceLibrary
{ {
data = new byte[messageAll.Length - 5]; data = new byte[messageAll.Length - 5];
} }
//data = new byte[messageAll.Length];
sb.SendCommand(messageAll, ref data, 2, out isOk); sb.SendCommand(messageAll, ref data, 2, out isOk);
string rawMsg = Encoding.ASCII.GetString(data, 0, data.Length);
return data; return data;
} }
//private static byte[] parseCommand(string commandText, out bool isOk)
//{
// if (sb == null)
// {
// isOk = false;
// return null;
// }
// byte[] message = new byte[commandText.Length + 2];
// message[0] = (byte)2;
// for (int i = 1; i < commandText.Length + 1; i++)
// {
// message[i] = (byte)commandText[i - 1];
// }
// message[message.Length - 1] = (byte)3;
// ushort bcc = 0;
// SerialBean.CalculateBCC(message, message.Length, out bcc);
// /**
// * 读命令返回值包含数据域
// * 写命令返回值不包含数据域
// */
// byte[] data = null;
// byte[] messageAll = new byte[message.Length + 1];
// message.CopyTo(messageAll, 0);
// messageAll[messageAll.Length - 1] = (byte)bcc;
// if ("R".Equals(commandText.Substring(0, 1)))
// {
// data = new byte[messageAll.Length + 5];
// }
// else
// {
// data = new byte[messageAll.Length - 5];
// }
// sb.SendCommand(messageAll, ref data, 2, out isOk);
// string rawMsg = Encoding.ASCII.GetString(data, 0, data.Length);
// return data;
//}
public static string GetErrorStr(int error) public static string GetErrorStr(int error)
{ {
string errMsg = ""; string errMsg = "";
......
...@@ -105,81 +105,77 @@ namespace URSoldering.LoadCSVLibrary ...@@ -105,81 +105,77 @@ namespace URSoldering.LoadCSVLibrary
/// <summary> ///// <summary>
/// DI DO 焊接阻挡下降端 StopCylinder_Down 焊接阻挡下降端 X03 DI-03 ///// DI DO 焊接阻挡下降端 StopCylinder_Down 焊接阻挡下降端 X03 DI-03
/// </summary> ///// </summary>
public static string StopCylinder_Down = "StopCylinder_Down"; //public static string StopCylinder_Down = "StopCylinder_Down";
/// <summary> ///// <summary>
/// DI DO 焊接阻挡上升端 StopCylinder_Up 焊接阻挡上升端 X04 DI-04 ///// DI DO 焊接阻挡上升端 StopCylinder_Up 焊接阻挡上升端 X04 DI-04
/// </summary> ///// </summary>
public static string StopCylinder_Up = "StopCylinder_Up"; //public static string StopCylinder_Up = "StopCylinder_Up";
/// <summary> ///// <summary>
/// DI DO 送丝气缸下降端 SendWire_Down 送丝气缸下降端 X05 DI-05 ///// DI DO 送丝气缸下降端 SendWire_Down 送丝气缸下降端 X05 DI-05
/// </summary> ///// </summary>
public static string SendWire_Down = "SendWire_Down"; //public static string SendWire_Down = "SendWire_Down";
/// <summary> ///// <summary>
/// DI DO 送丝气缸上升端 SendWire_Up 送丝气缸上升端 X06 DI-06 ///// DI DO 送丝气缸上升端 SendWire_Up 送丝气缸上升端 X06 DI-06
/// </summary> ///// </summary>
public static string SendWire_Up = "SendWire_Up"; //public static string SendWire_Up = "SendWire_Up";
/// <summary> ///// <summary>
/// DI 焊丝堵 SendWireNoWire 焊丝堵 X07 DI-07 ///// DI 焊丝堵 SendWireNoWire 焊丝堵 X07 DI-07
/// </summary> ///// </summary>
public static string SendWireNoWire = "SendWireNoWire"; //public static string SendWireNoWire = "SendWireNoWire";
/// <summary> ///// <summary>
/// DI 焊丝缺 SendWireLock 焊丝缺 X08 DI-08 ///// DI 焊丝缺 SendWireLock 焊丝缺 X08 DI-08
/// </summary> ///// </summary>
public static string SendWireLock = "SendWireLock"; //public static string SendWireLock = "SendWireLock";
/// <summary> ///// <summary>
/// DI 流水线入口检测 LineInCheck 流水线入口检测 X09 DI-09 ///// DI 流水线入口检测 LineInCheck 流水线入口检测 X09 DI-09
/// </summary> ///// </summary>
public static string LineInCheck = "LineInCheck"; //public static string LineInCheck = "LineInCheck";
/// <summary> ///// <summary>
/// DI 流水线焊接检测 LineWeldCheck 流水线焊接检测 X10 DI-10 ///// DI 流水线焊接检测 LineWeldCheck 流水线焊接检测 X10 DI-10
/// </summary> ///// </summary>
public static string LineWeldCheck = "LineWeldCheck"; //public static string LineWeldCheck = "LineWeldCheck";
/// <summary> ///// <summary>
/// DI 流水线出口检测 LineOutCheck 流水线出口检测 X11 DI-11 ///// DI 流水线出口检测 LineOutCheck 流水线出口检测 X11 DI-11
/// </summary> ///// </summary>
public static string LineOutCheck = "LineOutCheck"; //public static string LineOutCheck = "LineOutCheck";
///// <summary>
///// DI EpsonReady X14 DI-14
///// </summary>
//public static string EpsonReady = "EpsonReady";
/// <summary> ///// <summary>
/// DI EpsonReady X14 DI-14 ///// DI EpsonRunning X15 DI-15
/// </summary> ///// </summary>
public static string EpsonReady = "EpsonReady"; //public static string EpsonRunning = "EpsonRunning";
/// <summary> ///// <summary>
/// DI EpsonRunning X15 DI-15 ///// DI EpsonAlarm X16 DI-16
/// </summary> ///// </summary>
public static string EpsonRunning = "EpsonRunning"; //public static string EpsonAlarm = "EpsonAlarm";
/// <summary> ///// <summary>
/// DI EpsonAlarm X16 DI-16 ///// DO 洗焊吹气启动SOL ClearWeldingSQL 洗焊吹气启动SOL Y05 DO-05
/// </summary> ///// </summary>
public static string EpsonAlarm = "EpsonAlarm"; //public static string ClearWeldingSQL = "ClearWeldingSQL";
/// <summary> ///// <summary>
/// DO 洗焊吹气启动SOL ClearWeldingSQL 洗焊吹气启动SOL Y05 DO-05 ///// DO 流水线启动 LineStart 流水线启动 Y06 DO-06
/// </summary> ///// </summary>
public static string ClearWeldingSQL = "ClearWeldingSQL"; //public static string LineStart = "LineStart";
/// <summary>
/// DO 流水线启动 LineStart 流水线启动 Y06 DO-06 ///// <summary>
/// </summary> ///// DO EpsonStart Y09 DO-09
public static string LineStart = "LineStart"; ///// </summary>
//public static string EpsonStart = "EpsonStart";
/// <summary> ///// <summary>
/// DO EpsonStart Y09 DO-09 ///// DO EpsonStop Y10 DO-10
/// </summary> ///// </summary>
public static string EpsonStart = "EpsonStart"; //public static string EpsonStop = "EpsonStop";
/// <summary> ///// <summary>
/// DO EpsonStop Y10 DO-10 ///// DO EpsonReset Y11 DO-11
/// </summary> ///// </summary>
public static string EpsonStop = "EpsonStop"; //public static string EpsonReset = "EpsonReset";
/// <summary>
/// DO EpsonReset Y11 DO-11
/// </summary>
public static string EpsonReset = "EpsonReset";
#endregion #endregion
} }
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(73, 100); this.label1.Location = new System.Drawing.Point(73, 100);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 17); this.label1.Size = new System.Drawing.Size(32, 17);
this.label1.TabIndex = 269; this.label1.TabIndex = 269;
this.label1.Text = "条码"; this.label1.Text = "条码";
// //
...@@ -185,7 +185,6 @@ ...@@ -185,7 +185,6 @@
this.ClientSize = new System.Drawing.Size(463, 293); this.ClientSize = new System.Drawing.Size(463, 293);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.label14); this.Controls.Add(this.label14);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmBoardCopy"; this.Name = "FrmBoardCopy";
this.Text = "新增程序"; this.Text = "新增程序";
this.Load += new System.EventHandler(this.FrmBoardInfo_Load); this.Load += new System.EventHandler(this.FrmBoardInfo_Load);
......
...@@ -1032,9 +1032,8 @@ namespace URSoldering.Client ...@@ -1032,9 +1032,8 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); WeldRobotBean.SendWireWork(false);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); WeldRobotBean.SolderingUp(false);
URPointValue point = WeldRobotBean.HomePoint; URPointValue point = WeldRobotBean.HomePoint;
if (point.X != 0 && point.Y != 0 && point.Z!=0) if (point.X != 0 && point.Y != 0 && point.Z!=0)
{ {
...@@ -1501,14 +1500,13 @@ namespace URSoldering.Client ...@@ -1501,14 +1500,13 @@ namespace URSoldering.Client
{ {
if (btnWUp.Text.Equals("送丝上升")) if (btnWUp.Text.Equals("送丝上升"))
{ {
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); WeldRobotBean.SolderingUp(false);
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW);
btnWUp.Text = "送丝下降"; btnWUp.Text = "送丝下降";
} }
else else
{ {
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.HIGH); WeldRobotBean.SolderingDown(false);
btnWUp.Text = "送丝上升"; btnWUp.Text = "送丝上升";
} }
} }
...@@ -1516,8 +1514,8 @@ namespace URSoldering.Client ...@@ -1516,8 +1514,8 @@ namespace URSoldering.Client
private void btnWDown_Click(object sender, EventArgs e) private void btnWDown_Click(object sender, EventArgs e)
{ {
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.LOW); //RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.HIGH); //RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.HIGH);
} }
private void btnSetClear1_Click(object sender, EventArgs e) private void btnSetClear1_Click(object sender, EventArgs e)
...@@ -1579,24 +1577,24 @@ namespace URSoldering.Client ...@@ -1579,24 +1577,24 @@ namespace URSoldering.Client
private void btnStopDown_Click(object sender, EventArgs e) private void btnStopDown_Click(object sender, EventArgs e)
{ {
if (btnStopDown.Text.Equals("阻挡气缸下降")) //if (btnStopDown.Text.Equals("阻挡气缸下降"))
{ //{
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.HIGH); // RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.HIGH);
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.LOW); // RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.LOW);
btnStopDown.Text = "阻挡气缸上升"; // btnStopDown.Text = "阻挡气缸上升";
} //}
else //else
{ //{
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW); // RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH); // RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH);
btnStopDown.Text = "阻挡气缸下降"; // btnStopDown.Text = "阻挡气缸下降";
} //}
} }
private void btnStopUp_Click(object sender, EventArgs e) private void btnStopUp_Click(object sender, EventArgs e)
{ {
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW); //RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH); //RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH);
} }
private void btnPositionTest_Click(object sender, EventArgs e) private void btnPositionTest_Click(object sender, EventArgs e)
......
...@@ -82,9 +82,7 @@ namespace URSoldering.Client ...@@ -82,9 +82,7 @@ namespace URSoldering.Client
cmbWriteIO.DataSource = new List<ConfigIO>(RobotManager.robotConfig.RobotDOList.Values); cmbWriteIO.DataSource = new List<ConfigIO>(RobotManager.robotConfig.RobotDOList.Values);
cmbWriteIO.ValueMember = "ProName"; cmbWriteIO.ValueMember = "ProName";
cmbWriteIO.DisplayMember = "DisplayStr"; cmbWriteIO.DisplayMember = "DisplayStr";
cmbWriteValue.SelectedIndex = 0;
cmbWriteIO.SelectedIndex = 0;
cmbWriteIO_SelectedIndexChanged(null, null);
} }
private void btnReadIO_Click(object sender, EventArgs e) private void btnReadIO_Click(object sender, EventArgs e)
{ {
...@@ -117,7 +115,11 @@ namespace URSoldering.Client ...@@ -117,7 +115,11 @@ namespace URSoldering.Client
{ {
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
int index = FormUtil.GetIntValue(txtDOIndex); int index = FormUtil.GetIntValue(txtDOIndex);
IO_VALUE value = (IO_VALUE)cmbWriteValue.SelectedIndex; IO_VALUE value = IO_VALUE.LOW;
if (rdoHigh.Checked)
{
value = IO_VALUE.HIGH;
}
int time = FormUtil.GetIntValue(txtWriteTime); int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId); int slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0) if (time > 0)
...@@ -166,9 +168,6 @@ namespace URSoldering.Client ...@@ -166,9 +168,6 @@ namespace URSoldering.Client
private void btnReadAllDi_Click(object sender, EventArgs e) private void btnReadAllDi_Click(object sender, EventArgs e)
{ {
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
IO_VALUE value = (IO_VALUE)cmbWriteValue.SelectedIndex;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId); int slaveId = FormUtil.GetIntValue(txtSlaveId);
KNDManager.ReadMultipleDI(deviceName, (byte)slaveId, (ushort)KNDManager.DIStartAddress, 16); KNDManager.ReadMultipleDI(deviceName, (byte)slaveId, (ushort)KNDManager.DIStartAddress, 16);
} }
...@@ -176,8 +175,6 @@ namespace URSoldering.Client ...@@ -176,8 +175,6 @@ namespace URSoldering.Client
private void btnReadAllDo_Click(object sender, EventArgs e) private void btnReadAllDo_Click(object sender, EventArgs e)
{ {
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
IO_VALUE value = (IO_VALUE)cmbWriteValue.SelectedIndex;
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId); int slaveId = FormUtil.GetIntValue(txtSlaveId);
KNDManager.ReadMultipleDO(deviceName, (byte)slaveId, (ushort)KNDManager.DoStartAddress, 16); KNDManager.ReadMultipleDO(deviceName, (byte)slaveId, (ushort)KNDManager.DoStartAddress, 16);
} }
...@@ -187,7 +184,7 @@ namespace URSoldering.Client ...@@ -187,7 +184,7 @@ namespace URSoldering.Client
if (RobotBean.ShuddenOK().Equals(false)) if (RobotBean.ShuddenOK().Equals(false))
{ {
lblMsg.Text = "急停未开"; lblMsg.Text = "急停未开";
if (this.btnClean.Enabled) if (this.btnSendWireStop.Enabled)
{ {
FormStatus(false); FormStatus(false);
...@@ -196,7 +193,7 @@ namespace URSoldering.Client ...@@ -196,7 +193,7 @@ namespace URSoldering.Client
else else
{ {
lblMsg.Text = ""; lblMsg.Text = "";
if (this.btnClean.Enabled == false) if (this.btnSendWireStop.Enabled == false)
{ {
FormStatus(true); FormStatus(true);
} }
...@@ -209,7 +206,7 @@ namespace URSoldering.Client ...@@ -209,7 +206,7 @@ namespace URSoldering.Client
private void FormStatus(bool isOpen) private void FormStatus(bool isOpen)
{ {
this.btnClean.Enabled = isOpen; this.btnSendWireStop.Enabled = isOpen;
this.btnWDown.Enabled = isOpen; this.btnWDown.Enabled = isOpen;
this.btnWUp.Enabled = isOpen; this.btnWUp.Enabled = isOpen;
...@@ -218,15 +215,17 @@ namespace URSoldering.Client ...@@ -218,15 +215,17 @@ namespace URSoldering.Client
this.btnStopSend.Enabled = isOpen; this.btnStopSend.Enabled = isOpen;
this.btnWStop.Enabled = isOpen; this.btnWStop.Enabled = isOpen;
groupBox4.Enabled = isOpen; groupBox4.Enabled = isOpen;
btnStopStop.Enabled = isOpen; btnFixtureStop.Enabled = isOpen;
btnLineMove.Enabled = isOpen; btnWireWork.Enabled = isOpen;
} }
private void btnSendWire_Click(object sender, EventArgs e) private void btnSendWire_Click(object sender, EventArgs e)
{ {
//匀速运动 int speed = FormUtil.GetIntValue(txtSpeed);
int speed = FormUtil.GetIntValue(txtSpeed) * WeldRobotBean.SendWireXiShu; int length = FormUtil.GetIntValue(txtSendWireLength);
//SendWireManager.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed); SendWireManager.setLength(length);
SendWireManager.setSpeed(speed);
SendWireManager.StartFSend();
} }
private void btnStopSend_Click(object sender, EventArgs e) private void btnStopSend_Click(object sender, EventArgs e)
...@@ -243,8 +242,11 @@ namespace URSoldering.Client ...@@ -243,8 +242,11 @@ namespace URSoldering.Client
} }
private void btnTestSend_Click(object sender, EventArgs e) private void btnTestSend_Click(object sender, EventArgs e)
{ {
int position = FormUtil.GetIntValue(txtSendWirePosition) * WeldRobotBean.SendWireXiShu; int speed = FormUtil.GetIntValue(txtSpeed);
//SendWireManager.RelativeMove(WeldRobotBean.RobotConfig.SendWire_Slv, position); int length = FormUtil.GetIntValue(txtSendWireLength);
SendWireManager.setLength(length);
SendWireManager.setSpeed(speed);
SendWireManager.StartBSend();
} }
...@@ -255,50 +257,62 @@ namespace URSoldering.Client ...@@ -255,50 +257,62 @@ namespace URSoldering.Client
private void btnClean_Click(object sender, EventArgs e) private void btnClean_Click(object sender, EventArgs e)
{ {
this.btnClean.Enabled = false; SendWireCylinderMove(IO_VALUE.LOW, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH);
Thread.Sleep(WeldRobotBean.RobotConfig.ClearMSenconds);
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.LOW);
this.btnClean.Enabled = true;
} }
private void SolderingCylinderMove(IO_VALUE down,IO_VALUE up)
{
RobotBean.KNDIOMove(IO_Type.Soldering_Down, down);
RobotBean.KNDIOMove(IO_Type.Soldering_Up, up);
}
private void FixtureCylinderMove(IO_VALUE clamp, IO_VALUE relax)
{
RobotBean.KNDIOMove(IO_Type.Fixture_Clamp, clamp);
RobotBean.KNDIOMove(IO_Type.Fixture_Relax, relax);
}
private void SendWireCylinderMove(IO_VALUE work, IO_VALUE clear)
{
RobotBean.KNDIOMove(IO_Type.SendWire_Work, work);
RobotBean.KNDIOMove(IO_Type.SendWire_Clear, clear);
}
private void btnWDown_Click(object sender, EventArgs e) private void btnWDown_Click(object sender, EventArgs e)
{ {
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.HIGH); SolderingCylinderMove(IO_VALUE.HIGH, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.LOW);
} }
private void btnWUp_Click(object sender, EventArgs e) private void btnWUp_Click(object sender, EventArgs e)
{ {
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); SolderingCylinderMove(IO_VALUE.LOW, IO_VALUE.HIGH);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH);
} }
private void btnWStop_Click(object sender, EventArgs e) private void btnWStop_Click(object sender, EventArgs e)
{ {
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); SolderingCylinderMove(IO_VALUE.LOW, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.LOW);
} }
private void btnStopDown_Click(object sender, EventArgs e) private void btnFixtureClamp_Click(object sender, EventArgs e)
{ {
FixtureCylinderMove(IO_VALUE.HIGH, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.HIGH);
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.LOW);
} }
private void btnStopUp_Click(object sender, EventArgs e) private void btnFixtureReleax_Click(object sender, EventArgs e)
{ {
FixtureCylinderMove(IO_VALUE.LOW, IO_VALUE.HIGH);
}
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW); private void btnFixtureStop_Click(object sender, EventArgs e)
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH); {
FixtureCylinderMove(IO_VALUE.LOW, IO_VALUE.LOW);
} }
private void btnStopStop_Click(object sender, EventArgs e) private void btnWireWork_Click(object sender, EventArgs e)
{ {
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW); SendWireCylinderMove(IO_VALUE.HIGH, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.LOW); }
private void btnWireClear_Click(object sender, EventArgs e)
{
SendWireCylinderMove(IO_VALUE.HIGH, IO_VALUE.LOW);
} }
} }
} }
...@@ -67,29 +67,29 @@ namespace URSoldering.Client ...@@ -67,29 +67,29 @@ namespace URSoldering.Client
private bool isRun = false; private bool isRun = false;
private void timer_Elapsed(object sender, EventArgs e) private void timer_Elapsed(object sender, EventArgs e)
{ {
if (!URRobotControl.IsRun && isRun.Equals(false)) //if (!URRobotControl.IsRun && isRun.Equals(false))
{ //{
Task.Factory.StartNew(delegate () // Task.Factory.StartNew(delegate ()
{ // {
bool result = URRobotControl.StartRobot(); // bool result = URRobotControl.StartRobot();
if (!result) // if (!result)
{ // {
LogUtil.info("连接失败:" + result); // LogUtil.info("连接失败:" + result);
} // }
else // else
{ // {
URRobotControl.FreeAxis(); // URRobotControl.FreeAxis();
isAuto = false; // isAuto = false;
} // }
}); // });
isRun = true; // isRun = true;
} //}
else //else
{ //{
URPointValue lastP = URRobotControl.GetLastPosition(); // URPointValue lastP = URRobotControl.GetLastPosition();
urRobotSControl1.ShowPoint(lastP); // urRobotSControl1.ShowPoint(lastP);
} //}
} }
private void FrmBoardInfo_FormClosing(object sender, FormClosingEventArgs e) private void FrmBoardInfo_FormClosing(object sender, FormClosingEventArgs e)
...@@ -135,8 +135,8 @@ namespace URSoldering.Client ...@@ -135,8 +135,8 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); //RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); //RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH);
URPointValue point = WeldRobotBean.HomePoint; URPointValue point = WeldRobotBean.HomePoint;
URRobotControl.MoveTo(point); URRobotControl.MoveTo(point);
......
using log4net; using log4net;
using System; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using URSoldering.Common; using URSoldering.Common;
using URSoldering.DeviceLibrary; using URSoldering.DeviceLibrary;
...@@ -131,8 +125,12 @@ namespace URSoldering.Client ...@@ -131,8 +125,12 @@ namespace URSoldering.Client
private void btnReadError_Click_1(object sender, EventArgs e) private void btnReadError_Click_1(object sender, EventArgs e)
{ {
int speed = SendWireManager.querySpeed();
int length = SendWireManager.queryLength();
int value = SendWireManager.ReadPortError(); int value = SendWireManager.ReadPortError();
txtPortError.Text = value.ToString(); txtPortError.Text = value.ToString();
txtLength.Text = length.ToString();
txtSpeed.Text = speed.ToString();
} }
private void btnReset_Click(object sender, EventArgs e) private void btnReset_Click(object sender, EventArgs e)
...@@ -140,6 +138,20 @@ namespace URSoldering.Client ...@@ -140,6 +138,20 @@ namespace URSoldering.Client
SendWireManager.Reset(); SendWireManager.Reset();
} }
private void btnSend_Click(object sender, EventArgs e)
{
txtRevice.Text = "";
string text = txtSend.Text;
bool isOk = false;
byte[] reviceData =SendWireManager.parseCommand(text, out isOk);
int length = reviceData.Length - 3;
if (length <= 0)
{
length = reviceData.Length;
}
string rawMsg = Encoding.ASCII.GetString(reviceData, 1, length);
txtRevice.Text = rawMsg;
}
} }
} }
...@@ -230,7 +230,7 @@ namespace URSoldering.Client ...@@ -230,7 +230,7 @@ namespace URSoldering.Client
// //
// btnCloseSold // btnCloseSold
// //
this.btnCloseSold.Location = new System.Drawing.Point(439, 40); this.btnCloseSold.Location = new System.Drawing.Point(439, 39);
this.btnCloseSold.Name = "btnCloseSold"; this.btnCloseSold.Name = "btnCloseSold";
this.btnCloseSold.Size = new System.Drawing.Size(117, 35); this.btnCloseSold.Size = new System.Drawing.Size(117, 35);
this.btnCloseSold.TabIndex = 266; this.btnCloseSold.TabIndex = 266;
...@@ -240,7 +240,7 @@ namespace URSoldering.Client ...@@ -240,7 +240,7 @@ namespace URSoldering.Client
// //
// txtSoldingCom // txtSoldingCom
// //
this.txtSoldingCom.Location = new System.Drawing.Point(125, 41); this.txtSoldingCom.Location = new System.Drawing.Point(125, 45);
this.txtSoldingCom.Name = "txtSoldingCom"; this.txtSoldingCom.Name = "txtSoldingCom";
this.txtSoldingCom.Size = new System.Drawing.Size(101, 23); this.txtSoldingCom.Size = new System.Drawing.Size(101, 23);
this.txtSoldingCom.TabIndex = 265; this.txtSoldingCom.TabIndex = 265;
...@@ -248,7 +248,7 @@ namespace URSoldering.Client ...@@ -248,7 +248,7 @@ namespace URSoldering.Client
// label8 // label8
// //
this.label8.AutoSize = true; this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(64, 46); this.label8.Location = new System.Drawing.Point(64, 48);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17); this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 264; this.label8.TabIndex = 264;
......
...@@ -112,21 +112,21 @@ ...@@ -112,21 +112,21 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 17</value> <value>107, 17</value>
</metadata> </metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>78</value> <value>78</value>
</metadata> </metadata>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -313,7 +313,7 @@ ...@@ -313,7 +313,7 @@
this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox5.Location = new System.Drawing.Point(305, 270); this.groupBox5.Location = new System.Drawing.Point(305, 270);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(414, 260); this.groupBox5.Size = new System.Drawing.Size(404, 260);
this.groupBox5.TabIndex = 42; this.groupBox5.TabIndex = 42;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "机械臂活动范围"; this.groupBox5.Text = "机械臂活动范围";
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(21, 19); this.groupBox1.Location = new System.Drawing.Point(21, 19);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(475, 119); this.groupBox1.Size = new System.Drawing.Size(470, 119);
this.groupBox1.TabIndex = 59; this.groupBox1.TabIndex = 59;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "焊点基本信息"; this.groupBox1.Text = "焊点基本信息";
...@@ -213,23 +213,23 @@ ...@@ -213,23 +213,23 @@
// //
this.groupBox2.Controls.Add(this.urRobot); this.groupBox2.Controls.Add(this.urRobot);
this.groupBox2.Controls.Add(this.btnUpdate); this.groupBox2.Controls.Add(this.btnUpdate);
this.groupBox2.Location = new System.Drawing.Point(502, 135); this.groupBox2.Location = new System.Drawing.Point(499, 139);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(202, 310); this.groupBox2.Size = new System.Drawing.Size(202, 306);
this.groupBox2.TabIndex = 60; this.groupBox2.TabIndex = 60;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "坐标"; this.groupBox2.Text = "坐标";
// //
// urRobot // urRobot
// //
this.urRobot.Location = new System.Drawing.Point(18, 30); this.urRobot.Location = new System.Drawing.Point(18, 27);
this.urRobot.Name = "urRobot"; this.urRobot.Name = "urRobot";
this.urRobot.Size = new System.Drawing.Size(156, 212); this.urRobot.Size = new System.Drawing.Size(156, 212);
this.urRobot.TabIndex = 70; this.urRobot.TabIndex = 70;
// //
// btnUpdate // btnUpdate
// //
this.btnUpdate.Location = new System.Drawing.Point(54, 264); this.btnUpdate.Location = new System.Drawing.Point(54, 258);
this.btnUpdate.Name = "btnUpdate"; this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(120, 35); this.btnUpdate.Size = new System.Drawing.Size(120, 35);
this.btnUpdate.TabIndex = 69; this.btnUpdate.TabIndex = 69;
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
this.gbIron.Controls.Add(this.txtDweldTime); this.gbIron.Controls.Add(this.txtDweldTime);
this.gbIron.Location = new System.Drawing.Point(21, 139); this.gbIron.Location = new System.Drawing.Point(21, 139);
this.gbIron.Name = "gbIron"; this.gbIron.Name = "gbIron";
this.gbIron.Size = new System.Drawing.Size(475, 188); this.gbIron.Size = new System.Drawing.Size(470, 188);
this.gbIron.TabIndex = 55; this.gbIron.TabIndex = 55;
this.gbIron.TabStop = false; this.gbIron.TabStop = false;
this.gbIron.Text = "烙铁温度"; this.gbIron.Text = "烙铁温度";
...@@ -522,7 +522,7 @@ ...@@ -522,7 +522,7 @@
this.gbWireFeeding.Controls.Add(this.txtDsendWireTime); this.gbWireFeeding.Controls.Add(this.txtDsendWireTime);
this.gbWireFeeding.Location = new System.Drawing.Point(21, 329); this.gbWireFeeding.Location = new System.Drawing.Point(21, 329);
this.gbWireFeeding.Name = "gbWireFeeding"; this.gbWireFeeding.Name = "gbWireFeeding";
this.gbWireFeeding.Size = new System.Drawing.Size(475, 116); this.gbWireFeeding.Size = new System.Drawing.Size(470, 116);
this.gbWireFeeding.TabIndex = 56; this.gbWireFeeding.TabIndex = 56;
this.gbWireFeeding.TabStop = false; this.gbWireFeeding.TabStop = false;
this.gbWireFeeding.Text = "送丝"; this.gbWireFeeding.Text = "送丝";
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.lblAOIResult = new System.Windows.Forms.Label(); this.lblAOIResult = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnWeld = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.lblRobotWarnMsg = new System.Windows.Forms.Label(); this.lblRobotWarnMsg = new System.Windows.Forms.Label();
this.btnStart = new System.Windows.Forms.Button(); this.btnStart = new System.Windows.Forms.Button();
...@@ -310,6 +311,7 @@ ...@@ -310,6 +311,7 @@
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.btnWeld);
this.groupBox1.Controls.Add(this.panel2); this.groupBox1.Controls.Add(this.panel2);
this.groupBox1.Controls.Add(this.btnStart); this.groupBox1.Controls.Add(this.btnStart);
this.groupBox1.Controls.Add(this.btnBack); this.groupBox1.Controls.Add(this.btnBack);
...@@ -321,15 +323,26 @@ ...@@ -321,15 +323,26 @@
this.groupBox1.TabIndex = 268; this.groupBox1.TabIndex = 268;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// btnWeld
//
this.btnWeld.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWeld.Location = new System.Drawing.Point(145, 16);
this.btnWeld.Name = "btnWeld";
this.btnWeld.Size = new System.Drawing.Size(133, 52);
this.btnWeld.TabIndex = 271;
this.btnWeld.Text = "开始焊接";
this.btnWeld.UseVisualStyleBackColor = true;
this.btnWeld.Click += new System.EventHandler(this.btnWeld_Click);
//
// panel2 // panel2
// //
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panel2.Controls.Add(this.lblRobotWarnMsg); this.panel2.Controls.Add(this.lblRobotWarnMsg);
this.panel2.Location = new System.Drawing.Point(435, 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(1149, 59); this.panel2.Size = new System.Drawing.Size(1066, 59);
this.panel2.TabIndex = 270; this.panel2.TabIndex = 270;
// //
// lblRobotWarnMsg // lblRobotWarnMsg
...@@ -340,7 +353,7 @@ ...@@ -340,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(1139, 51); this.lblRobotWarnMsg.Size = new System.Drawing.Size(1056, 51);
this.lblRobotWarnMsg.TabIndex = 4; this.lblRobotWarnMsg.TabIndex = 4;
// //
// btnStart // btnStart
...@@ -348,7 +361,7 @@ ...@@ -348,7 +361,7 @@
this.btnStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStart.Location = new System.Drawing.Point(6, 16); this.btnStart.Location = new System.Drawing.Point(6, 16);
this.btnStart.Name = "btnStart"; this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(150, 52); this.btnStart.Size = new System.Drawing.Size(133, 52);
this.btnStart.TabIndex = 266; this.btnStart.TabIndex = 266;
this.btnStart.Text = "启动"; this.btnStart.Text = "启动";
this.btnStart.UseVisualStyleBackColor = true; this.btnStart.UseVisualStyleBackColor = true;
...@@ -369,9 +382,9 @@ ...@@ -369,9 +382,9 @@
// btnStop // btnStop
// //
this.btnStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop.Location = new System.Drawing.Point(162, 16); this.btnStop.Location = new System.Drawing.Point(284, 17);
this.btnStop.Name = "btnStop"; this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(150, 52); this.btnStop.Size = new System.Drawing.Size(133, 52);
this.btnStop.TabIndex = 265; this.btnStop.TabIndex = 265;
this.btnStop.Text = "停止"; this.btnStop.Text = "停止";
this.btnStop.UseVisualStyleBackColor = true; this.btnStop.UseVisualStyleBackColor = true;
...@@ -381,7 +394,7 @@ ...@@ -381,7 +394,7 @@
// //
this.chbHigh.AutoSize = true; this.chbHigh.AutoSize = true;
this.chbHigh.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbHigh.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbHigh.Location = new System.Drawing.Point(330, 30); this.chbHigh.Location = new System.Drawing.Point(424, 31);
this.chbHigh.Name = "chbHigh"; this.chbHigh.Name = "chbHigh";
this.chbHigh.Size = new System.Drawing.Size(93, 25); this.chbHigh.Size = new System.Drawing.Size(93, 25);
this.chbHigh.TabIndex = 267; this.chbHigh.TabIndex = 267;
...@@ -878,5 +891,6 @@ ...@@ -878,5 +891,6 @@
private System.Windows.Forms.Label lblCode; private System.Windows.Forms.Label lblCode;
private System.Windows.Forms.Label lblProName; private System.Windows.Forms.Label lblProName;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnWeld;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -933,5 +933,11 @@ namespace URSoldering.Client ...@@ -933,5 +933,11 @@ namespace URSoldering.Client
{ {
LoadCountPoint(true); LoadCountPoint(true);
} }
private void btnWeld_Click(object sender, EventArgs e)
{
//如果开始焊接,开始焊接
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!