Commit 8eccf70f 几米阳光

1

1 个父辈 85436596
...@@ -22,17 +22,12 @@ namespace URSoldering.Common ...@@ -22,17 +22,12 @@ namespace URSoldering.Common
public static string Robot_Type = "Robot_Type"; public static string Robot_Type = "Robot_Type";
public static string AOIFileConfig = "AOIFileConfig"; public static string AOIFileConfig = "AOIFileConfig";
/// <summary>
/// 检测焊点文件
/// </summary>
public static string AOICheckPointFile = "AOICheckPointFile";
public static string ISDebug = "ISDebug"; public static string ISDebug = "ISDebug";
public static string WorkCount_ConfigPath = "WorkCount_ConfigPath"; public static string WorkCount_ConfigPath = "WorkCount_ConfigPath";
#region 焊接机器人配置 #region 焊接机器人配置
public static string ScanCodeConfig = "ScanCodeConfig";
/// <summary> /// <summary>
/// 元器件库目录 /// 元器件库目录
/// </summary> /// </summary>
...@@ -71,9 +66,8 @@ namespace URSoldering.Common ...@@ -71,9 +66,8 @@ namespace URSoldering.Common
/// 机械臂最小范围 /// 机械臂最小范围
/// </summary> /// </summary>
public static string Soldering_RobotMax = "Soldering_RobotMax"; public static string Soldering_RobotMax = "Soldering_RobotMax";
public static string Soldering_LIM_Z = "Soldering_LIM_Z"; public static string Soldering_LIM_Z = "Soldering_LIM_Z";
public static string SendWire_Change = "SendWire_Change";
public static string Slave_ID = "Slave_ID"; public static string Slave_ID = "Slave_ID";
/// <summary> /// <summary>
...@@ -90,21 +84,10 @@ namespace URSoldering.Common ...@@ -90,21 +84,10 @@ namespace URSoldering.Common
/// </summary> /// </summary>
public static string SendWireRecoverSeconds = "SendWireRecoverSeconds"; public static string SendWireRecoverSeconds = "SendWireRecoverSeconds";
public static string ReverseSendWireSpeed = "ReverseSendWireSpeed"; public static string ReverseSendWireSpeed = "ReverseSendWireSpeed";
public static string ReverseSendWireTime = "ReverseSendWireTime"; public static string ReverseSendWireTime = "ReverseSendWireTime";
/// <summary>
/// 摄像机名称,多个中间使用#分割
/// </summary>
public static string CameraName = "CameraName"; public static string CameraName = "CameraName";
/// <summary>
/// 需要识别的条码类型,多个中间使用#分割
/// </summary>
public static string CodeType = "CodeType"; public static string CodeType = "CodeType";
/// <summary>
/// 配置文件路径 Data Matrix ECC 200.dcm
/// </summary>
public static string CodeParamPath = "CodeParamPath"; public static string CodeParamPath = "CodeParamPath";
public static string VideoCameraName = "VideoCameraName"; public static string VideoCameraName = "VideoCameraName";
...@@ -115,6 +98,5 @@ namespace URSoldering.Common ...@@ -115,6 +98,5 @@ namespace URSoldering.Common
public static string HasSoldering = "HasSoldering"; public static string HasSoldering = "HasSoldering";
public static string Config_Pwd = "Config_Pwd"; public static string Config_Pwd = "Config_Pwd";
public static object ShuoKe_Control_SerialPort { get; set; }
} }
} }
...@@ -25,7 +25,6 @@ namespace URSoldering.DeviceLibrary ...@@ -25,7 +25,6 @@ namespace URSoldering.DeviceLibrary
public static URPointValue RobotMax = new URPointValue(); public static URPointValue RobotMax = new URPointValue();
public static int SendWireXiShu = ConfigAppSettings.GetIntValue(Setting_Init.SendWire_Change);
//休眠的秒数,<=0不需要休眠 //休眠的秒数,<=0不需要休眠
public static int SleepSeconds = ConfigAppSettings.GetIntValue(Setting_Init.SleepSeconds); public static int SleepSeconds = ConfigAppSettings.GetIntValue(Setting_Init.SleepSeconds);
public static bool isHighSpeed = ConfigAppSettings.GetIntValue(Setting_Init.Robot_IsHigh) == 1; public static bool isHighSpeed = ConfigAppSettings.GetIntValue(Setting_Init.Robot_IsHigh) == 1;
......
...@@ -286,7 +286,7 @@ namespace URSoldering.DeviceLibrary ...@@ -286,7 +286,7 @@ namespace URSoldering.DeviceLibrary
double time = WeldMoveStep.CurrPoint.startSendWireTime; double time = WeldMoveStep.CurrPoint.startSendWireTime;
if (time > 0) if (time > 0)
{ {
int speed = (int)WeldMoveStep.CurrPoint.startSendWireSpeed * SendWireXiShu; double speed = WeldMoveStep.CurrPoint.startSendWireSpeed;
WeldLog(" 慢速送丝,速度:" + speed + " :" + time.ToString() + "秒"); WeldLog(" 慢速送丝,速度:" + speed + " :" + time.ToString() + "秒");
SendWireManager.SendWire( time, speed); SendWireManager.SendWire( time, speed);
int ms = (int)(time * 1000+100); int ms = (int)(time * 1000+100);
...@@ -301,7 +301,7 @@ namespace URSoldering.DeviceLibrary ...@@ -301,7 +301,7 @@ namespace URSoldering.DeviceLibrary
{ {
SetTemp(false, false); SetTemp(false, false);
double time = WeldMoveStep.CurrPoint.sendWireTime; double time = WeldMoveStep.CurrPoint.sendWireTime;
int speed = (int)WeldMoveStep.CurrPoint.sendWireSpeed * SendWireXiShu; double speed =WeldMoveStep.CurrPoint.sendWireSpeed ;
WeldLog(" 送丝,速度:" + speed + " :" + time.ToString() + "秒"); WeldLog(" 送丝,速度:" + speed + " :" + time.ToString() + "秒");
if (time > 0) if (time > 0)
{ {
...@@ -480,7 +480,7 @@ namespace URSoldering.DeviceLibrary ...@@ -480,7 +480,7 @@ namespace URSoldering.DeviceLibrary
WeldMoveStep.ResetCount++; WeldMoveStep.ResetCount++;
SendWireManager.Reset(); SendWireManager.Reset();
//反向送丝 //反向送丝
int speed = ConfigAppSettings.GetIntValue(Setting_Init.ReverseSendWireSpeed) * SendWireXiShu; int speed = ConfigAppSettings.GetIntValue(Setting_Init.ReverseSendWireSpeed) ;
double time = (double)ConfigAppSettings.GetNumValue(Setting_Init.ReverseSendWireTime); double time = (double)ConfigAppSettings.GetNumValue(Setting_Init.ReverseSendWireTime);
if (speed.Equals(0) || time <= 0) if (speed.Equals(0) || time <= 0)
{ {
...@@ -495,7 +495,7 @@ namespace URSoldering.DeviceLibrary ...@@ -495,7 +495,7 @@ namespace URSoldering.DeviceLibrary
SendWireManager.SendWireBack(time, speed); SendWireManager.SendWireBack(time, speed);
int ms = (int)((time * 1000) + 100); int ms = (int)((time * 1000) + 100);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitSendWire(ms, false)); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitSendWire(ms, true));
isOk = false; isOk = false;
} }
} }
......
...@@ -148,14 +148,14 @@ namespace URSoldering.DeviceLibrary ...@@ -148,14 +148,14 @@ namespace URSoldering.DeviceLibrary
} }
return false; return false;
} }
public static void SendWireBack(double time, int speed) public static void SendWireBack(double time, double speed)
{ {
setSpeed(speed); setSpeed(speed);
double length = (time * speed); double length = (time * speed);
setLength(length); setLength(length);
StartBSend(); StartBSend();
} }
public static void SendWire(double time, int speed) public static void SendWire(double time, double speed)
{ {
setSpeed(speed); setSpeed(speed);
double length = (time * speed); double length = (time * speed);
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<!--AOI检测文件--> <!--AOI检测文件-->
<add key="VideoCameraName" value="[0] Integrated Camera" /> <add key="VideoCameraName" value="[0] Integrated Camera" />
<add key="AOIFileConfig" value="\RobotConfig\AOIConfig\AOIProgram.vscf" /> <add key="AOIFileConfig" value="\RobotConfig\AOIConfig\AOIProgram.vscf" />
<add key="AOICheckPointFile" value="\RobotConfig\AOIConfig\AOIPointProgram.vscf" />
<add key="AOIWaitSeconds" value="1000" /> <add key="AOIWaitSeconds" value="1000" />
<!--送丝器消除报警需要持续的秒数--> <!--送丝器消除报警需要持续的秒数-->
<add key="SendWireRecoverSeconds" value="5" /> <add key="SendWireRecoverSeconds" value="5" />
...@@ -39,10 +38,9 @@ ...@@ -39,10 +38,9 @@
<add key="Board_Image_Path" value="\RobotConfig\config" /> <add key="Board_Image_Path" value="\RobotConfig\config" />
<!--程序默认图片--> <!--程序默认图片-->
<add key="BOARD_IMAGE_DEFAULT" value="defaultBoard.jpg" /> <add key="BOARD_IMAGE_DEFAULT" value="defaultBoard.jpg" />
<!--送丝1mm对应的脉冲数-->
<add key="SendWire_Change" value="-305" />
<!--报警时反转送丝速度--> <!--报警时反转送丝速度-->
<add key="ReverseSendWireSpeed" value="-10" /> <add key="ReverseSendWireSpeed" value="10" />
<!--报警时反转送丝时间--> <!--报警时反转送丝时间-->
<add key="ReverseSendWireTime" value="3" /> <add key="ReverseSendWireTime" value="3" />
<add key="ISDebug" value="1" /> <add key="ISDebug" value="1" />
......
...@@ -12,8 +12,8 @@ namespace URSoldering.Client ...@@ -12,8 +12,8 @@ namespace URSoldering.Client
{ {
InitializeComponent(); InitializeComponent();
} }
private static string VideoCameraName = ConfigAppSettings.GetValue(Setting_Init.VideoCameraName); //private static string VideoCameraName = ConfigAppSettings.GetValue(Setting_Init.VideoCameraName);
//private static string CodeCameraName = ConfigAppSettings.GetValue(Setting_Init.CodeCameraName);
private void btnOpen_Click(object sender, EventArgs e) private void btnOpen_Click(object sender, EventArgs e)
{ {
string name = cmbCamera.Text; string name = cmbCamera.Text;
...@@ -38,7 +38,7 @@ namespace URSoldering.Client ...@@ -38,7 +38,7 @@ namespace URSoldering.Client
private void FrmCamera_Load(object sender, EventArgs e) private void FrmCamera_Load(object sender, EventArgs e)
{ {
cmbCamera.Items.Add(VideoCameraName); //cmbCamera.Items.Add(VideoCameraName);
//cmbCamera.Items.Add(CodeCameraName); //cmbCamera.Items.Add(CodeCameraName);
cmbCamera.SelectedIndex = 0; cmbCamera.SelectedIndex = 0;
FormStatus(false); FormStatus(false);
......
...@@ -26,22 +26,22 @@ namespace URSoldering.Client ...@@ -26,22 +26,22 @@ namespace URSoldering.Client
} }
private void getValue() private void getValue()
{ {
int index = -1; //int index = -1;
foreach (BoardInfo obj in BoardManager.boardList) //foreach (BoardInfo obj in BoardManager.boardList)
{ //{
index++; // index++;
if (obj.boardId.Equals(BoardManager.CurrBoardId)) // if (obj.boardId.Equals(BoardManager.CurrBoardId))
{ // {
break; // break;
} // }
} //}
if (index >= 0) //if (index >= 0)
{ //{
cmbBoardList.SelectedIndex = index; // cmbBoardList.SelectedIndex = index;
} //}
this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X); //this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X);
this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y); //this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y);
int ch = WeldRobotBean.SendWireXiShu; //int ch = WeldRobotBean.SendWireXiShu;
txtLimZ.Text = ((double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_LIM_Z)).ToString(); txtLimZ.Text = ((double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_LIM_Z)).ToString();
txtsendWireSpeed.Text = ConfigAppSettings.GetValue(Setting_Init.ReverseSendWireSpeed); txtsendWireSpeed.Text = ConfigAppSettings.GetValue(Setting_Init.ReverseSendWireSpeed);
...@@ -59,8 +59,8 @@ namespace URSoldering.Client ...@@ -59,8 +59,8 @@ namespace URSoldering.Client
{ {
try try
{ {
int boardId = ((BoardInfo)cmbBoardList.SelectedItem).boardId; //int boardId = ((BoardInfo)cmbBoardList.SelectedItem).boardId;
BoardManager.UpdateCurrBoard(boardId); //BoardManager.UpdateCurrBoard(boardId);
int limz = FormUtil.GetIntValue(txtLimZ); int limz = FormUtil.GetIntValue(txtLimZ);
...@@ -154,8 +154,8 @@ namespace URSoldering.Client ...@@ -154,8 +154,8 @@ namespace URSoldering.Client
ConfigAppSettings.SaveValue(Setting_Init.Soldering_LIM_Z, limz.ToString()); ConfigAppSettings.SaveValue(Setting_Init.Soldering_LIM_Z, limz.ToString());
URRobotControl.Robot_LIM_Z = limz; URRobotControl.Robot_LIM_Z = limz;
ConfigAppSettings.SaveValue(Setting_Init.Default_BoardID, boardId); //ConfigAppSettings.SaveValue(Setting_Init.Default_BoardID, boardId);
BoardManager.UpdateCurrBoard(boardId); //BoardManager.UpdateCurrBoard(boardId);
ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireSpeed, sendWireSpeed); ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireSpeed, sendWireSpeed);
ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireTime, sendWireTime); ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireTime, sendWireTime);
...@@ -175,16 +175,16 @@ namespace URSoldering.Client ...@@ -175,16 +175,16 @@ namespace URSoldering.Client
private void FrmRobotSetting_Load(object sender, EventArgs e) private void FrmRobotSetting_Load(object sender, EventArgs e)
{ {
LoadCom(); //LoadCom();
getValue(); getValue();
} }
private void LoadCom() //private void LoadCom()
{ //{
cmbBoardList.DataSource = null; // cmbBoardList.DataSource = null;
cmbBoardList.DataSource = BoardManager.boardList; // cmbBoardList.DataSource = BoardManager.boardList;
cmbBoardList.DisplayMember = "boardName"; // cmbBoardList.DisplayMember = "boardName";
cmbBoardList.ValueMember = "boardId"; // cmbBoardList.ValueMember = "boardId";
} //}
private void btnClose_Click(object sender, EventArgs e) private void btnClose_Click(object sender, EventArgs e)
{ {
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
this.logBox = new System.Windows.Forms.RichTextBox(); this.logBox = new System.Windows.Forms.RichTextBox();
this.lblRobot = new System.Windows.Forms.Label(); this.lblRobot = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.axCKVisionCtrl1 = new AxCKVisionCtrlLib.AxCKVisionCtrl(); this.axCKVisionCtrl1 = new AxCKVisionCtrlLib.AxCKVisionCtrl();
this.lblCodeResult = new System.Windows.Forms.Label(); this.lblCodeResult = new System.Windows.Forms.Label();
...@@ -168,7 +167,7 @@ ...@@ -168,7 +167,7 @@
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox2.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.groupBox2.Controls.Add(this.button2);
this.groupBox2.Controls.Add(this.button1); this.groupBox2.Controls.Add(this.button1);
this.groupBox2.Controls.Add(this.axCKVisionCtrl1); this.groupBox2.Controls.Add(this.axCKVisionCtrl1);
this.groupBox2.Controls.Add(this.lblCodeResult); this.groupBox2.Controls.Add(this.lblCodeResult);
...@@ -181,17 +180,7 @@ ...@@ -181,17 +180,7 @@
this.groupBox2.Size = new System.Drawing.Size(99, 595); this.groupBox2.Size = new System.Drawing.Size(99, 595);
this.groupBox2.TabIndex = 269; this.groupBox2.TabIndex = 269;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
//
// button2
//
this.button2.Location = new System.Drawing.Point(486, 14);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(79, 26);
this.button2.TabIndex = 308;
this.button2.Text = "扫码测试";
this.button2.UseVisualStyleBackColor = true;
this.button2.Visible = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
// //
// button1 // button1
// //
...@@ -821,7 +810,7 @@ ...@@ -821,7 +810,7 @@
private System.Windows.Forms.Button btnBlow; private System.Windows.Forms.Button btnBlow;
private System.Windows.Forms.Label lblCodeResult; private System.Windows.Forms.Label lblCodeResult;
private AxCKVisionCtrlLib.AxCKVisionCtrl axCKVisionCtrl1; private AxCKVisionCtrlLib.AxCKVisionCtrl axCKVisionCtrl1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!