Commit 9a750da5 几米阳光

去掉硕科送丝器代码,改为JBC送丝器

1 个父辈 2384bcdd
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
<Compile Include="deviceLibrary\halcon\UsbCameraHDevelop.cs" /> <Compile Include="deviceLibrary\halcon\UsbCameraHDevelop.cs" />
<Compile Include="deviceLibrary\jbc\SendWireManager.cs" /> <Compile Include="deviceLibrary\jbc\SendWireManager.cs" />
<Compile Include="deviceLibrary\jbc\SolderingManager.cs" /> <Compile Include="deviceLibrary\jbc\SolderingManager.cs" />
<Compile Include="deviceLibrary\shuoke\ShuoKeControls.cs" />
<Compile Include="deviceLibrary\urRobot\URRobotControl.cs" /> <Compile Include="deviceLibrary\urRobot\URRobotControl.cs" />
<Compile Include="deviceLibrary\urRobot\URRobotManager.cs" /> <Compile Include="deviceLibrary\urRobot\URRobotManager.cs" />
<Compile Include="Robot\MoveType.cs" /> <Compile Include="Robot\MoveType.cs" />
......
...@@ -34,21 +34,6 @@ namespace URSoldering.DeviceLibrary ...@@ -34,21 +34,6 @@ namespace URSoldering.DeviceLibrary
{ {
return RobotReset(); return RobotReset();
} }
public void InitLineSpeed()
{
//设置速度
ShuoKeControls.SetSpeed(Config.Line_Slv, ShuoKeCMD.SetAddSpeed, Config.Line_AddSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.Line_Slv, ShuoKeCMD.SetDelSpeed, Config.Line_DelSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.Line_Slv, ShuoKeCMD.SetEndSpeed, Config.Line_EndSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.Line_Slv, ShuoKeCMD.SetHomeSpeed, Config.Line_HomeSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.Line_Slv, ShuoKeCMD.SetMaxSpeed, Config.Line_MaxSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.Line_Slv, ShuoKeCMD.SetStartSpeed, Config.Line_StartSpeed);
}
public bool RobotReset() public bool RobotReset()
{ {
...@@ -96,7 +81,7 @@ namespace URSoldering.DeviceLibrary ...@@ -96,7 +81,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);
InitLineSpeed(); //InitLineSpeed();
//阻挡气缸上升 //阻挡气缸上升
StopCylinderUp(); StopCylinderUp();
...@@ -247,7 +232,7 @@ namespace URSoldering.DeviceLibrary ...@@ -247,7 +232,7 @@ namespace URSoldering.DeviceLibrary
LineLog("流水线转动:阻挡气缸上升到位,转动流水线"); LineLog("流水线转动:阻挡气缸上升到位,转动流水线");
LineStep.NextMoveStep(MoveStep.L01_StartLineMove); LineStep.NextMoveStep(MoveStep.L01_StartLineMove);
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineWeldCheck, IO_VALUE.HIGH)); LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineWeldCheck, IO_VALUE.HIGH));
LineStartMove(); //LineStartMove();
} }
else if (LineStep.moveStep.Equals(MoveStep.L01_StartLineMove)) else if (LineStep.moveStep.Equals(MoveStep.L01_StartLineMove))
{ {
...@@ -259,7 +244,7 @@ namespace URSoldering.DeviceLibrary ...@@ -259,7 +244,7 @@ namespace URSoldering.DeviceLibrary
} }
else if (LineStep.moveStep.Equals(MoveStep.L02_GetWeldSingle)) else if (LineStep.moveStep.Equals(MoveStep.L02_GetWeldSingle))
{ {
LineStopMove(); //LineStopMove();
LineStep.NextMoveStep(MoveStep.L03_GetCode); LineStep.NextMoveStep(MoveStep.L03_GetCode);
LineStep.WaitList.Add(WaitResultInfo.WaitTime(500)); LineStep.WaitList.Add(WaitResultInfo.WaitTime(500));
...@@ -335,7 +320,7 @@ namespace URSoldering.DeviceLibrary ...@@ -335,7 +320,7 @@ namespace URSoldering.DeviceLibrary
//IsWaitCheck = false; //IsWaitCheck = false;
//WaitScanResult = false; //WaitScanResult = false;
//CanScan = false; //CanScan = false;
LineStopMove(); //LineStopMove();
KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW); KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
//HDevelopExport.CloseAllCamera(); //HDevelopExport.CloseAllCamera();
WeldRobotBean.StopMove(); WeldRobotBean.StopMove();
......
...@@ -25,89 +25,89 @@ namespace URSoldering.DeviceLibrary ...@@ -25,89 +25,89 @@ namespace URSoldering.DeviceLibrary
} }
private void BusyProcess() private void BusyProcess()
{ {
if (LineStep.IsInWait) //if (LineStep.IsInWait)
{ //{
CheckWait(); // CheckWait();
} //}
if(LineStep.IsInWait) //if(LineStep.IsInWait)
{ //{
return; // return;
} //}
if (LineStep.moveStep.Equals(MoveStep.BUSY01_Weld)) //if (LineStep.moveStep.Equals(MoveStep.BUSY01_Weld))
{ //{
//if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.None)) // //if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.None))
if (WeldRobotBean.IsInWeld.Equals(false)) // if (WeldRobotBean.IsInWeld.Equals(false))
{ // {
LastEndWeldTime = DateTime.Now; // LastEndWeldTime = DateTime.Now;
TimeSpan span = LastEndWeldTime - LastStartWeldTime; // TimeSpan span = LastEndWeldTime - LastStartWeldTime;
if (BoardManager.CurrBoard.WeldTime.TotalSeconds <= 0) // if (BoardManager.CurrBoard.WeldTime.TotalSeconds <= 0)
{ // {
BoardManager.CurrBoard.WeldTime = span; // BoardManager.CurrBoard.WeldTime = span;
} // }
else // else
{ // {
BoardManager.CurrBoard.WeldTime = new TimeSpan(0, 0, (int)(BoardManager.CurrBoard.WeldTime.TotalSeconds + span.TotalSeconds) / 2); // BoardManager.CurrBoard.WeldTime = new TimeSpan(0, 0, (int)(BoardManager.CurrBoard.WeldTime.TotalSeconds + span.TotalSeconds) / 2);
} // }
BoardManager.Update(BoardManager.CurrBoard); // BoardManager.Update(BoardManager.CurrBoard);
LogUtil.info("Busy处理:" + "焊接结束,焊接耗时"+FormUtil.GetSpanStr(span)+ ",累积平均耗时" + FormUtil.GetSpanStr(BoardManager.CurrBoard.WeldTime) + ",阻挡气缸下降"); // LogUtil.info("Busy处理:" + "焊接结束,焊接耗时"+FormUtil.GetSpanStr(span)+ ",累积平均耗时" + FormUtil.GetSpanStr(BoardManager.CurrBoard.WeldTime) + ",阻挡气缸下降");
LineStep.NextMoveStep(MoveStep.BUSY03_CylinderDown); // LineStep.NextMoveStep(MoveStep.BUSY03_CylinderDown);
StopCylinderDownAndWait(); // StopCylinderDownAndWait();
} // }
} //}
//焊接完成,流水线继续转动,直到出料口检测到信号 ////焊接完成,流水线继续转动,直到出料口检测到信号
else if (LineStep.moveStep.Equals(MoveStep.BUSY03_CylinderDown)) //else if (LineStep.moveStep.Equals(MoveStep.BUSY03_CylinderDown))
{ //{
LineLog("Busy处理:" + "流水线转动,等待出料口信号"); // LineLog("Busy处理:" + "流水线转动,等待出料口信号");
LineStep.NextMoveStep(MoveStep.BUSY04_LineMove); // LineStep.NextMoveStep(MoveStep.BUSY04_LineMove);
LineStartMove(); // LineStartMove();
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineOutCheck, IO_VALUE.HIGH)); // LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineOutCheck, IO_VALUE.HIGH));
} //}
else if (LineStep.moveStep.Equals(MoveStep.BUSY04_LineMove)) //else if (LineStep.moveStep.Equals(MoveStep.BUSY04_LineMove))
{ //{
LineStopMove(); // LineStopMove();
if (IsAutoRun) // if (IsAutoRun)
{ // {
LineLog("Busy处理:" + "等待3秒钟后流水线倒转"); // LineLog("Busy处理:" + "等待3秒钟后流水线倒转");
LineStep.NextMoveStep(MoveStep.BUSY05_Wait); // LineStep.NextMoveStep(MoveStep.BUSY05_Wait);
LineStep.WaitList.Add(WaitResultInfo.WaitTime(2000)); // LineStep.WaitList.Add(WaitResultInfo.WaitTime(2000));
} // }
else // else
{ // {
LineLog("Busy处理:" + "停止转动"); // LineLog("Busy处理:" + "停止转动");
StopCylinderUp(); // StopCylinderUp();
Status = RobotStatus.Runing; // Status = RobotStatus.Runing;
} // }
} //}
else if (LineStep.moveStep.Equals(MoveStep.BUSY05_Wait)) //else if (LineStep.moveStep.Equals(MoveStep.BUSY05_Wait))
{ //{
LineLog("Busy处理:" + "流水线转动,等待出料口信号"); // LineLog("Busy处理:" + "流水线转动,等待出料口信号");
LineStep.NextMoveStep(MoveStep.BUSY06_WaitInSingle); // LineStep.NextMoveStep(MoveStep.BUSY06_WaitInSingle);
LineBackMove(); // LineBackMove();
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineInCheck, IO_VALUE.HIGH)); // LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineInCheck, IO_VALUE.HIGH));
} //}
else if (LineStep.moveStep.Equals(MoveStep.BUSY06_WaitInSingle)) //else if (LineStep.moveStep.Equals(MoveStep.BUSY06_WaitInSingle))
{ //{
LineLog("Busy处理:" + "板子到达入料口,停止转动"); // LineLog("Busy处理:" + "板子到达入料口,停止转动");
LineStopMove(); // LineStopMove();
StopCylinderUp(); // StopCylinderUp();
Status = RobotStatus.Runing; // Status = RobotStatus.Runing;
} //}
} }
private void LineBackMove() //private void LineBackMove()
{ //{
ShuoKeControls.VolMove(Config.Line_Slv, Config.Line_EndSpeed); // ShuoKeControls.VolMove(Config.Line_Slv, Config.Line_EndSpeed);
KNDIOMove(IO_Type.LineStart, IO_VALUE.HIGH); // KNDIOMove(IO_Type.LineStart, IO_VALUE.HIGH);
} //}
private void LineStartMove() //private void LineStartMove()
{ //{
ShuoKeControls.VolMove(Config.Line_Slv, 0- Config.Line_EndSpeed); // ShuoKeControls.VolMove(Config.Line_Slv, 0- Config.Line_EndSpeed);
KNDIOMove(IO_Type.LineStart, IO_VALUE.HIGH); // KNDIOMove(IO_Type.LineStart, IO_VALUE.HIGH);
} //}
private void LineStopMove() //private void LineStopMove()
{ //{
ShuoKeControls.SuddownStop(Config.Line_Slv); // ShuoKeControls.SuddownStop(Config.Line_Slv);
KNDIOMove(IO_Type.LineStart, IO_VALUE.LOW); // KNDIOMove(IO_Type.LineStart, IO_VALUE.LOW);
} //}
/// <summary> /// <summary>
/// 判断是否还有未完成的工作 /// 判断是否还有未完成的工作
...@@ -212,7 +212,7 @@ namespace URSoldering.DeviceLibrary ...@@ -212,7 +212,7 @@ namespace URSoldering.DeviceLibrary
KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.HIGH); KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.HIGH);
WarnMsg = "收到急停信号"; WarnMsg = "收到急停信号";
WeldRobotBean.Alarm(AlarmType.SuddenStop); WeldRobotBean.Alarm(AlarmType.SuddenStop);
ShuoKeControls.ClosePort(); SendWireManager.Release();
StopMove(); StopMove();
} }
} }
......
...@@ -105,7 +105,7 @@ namespace URSoldering.DeviceLibrary ...@@ -105,7 +105,7 @@ namespace URSoldering.DeviceLibrary
}); });
//SendWireManager.Init(); //SendWireManager.Init();
SolderingManager.Init(RobotConfig.JBC_SerialPort, RobotConfig.JBC_EquipmentPort); SolderingManager.Init(RobotConfig.JBC_SerialPort, RobotConfig.JBC_EquipmentPort);
ShuoKeControls.InitPort(); SendWireManager.Init(RobotConfig.JBC_SendWire_Port);
isInit = true; isInit = true;
} }
...@@ -121,7 +121,7 @@ namespace URSoldering.DeviceLibrary ...@@ -121,7 +121,7 @@ namespace URSoldering.DeviceLibrary
WarnMsg = warnMsg; WarnMsg = warnMsg;
}); });
} }
ShuoKeControls.InitPort(); SendWireManager.Init(RobotConfig.JBC_SendWire_Port);
SolderingManager.Init(RobotConfig.JBC_SerialPort, RobotConfig.JBC_EquipmentPort); SolderingManager.Init(RobotConfig.JBC_SerialPort, RobotConfig.JBC_EquipmentPort);
} }
/// <summary> /// <summary>
...@@ -161,10 +161,10 @@ namespace URSoldering.DeviceLibrary ...@@ -161,10 +161,10 @@ namespace URSoldering.DeviceLibrary
return "烙铁没有连接上!"; return "烙铁没有连接上!";
} }
} }
if (!ShuoKeControls.isRun) if (!SendWireManager.IsRun)
{ {
LogUtil.info(RobotName + "开始启动:送丝步进驱动器没有连接上"); LogUtil.info(RobotName + "开始启动:JBC送丝器没有连接上");
return "送丝步进驱动器没有连接上!"; return "JBC送丝器没有连接上!";
} }
if (EpsonDevice.IsRun) if (EpsonDevice.IsRun)
{ {
...@@ -188,7 +188,7 @@ namespace URSoldering.DeviceLibrary ...@@ -188,7 +188,7 @@ namespace URSoldering.DeviceLibrary
//锁定轴 //锁定轴
EpsonDevice.LockAxis(); EpsonDevice.LockAxis();
InitSendWireSpeed(); //InitSendWireSpeed();
//烙铁温度=0, 送丝上升,机器复位 //烙铁温度=0, 送丝上升,机器复位
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH);
...@@ -200,21 +200,21 @@ namespace URSoldering.DeviceLibrary ...@@ -200,21 +200,21 @@ namespace URSoldering.DeviceLibrary
} }
public static void InitSendWireSpeed() //public static void InitSendWireSpeed()
{ //{
//设置速度 // //设置速度
ShuoKeControls.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetAddSpeed, RobotConfig.SendWire_AddSpeed); // SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetAddSpeed, RobotConfig.SendWire_AddSpeed);
Thread.Sleep(100); // Thread.Sleep(100);
ShuoKeControls.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetDelSpeed, RobotConfig.SendWire_DelSpeed); // SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetDelSpeed, RobotConfig.SendWire_DelSpeed);
Thread.Sleep(100); // Thread.Sleep(100);
ShuoKeControls.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetEndSpeed, RobotConfig.SendWire_EndSpeed); // SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetEndSpeed, RobotConfig.SendWire_EndSpeed);
Thread.Sleep(100); // Thread.Sleep(100);
ShuoKeControls.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetHomeSpeed, RobotConfig.SendWire_HomeSpeed); // SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetHomeSpeed, RobotConfig.SendWire_HomeSpeed);
Thread.Sleep(100); // Thread.Sleep(100);
ShuoKeControls.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetMaxSpeed, RobotConfig.SendWire_MaxSpeed); // SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetMaxSpeed, RobotConfig.SendWire_MaxSpeed);
Thread.Sleep(100); // Thread.Sleep(100);
ShuoKeControls.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetStartSpeed, RobotConfig.SendWire_StartSpeed); // SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetStartSpeed, RobotConfig.SendWire_StartSpeed);
} //}
public static void StopWeld() public static void StopWeld()
{ {
...@@ -234,7 +234,7 @@ namespace URSoldering.DeviceLibrary ...@@ -234,7 +234,7 @@ namespace URSoldering.DeviceLibrary
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.LOW); RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.LOW);
//硕科 停止 //硕科 停止
ShuoKeControls.DStoop(RobotConfig.SendWire_Slv); SendWireManager.StopSend();
SolderingManager.Release(); SolderingManager.Release();
} }
/// <summary> /// <summary>
...@@ -329,44 +329,44 @@ namespace URSoldering.DeviceLibrary ...@@ -329,44 +329,44 @@ namespace URSoldering.DeviceLibrary
/// </summary> /// </summary>
private static void CheckSendWireAlarm() private static void CheckSendWireAlarm()
{ {
preCheckSendWireTime = DateTime.Now; //preCheckSendWireTime = DateTime.Now;
//如果休眠了不需要处理 ////如果休眠了不需要处理
if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH)) //if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH))
{ //{
//停止送丝器 // //停止送丝器
ShuoKeControls.SuddownStop(RobotConfig.SendWire_Slv); // SendWireManager.SuddownStop(RobotConfig.SendWire_Slv);
WarnMsg = "送丝报警:卡丝"; // WarnMsg = "送丝报警:卡丝";
Alarm(AlarmType.SendWireAlarm); // Alarm(AlarmType.SendWireAlarm);
LogUtil.error(RobotName + WarnMsg); // LogUtil.error(RobotName + WarnMsg);
ISAlarmAndOk = false; // ISAlarmAndOk = false;
} //}
else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH)) //else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH))
{ //{
//停止送丝器 // //停止送丝器
ShuoKeControls.SuddownStop(RobotConfig.SendWire_Slv); // SendWireManager.SuddownStop(RobotConfig.SendWire_Slv);
WarnMsg = "送丝报警:没有锡丝"; // WarnMsg = "送丝报警:没有锡丝";
Alarm(AlarmType.SendWireAlarm); // Alarm(AlarmType.SendWireAlarm);
LogUtil.error(RobotName + WarnMsg); // LogUtil.error(RobotName + WarnMsg);
ISAlarmAndOk = false; // ISAlarmAndOk = false;
} //}
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 (ISAlarmAndOk) // if (ISAlarmAndOk)
{ // {
TimeSpan span = DateTime.Now - lastSendWireOkTime; // TimeSpan span = DateTime.Now - lastSendWireOkTime;
int needSeconds=ConfigAppSettings.GetIntValue(Setting_Init.SendWireRecoverSeconds); // int needSeconds=ConfigAppSettings.GetIntValue(Setting_Init.SendWireRecoverSeconds);
if (span.TotalSeconds > needSeconds) // if (span.TotalSeconds > needSeconds)
{ // {
WarnMsg = ""; // WarnMsg = "";
alarmType = AlarmType.None; // alarmType = AlarmType.None;
WarnMsg = ""; // WarnMsg = "";
LogUtil.info(RobotName + "送丝器已恢复超过【" + needSeconds + "】秒,消除送丝器报警!"); // LogUtil.info(RobotName + "送丝器已恢复超过【" + needSeconds + "】秒,消除送丝器报警!");
} // }
} // }
} // }
} //}
} }
/// <summary> /// <summary>
/// 卡丝恢复功能,只有手动点了才会继续 /// 卡丝恢复功能,只有手动点了才会继续
......
...@@ -313,7 +313,7 @@ namespace URSoldering.DeviceLibrary ...@@ -313,7 +313,7 @@ namespace URSoldering.DeviceLibrary
{ {
int speed = (int)WeldMoveStep.CurrPoint.startSendWireSpeed * SendWireXiShu; int speed = (int)WeldMoveStep.CurrPoint.startSendWireSpeed * SendWireXiShu;
WeldLog(" 慢速送丝,速度:" + speed + " :" + time.ToString() + "秒"); WeldLog(" 慢速送丝,速度:" + speed + " :" + time.ToString() + "秒");
ShuoKeControls.SendWire(RobotConfig.SendWire_Slv, time, speed); SendWireManager.SendWire( time, speed);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitShuoKe(RobotConfig.SendWire_Slv, false)); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitShuoKe(RobotConfig.SendWire_Slv, false));
} }
else else
...@@ -329,7 +329,7 @@ namespace URSoldering.DeviceLibrary ...@@ -329,7 +329,7 @@ namespace URSoldering.DeviceLibrary
WeldLog(" 送丝,速度:" + speed + " :" + time.ToString() + "秒"); WeldLog(" 送丝,速度:" + speed + " :" + time.ToString() + "秒");
if (time > 0) if (time > 0)
{ {
ShuoKeControls.SendWire(RobotConfig.SendWire_Slv, time, speed); SendWireManager.SendWire( time, speed);
//硕科步进驱动走对应的相对位置 //硕科步进驱动走对应的相对位置
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitShuoKe(RobotConfig.SendWire_Slv, false)); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitShuoKe(RobotConfig.SendWire_Slv, false));
} }
...@@ -461,14 +461,14 @@ namespace URSoldering.DeviceLibrary ...@@ -461,14 +461,14 @@ namespace URSoldering.DeviceLibrary
if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH)) if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH))
{ {
//停止送丝器 //停止送丝器
ShuoKeControls.SuddownStop(RobotConfig.SendWire_Slv); 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))
{ {
//停止送丝器 //停止送丝器
ShuoKeControls.SuddownStop(RobotConfig.SendWire_Slv); SendWireManager.StopSend();
msg = "没有锡丝"; msg = "没有锡丝";
isAlarm = true; isAlarm = true;
} }
...@@ -487,22 +487,22 @@ namespace URSoldering.DeviceLibrary ...@@ -487,22 +487,22 @@ namespace URSoldering.DeviceLibrary
else else
{ {
LogUtil.error("焊接中第【" + WeldMoveStep.ResetCount + "】次 检测到" + msg + ", 开始反向送丝,速度【" + speed + "】时间【" + times + "】"); LogUtil.error("焊接中第【" + WeldMoveStep.ResetCount + "】次 检测到" + msg + ", 开始反向送丝,速度【" + speed + "】时间【" + times + "】");
WeldMoveStep.LastSetpTime = DateTime.Now; //WeldMoveStep.LastSetpTime = DateTime.Now;
WeldMoveStep.WaitList.Clear(); //WeldMoveStep.WaitList.Clear();
//设置速度 ////设置速度
ShuoKeControls.SetMoveSpeed(RobotConfig.SendWire_Slv, speed); //SendWireManager.SetMoveSpeed(RobotConfig.SendWire_Slv, speed);
int shuokeRel = (int)times * speed; //int shuokeRel = (int)times * speed;
if (shuokeRel < 0) //if (shuokeRel < 0)
{ //{
shuokeRel = 0 - shuokeRel; // shuokeRel = 0 - shuokeRel;
} //}
ShuoKeControls.RelativeMove(RobotConfig.SendWire_Slv, shuokeRel); //SendWireManager.RelativeMove(RobotConfig.SendWire_Slv, shuokeRel);
//硕科步进驱动走对应的相对位置 ////硕科步进驱动走对应的相对位置
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitShuoKe(RobotConfig.SendWire_Slv, true)); //WeldMoveStep.WaitList.Add(WaitResultInfo.WaitShuoKe(RobotConfig.SendWire_Slv, true));
Thread.Sleep(100); //Thread.Sleep(100);
ShuoKeControls.GetStatus(RobotConfig.SendWire_Slv); //SendWireManager.GetStatus(RobotConfig.SendWire_Slv);
isOk = false; isOk = false;
} }
} }
...@@ -511,15 +511,15 @@ namespace URSoldering.DeviceLibrary ...@@ -511,15 +511,15 @@ namespace URSoldering.DeviceLibrary
if (wait.ShuoKeISReverse.Equals(false) && isAlarm.Equals(false)) if (wait.ShuoKeISReverse.Equals(false) && isAlarm.Equals(false))
{ {
if (!ShuoKeControls.IsMoveEnd(wait.SlvAddr, WeldMoveStep.LastSetpTime)) //if (!SendWireManager.IsMoveEnd(wait.SlvAddr, WeldMoveStep.LastSetpTime))
{ //{
NotOkMsg = "送丝结束"; // NotOkMsg = "送丝结束";
isOk = false; // isOk = false;
ShuoKeControls.GetStatus(wait.SlvAddr); // SendWireManager.GetStatus(wait.SlvAddr);
break; // break;
} //}
else if (WeldMoveStep.OneWaitOk) //else if (WeldMoveStep.OneWaitOk)
{ {
isOk = true; isOk = true;
break; break;
...@@ -527,25 +527,25 @@ namespace URSoldering.DeviceLibrary ...@@ -527,25 +527,25 @@ namespace URSoldering.DeviceLibrary
} }
else if (wait.ShuoKeISReverse.Equals(true) && isAlarm.Equals(false)) else if (wait.ShuoKeISReverse.Equals(true) && isAlarm.Equals(false))
{ {
if (!ShuoKeControls.IsMoveEnd(wait.SlvAddr, WeldMoveStep.LastSetpTime)) //if (!SendWireManager.IsMoveEnd(wait.SlvAddr, WeldMoveStep.LastSetpTime))
{
NotOkMsg = "送丝反转";
isOk = false;
//TimeSpan getStatusSpan = DateTime.Now - preGetStatusTime;
//if (getStatusSpan.TotalSeconds >= 1)
//{ //{
// preGetStatusTime = DateTime.Now; // NotOkMsg = "送丝反转";
ShuoKeControls.GetStatus(wait.SlvAddr); // isOk = false;
// //TimeSpan getStatusSpan = DateTime.Now - preGetStatusTime;
// //if (getStatusSpan.TotalSeconds >= 1)
// //{
// // preGetStatusTime = DateTime.Now;
// //SendWireManager.GetStatus(wait.SlvAddr);
// //}
// break;
//}
//else
//{
// //反转已经停止,直接重新运行次步骤
// //MoveStep step = (MoveStep)((int)WeldMoveStep.moveStep - 1);
// LogUtil.info(RobotName + " 送丝反转结束,重新开始当前焊点焊接");
// WeldMoveStep.NextMoveStep(MoveStep.Wait);
//} //}
break;
}
else
{
//反转已经停止,直接重新运行次步骤
//MoveStep step = (MoveStep)((int)WeldMoveStep.moveStep - 1);
LogUtil.info(RobotName + " 送丝反转结束,重新开始当前焊点焊接");
WeldMoveStep.NextMoveStep(MoveStep.Wait);
}
} }
} }
else if (wait.WaitType == 6) else if (wait.WaitType == 6)
......
...@@ -12,9 +12,9 @@ DI,烙铁气缸下降端,Soldering_Down,207,192.168.200.11,0,烙铁气缸下降端,X08,DI-08,0 ...@@ -12,9 +12,9 @@ DI,烙铁气缸下降端,Soldering_Down,207,192.168.200.11,0,烙铁气缸下降端,X08,DI-08,0
,,,210,192.168.200.11,0,,X11,DI-11,0 ,,,210,192.168.200.11,0,,X11,DI-11,0
,,,211,192.168.200.11,0,,X12,DI-12,0 ,,,211,192.168.200.11,0,,X12,DI-12,0
,,,212,192.168.200.11,0,,X13,DI-13,0 ,,,212,192.168.200.11,0,,X13,DI-13,0
DI,,,213,192.168.200.11,0,,X14,DI-14,0 ,,,213,192.168.200.11,0,,X14,DI-14,0
DI,,,214,192.168.200.11,0,,X15,DI-15,0 ,,,214,192.168.200.11,0,,X15,DI-15,0
DI,,,215,192.168.200.11,0,,X16,DI-16,0 ,,,215,192.168.200.11,0,,X16,DI-16,0
DO,自动夹具夹紧SOL,Fixture_Clamp,100,192.168.200.11,0,自动夹具夹紧SOL,Y01,DO-01,0 DO,自动夹具夹紧SOL,Fixture_Clamp,100,192.168.200.11,0,自动夹具夹紧SOL,Y01,DO-01,0
DO,自动夹具放松SOL,Fixture_Relax,101,192.168.200.11,0,自动夹具放松SOL,Y02,DO-02,0 DO,自动夹具放松SOL,Fixture_Relax,101,192.168.200.11,0,自动夹具放松SOL,Y02,DO-02,0
DO,送丝气缸工作SOL,SendWire_Work,102,192.168.200.11,0,送丝气缸工作SOL,Y03,DO-03,0 DO,送丝气缸工作SOL,SendWire_Work,102,192.168.200.11,0,送丝气缸工作SOL,Y03,DO-03,0
...@@ -28,9 +28,9 @@ DO,送丝电机启动,SendWireStart,106,192.168.200.11,0,送丝电机启动,Y07,DO-07,0 ...@@ -28,9 +28,9 @@ DO,送丝电机启动,SendWireStart,106,192.168.200.11,0,送丝电机启动,Y07,DO-07,0
,,,110,192.168.200.11,0,,Y11,DO-11,0 ,,,110,192.168.200.11,0,,Y11,DO-11,0
,,,111,192.168.200.11,0,,Y12,DO-12,0 ,,,111,192.168.200.11,0,,Y12,DO-12,0
,,,112,192.168.200.11,0,,Y13,DO-13,0 ,,,112,192.168.200.11,0,,Y13,DO-13,0
DO,自动指示灯(绿色),AutoRunSingle,113,192.168.200.11,0,自动指示灯(绿色),Y14,DO-14,0 ,自动指示灯(绿色),AutoRunSingle,113,192.168.200.11,0,自动指示灯(绿色),Y14,DO-14,0
DO,待机指示灯(黄色),WaitSingle,114,192.168.200.11,0,待机指示灯(黄色),Y15,DO-15,0 ,待机指示灯(黄色),WaitSingle,114,192.168.200.11,0,待机指示灯(黄色),Y15,DO-15,0
DO,故障指示灯(红色),AlarmSingle,115,192.168.200.11,0,故障指示灯(红色),Y16,DO-16,0 ,故障指示灯(红色),AlarmSingle,115,192.168.200.11,0,故障指示灯(红色),Y16,DO-16,0
,,,,,,,,, ,,,,,,,,,
PRO,EMSIP地址,EMS_IP,192.168.200.4,,,,,, PRO,EMSIP地址,EMS_IP,192.168.200.4,,,,,,
PRO,EMS端口号,EMS_Port,12345,,,,,, PRO,EMS端口号,EMS_Port,12345,,,,,,
......
...@@ -23,10 +23,6 @@ namespace URSoldering.DeviceLibrary ...@@ -23,10 +23,6 @@ namespace URSoldering.DeviceLibrary
private static string FreeOK = "free ok"; private static string FreeOK = "free ok";
private static string LockOK = "lock ok"; private static string LockOK = "lock ok";
internal static void Init(object epson_IP)
{
throw new NotImplementedException();
}
//最后一次从机械臂读取到的坐标位置 //最后一次从机械臂读取到的坐标位置
public static PointValue LastPoint = new PointValue(0, 0, 0, 0, 0); public static PointValue LastPoint = new PointValue(0, 0, 0, 0, 0);
......
...@@ -18,13 +18,13 @@ namespace URSoldering.DeviceLibrary ...@@ -18,13 +18,13 @@ namespace URSoldering.DeviceLibrary
{ {
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static bool IsRun = false; public static bool IsRun = false;
public static string serialPort = ConfigAppSettings.GetValue(Setting_Init.ShuoKe_Control_SerialPort);//串口号 public static string serialPort = "";
private static int bautRate = 19200;//波特率 private static int bautRate = 19200;//波特率
private static Parity parity = Parity.None;//校验位 private static Parity parity = Parity.None;//校验位
private static int dataBits = 8;//数据位 private static int dataBits = 8;//数据位
private static StopBits stopBits = StopBits.One; //停止位 private static StopBits stopBits = StopBits.One; //停止位
private static SerialBean sb = new SerialBean(serialPort, bautRate, parity, dataBits, stopBits); private static SerialBean sb = null;
private static string CMD_WriteMode = "WMOD00002"; private static string CMD_WriteMode = "WMOD00002";
private static string CMD_SetSpeed = "WSPD"; private static string CMD_SetSpeed = "WSPD";
...@@ -36,7 +36,6 @@ namespace URSoldering.DeviceLibrary ...@@ -36,7 +36,6 @@ namespace URSoldering.DeviceLibrary
private static string CMD_StartBackSend = "WSFD00000"; private static string CMD_StartBackSend = "WSFD00000";
private static string CMD_StopSend = "WSSD00000"; private static string CMD_StopSend = "WSSD00000";
private static string CMD_Reset = "WCTP00000"; private static string CMD_Reset = "WCTP00000";
public static bool isRun;
//private static string CMD_WriteMode = "02 57 4D 4F 44 30 30 30 30 32 03 22"; //private static string CMD_WriteMode = "02 57 4D 4F 44 30 30 30 30 32 03 22";
//private static string CMD_SetSpeed = "02 57 53 50 44 30 30 31 31 30 03 21"; //private static string CMD_SetSpeed = "02 57 53 50 44 30 30 31 31 30 03 21";
...@@ -50,8 +49,13 @@ namespace URSoldering.DeviceLibrary ...@@ -50,8 +49,13 @@ namespace URSoldering.DeviceLibrary
/// 初始化 /// 初始化
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static bool Init() public static bool Init(string port)
{ {
if (sb == null)
{
serialPort = port;
new SerialBean(serialPort, bautRate, parity, dataBits, stopBits);
}
try try
{ {
if (sb.openPort()) if (sb.openPort())
...@@ -141,7 +145,12 @@ namespace URSoldering.DeviceLibrary ...@@ -141,7 +145,12 @@ namespace URSoldering.DeviceLibrary
} }
return tem; return tem;
} }
public static void SendWire(double time, int speed)
{
setSpeed(speed);
setLength(time * speed);
StartFSend();
}
public static bool setSpeed(double speed) public static bool setSpeed(double speed)
{ {
bool isOk = false; bool isOk = false;
...@@ -270,5 +279,6 @@ namespace URSoldering.DeviceLibrary ...@@ -270,5 +279,6 @@ namespace URSoldering.DeviceLibrary
return errMsg; return errMsg;
} }
} }
} }
...@@ -65,57 +65,57 @@ namespace URSoldering.LoadCSVLibrary ...@@ -65,57 +65,57 @@ namespace URSoldering.LoadCSVLibrary
/// <summary> /// <summary>
/// PRO 硕科 端口号 ShuoKe_PortName COM1 /// PRO 硕科 端口号 ShuoKe_PortName COM1
/// </summary> /// </summary>
[ConfigProAttribute("ShuoKe_PortName")] [ConfigProAttribute("ShuoKe_PortName",false)]
public string ShuoKe_PortName { get; set; } public string ShuoKe_PortName { get; set; }
/// <summary> /// <summary>
/// PRO 硕科 波特率 ShuoKe_PortBaudrate 9600 /// PRO 硕科 波特率 ShuoKe_PortBaudrate 9600
/// </summary> /// </summary>
[ConfigProAttribute("ShuoKe_PortBaudrate")] [ConfigProAttribute("ShuoKe_PortBaudrate",false)]
public int ShuoKe_PortBaudrate { get; set; } public int ShuoKe_PortBaudrate { get; set; }
/// <summary> /// <summary>
/// PRO 硕科 奇偶校验 ShuoKe_PortParity 0 /// PRO 硕科 奇偶校验 ShuoKe_PortParity 0
/// </summary> /// </summary>
[ConfigProAttribute("ShuoKe_PortParity")] [ConfigProAttribute("ShuoKe_PortParity",false)]
public int ShuoKe_PortParity { get; set; } public int ShuoKe_PortParity { get; set; }
/// <summary> /// <summary>
/// PRO 硕科 停止位 ShuoKe_StopBits 1 /// PRO 硕科 停止位 ShuoKe_StopBits 1
/// </summary> /// </summary>
[ConfigProAttribute("ShuoKe_StopBits")] [ConfigProAttribute("ShuoKe_StopBits",false)]
public int ShuoKe_StopBits { get; set; } public int ShuoKe_StopBits { get; set; }
/// <summary> /// <summary>
/// PRO 硕科送丝器 初速度 SendWire_StartSpeed 50000 /// PRO 硕科送丝器 初速度 SendWire_StartSpeed 50000
/// </summary> /// </summary>
[ConfigProAttribute("SendWire_StartSpeed")] [ConfigProAttribute("SendWire_StartSpeed",false)]
public int SendWire_StartSpeed { get; set; } public int SendWire_StartSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科送丝器 最大速度 SendWire_MaxSpeed 200000 /// PRO 硕科送丝器 最大速度 SendWire_MaxSpeed 200000
/// </summary> /// </summary>
[ConfigProAttribute("SendWire_MaxSpeed")] [ConfigProAttribute("SendWire_MaxSpeed",false)]
public int SendWire_MaxSpeed { get; set; } public int SendWire_MaxSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科送丝器 末速度 SendWire_EndSpeed 70000 /// PRO 硕科送丝器 末速度 SendWire_EndSpeed 70000
/// </summary> /// </summary>
[ConfigProAttribute("SendWire_EndSpeed")] [ConfigProAttribute("SendWire_EndSpeed",false)]
public int SendWire_EndSpeed { get; set; } public int SendWire_EndSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科送丝器 加速度 SendWire_AddSpeed 50000 /// PRO 硕科送丝器 加速度 SendWire_AddSpeed 50000
/// </summary> /// </summary>
[ConfigProAttribute("SendWire_AddSpeed")] [ConfigProAttribute("SendWire_AddSpeed",false)]
public int SendWire_AddSpeed { get; set; } public int SendWire_AddSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科送丝器 减速度 SendWire_DelSpeed 50000 /// PRO 硕科送丝器 减速度 SendWire_DelSpeed 50000
/// </summary> /// </summary>
[ConfigProAttribute("SendWire_DelSpeed")] [ConfigProAttribute("SendWire_DelSpeed",false)]
public int SendWire_DelSpeed { get; set; } public int SendWire_DelSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科送丝器 归零速度 SendWire_HomeSpeed 50000 /// PRO 硕科送丝器 归零速度 SendWire_HomeSpeed 50000
/// </summary> /// </summary>
[ConfigProAttribute("SendWire_HomeSpeed")] [ConfigProAttribute("SendWire_HomeSpeed",false)]
public int SendWire_HomeSpeed { get; set; } public int SendWire_HomeSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科送丝器 电机地址 SendWire_Slv 1 /// PRO 硕科送丝器 电机地址 SendWire_Slv 1
/// </summary> /// </summary>
[ConfigProAttribute("SendWire_Slv")] [ConfigProAttribute("SendWire_Slv",false)]
public int SendWire_Slv { get; set; } public int SendWire_Slv { get; set; }
...@@ -124,41 +124,41 @@ namespace URSoldering.LoadCSVLibrary ...@@ -124,41 +124,41 @@ namespace URSoldering.LoadCSVLibrary
/// <summary> /// <summary>
/// PRO 硕科流水线 初速度 Line_StartSpeed 50000 /// PRO 硕科流水线 初速度 Line_StartSpeed 50000
/// </summary> /// </summary>
[ConfigProAttribute("Line_StartSpeed")] [ConfigProAttribute("Line_StartSpeed",false)]
public int Line_StartSpeed { get; set; } public int Line_StartSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科流水线 最大速度 Line_MaxSpeed 200000 /// PRO 硕科流水线 最大速度 Line_MaxSpeed 200000
/// </summary> /// </summary>
[ConfigProAttribute("Line_MaxSpeed")] [ConfigProAttribute("Line_MaxSpeed",false)]
public int Line_MaxSpeed { get; set; } public int Line_MaxSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科流水线 末速度 Line_EndSpeed 70000 /// PRO 硕科流水线 末速度 Line_EndSpeed 70000
/// </summary> /// </summary>
[ConfigProAttribute("Line_EndSpeed")] [ConfigProAttribute("Line_EndSpeed",false)]
public int Line_EndSpeed { get; set; } public int Line_EndSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科流水线 加速度 Line_AddSpeed 50000 /// PRO 硕科流水线 加速度 Line_AddSpeed 50000
/// </summary> /// </summary>
[ConfigProAttribute("Line_AddSpeed")] [ConfigProAttribute("Line_AddSpeed",false)]
public int Line_AddSpeed { get; set; } public int Line_AddSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科流水线 减速度 Line_DelSpeed 50000 /// PRO 硕科流水线 减速度 Line_DelSpeed 50000
/// </summary> /// </summary>
[ConfigProAttribute("Line_DelSpeed")] [ConfigProAttribute("Line_DelSpeed",false)]
public int Line_DelSpeed { get; set; } public int Line_DelSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科流水线 归零速度 Line_HomeSpeed 50000 /// PRO 硕科流水线 归零速度 Line_HomeSpeed 50000
/// </summary> /// </summary>
[ConfigProAttribute("Line_HomeSpeed")] [ConfigProAttribute("Line_HomeSpeed",false)]
public int Line_HomeSpeed { get; set; } public int Line_HomeSpeed { get; set; }
/// <summary> /// <summary>
/// PRO 硕科流水线 电机地址 Line_Slv 1 /// PRO 硕科流水线 电机地址 Line_Slv 1
/// </summary> /// </summary>
[ConfigProAttribute("Line_Slv")] [ConfigProAttribute("Line_Slv",false)]
public int Line_Slv { get; set; } public int Line_Slv { get; set; }
public string JBC_EquipmentPort { get; set; } public string JBC_EquipmentPort = "";
public string JBC_SerialPort { get; set; } public string JBC_SerialPort = "";
public object Epson_IP { get; set; } public string Epson_IP = "";
protected override void initMustHavePro() protected override void initMustHavePro()
{ {
......
...@@ -109,12 +109,12 @@ namespace URSoldering.Client ...@@ -109,12 +109,12 @@ namespace URSoldering.Client
this.btnWUp.Enabled = true; this.btnWUp.Enabled = true;
} }
if (!ShuoKeControls.isRun) if (!SendWireManager.IsRun)
{ {
ShuoKeControls.InitPort(); SendWireManager.Init(WeldRobotBean.RobotConfig.JBC_SendWire_Port);
} }
if (ShuoKeControls.isRun) if (SendWireManager.IsRun)
{ {
btnSendWire.Enabled = true; btnSendWire.Enabled = true;
btnStopSend.Enabled = true; btnStopSend.Enabled = true;
...@@ -1305,12 +1305,12 @@ namespace URSoldering.Client ...@@ -1305,12 +1305,12 @@ namespace URSoldering.Client
{ {
//匀速运动 //匀速运动
int speed = FormUtil.GetIntValue(txtSpeed) * WeldRobotBean.SendWireXiShu; int speed = FormUtil.GetIntValue(txtSpeed) * WeldRobotBean.SendWireXiShu;
ShuoKeControls.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed); //SendWireManager.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed);
} }
private void btnStopSend_Click(object sender, EventArgs e) private void btnStopSend_Click(object sender, EventArgs e)
{ {
ShuoKeControls.SuddownStop(WeldRobotBean.RobotConfig.SendWire_Slv); SendWireManager.StopSend();
} }
private void btnWUp_Click(object sender, EventArgs e) private void btnWUp_Click(object sender, EventArgs e)
......
...@@ -122,13 +122,12 @@ namespace URSoldering.Client ...@@ -122,13 +122,12 @@ namespace URSoldering.Client
this.btnWUp.Enabled = true; this.btnWUp.Enabled = true;
} }
if (!ShuoKeControls.isRun) if (!SendWireManager.IsRun)
{ {
ShuoKeControls.InitPort(); SendWireManager.Init(WeldRobotBean.RobotConfig.JBC_SendWire_Port);
} }
if (ShuoKeControls.isRun) if (SendWireManager.IsRun) {
{
btnSendWire.Enabled = true; btnSendWire.Enabled = true;
btnStopSend.Enabled = true; btnStopSend.Enabled = true;
} }
...@@ -1581,12 +1580,12 @@ namespace URSoldering.Client ...@@ -1581,12 +1580,12 @@ namespace URSoldering.Client
{ {
//匀速运动 //匀速运动
int speed = FormUtil.GetIntValue(txtSpeed) * WeldRobotBean.SendWireXiShu; int speed = FormUtil.GetIntValue(txtSpeed) * WeldRobotBean.SendWireXiShu;
ShuoKeControls.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed); //SendWireManager.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed);
} }
private void btnStopSend_Click(object sender, EventArgs e) private void btnStopSend_Click(object sender, EventArgs e)
{ {
ShuoKeControls.SuddownStop(WeldRobotBean.RobotConfig.SendWire_Slv); SendWireManager.StopSend();
} }
private void btnWUp_Click(object sender, EventArgs e) private void btnWUp_Click(object sender, EventArgs e)
......
...@@ -41,10 +41,10 @@ namespace URSoldering.Client ...@@ -41,10 +41,10 @@ namespace URSoldering.Client
private void btnSendWireDebug_Click(object sender, EventArgs e) private void btnSendWireDebug_Click(object sender, EventArgs e)
{ {
FrmShuoKeDebug shuoke = new FrmShuoKeDebug(); //FrmShuoKeDebug shuoke = new FrmShuoKeDebug();
this.Visible = false; //this.Visible = false;
shuoke.ShowDialog(); //shuoke.ShowDialog();
this.Visible = true; //this.Visible = true;
} }
private void btnConfig_Click(object sender, EventArgs e) private void btnConfig_Click(object sender, EventArgs e)
......
...@@ -226,12 +226,12 @@ namespace URSoldering.Client ...@@ -226,12 +226,12 @@ namespace URSoldering.Client
{ {
//匀速运动 //匀速运动
int speed = FormUtil.GetIntValue(txtSpeed) * WeldRobotBean.SendWireXiShu; int speed = FormUtil.GetIntValue(txtSpeed) * WeldRobotBean.SendWireXiShu;
ShuoKeControls.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed); //SendWireManager.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed);
} }
private void btnStopSend_Click(object sender, EventArgs e) private void btnStopSend_Click(object sender, EventArgs e)
{ {
ShuoKeControls.SuddownStop(WeldRobotBean.RobotConfig.SendWire_Slv); SendWireManager.StopSend();
} }
protected override void OnVisibleChanged(EventArgs e) protected override void OnVisibleChanged(EventArgs e)
{ {
...@@ -244,7 +244,7 @@ namespace URSoldering.Client ...@@ -244,7 +244,7 @@ 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 position = FormUtil.GetIntValue(txtSendWirePosition) * WeldRobotBean.SendWireXiShu;
ShuoKeControls.RelativeMove(WeldRobotBean.RobotConfig.SendWire_Slv, position); //SendWireManager.RelativeMove(WeldRobotBean.RobotConfig.SendWire_Slv, position);
} }
......
...@@ -89,7 +89,7 @@ namespace URSoldering.Client ...@@ -89,7 +89,7 @@ namespace URSoldering.Client
KNDManager.CloseAllDO(); KNDManager.CloseAllDO();
KNDManager.CloseAllConnection(); KNDManager.CloseAllConnection();
SolderingManager.Release(); SolderingManager.Release();
ShuoKeControls.ClosePort(); SendWireManager.Release();
Application.Exit(); Application.Exit();
} }
private void FrmMenu_SizeChanged(object sender, EventArgs e) private void FrmMenu_SizeChanged(object sender, EventArgs e)
......
...@@ -43,7 +43,7 @@ namespace URSoldering.Client ...@@ -43,7 +43,7 @@ namespace URSoldering.Client
private void btnStopSend_Click(object sender, EventArgs e) private void btnStopSend_Click(object sender, EventArgs e)
{ {
ShuoKeControls.SuddownStop(WeldRobotBean.RobotConfig.SendWire_Slv); SendWireManager.StopSend();
} }
protected override void OnVisibleChanged(EventArgs e) protected override void OnVisibleChanged(EventArgs e)
{ {
......
...@@ -151,12 +151,6 @@ ...@@ -151,12 +151,6 @@
<Compile Include="FrmPwd.Designer.cs"> <Compile Include="FrmPwd.Designer.cs">
<DependentUpon>FrmPwd.cs</DependentUpon> <DependentUpon>FrmPwd.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmShuoKeDebug.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmShuoKeDebug.Designer.cs">
<DependentUpon>FrmShuoKeDebug.cs</DependentUpon>
</Compile>
<Compile Include="FrmSolderingSetting.cs"> <Compile Include="FrmSolderingSetting.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -222,9 +216,6 @@ ...@@ -222,9 +216,6 @@
<EmbeddedResource Include="FrmPwd.resx"> <EmbeddedResource Include="FrmPwd.resx">
<DependentUpon>FrmPwd.cs</DependentUpon> <DependentUpon>FrmPwd.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmShuoKeDebug.resx">
<DependentUpon>FrmShuoKeDebug.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmSolderingSetting.resx"> <EmbeddedResource Include="FrmSolderingSetting.resx">
<DependentUpon>FrmSolderingSetting.cs</DependentUpon> <DependentUpon>FrmSolderingSetting.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!