Commit 5dcd4a26 几米阳光

修改 配置

1 个父辈 29623d2e
...@@ -225,7 +225,7 @@ namespace URSoldering.Common ...@@ -225,7 +225,7 @@ namespace URSoldering.Common
} }
else else
{ {
LogUtil.debug(LOGGER, "发送数据:" + strSendData); LogUtil.info(LOGGER, "发送数据:" + strSendData);
} }
strSendData = strSendData + "\r\n"; strSendData = strSendData + "\r\n";
......
...@@ -86,18 +86,19 @@ ...@@ -86,18 +86,19 @@
<Compile Include="bean\RobotBean.cs" /> <Compile Include="bean\RobotBean.cs" />
<Compile Include="bean\RobotManager.cs" /> <Compile Include="bean\RobotManager.cs" />
<Compile Include="bean\WorkCountManager.cs" /> <Compile Include="bean\WorkCountManager.cs" />
<Compile Include="deviceLibrary\epson\EpsonControl.cs" />
<Compile Include="deviceLibrary\epson\EpsonRobotDevice.cs" /> <Compile Include="deviceLibrary\epson\EpsonRobotDevice.cs" />
<Compile Include="deviceLibrary\halcon\HDevelopCodeLearn.cs" /> <Compile Include="deviceLibrary\halcon\HDevelopCodeLearn.cs" />
<Compile Include="deviceLibrary\halcon\HDevelopExport.cs" /> <Compile Include="deviceLibrary\halcon\HDevelopExport.cs" />
<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\shuoke\ShuoKeControls.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\URRobotManager.cs" /> <Compile Include="deviceLibrary\urRobot\URRobotManager.cs" />
<Compile Include="Robot\MoveType.cs" /> <Compile Include="Robot\MoveType.cs" />
<Compile Include="Robot\soldering\AlarmType.cs" /> <Compile Include="Robot\soldering\AlarmType.cs" />
<Compile Include="bean\BoardManager.cs" /> <Compile Include="bean\BoardManager.cs" />
<Compile Include="deviceLibrary\epson\EpsonControl.cs" />
<Compile Include="deviceLibrary\kangnaide\KNDManager.cs" /> <Compile Include="deviceLibrary\kangnaide\KNDManager.cs" />
<Compile Include="deviceLibrary\kangnaide\MasterTcpClient.cs" /> <Compile Include="deviceLibrary\kangnaide\MasterTcpClient.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID 类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID
DI,急停开关,SuddenStop_Single,200,192.168.200.11,0,急停开关,X01,DI-01,0 DI,急停,SuddenStop_Single,200,192.168.200.11,0,急停,X01,DI-01,0
DI,气压检测,AirCheck_Single,201,192.168.200.11,0,气压检测,X02,DI-02,0 DI,气压检测,AirCheck_Single,201,192.168.200.11,0,气压检测,X02,DI-02,0
DI,焊接阻挡下降端,StopCylinder_Down,202,192.168.200.11,0,焊接阻挡下降端,X03,DI-03,0 DI,自动夹具夹紧端,Fixture_Clamp,202,192.168.200.11,0,自动夹具夹紧端,X03,DI-03,0
DI,焊接阻挡上升端,StopCylinder_Up,203,192.168.200.11,0,焊接阻挡上升端,X04,DI-04,0 DI,自动夹具放松端,Fixture_Relax,203,192.168.200.11,0,自动夹具放松端,X04,DI-04,0
DI,送丝气缸下降端,SendWire_Down,204,192.168.200.11,0,送丝气缸下降端,X05,DI-05,0 DI,送丝气缸工作端,SendWire_Work,204,192.168.200.11,0,送丝气缸工作端,X05,DI-05,0
DI,送丝气缸上升端,SendWire_Up,205,192.168.200.11,0,送丝气缸上升端,X06,DI-06,0 DI,送丝气缸清洗端,SendWire_Clear,205,192.168.200.11,0,送丝气缸清洗端,X06,DI-06,0
DI,焊丝堵,SendWireNoWire,206,192.168.200.11,0,焊丝堵,X07,DI-07,0 DI,烙铁气缸上升端,Soldering_Up,206,192.168.200.11,0,烙铁气缸上升端,X07,DI-07,0
DI,焊丝缺,SendWireLock,207,192.168.200.11,0,焊丝缺,X08,DI-08,0 DI,烙铁气缸下降端,Soldering_Down,207,192.168.200.11,0,烙铁气缸下降端,X08,DI-08,0
DI,流水线入口检测,LineInCheck,208,192.168.200.11,0,流水线入口检测,X09,DI-09,0 ,,,208,192.168.200.11,0,,X09,DI-09,0
DI,流水线焊接检测,LineWeldCheck,209,192.168.200.11,0,流水线焊接检测,X10,DI-10,0 ,,,209,192.168.200.11,0,,X10,DI-10,0
DI,流水线出口检测,LineOutCheck,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,EPSON_READY,EpsonReady,213,192.168.200.11,0,EPSON_READY,X14,DI-14,0 DI,,,213,192.168.200.11,0,,X14,DI-14,0
DI,EPSON_RUNNING ,EpsonRunning,214,192.168.200.11,0,EPSON_RUNNING ,X15,DI-15,0 DI,,,214,192.168.200.11,0,,X15,DI-15,0
DI,EPSON_ALARM,EpsonAlarm,215,192.168.200.11,0,EPSON_ALARM,X16,DI-16,0 DI,,,215,192.168.200.11,0,,X16,DI-16,0
DO,焊接阻挡下降SOL ,StopCylinder_Down,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 ,StopCylinder_Up,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_Down,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
DO,送丝气缸上升SOL,SendWire_Up,103,192.168.200.11,0,送丝气缸上升SOL,Y04,DO-04,0 DO,送丝气缸清洗SOL,SendWire_Clear,103,192.168.200.11,0,送丝气缸清洗SOL,Y04,DO-04,0
DO,洗焊吹气启动SOL,ClearWeldingSQL,104,192.168.200.11,0,洗焊吹气启动SOL,Y05,DO-05,0 DO,烙铁气缸上升SOL,Soldering_Up,104,192.168.200.11,0,烙铁气缸上升SOL,Y05,DO-05,0
DO,流水线启动,LineStart,105,192.168.200.11,0,流水线启动,Y06,DO-06,0 DO,烙铁气缸下降SOL,Soldering_Down,105,192.168.200.11,0,烙铁气缸下降SOL,Y06,DO-06,0
,,,106,192.168.200.11,0,,Y07,DO-07,0 DO,送丝电机启动,SendWireStart,106,192.168.200.11,0,送丝电机启动,Y07,DO-07,0
,,,107,192.168.200.11,0,,Y08,DO-08,0 ,,,107,192.168.200.11,0,,Y08,DO-08,0
DO,EPSON_START,EpsonStart,108,192.168.200.11,0,EPSON_START,Y09,DO-09,0 ,,,108,192.168.200.11,0,,Y09,DO-09,0
DO,EPSON_STOP,EpsonStop,109,192.168.200.11,0,EPSON_STOP,Y10,DO-10,0 ,,,109,192.168.200.11,0,,Y10,DO-10,0
DO,EPSON_RESET,EpsonReset,110,192.168.200.11,0,EPSON_RESET,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 DO,自动指示灯(绿色),AutoRunSingle,113,192.168.200.11,0,自动指示灯(绿色),Y14,DO-14,0
DO,待机指示灯(黄色),WaitSingle,114,192.168.200.11,0,待机指示灯(黄色),Y15,DO-15,0 DO,待机指示灯(黄色),WaitSingle,114,192.168.200.11,0,待机指示灯(黄色),Y15,DO-15,0
DO,故障指示灯(红色),AlarmSingle,115,192.168.200.11,0,故障指示灯(红色),Y16,DO-16,0 DO,故障指示灯(红色),AlarmSingle,115,192.168.200.11,0,故障指示灯(红色),Y16,DO-16,0
PRO,硕科 端口号,ShuoKe_PortName,COM1,,,,,,
PRO,硕科 波特率,ShuoKe_PortBaudrate,9600,,,,,,
PRO,硕科 奇偶校验,ShuoKe_PortParity,0,,,,,,
PRO,硕科 停止位,ShuoKe_StopBits,1,,,,,,
PRO,硕科送丝器 初速度,SendWire_StartSpeed,1000,,,,,,
PRO,硕科送丝器 最大速度,SendWire_MaxSpeed,20000,,,,,,
PRO,硕科送丝器 末速度,SendWire_EndSpeed,10000,,,,,,
PRO,硕科送丝器 加速度,SendWire_AddSpeed,1000,,,,,,
PRO,硕科送丝器 减速度,SendWire_DelSpeed,1000,,,,,,
PRO,硕科送丝器 归零速度 ,SendWire_HomeSpeed,5000,,,,,,
PRO,硕科送丝器 电机地址 ,SendWire_Slv,1,,,,,,
,,,,,,,,,
PRO,硕科流水线 初速度,Line_StartSpeed,10000,,,,,,
PRO,硕科流水线 最大速度,Line_MaxSpeed,40000,,,,,,
PRO,硕科流水线 末速度,Line_EndSpeed,35000,,,,,,
PRO,硕科流水线 加速度,Line_AddSpeed,5000,,,,,,
PRO,硕科流水线 减速度,Line_DelSpeed,5000,,,,,,
PRO,硕科流水线 归零速度 ,Line_HomeSpeed,10000,,,,,,
PRO,硕科流水线 电机地址 ,Line_Slv,2,,,,,,
,,,,,,,,, ,,,,,,,,,
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,,,,,,
PRO,爱普生机器人IP,Epson_IP,192.168.200.13,,,,,, PRO,尤傲机器人IP,UR_IP,192.168.200.13,,,,,,
PRO,焊接多少块板子后,清洗烙铁,ClearCount,1,,,,,, PRO,焊接多少块板子后,清洗烙铁,ClearCount,1,,,,,,
PRO,清洗IO的毫秒数,ClearMSenconds,3000,,,,,, PRO,清洗IO的毫秒数,ClearMSenconds,3000,,,,,,
PRO,JBC烙铁串口端口号,JBC_SerialPort,COM4,,,,,, PRO,JBC烙铁端口号,JBC_Soldering_Port,COM4,,,,,,
PRO,JBC烙铁设备端口号,JBC_EquipmentPort,1,,,,,, PRO,JBC烙铁编号,JBC_Soldering_Num,1,,,,,,
PRO,JBC送丝端口号,JBC_SendWire_Port,COM1,,,,,,
...@@ -22,6 +22,12 @@ namespace URSoldering.DeviceLibrary ...@@ -22,6 +22,12 @@ namespace URSoldering.DeviceLibrary
private static string MoveOK = "point ok"; private static string MoveOK = "point ok";
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);
//最后一次软件控制移动到的位置 //最后一次软件控制移动到的位置
......
...@@ -36,6 +36,8 @@ namespace URSoldering.DeviceLibrary ...@@ -36,6 +36,8 @@ 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";
//private static string CMD_SetSendLength = "02 57 4C 45 4E 30 31 31 30 30 03 21"; //private static string CMD_SetSendLength = "02 57 4C 45 4E 30 31 31 30 30 03 21";
......
...@@ -199,6 +199,11 @@ namespace URSoldering.DeviceLibrary ...@@ -199,6 +199,11 @@ namespace URSoldering.DeviceLibrary
return getReviceTemp(minTemp); return getReviceTemp(minTemp);
} }
internal static void Init(object jBC_SerialPort, object jBC_EquipmentPort)
{
throw new NotImplementedException();
}
public static int ReadPortError() public static int ReadPortError()
{ {
if (IsRun) if (IsRun)
......
using log4net;
using URSoldering.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace URSoldering.DeviceLibrary
{
public class URRobotControl
{
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static TcpClient controlTcp = new TcpClient();
public static string RobotIp = "192.168.1.120";
public static int ControlPort = 29999;
public static double Robot_LIM_Z = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_LIM_Z);
private static string CMD_powerOn = "power on";
private static string CMD_powerOff = "power off";
private static string CMD_robotMode = "robotmode";
private static string CMD_brakeRelease = "brake release";
/// <summary>
/// 记录最后一次收到OK的时间
/// </summary>
private static Dictionary<string, DateTime> LastOkMap = new Dictionary<string, DateTime>();
/// <summary>
/// 是否锁住轴
/// </summary>
public static bool IsLock = true;
/// <summary>
/// 是否运行中
/// </summary>
public static bool IsRun = false;
public static bool IsStartConnect = false;
private static int startCount = 0;
/// <summary>
/// 上一次启动的时间,UR机械臂启动需要时间,默认需要3分钟,若三分钟后还没有链接,需要重新启动
/// </summary>
private static DateTime PreStartTime = DateTime.Now;
private static int StartTimeOutSeconds = 10000;
public static string WarnMsg = "";
private static System.Timers.Timer reconnectTimer = new System.Timers.Timer();
public static bool InitRobot()
{
if (reconnectTimer == null)
{
reconnectTimer = new System.Timers.Timer();
reconnectTimer.AutoReset = true;
reconnectTimer.Interval = 30000;
reconnectTimer.Elapsed += reconnectTimer_Elapsed;
reconnectTimer.Enabled = false;
}
IsStartConnect = true;
if (IsRun)
{
return true;
}
return StartConnect();
}
private static bool StartConnect()
{
try
{
WarnMsg = "";
if (startCount > 0)
{
TimeSpan span = DateTime.Now - PreStartTime;
if (span.TotalMilliseconds < StartTimeOutSeconds)
{
LogUtil.info("UR机械臂正在连接中,不需要重连");
return true;
}
else
{
LogUtil.info("UR机械臂距离上次启动已经超过10秒,重新开始连接");
StopRobot();
}
}
PreStartTime = DateTime.Now;
startCount++;
controlTcp = new TcpClient();
bool result = controlTcp.connect(RobotIp, ControlPort, new TcpClient.HandleMessage(OnControlRevice));
if (!result)
{
LogUtil.error(LOGGER, "连接【" + RobotIp + "】【" + ControlPort + "】失败");
return false;
}
else
{
LogUtil.info(LOGGER, "连接【" + RobotIp + "】【" + ControlPort + "】成功");
}
//发送
controlTcp.sendLine(CMD_robotMode);
return true;
}
catch (Exception ex)
{
LogUtil.error("starttcp error:" + ex.ToString());
return false;
}
}
private static void reconnectTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if (IsStartConnect)
{
//判断500在连接上,则获取状态
if (controlTcp.IsConnected())
{
controlTcp.sendLine(CMD_robotMode);
}
else
{
LogUtil.error("reconnectTimer_Elapsed检测到UR机械臂已经断开,需要重连!");
stopTcp();
StartConnect();
}
}
}
public static bool SendCMD(string cmd, int msendons)
{
try
{
if (msendons > 0)
{
Task.Factory.StartNew(delegate ()
{
Thread.Sleep(msendons);
controlTcp.sendLine(cmd);
});
}
else
{
controlTcp.sendLine(cmd);
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "SendCMD出错啦cmd[" + cmd + "]msendons[" + msendons + "]" + ex.ToString());
}
return true;
}
public static bool GetRobotMode()
{
return SendCMD(CMD_robotMode, 0);
}
private static void OnControlRevice(string message)
{
if (message == null || message.Equals(""))
{
return;
}
try
{
LogUtil.info(LOGGER, "【" + RobotIp + "】【" + ControlPort + "】收到数据:" + message);
if (message.ToLower().IndexOf("powering on") >= 0)
{
SendCMD(CMD_brakeRelease, 1000);
}
else if (message.ToLower().IndexOf("brake releasing") >= 0)
{
SendCMD(CMD_robotMode, 2000);
}
else if (message.ToLower().IndexOf("robotmode") >= 0)
{
StatusProcess(message);
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "出错啦" + ex.ToString());
}
}
private static void StatusProcess(string message)
{
string msg = message.ToLower().Replace("robotmode: ", "").ToUpper().Trim();
//LogUtil.info("收到机器人状态:"+message);
if (msg.Equals(URStatus.POWER_ON))
{
SendCMD(CMD_brakeRelease, 1000);
}
else if (msg.Equals(URStatus.RUNNING) || msg.Equals(URStatus.IDLE))
{
LogUtil.info("优傲机器人当前状态:" + msg + ",机器人连接成功!");
IsRun = true;
}
else
{
LogUtil.info("优傲机器人当前状态:" + msg + ",发送打开命令" + CMD_powerOn);
SendCMD(CMD_powerOn, 1000);
}
}
private static void stopTcp()
{
try
{
IsRun = false;
startCount--;
controlTcp.sendLine(CMD_powerOff);
controlTcp.close();
}
catch (Exception ex)
{
LogUtil.error("stopTcp出错啦" + ex.ToString());
}
}
public static void StopRobot()
{
try
{
IsStartConnect = false;
reconnectTimer.Enabled = false;
stopTcp();
}
catch (Exception ex)
{
LogUtil.error("StopEpson出错啦" + ex.ToString());
}
}
}
public class URPointValue
{
public URPointValue(double x, double y, double u, double z, int handDir)
{
// TODO: Complete member initialization
this.X = x;
this.Y = y;
this.U = u;
this.Z = z;
this.HandDir = handDir;
this.UpdateTime = DateTime.Now;
}
/// <summary>
/// 更新的时间
/// </summary>
public DateTime UpdateTime { get; set; }
public double X { get; set; }
public double Y { get; set; }
public double U { get; set; }
public double Z { get; set; }
public int HandDir { get; set; }
}
public struct URStatus
{
public static string NO_CONTROLLER = "NO_CONTROLLER";
public static string DISCONNECTED = "DISCONNECTED";
public static string CONFIRM_SAFETY = "CONFIRM_SAFETY";
public static string BOOTING = "BOOTING";
public static string POWER_OFF = "POWER_OFF";
public static string POWER_ON = "POWER_ON";
public static string IDLE = "IDLE";
public static string BACKDRIVE = "BACKDRIVE";
public static string RUNNING = "RUNNING";
}
}
...@@ -10,6 +10,11 @@ namespace URSoldering.DeviceLibrary ...@@ -10,6 +10,11 @@ namespace URSoldering.DeviceLibrary
public class URRobotManager public class URRobotManager
{ {
private static URTcpClient listenClient = null; private static URTcpClient listenClient = null;
public static double Robot_LIM_Z { get; set; }
public static bool IsRun { get; set; }
public static void StartListen() public static void StartListen()
{ {
listenClient = new URTcpClient(); listenClient = new URTcpClient();
...@@ -107,5 +112,25 @@ namespace URSoldering.DeviceLibrary ...@@ -107,5 +112,25 @@ namespace URSoldering.DeviceLibrary
LogUtil.error("出错:" + ex.ToString()); LogUtil.error("出错:" + ex.ToString());
} }
} }
public static void GetPosition(Action<double, double, double, double, int> afterGet)
{
throw new NotImplementedException();
}
public static void FreeAxis()
{
throw new NotImplementedException();
}
public static void MoveTo(double x, double y, double z, double u, bool isfast, int hand, Action<string> afterMove)
{
throw new NotImplementedException();
}
public static void LockAxis()
{
throw new NotImplementedException();
}
} }
} }
...@@ -58,8 +58,6 @@ namespace URSoldering.LoadCSVLibrary ...@@ -58,8 +58,6 @@ namespace URSoldering.LoadCSVLibrary
/// </summary> /// </summary>
public static string DeviceRunON = "DeviceRunON"; public static string DeviceRunON = "DeviceRunON";
#region 焊接IO
/// <summary> /// <summary>
/// DI-急停 SuddenStop_Single X01 DI-01 /// DI-急停 SuddenStop_Single X01 DI-01
...@@ -72,6 +70,42 @@ namespace URSoldering.LoadCSVLibrary ...@@ -72,6 +70,42 @@ namespace URSoldering.LoadCSVLibrary
public static string AirCheck_Single = "AirCheck_Single"; public static string AirCheck_Single = "AirCheck_Single";
/// <summary> /// <summary>
/// DI DO 自动夹具夹紧端 Fixture_Clamp X03 DI-03
/// </summary>
public static string Fixture_Clamp = "Fixture_Clamp";
/// <summary>
/// DI DO 自动夹具放松端 Fixture_Relax X04 DI-04
/// </summary>
public static string Fixture_Relax = "Fixture_Relax";
/// <summary>
/// DI DO 送丝气缸工作端 SendWire_Work X05 DI-05
/// </summary>
public static string SendWire_Work = "SendWire_Work";
/// <summary>
/// DI DO 送丝气缸清洗端 SendWire_Clear X06 DI-06
/// </summary>
public static string SendWire_Clear = "SendWire_Clear";
/// <summary>
/// DI DO 烙铁气缸上升端 Soldering_Up X07 DI-07
/// </summary>
public static string Soldering_Up = "Soldering_Up";
/// <summary>
/// DI DO 烙铁气缸下降端 Soldering_Down X07 DI-07
/// </summary>
public static string Soldering_Down = "Soldering_Down";
/// <summary>
/// 送丝电机启动 SendWireStart
/// </summary>
public static string SendWireStart = "SendWireStart";
#region 焊接IO
/// <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";
......
...@@ -22,22 +22,12 @@ namespace URSoldering.LoadCSVLibrary ...@@ -22,22 +22,12 @@ namespace URSoldering.LoadCSVLibrary
/// <summary> /// <summary>
/// PRO 爱普生机器人IP Epson_IP 192.168.0.1 /// PRO 尤傲机器人IP UR_IP 192.168.200.13
/// </summary>
[ConfigProAttribute("Epson_IP")]
public string Epson_IP { get; set; }
///// <summary> /// </summary>
///// PRO 爱普生机器人控制端口 Epson_ControlPort 5000 [ConfigProAttribute("UR_IP")]
///// </summary> public string UR_IP { get; set; }
//[ConfigProAttribute("Epson_ControlPort")]
//public int Epson_ControlPort { get; set; }
///// <summary>
///// PRO 爱普生机器人运动端口 Epson_MovePort 2000
///// </summary>
//[ConfigProAttribute("Epson_MovePort")]
//public int Epson_MovePort { get; set; }
/// <summary> /// <summary>
/// PRO 焊接多少块板子后,清洗烙铁 ClearCount 10 /// PRO 焊接多少块板子后,清洗烙铁 ClearCount 10
...@@ -52,16 +42,24 @@ namespace URSoldering.LoadCSVLibrary ...@@ -52,16 +42,24 @@ namespace URSoldering.LoadCSVLibrary
public int ClearMSenconds { get; set; } public int ClearMSenconds { get; set; }
/// <summary> /// <summary>
/// PRO JBC烙铁串口端口号 JBC_SerialPort COM1 /// PRO JBC烙铁端口号 JBC_Soldering_Port COM1
/// </summary> /// </summary>
[ConfigProAttribute("JBC_SerialPort")] [ConfigProAttribute("JBC_Soldering_Port")]
public string JBC_SerialPort { get; set; } public string JBC_Soldering_Port { get; set; }
/// <summary> /// <summary>
/// PRO JBC烙铁设备端口号 JBC_EquipmentPort 1 /// PRO JBC烙铁编号 JBC_Soldering_Num 1
/// </summary> /// </summary>
[ConfigProAttribute("JBC_EquipmentPort")] [ConfigProAttribute("JBC_Soldering_Num")]
public string JBC_EquipmentPort { get; set; } public string JBC_Soldering_Num { get; set; }
/// <summary>
/// JBC送丝端口号 JBC_SendWire_Port COM1
/// </summary>
[ConfigProAttribute("JBC_SendWire_Port")]
public string JBC_SendWire_Port { get; set; }
/// <summary> /// <summary>
...@@ -158,7 +156,8 @@ namespace URSoldering.LoadCSVLibrary ...@@ -158,7 +156,8 @@ namespace URSoldering.LoadCSVLibrary
/// </summary> /// </summary>
[ConfigProAttribute("Line_Slv")] [ConfigProAttribute("Line_Slv")]
public int Line_Slv { get; set; } public int Line_Slv { get; set; }
public string JBC_EquipmentPort { get; set; }
public string JBC_SerialPort { get; set; }
protected override void initMustHavePro() protected override void initMustHavePro()
{ {
...@@ -167,22 +166,21 @@ namespace URSoldering.LoadCSVLibrary ...@@ -167,22 +166,21 @@ namespace URSoldering.LoadCSVLibrary
MustHaveDIList.Add(IO_Type.SuddenStop_Single); MustHaveDIList.Add(IO_Type.SuddenStop_Single);
MustHaveDIList.Add(IO_Type.AirCheck_Single); MustHaveDIList.Add(IO_Type.AirCheck_Single);
MustHaveDIList.Add(IO_Type.StopCylinder_Down); MustHaveDIList.Add(IO_Type.Fixture_Clamp);
MustHaveDIList.Add(IO_Type.StopCylinder_Up); MustHaveDIList.Add(IO_Type.Fixture_Relax);
MustHaveDIList.Add(IO_Type.SendWire_Down); MustHaveDIList.Add(IO_Type.SendWire_Clear);
MustHaveDIList.Add(IO_Type.SendWire_Up); MustHaveDIList.Add(IO_Type.SendWire_Work);
MustHaveDIList.Add(IO_Type.SendWireNoWire); MustHaveDIList.Add(IO_Type.Soldering_Down);
MustHaveDIList.Add(IO_Type.SendWireLock); MustHaveDIList.Add(IO_Type.Soldering_Up);
MustHaveDIList.Add(IO_Type.LineInCheck);
MustHaveDIList.Add(IO_Type.LineWeldCheck); MustHaveDOList.Add(IO_Type.Fixture_Clamp);
MustHaveDIList.Add(IO_Type.LineOutCheck); MustHaveDOList.Add(IO_Type.Fixture_Relax);
MustHaveDOList.Add(IO_Type.SendWire_Clear);
MustHaveDOList.Add(IO_Type.SendWire_Down); MustHaveDOList.Add(IO_Type.SendWire_Work);
MustHaveDOList.Add(IO_Type.SendWire_Up); MustHaveDOList.Add(IO_Type.Soldering_Down);
MustHaveDOList.Add(IO_Type.StopCylinder_Down); MustHaveDOList.Add(IO_Type.Soldering_Up);
MustHaveDOList.Add(IO_Type.StopCylinder_Up);
MustHaveDOList.Add(IO_Type.ClearWeldingSQL); MustHaveDOList.Add(IO_Type.SendWireStart);
MustHaveDOList.Add(IO_Type.LineStart);
} }
} }
} }
...@@ -35,12 +35,13 @@ namespace URSoldering.Client ...@@ -35,12 +35,13 @@ namespace URSoldering.Client
this.btnProduct = new System.Windows.Forms.Button(); this.btnProduct = new System.Windows.Forms.Button();
this.btnWelding = new System.Windows.Forms.Button(); this.btnWelding = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.btnStop = new System.Windows.Forms.Button();
this.btnStart = new System.Windows.Forms.Button();
this.btnAutoEdit = new System.Windows.Forms.Button(); this.btnAutoEdit = new System.Windows.Forms.Button();
this.btnTongji = new System.Windows.Forms.Button(); this.btnTongji = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.btnCom = new System.Windows.Forms.Button(); this.btnCom = new System.Windows.Forms.Button();
this.btnStart = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -115,6 +116,7 @@ namespace URSoldering.Client ...@@ -115,6 +116,7 @@ namespace URSoldering.Client
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage"))); this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage")));
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.btnStop); this.panel1.Controls.Add(this.btnStop);
this.panel1.Controls.Add(this.btnStart); this.panel1.Controls.Add(this.btnStart);
this.panel1.Controls.Add(this.btnAutoEdit); this.panel1.Controls.Add(this.btnAutoEdit);
...@@ -130,6 +132,26 @@ namespace URSoldering.Client ...@@ -130,6 +132,26 @@ namespace URSoldering.Client
this.panel1.Size = new System.Drawing.Size(861, 453); this.panel1.Size = new System.Drawing.Size(861, 453);
this.panel1.TabIndex = 15; this.panel1.TabIndex = 15;
// //
// btnStop
//
this.btnStop.Location = new System.Drawing.Point(67, 204);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(85, 28);
this.btnStop.TabIndex = 16;
this.btnStop.Text = "停止";
this.btnStop.UseVisualStyleBackColor = true;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// btnStart
//
this.btnStart.Location = new System.Drawing.Point(67, 175);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(85, 28);
this.btnStart.TabIndex = 15;
this.btnStart.Text = "开始";
this.btnStart.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// btnAutoEdit // btnAutoEdit
// //
this.btnAutoEdit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(186)))), ((int)(((byte)(118)))), ((int)(((byte)(159))))); this.btnAutoEdit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(186)))), ((int)(((byte)(118)))), ((int)(((byte)(159)))));
...@@ -193,25 +215,15 @@ namespace URSoldering.Client ...@@ -193,25 +215,15 @@ namespace URSoldering.Client
this.btnCom.TabIndex = 5; this.btnCom.TabIndex = 5;
this.btnCom.UseVisualStyleBackColor = false; this.btnCom.UseVisualStyleBackColor = false;
// //
// btnStart // button2
// //
this.btnStart.Location = new System.Drawing.Point(67, 175); this.button2.Location = new System.Drawing.Point(67, 238);
this.btnStart.Name = "btnStart"; this.button2.Name = "button2";
this.btnStart.Size = new System.Drawing.Size(85, 28); this.button2.Size = new System.Drawing.Size(85, 28);
this.btnStart.TabIndex = 15; this.button2.TabIndex = 17;
this.btnStart.Text = "开始"; this.button2.Text = "状态";
this.btnStart.UseVisualStyleBackColor = true; this.button2.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click); this.button2.Click += new System.EventHandler(this.button2_Click);
//
// btnStop
//
this.btnStop.Location = new System.Drawing.Point(67, 204);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(85, 28);
this.btnStop.TabIndex = 16;
this.btnStop.Text = "停止";
this.btnStop.UseVisualStyleBackColor = true;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
// //
// FrmMenu // FrmMenu
// //
...@@ -243,5 +255,6 @@ namespace URSoldering.Client ...@@ -243,5 +255,6 @@ namespace URSoldering.Client
private System.Windows.Forms.Button btnAutoEdit; private System.Windows.Forms.Button btnAutoEdit;
private System.Windows.Forms.Button btnStop; private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.Button btnStart; private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.Button button2;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -118,13 +118,19 @@ namespace URSoldering.Client ...@@ -118,13 +118,19 @@ namespace URSoldering.Client
private void btnStart_Click(object sender, EventArgs e) private void btnStart_Click(object sender, EventArgs e)
{ {
URRobotControl.InitRobot();
URRobotManager.StartListen(); //URRobotManager.StartListen();
} }
private void btnStop_Click(object sender, EventArgs e) private void btnStop_Click(object sender, EventArgs e)
{ {
URRobotManager.StopListen(); URRobotControl.StopRobot();
//URRobotManager.StopListen();
}
private void button2_Click(object sender, EventArgs e)
{
URRobotControl.GetRobotMode();
} }
} }
} }
...@@ -151,18 +151,18 @@ ...@@ -151,18 +151,18 @@
<Compile Include="FrmPwd.Designer.cs"> <Compile Include="FrmPwd.Designer.cs">
<DependentUpon>FrmPwd.cs</DependentUpon> <DependentUpon>FrmPwd.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmSolderingSetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmSolderingSetting.Designer.cs">
<DependentUpon>FrmSolderingSetting.cs</DependentUpon>
</Compile>
<Compile Include="FrmShuoKeDebug.cs"> <Compile Include="FrmShuoKeDebug.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="FrmShuoKeDebug.Designer.cs"> <Compile Include="FrmShuoKeDebug.Designer.cs">
<DependentUpon>FrmShuoKeDebug.cs</DependentUpon> <DependentUpon>FrmShuoKeDebug.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmSolderingSetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmSolderingSetting.Designer.cs">
<DependentUpon>FrmSolderingSetting.cs</DependentUpon>
</Compile>
<Compile Include="FrmSoldDebug.cs"> <Compile Include="FrmSoldDebug.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -222,12 +222,12 @@ ...@@ -222,12 +222,12 @@
<EmbeddedResource Include="FrmPwd.resx"> <EmbeddedResource Include="FrmPwd.resx">
<DependentUpon>FrmPwd.cs</DependentUpon> <DependentUpon>FrmPwd.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmSolderingSetting.resx">
<DependentUpon>FrmSolderingSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmShuoKeDebug.resx"> <EmbeddedResource Include="FrmShuoKeDebug.resx">
<DependentUpon>FrmShuoKeDebug.cs</DependentUpon> <DependentUpon>FrmShuoKeDebug.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmSolderingSetting.resx">
<DependentUpon>FrmSolderingSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmSoldDebug.resx"> <EmbeddedResource Include="FrmSoldDebug.resx">
<DependentUpon>FrmSoldDebug.cs</DependentUpon> <DependentUpon>FrmSoldDebug.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!