和测试软件通信优化

master
lhiven 1 year ago
parent 0312ef6c8d
commit 2c4041b52e

@ -17,6 +17,19 @@ namespace Rs.Framework
{ {
#region newpro #region newpro
/// <summary>
/// 检测视觉软件是否打开
/// </summary>
[ParameterInit("bool", "true", "system", "测试模式(A,AAB,ABC)")]
public static bool CheckVisionSwOpened
{
get
{
return SysConfigParam.GetValue<bool>(nameof(CheckVisionSwOpened));
}
}
/// <summary> /// <summary>
/// 测试模式(A,AAB,ABC) /// 测试模式(A,AAB,ABC)
/// </summary> /// </summary>

@ -11,20 +11,23 @@ namespace Rs.MotionPlat.Commom
public static class Msgbox public static class Msgbox
{ {
static Dictionary<int, Form> boxList = new Dictionary<int, Form>(); static Dictionary<int, Form> boxList = new Dictionary<int, Form>();
public static EButtonType ShowDialog(int msgID,EButtonType buttons,string content,string title="") /// <summary>
/// 显示模态弹框
/// </summary>
public static EButtonType ShowDialog(EButtonType buttons,string content,string title="")
{ {
EButtonType ret = EButtonType.None; EButtonType ret = EButtonType.None;
if (!boxList.ContainsKey(msgID)) FrmDialog fd = new FrmDialog();
{ ret = fd.ShowMessage(buttons, content, "",title);
FrmDialog fd = new FrmDialog();
boxList.Add(msgID, fd);
ret = fd.ShowMessage(buttons, content, title);
boxList.Remove(msgID);
}
return ret; return ret;
} }
/// <summary>
/// 显示模态弹框
/// </summary>
/// <param name="alarmInfo"></param>
/// <param name="buttons"></param>
/// <returns></returns>
public static EButtonType ShowDialog(AlarmEntity alarmInfo, EButtonType buttons) public static EButtonType ShowDialog(AlarmEntity alarmInfo, EButtonType buttons)
{ {
EButtonType ret = EButtonType.None; EButtonType ret = EButtonType.None;
@ -34,23 +37,40 @@ namespace Rs.MotionPlat.Commom
boxList.Add(alarmInfo.AlarmID, fd); boxList.Add(alarmInfo.AlarmID, fd);
ret = fd.ShowMessage(buttons, alarmInfo.CN,alarmInfo.EN); ret = fd.ShowMessage(buttons, alarmInfo.CN,alarmInfo.EN);
boxList.Remove(alarmInfo.AlarmID); boxList.Remove(alarmInfo.AlarmID);
} }
return ret; return ret;
} }
/// <summary>
/// 显示非模态弹框
/// </summary>
/// <param name="content"></param>
/// <param name="buttons"></param>
public static void Show(string content ,EButtonType buttons)
{
FrmDialog fd = new FrmDialog();
fd.ShowMessage(buttons, content,"","",false);
}
/// <summary>
/// 显示非模态对话框
/// </summary>
/// <param name="alarmInfo"></param>
/// <param name="buttons"></param>
public static void Show(AlarmEntity alarmInfo, EButtonType buttons) public static void Show(AlarmEntity alarmInfo, EButtonType buttons)
{ {
if (!boxList.ContainsKey(alarmInfo.AlarmID)) if (!boxList.ContainsKey(alarmInfo.AlarmID))
{ {
FrmDialog fd = new FrmDialog(); FrmDialog fd = new FrmDialog();
boxList.Add(alarmInfo.AlarmID, fd); boxList.Add(alarmInfo.AlarmID, fd);
fd.ShowMessage(buttons, alarmInfo.CN, alarmInfo.EN,"",false); fd.ShowMessage(buttons, alarmInfo.CN, alarmInfo.EN, "", false);
} }
} }
/// <summary>
/// 关闭弹框
/// </summary>
/// <param name="msgID"></param>
public static void CloseBox(int msgID) public static void CloseBox(int msgID)
{ {
if(boxList.ContainsKey(msgID)) if(boxList.ContainsKey(msgID))

@ -1,6 +1,7 @@
using NPOI.SS.Format; using NPOI.SS.Format;
using NPOI.SS.Formula.Functions; using NPOI.SS.Formula.Functions;
using Rs.Framework; using Rs.Framework;
using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Flow.NormalFlow; using Rs.MotionPlat.Flow.NormalFlow;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
@ -283,6 +284,11 @@ namespace Rs.MotionPlat.Entitys
} }
} }
public void SetEvent()
{
dataEvent.Set();
}
public void QueryStatus() public void QueryStatus()
{ {
Task.Run(() => { Task.Run(() => {
@ -315,6 +321,55 @@ namespace Rs.MotionPlat.Entitys
}); });
} }
/// <summary>
/// 通知治具回原
/// </summary>
public void Home()
{
while (true)
{
if (dataEvent.WaitOne(10))
{
break;
}
else
{
Thread.Sleep(10);
}
}
Send($"Home$");
if (CheckPrintLog())
{
logs.Enqueue($"<<< TC{Index} Home$");
}
}
/// <summary>
/// 通知治具暂停
/// </summary>
public void Pause()
{
while (true)
{
if (dataEvent.WaitOne(10))
{
break;
}
else
{
Thread.Sleep(10);
}
}
Send($"Pause#1$");
if (CheckPrintLog())
{
logs.Enqueue($"<<< TC{Index} Pause#1$");
}
}
/// <summary>
/// 通知治具启动测试
/// </summary>
public void StartTest() public void StartTest()
{ {
while (true) while (true)
@ -332,12 +387,7 @@ namespace Rs.MotionPlat.Entitys
Send($"StartTest#{Product.SN}$"); Send($"StartTest#{Product.SN}$");
if(CheckPrintLog()) if(CheckPrintLog())
{ {
//lock(this) logs.Enqueue($"<<< TC{Index} starttest");
//{
// File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} starttest\r\n");
//}
logs.Enqueue($"<<< 治具{Index} starttest");
} }
} }
private ConcurrentQueue<string> logs = new ConcurrentQueue<string>(); private ConcurrentQueue<string> logs = new ConcurrentQueue<string>();
@ -369,13 +419,15 @@ namespace Rs.MotionPlat.Entitys
} }
else else
{ {
MessageQueue.Instance.Warn("disconned!"); MessageQueue.Instance.Warn($"TC{Index} disconned!");
Status = ETestFixtureStatus.NoConnect;
Connected = false; Connected = false;
} }
} }
catch (SocketException ex) catch (SocketException ex)
{ {
MessageQueue.Instance.Warn("disconned!"); Status = ETestFixtureStatus.NoConnect;
MessageQueue.Instance.Warn($"TC{Index} disconned!");
Connected = false; Connected = false;
} }
@ -390,7 +442,7 @@ namespace Rs.MotionPlat.Entitys
string content = Encoding.ASCII.GetString(data.ToArray()); string content = Encoding.ASCII.GetString(data.ToArray());
if (CheckPrintLog()) if (CheckPrintLog())
{ {
logs.Enqueue($">>> 治具{Index},{content}"); logs.Enqueue($">>> TC{Index},{content}");
} }
string[] items = content.Split('#'); string[] items = content.Split('#');
string command = items[0]; string command = items[0];
@ -410,7 +462,7 @@ namespace Rs.MotionPlat.Entitys
// File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} ErrorCode$\r\n"); // File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} ErrorCode$\r\n");
//} //}
logs.Enqueue($"<<< 治具{Index} ErrorCode$"); logs.Enqueue($"<<< TC{Index} ErrorCode$");
} }
break; break;
case "1": case "1":
@ -425,7 +477,7 @@ namespace Rs.MotionPlat.Entitys
// File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} Result$\r\n"); // File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} Result$\r\n");
//} //}
logs.Enqueue($"<<< 治具{Index} Result$"); logs.Enqueue($"<<< TC{Index} Result$");
} }
} }
else else
@ -476,6 +528,19 @@ namespace Rs.MotionPlat.Entitys
//{ //{
// LogHelper.Info($">>> 治具{Index} ErrorCode"); // LogHelper.Info($">>> 治具{Index} ErrorCode");
//} //}
string code = items[1];
if(code!="0")
{
if(Status != ETestFixtureStatus.Warning)
{
MessageQueue.Instance.Warn($"code:{items[1]},desc:{items[2]}");
Status = ETestFixtureStatus.Warning;
}
}
else
{
Status = ETestFixtureStatus.Testing;
}
dataEvent.Set(); dataEvent.Set();
break; break;
case "Grip": case "Grip":
@ -504,6 +569,10 @@ namespace Rs.MotionPlat.Entitys
} }
} }
public void AddLog(string log)
{
logs.Enqueue(log);
}
private void PrintCommunitionLog() private void PrintCommunitionLog()
{ {
Task.Run(() => { Task.Run(() => {
@ -604,46 +673,87 @@ namespace Rs.MotionPlat.Entitys
{ {
Socket clientSocket = serverSocket.Accept(); Socket clientSocket = serverSocket.Accept();
clientSockets.Add(clientSocket); clientSockets.Add(clientSocket);
MessageQueue.Instance.Insert($"ip:{((IPEndPoint)clientSocket.RemoteEndPoint).Address.ToString()},port:{((IPEndPoint)clientSocket.RemoteEndPoint).Port.ToString()}"); IPEndPoint endPoint = ((IPEndPoint)clientSocket.RemoteEndPoint);
MessageQueue.Instance.Insert($"ip:{endPoint.Address.ToString()},port:{endPoint.Port.ToString()} connected!");
ThreadPool.QueueUserWorkItem((obj) => { ThreadPool.QueueUserWorkItem((obj) => {
List<byte> registData=new List<byte>();
Socket soct=(Socket)obj; Socket soct=(Socket)obj;
byte[] buffer = new byte[1024 * 10]; byte[] buffer = new byte[1024 * 10];
while (true) bool stop = false;
while (!stop)
{ {
int len = soct.Receive(buffer); int len = soct.Receive(buffer);
if (len > 0) if (len > 0)
{ {
string content = Encoding.ASCII.GetString(buffer, 0, len); for(int i=0;i<len;i++)
if (content.IndexOf("Register") >= 0)
{ {
try if (buffer[i] !=36)
{ {
registData.Add(buffer[i]);
}
else
{
string content=Encoding.ASCII.GetString(registData.ToArray());
MessageQueue.Instance.Insert($"ip:{((IPEndPoint)soct.RemoteEndPoint).Address.ToString()},port:{((IPEndPoint)soct.RemoteEndPoint).Port.ToString()},{content}"); MessageQueue.Instance.Insert($"ip:{((IPEndPoint)soct.RemoteEndPoint).Address.ToString()},port:{((IPEndPoint)soct.RemoteEndPoint).Port.ToString()},{content}");
string[] items = content.TrimEnd(new char[] { '$' }).Split('#'); string[] items = content.TrimEnd(new char[] { '$' }).Split('#');
//打印日志
//string logDir = $"d:\\Communition\\{DateTime.Now.ToString("yyyyMMdd")}";
//if (!Directory.Exists(logDir))
//{
// Directory.CreateDirectory(logDir);
//}
//string logFileName = $"{logDir}\\{items[2]}.txt";
//File.AppendAllText(logFileName, $"{DateTime.Now.ToString("HH:mm:ss fff")} >>> {content}\r\n");
string reg = "Register#1$";
int sendLen = clientSocket.Send(Encoding.ASCII.GetBytes(reg));
//打印日志
//logDir = $"d:\\Communition\\{DateTime.Now.ToString("yyyyMMdd")}";
//if (!Directory.Exists(logDir))
//{
// Directory.CreateDirectory(logDir);
//}
//logFileName = $"{logDir}\\{items[2]}.txt";
//File.AppendAllText(logFileName, $"{DateTime.Now.ToString("HH:mm:ss fff")} <<< {reg},{sendLen}\r\n");
TestFixture tf = GetTestFixture(int.Parse(items[2])); TestFixture tf = GetTestFixture(int.Parse(items[2]));
tf.AddLog(" <<< " + content);
tf.AddLog(" >>> " + reg);
tf.MachineID = items[1]; tf.MachineID = items[1];
tf.Connected = true; tf.Connected = true;
tf.Status = ETestFixtureStatus.IDLE; tf.Status = ETestFixtureStatus.IDLE;
tf.CsvTitle = items[3];
tf.SetSocket(soct); tf.SetSocket(soct);
tf.QueryStatus(); tf.QueryStatus();
tf.StartRecive(); tf.StartRecive();
tf.SetEvent();
stop = true;
break; break;
} }
catch (Exception ex)
{
LogHelper.Error(ex.Message + ex.StackTrace);
break;
}
} }
//string content = Encoding.ASCII.GetString(buffer, 0, len);
//if (content.IndexOf("Register") >= 0)
//{
// try
// {
// break;
// }
// catch (Exception ex)
// {
// LogHelper.Error(ex.Message + ex.StackTrace);
// break;
// }
//}
} }
} }
}, clientSocket); }, clientSocket);
Task.Run(() =>
{
});
} }
}); });
} }

@ -74,6 +74,23 @@ namespace Rs.MotionPlat.Flow
switch (step) switch (step)
{ {
case EHomeFlowStep.: case EHomeFlowStep.:
if(GlobalVar.CheckVisionSwOpened)
{
while (true)
{
string vname = "KImage";
Process[] progresses = Process.GetProcesses();
if( progresses.Where(p => p.ProcessName == vname).Count() ==0)
{
Msgbox.ShowDialog(EButtonType.Retry,"Vision software hasn't open,please open vision software!");
}
else
{
break;
}
}
}
MessageQueue.Instance.Insert("气缸复位"); MessageQueue.Instance.Insert("气缸复位");
if(false) if(false)
{ {

@ -158,7 +158,7 @@ namespace Rs.MotionPlat
VisionHelper.Init(); VisionHelper.Init();
TestFixtureManager.Instance.StartLister(); TestFixtureManager.Instance.StartLister();
SimulateTesterManager.Instance.Init(); //SimulateTesterManager.Instance.Init();
uTestCell1.BindEntity(TestFixtureManager.Instance.GetTestFixture(1)); uTestCell1.BindEntity(TestFixtureManager.Instance.GetTestFixture(1));
uTestCell2.BindEntity(TestFixtureManager.Instance.GetTestFixture(2)); uTestCell2.BindEntity(TestFixtureManager.Instance.GetTestFixture(2));

@ -32,8 +32,8 @@ namespace Rs.MotionPlat
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
@ -294,14 +294,14 @@ namespace Rs.MotionPlat
this.dgv_errinfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgv_errinfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgv_errinfo.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText; this.dgv_errinfo.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText;
this.dgv_errinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; this.dgv_errinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.Red; dataGridViewCellStyle1.BackColor = System.Drawing.Color.Red;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.White; dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3; this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgv_errinfo.ColumnHeadersHeight = 30; this.dgv_errinfo.ColumnHeadersHeight = 30;
this.dgv_errinfo.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgv_errinfo.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn1,
@ -379,8 +379,8 @@ namespace Rs.MotionPlat
// Time // Time
// //
this.Time.DataPropertyName = "Time"; this.Time.DataPropertyName = "Time";
dataGridViewCellStyle4.BackColor = System.Drawing.Color.Red; dataGridViewCellStyle2.BackColor = System.Drawing.Color.Red;
this.Time.DefaultCellStyle = dataGridViewCellStyle4; this.Time.DefaultCellStyle = dataGridViewCellStyle2;
this.Time.FillWeight = 25F; this.Time.FillWeight = 25F;
this.Time.HeaderText = "Time"; this.Time.HeaderText = "Time";
this.Time.MinimumWidth = 6; this.Time.MinimumWidth = 6;
@ -914,12 +914,15 @@ namespace Rs.MotionPlat
// cboxMtcp // cboxMtcp
// //
this.cboxMtcp.AutoSize = true; this.cboxMtcp.AutoSize = true;
this.cboxMtcp.BackColor = System.Drawing.Color.Transparent;
this.cboxMtcp.Enabled = false;
this.cboxMtcp.ForeColor = System.Drawing.Color.White;
this.cboxMtcp.Location = new System.Drawing.Point(14, 10); this.cboxMtcp.Location = new System.Drawing.Point(14, 10);
this.cboxMtcp.Name = "cboxMtcp"; this.cboxMtcp.Name = "cboxMtcp";
this.cboxMtcp.Size = new System.Drawing.Size(48, 16); this.cboxMtcp.Size = new System.Drawing.Size(48, 16);
this.cboxMtcp.TabIndex = 0; this.cboxMtcp.TabIndex = 0;
this.cboxMtcp.Text = "MTCP"; this.cboxMtcp.Text = "MTCP";
this.cboxMtcp.UseVisualStyleBackColor = true; this.cboxMtcp.UseVisualStyleBackColor = false;
// //
// panel9 // panel9
// //
@ -933,12 +936,15 @@ namespace Rs.MotionPlat
// cboxNoise // cboxNoise
// //
this.cboxNoise.AutoSize = true; this.cboxNoise.AutoSize = true;
this.cboxNoise.BackColor = System.Drawing.Color.Transparent;
this.cboxNoise.Enabled = false;
this.cboxNoise.ForeColor = System.Drawing.Color.White;
this.cboxNoise.Location = new System.Drawing.Point(35, 10); this.cboxNoise.Location = new System.Drawing.Point(35, 10);
this.cboxNoise.Name = "cboxNoise"; this.cboxNoise.Name = "cboxNoise";
this.cboxNoise.Size = new System.Drawing.Size(54, 16); this.cboxNoise.Size = new System.Drawing.Size(54, 16);
this.cboxNoise.TabIndex = 0; this.cboxNoise.TabIndex = 0;
this.cboxNoise.Text = "Noise"; this.cboxNoise.Text = "Noise";
this.cboxNoise.UseVisualStyleBackColor = true; this.cboxNoise.UseVisualStyleBackColor = false;
// //
// panel10 // panel10
// //
@ -953,6 +959,7 @@ namespace Rs.MotionPlat
// //
this.txtLotName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtLotName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtLotName.Enabled = false;
this.txtLotName.Location = new System.Drawing.Point(3, 9); this.txtLotName.Location = new System.Drawing.Point(3, 9);
this.txtLotName.Name = "txtLotName"; this.txtLotName.Name = "txtLotName";
this.txtLotName.Size = new System.Drawing.Size(113, 21); this.txtLotName.Size = new System.Drawing.Size(113, 21);
@ -972,6 +979,7 @@ namespace Rs.MotionPlat
// //
this.txtConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtConfig.Enabled = false;
this.txtConfig.Location = new System.Drawing.Point(3, 9); this.txtConfig.Location = new System.Drawing.Point(3, 9);
this.txtConfig.Name = "txtConfig"; this.txtConfig.Name = "txtConfig";
this.txtConfig.Size = new System.Drawing.Size(113, 21); this.txtConfig.Size = new System.Drawing.Size(113, 21);
@ -990,6 +998,7 @@ namespace Rs.MotionPlat
// //
this.txtSubLotName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtSubLotName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtSubLotName.Enabled = false;
this.txtSubLotName.Location = new System.Drawing.Point(3, 9); this.txtSubLotName.Location = new System.Drawing.Point(3, 9);
this.txtSubLotName.Name = "txtSubLotName"; this.txtSubLotName.Name = "txtSubLotName";
this.txtSubLotName.Size = new System.Drawing.Size(113, 21); this.txtSubLotName.Size = new System.Drawing.Size(113, 21);
@ -1008,6 +1017,7 @@ namespace Rs.MotionPlat
// //
this.txtSiteID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtSiteID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtSiteID.Enabled = false;
this.txtSiteID.Location = new System.Drawing.Point(3, 12); this.txtSiteID.Location = new System.Drawing.Point(3, 12);
this.txtSiteID.Name = "txtSiteID"; this.txtSiteID.Name = "txtSiteID";
this.txtSiteID.Size = new System.Drawing.Size(113, 21); this.txtSiteID.Size = new System.Drawing.Size(113, 21);
@ -1026,6 +1036,7 @@ namespace Rs.MotionPlat
// //
this.txtProjectID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtProjectID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtProjectID.Enabled = false;
this.txtProjectID.Location = new System.Drawing.Point(3, 10); this.txtProjectID.Location = new System.Drawing.Point(3, 10);
this.txtProjectID.Name = "txtProjectID"; this.txtProjectID.Name = "txtProjectID";
this.txtProjectID.Size = new System.Drawing.Size(113, 21); this.txtProjectID.Size = new System.Drawing.Size(113, 21);
@ -1045,6 +1056,7 @@ namespace Rs.MotionPlat
this.cboxConfigName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.cboxConfigName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.cboxConfigName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboxConfigName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboxConfigName.Enabled = false;
this.cboxConfigName.FormattingEnabled = true; this.cboxConfigName.FormattingEnabled = true;
this.cboxConfigName.Items.AddRange(new object[] { this.cboxConfigName.Items.AddRange(new object[] {
"SnCoating", "SnCoating",

@ -132,12 +132,6 @@
<metadata name="Content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.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>

@ -50,10 +50,11 @@
this.lblContent.ForeColor = System.Drawing.Color.White; this.lblContent.ForeColor = System.Drawing.Color.White;
this.lblContent.Location = new System.Drawing.Point(0, 40); this.lblContent.Location = new System.Drawing.Point(0, 40);
this.lblContent.Name = "lblContent"; this.lblContent.Name = "lblContent";
this.lblContent.Padding = new System.Windows.Forms.Padding(5);
this.lblContent.Size = new System.Drawing.Size(522, 263); this.lblContent.Size = new System.Drawing.Size(522, 263);
this.lblContent.TabIndex = 3; this.lblContent.TabIndex = 3;
this.lblContent.Text = "label1"; this.lblContent.Text = "label1";
this.lblContent.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblContent.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// FrmDialog // FrmDialog
// //

@ -97,6 +97,7 @@
this.txtControlCenterPort = new System.Windows.Forms.TextBox(); this.txtControlCenterPort = new System.Windows.Forms.TextBox();
this.cboxEnableExceptionHandlingNozzle = new System.Windows.Forms.CheckBox(); this.cboxEnableExceptionHandlingNozzle = new System.Windows.Forms.CheckBox();
this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox(); this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox();
this.cboxCheckVisionSwOpened = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.groupBox8.SuspendLayout(); this.groupBox8.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
@ -231,6 +232,7 @@
this.groupBox1.Controls.Add(this.cboxEnableTC3); this.groupBox1.Controls.Add(this.cboxEnableTC3);
this.groupBox1.Controls.Add(this.cboxEnableTC2); this.groupBox1.Controls.Add(this.cboxEnableTC2);
this.groupBox1.Controls.Add(this.cboxEnableTC1); this.groupBox1.Controls.Add(this.cboxEnableTC1);
this.groupBox1.Controls.Add(this.cboxCheckVisionSwOpened);
this.groupBox1.Controls.Add(this.cboxIsSimTest); this.groupBox1.Controls.Add(this.cboxIsSimTest);
this.groupBox1.Controls.Add(this.cboxPrintTC6Communicate); this.groupBox1.Controls.Add(this.cboxPrintTC6Communicate);
this.groupBox1.Controls.Add(this.cboxPrintTC3Communicate); this.groupBox1.Controls.Add(this.cboxPrintTC3Communicate);
@ -635,6 +637,13 @@
this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera"; this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera";
this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true; this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true;
// //
// cboxCheckVisionSwOpened
//
resources.ApplyResources(this.cboxCheckVisionSwOpened, "cboxCheckVisionSwOpened");
this.cboxCheckVisionSwOpened.Name = "cboxCheckVisionSwOpened";
this.cboxCheckVisionSwOpened.UseVisualStyleBackColor = true;
this.cboxCheckVisionSwOpened.CheckedChanged += new System.EventHandler(this.cbox_CheckedChanged);
//
// CommonConfig // CommonConfig
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
@ -730,5 +739,6 @@
private System.Windows.Forms.ComboBox comBoxTestMode; private System.Windows.Forms.ComboBox comBoxTestMode;
private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label10;
private System.Windows.Forms.CheckBox cboxCheckVisionSwOpened;
} }
} }

@ -1179,6 +1179,36 @@
<data name="&gt;&gt;cboxEnableTC1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxEnableTC1.ZOrder" xml:space="preserve">
<value>21</value> <value>21</value>
</data> </data>
<data name="cboxCheckVisionSwOpened.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cboxCheckVisionSwOpened.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cboxCheckVisionSwOpened.Location" type="System.Drawing.Point, System.Drawing">
<value>448, 185</value>
</data>
<data name="cboxCheckVisionSwOpened.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 16</value>
</data>
<data name="cboxCheckVisionSwOpened.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="cboxCheckVisionSwOpened.Text" xml:space="preserve">
<value>检测视觉软件是否打开</value>
</data>
<data name="&gt;&gt;cboxCheckVisionSwOpened.Name" xml:space="preserve">
<value>cboxCheckVisionSwOpened</value>
</data>
<data name="&gt;&gt;cboxCheckVisionSwOpened.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cboxCheckVisionSwOpened.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cboxCheckVisionSwOpened.ZOrder" xml:space="preserve">
<value>22</value>
</data>
<data name="cboxIsSimTest.AutoSize" type="System.Boolean, mscorlib"> <data name="cboxIsSimTest.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>
@ -1186,7 +1216,7 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="cboxIsSimTest.Location" type="System.Drawing.Point, System.Drawing"> <data name="cboxIsSimTest.Location" type="System.Drawing.Point, System.Drawing">
<value>233, 184</value> <value>299, 184</value>
</data> </data>
<data name="cboxIsSimTest.Size" type="System.Drawing.Size, System.Drawing"> <data name="cboxIsSimTest.Size" type="System.Drawing.Size, System.Drawing">
<value>72, 16</value> <value>72, 16</value>
@ -1207,7 +1237,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;cboxIsSimTest.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxIsSimTest.ZOrder" xml:space="preserve">
<value>22</value> <value>23</value>
</data> </data>
<data name="cboxPrintTC6Communicate.AutoSize" type="System.Boolean, mscorlib"> <data name="cboxPrintTC6Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1237,7 +1267,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;cboxPrintTC6Communicate.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxPrintTC6Communicate.ZOrder" xml:space="preserve">
<value>23</value> <value>24</value>
</data> </data>
<data name="cboxPrintTC3Communicate.AutoSize" type="System.Boolean, mscorlib"> <data name="cboxPrintTC3Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1267,7 +1297,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;cboxPrintTC3Communicate.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxPrintTC3Communicate.ZOrder" xml:space="preserve">
<value>24</value> <value>25</value>
</data> </data>
<data name="cboxPrintTC5Communicate.AutoSize" type="System.Boolean, mscorlib"> <data name="cboxPrintTC5Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1297,7 +1327,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;cboxPrintTC5Communicate.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxPrintTC5Communicate.ZOrder" xml:space="preserve">
<value>25</value> <value>26</value>
</data> </data>
<data name="cboxPrintTC2Communicate.AutoSize" type="System.Boolean, mscorlib"> <data name="cboxPrintTC2Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1327,7 +1357,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;cboxPrintTC2Communicate.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxPrintTC2Communicate.ZOrder" xml:space="preserve">
<value>26</value> <value>27</value>
</data> </data>
<data name="cboxPrintTC4Communicate.AutoSize" type="System.Boolean, mscorlib"> <data name="cboxPrintTC4Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1357,7 +1387,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;cboxPrintTC4Communicate.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxPrintTC4Communicate.ZOrder" xml:space="preserve">
<value>27</value> <value>28</value>
</data> </data>
<data name="cboxPrintTC1Communicate.AutoSize" type="System.Boolean, mscorlib"> <data name="cboxPrintTC1Communicate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1387,7 +1417,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;cboxPrintTC1Communicate.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxPrintTC1Communicate.ZOrder" xml:space="preserve">
<value>28</value> <value>29</value>
</data> </data>
<data name="cboxDisableDoor.AutoSize" type="System.Boolean, mscorlib"> <data name="cboxDisableDoor.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1417,7 +1447,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;cboxDisableDoor.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cboxDisableDoor.ZOrder" xml:space="preserve">
<value>29</value> <value>30</value>
</data> </data>
<data name="tbarWholeSpeed.AutoSize" type="System.Boolean, mscorlib"> <data name="tbarWholeSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>False</value> <value>False</value>
@ -1444,7 +1474,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;tbarWholeSpeed.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tbarWholeSpeed.ZOrder" xml:space="preserve">
<value>30</value> <value>31</value>
</data> </data>
<data name="label15.AutoSize" type="System.Boolean, mscorlib"> <data name="label15.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1474,7 +1504,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve"> <data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>31</value> <value>32</value>
</data> </data>
<data name="lblTakeTrayFromNg2InputSpeed.AutoSize" type="System.Boolean, mscorlib"> <data name="lblTakeTrayFromNg2InputSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1504,7 +1534,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;lblTakeTrayFromNg2InputSpeed.ZOrder" xml:space="preserve"> <data name="&gt;&gt;lblTakeTrayFromNg2InputSpeed.ZOrder" xml:space="preserve">
<value>32</value> <value>33</value>
</data> </data>
<data name="lblWholeSpeed.AutoSize" type="System.Boolean, mscorlib"> <data name="lblWholeSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1534,7 +1564,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;lblWholeSpeed.ZOrder" xml:space="preserve"> <data name="&gt;&gt;lblWholeSpeed.ZOrder" xml:space="preserve">
<value>33</value> <value>34</value>
</data> </data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib"> <data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -1564,7 +1594,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>34</value> <value>35</value>
</data> </data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@ -2065,6 +2095,6 @@
<value>CommonConfig</value> <value>CommonConfig</value>
</data> </data>
<data name="&gt;&gt;$this.Type" xml:space="preserve"> <data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>Rs.MotionPlat.BaseForm, Rs.MotionPlat, Version=3.20.24.14, Culture=neutral, PublicKeyToken=null</value> <value>Rs.MotionPlat.BaseForm, Rs.MotionPlat, Version=1.20.24.1, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
</root> </root>

@ -145,7 +145,7 @@ namespace Rs.MotionPlat
private void button16_Click(object sender, EventArgs e) private void button16_Click(object sender, EventArgs e)
{ {
Msgbox.ShowDialog(1, EButtonType.Retry, "fasd"); Msgbox.ShowDialog(EButtonType.Retry, "fasd");
} }
} }
} }

@ -37,7 +37,7 @@ namespace Rs.MotionPlat
string userpwd = txtPassword.Text.Trim(); string userpwd = txtPassword.Text.Trim();
if(username=="Op") if(username=="Op")
{ {
if(userpwd == "123") if(userpwd == "1")
{ {
OnloginSuccessEvent?.Invoke(username); OnloginSuccessEvent?.Invoke(username);
GlobalUser.UserLevel = EUserLevel.Op; GlobalUser.UserLevel = EUserLevel.Op;
@ -46,7 +46,7 @@ namespace Rs.MotionPlat
} }
else else
{ {
Msg.ShowError("userpwd error,please input again"); Msgbox.ShowDialog( EButtonType.Ok, "userpwd error,please input again");
txtPassword.Text = ""; txtPassword.Text = "";
} }
} }
@ -61,7 +61,7 @@ namespace Rs.MotionPlat
} }
else else
{ {
Msg.ShowError("userpwd error,please input again"); Msgbox.ShowDialog(EButtonType.Ok, "userpwd error,please input again");
txtPassword.Text = ""; txtPassword.Text = "";
} }
} }
@ -76,7 +76,7 @@ namespace Rs.MotionPlat
} }
else else
{ {
Msg.ShowError("userpwd error,please input again"); Msgbox.ShowDialog(EButtonType.Ok, "userpwd error,please input again");
txtPassword.Text = ""; txtPassword.Text = "";
} }
} }

Loading…
Cancel
Save