修改气浮设置的Bug

master
lhiven 1 year ago
parent 4421770e66
commit d61c42b76f

@ -1011,5 +1011,27 @@ namespace Rs.Framework
return SysConfigParam.GetValue<int>(nameof(TakeTrayFromNg2InputSpeed)); return SysConfigParam.GetValue<int>(nameof(TakeTrayFromNg2InputSpeed));
} }
} }
/// <summary>
/// Socket9-16异常处理位X
/// </summary>
public static double Socket9_16ExceptionX
{
get
{
return SysConfigParam.GetValue<int>(nameof(Socket9_16ExceptionX));
}
}
/// <summary>
/// Socket9-16异常处理位Y
/// </summary>
public static double Socket9_16ExceptionY
{
get
{
return SysConfigParam.GetValue<int>(nameof(Socket9_16ExceptionY));
}
}
} }
} }

@ -181,6 +181,20 @@ namespace Rs.MotionPlat.Commom
insertSql = $"insert into SysParameter(fieldname,fieldtype,fieldvalue,Desc,category,enable) values('TakeTrayFromNg2InputSpeed','int','2','搬运带料料盘速度','system',1)"; insertSql = $"insert into SysParameter(fieldname,fieldtype,fieldvalue,Desc,category,enable) values('TakeTrayFromNg2InputSpeed','int','2','搬运带料料盘速度','system',1)";
db.ExecuteNonQuery(insertSql); db.ExecuteNonQuery(insertSql);
} }
querySql = "select * from SysParameter where fieldname='Socket9_16ExceptionX'";
dt = db.GetDataTable(querySql);
if (dt == null || dt.Rows.Count == 0)
{
insertSql = $"insert into SysParameter(fieldname,fieldtype,fieldvalue,Desc,category,enable) values('Socket9_16ExceptionX','double','0','Socket9-16异常处理位X','system',1)";
db.ExecuteNonQuery(insertSql);
}
querySql = "select * from SysParameter where fieldname='Socket9_16ExceptionY'";
dt = db.GetDataTable(querySql);
if (dt == null || dt.Rows.Count == 0)
{
insertSql = $"insert into SysParameter(fieldname,fieldtype,fieldvalue,Desc,category,enable) values('Socket9_16ExceptionY','double','0','Socket9-16异常处理位Y','system',1)";
db.ExecuteNonQuery(insertSql);
}
} }
@ -410,45 +424,59 @@ namespace Rs.MotionPlat.Commom
IoManager.Instance.WriteOut(ioName, 0); IoManager.Instance.WriteOut(ioName, 0);
} }
public static bool IsOn(string ioName) public static bool IsOn(string ioName,bool needRecheck=true)
{ {
int num = 0; int num = 0;
short val = 0; short val = 0;
while (num<3) if (needRecheck)
{ {
val = IoManager.Instance.ReadIn(ioName); while (num < 3)
if(val==0)
{
num++;
Thread.Sleep(20);
}
else
{ {
num = 0; val = IoManager.Instance.ReadIn(ioName);
break; if (val == 0)
{
num++;
Thread.Sleep(20);
}
else
{
num = 0;
break;
}
} }
} }
else
{
val = IoManager.Instance.ReadIn(ioName);
}
return val == 1; return val == 1;
} }
public static bool IsOff(string ioName) public static bool IsOff(string ioName,bool needRecheck = true)
{ {
int num = 0; int num = 0;
short val = 0; short val = 0;
while (num < 3) if(needRecheck)
{ {
val = IoManager.Instance.ReadIn(ioName); while (num < 3)
if (val == 1)
{
num++;
Thread.Sleep(20);
}
else
{ {
num = 0; val = IoManager.Instance.ReadIn(ioName);
break; if (val == 1)
{
num++;
Thread.Sleep(20);
}
else
{
num = 0;
break;
}
} }
} }
else
{
val = IoManager.Instance.ReadIn(ioName);
}
return val == 0; return val == 0;
//return IoManager.Instance.ReadIn(ioName) == 0; //return IoManager.Instance.ReadIn(ioName) == 0;
} }

@ -191,11 +191,11 @@ namespace Rs.AutoDischarge.V3.Flow
public bool Load(EStockTrayLoadMode loadMode,Action loadFinishedEvent) public bool Load(EStockTrayLoadMode loadMode,Action loadFinishedEvent)
{ {
if(HasTray()) //if(HasTray())
{ //{
MessageQueue.Instance.Warn($"{GetTrayName()}工作位有料盘,不能重复上料盘"); // MessageQueue.Instance.Warn($"{GetTrayName()}工作位有料盘,不能重复上料盘");
return false; // return false;
} //}
logInfo = GetClassName() + $"{GetTrayName()} 料仓收到上料任务"; logInfo = GetClassName() + $"{GetTrayName()} 料仓收到上料任务";
LogHelper.Debug(logInfo); LogHelper.Debug(logInfo);
if (!isRunning) if (!isRunning)

@ -85,7 +85,7 @@ namespace Rs.MotionPlat.Flow
AxisControl.GetAxis($"NozzleZ{i}").GetOrgStatus(out bOnOrg); AxisControl.GetAxis($"NozzleZ{i}").GetOrgStatus(out bOnOrg);
if (!bOnOrg) if (!bOnOrg)
{ {
MessageQueue.Instance.Warn($"NozzleZ{i} is hasn't org signal"); MessageQueue.Instance.Warn($"NozzleZ{i} hasn't org signal");
return false; return false;
} }

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
// //
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
[assembly: AssemblyVersion("2.20.24.21")] [assembly: AssemblyVersion("2.20.24.24")]
//[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]

@ -52,12 +52,12 @@
this.label7 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label();
this.cboxUpCameraName = new System.Windows.Forms.ComboBox(); this.cboxUpCameraName = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtQifuValue = new System.Windows.Forms.TextBox();
this.cboxLocationFailAutoSkip = new System.Windows.Forms.CheckBox(); this.cboxLocationFailAutoSkip = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cboxMsgShowKo = new System.Windows.Forms.CheckBox(); this.cboxMsgShowKo = new System.Windows.Forms.CheckBox();
this.cboxMsgShowEn = new System.Windows.Forms.CheckBox(); this.cboxMsgShowEn = new System.Windows.Forms.CheckBox();
this.cboxMsgShowCn = new System.Windows.Forms.CheckBox(); this.cboxMsgShowCn = new System.Windows.Forms.CheckBox();
this.txtQifuValue = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox(); this.comboBox1 = new System.Windows.Forms.ComboBox();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
@ -397,9 +397,9 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.txtQifuValue);
this.groupBox1.Controls.Add(this.cboxLocationFailAutoSkip); this.groupBox1.Controls.Add(this.cboxLocationFailAutoSkip);
this.groupBox1.Controls.Add(this.groupBox2); this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.txtQifuValue);
this.groupBox1.Controls.Add(this.label9); this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.comboBox1);
this.groupBox1.Controls.Add(this.panel1); this.groupBox1.Controls.Add(this.panel1);
@ -449,6 +449,19 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "系统配置"; this.groupBox1.Text = "系统配置";
// //
// txtQifuValue
//
this.txtQifuValue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtQifuValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtQifuValue.ForeColor = System.Drawing.Color.White;
this.txtQifuValue.Location = new System.Drawing.Point(361, 323);
this.txtQifuValue.Name = "txtQifuValue";
this.txtQifuValue.Size = new System.Drawing.Size(100, 21);
this.txtQifuValue.TabIndex = 54;
this.txtQifuValue.Text = "0.01";
this.txtQifuValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtQifuValue.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtQifuValue_KeyUp);
//
// cboxLocationFailAutoSkip // cboxLocationFailAutoSkip
// //
this.cboxLocationFailAutoSkip.AutoSize = true; this.cboxLocationFailAutoSkip.AutoSize = true;
@ -502,21 +515,6 @@
this.cboxMsgShowCn.Text = "中文"; this.cboxMsgShowCn.Text = "中文";
this.cboxMsgShowCn.UseVisualStyleBackColor = true; this.cboxMsgShowCn.UseVisualStyleBackColor = true;
// //
// txtQifuValue
//
this.txtQifuValue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtQifuValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtQifuValue.Font = new System.Drawing.Font("宋体", 9F);
this.txtQifuValue.ForeColor = System.Drawing.Color.White;
this.txtQifuValue.Location = new System.Drawing.Point(370, 325);
this.txtQifuValue.Name = "txtQifuValue";
this.txtQifuValue.Size = new System.Drawing.Size(85, 21);
this.txtQifuValue.TabIndex = 51;
this.txtQifuValue.Tag = "PressZ";
this.txtQifuValue.Text = "0.01";
this.txtQifuValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtQifuValue.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtQifuValue_KeyUp);
//
// label9 // label9
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
@ -1064,7 +1062,6 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox cboxEnableExceptionHandlingNozzle; private System.Windows.Forms.CheckBox cboxEnableExceptionHandlingNozzle;
private System.Windows.Forms.CheckBox cboxEnableScanBarCodeByDownCamera; private System.Windows.Forms.CheckBox cboxEnableScanBarCodeByDownCamera;
private System.Windows.Forms.TextBox txtQifuValue;
private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label9;
private System.Windows.Forms.CheckBox cboxEnableTwoSpeed; private System.Windows.Forms.CheckBox cboxEnableTwoSpeed;
private System.Windows.Forms.CheckBox cboxEnableTestFixtureFiberCheck; private System.Windows.Forms.CheckBox cboxEnableTestFixtureFiberCheck;
@ -1086,5 +1083,6 @@
private System.Windows.Forms.Label lblTakeTrayFromNg2InputSpeed; private System.Windows.Forms.Label lblTakeTrayFromNg2InputSpeed;
private System.Windows.Forms.Label lblStockBeltSpeed; private System.Windows.Forms.Label lblStockBeltSpeed;
private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtQifuValue;
} }
} }

@ -91,11 +91,10 @@ namespace Rs.MotionPlat.SysConfig
cbox.SelectedItem = SysConfigParam.GetValue<string>(cbox.Name.Replace("cbox", "")); cbox.SelectedItem = SysConfigParam.GetValue<string>(cbox.Name.Replace("cbox", ""));
} }
} }
PositionHelper.BindPosition(groupBox9, "int");
txtQifuValue.Text = SysConfigParam.GetValue<string>(txtQifuValue.Name.Replace("txt", ""));
PositionHelper.BindPosition(groupBox9,"int");
PositionHelper.BindPosition(groupBox10, "int"); PositionHelper.BindPosition(groupBox10, "int");
PositionHelper.BindPosition(groupBox8, "int"); PositionHelper.BindPosition(groupBox8, "int");
txtQifuValue.Text = SysConfigParam.GetValue<string>(txtQifuValue.Name.Replace("txt", ""));
} }
private void btnSaveSpeedParam_Click(object sender, EventArgs e) private void btnSaveSpeedParam_Click(object sender, EventArgs e)

Loading…
Cancel
Save