增加高速IO触发通道的设置

Eight
lhiven 9 months ago
parent cb7ea00796
commit ac5dac1498

@ -22,7 +22,17 @@ namespace Rs.Framework
{
#region newpro
/// <summary>
/// 高速通道
/// </summary>
[ParameterInit("int", "1", "system", "高速通道")]
public static int HightChannel
{
get
{
return SysConfigParam.GetValue<int>(nameof(HightChannel));
}
}
/// <summary>
/// 检测是否粘料
/// </summary>

@ -1,4 +1,5 @@
using Rs.MotionPlat.Flow;
using Rs.Framework;
using Rs.MotionPlat.Flow;
using System;
using System.Collections.Generic;
using System.Linq;
@ -18,7 +19,7 @@ namespace Rs.MotionPlat.Commom
/// </summary>
public static void Grab()
{
AxisControl.LoadY2.ComparePulse(1, false);
AxisControl.LoadY2.ComparePulse((ushort)GlobalVar.HightChannel, false);
Thread.Sleep(150);
}
}

@ -210,13 +210,28 @@ namespace Rs.MotionPlat.Flow
}
else
{
StockManager.CloseTray(1);
StockManager.CloseTray(2);
StockManager.CloseTray(3);
var t1 = Task.Run(() => {
StockManager.CloseTray(1);
});
var t2 = Task.Run(() => {
StockManager.CloseTray(2);
});
var t3 = Task.Run(() => {
StockManager.CloseTray(3);
});
Task.WaitAll(new[] { t1,t2,t3});
StockManager.OpenTray(1);
StockManager.OpenTray(2);
StockManager.OpenTray(3);
var t4 = Task.Run(() => {
StockManager.OpenTray(1);
});
var t5 = Task.Run(() => {
StockManager.OpenTray(2);
});
var t6 = Task.Run(() => {
StockManager.OpenTray(3);
});
Task.WaitAll(new[] { t4,t5,t6});
flowStep = EDischargeFlowStep.;
}
@ -225,13 +240,35 @@ namespace Rs.MotionPlat.Flow
{
logInfo = GetClassName() + "选择了Cancel";
MessageQueue.Instance.Insert(logInfo);
StockManager.CloseTray(1);
StockManager.CloseTray(2);
StockManager.CloseTray(3);
StockManager.OpenTray(1);
StockManager.OpenTray(2);
StockManager.OpenTray(3);
var t1 = Task.Run(() => {
StockManager.CloseTray(1);
});
var t2 = Task.Run(() => {
StockManager.CloseTray(2);
});
var t3 = Task.Run(() => {
StockManager.CloseTray(3);
});
Task.WaitAll(new[] { t1, t2, t3 });
var t4 = Task.Run(() => {
StockManager.OpenTray(1);
});
var t5 = Task.Run(() => {
StockManager.OpenTray(2);
});
var t6 = Task.Run(() => {
StockManager.OpenTray(3);
});
Task.WaitAll(new[] { t4, t5, t6 });
//StockManager.CloseTray(1);
//StockManager.CloseTray(2);
//StockManager.CloseTray(3);
//StockManager.OpenTray(1);
//StockManager.OpenTray(2);
//StockManager.OpenTray(3);
flowStep = EDischargeFlowStep.;
}
}

@ -32,8 +32,10 @@ namespace Rs.MotionPlat
{
InitializeComponent();
DischargeFlow.Instance.workFinishedEvent += () => {
GlobalVar.Clear = false;
switchButton1.Checked = true;
Invoke(new Action(() => {
GlobalVar.Clear = false;
switchButton1.Checked = true;
}));
};
DischargeFlow.Instance.CleanDataEvent += () =>
{
@ -804,7 +806,7 @@ namespace Rs.MotionPlat
private void btnUpCameraGrab_Click(object sender, EventArgs e)
{
AxisControl.LoadY2.ComparePulse(1, false);
AxisControl.LoadY2.ComparePulse((ushort)GlobalVar.HightChannel, false);
}
private void txtLotName_KeyUp(object sender, KeyEventArgs e)

@ -42,10 +42,6 @@ namespace Rs.MotionPlat.Recipe
//cameraTemplate1.CustomDefineGrabEvent += CameraTemplate1_CustomDefineGrabEvent;
}
private void CameraTemplate1_CustomDefineGrabEvent()
{
AxisControl.LoadX.ComparePulse(2, false);
}
private void BindPoints()
{

@ -123,6 +123,8 @@
this.txtControlCenterPort = new System.Windows.Forms.TextBox();
this.cboxEnableExceptionHandlingNozzle = new System.Windows.Forms.CheckBox();
this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox();
this.label14 = new System.Windows.Forms.Label();
this.txtHightChannel = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox3.SuspendLayout();
@ -147,7 +149,7 @@
//
// groupBox8
//
resources.ApplyResources(this.groupBox8, "groupBox8");
this.groupBox8.Controls.Add(this.txtHightChannel);
this.groupBox8.Controls.Add(this.button1);
this.groupBox8.Controls.Add(this.cboxLanguage);
this.groupBox8.Controls.Add(this.label2);
@ -157,15 +159,17 @@
this.groupBox8.Controls.Add(this.cboxCheckSafeEnable);
this.groupBox8.Controls.Add(this.cboxEnableStock);
this.groupBox8.Controls.Add(this.cboxRunSpace);
this.groupBox8.Controls.Add(this.label14);
resources.ApplyResources(this.groupBox8, "groupBox8");
this.groupBox8.ForeColor = System.Drawing.Color.White;
this.groupBox8.Name = "groupBox8";
this.groupBox8.TabStop = false;
//
// button1
//
resources.ApplyResources(this.button1, "button1");
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56)))));
this.button1.FlatAppearance.BorderColor = System.Drawing.Color.White;
resources.ApplyResources(this.button1, "button1");
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.Name = "button1";
this.button1.UseVisualStyleBackColor = false;
@ -173,11 +177,11 @@
//
// cboxLanguage
//
resources.ApplyResources(this.cboxLanguage, "cboxLanguage");
this.cboxLanguage.FormattingEnabled = true;
this.cboxLanguage.Items.AddRange(new object[] {
resources.GetString("cboxLanguage.Items"),
resources.GetString("cboxLanguage.Items1")});
resources.ApplyResources(this.cboxLanguage, "cboxLanguage");
this.cboxLanguage.Name = "cboxLanguage";
//
// label2
@ -230,7 +234,6 @@
//
// groupBox3
//
resources.ApplyResources(this.groupBox3, "groupBox3");
this.groupBox3.Controls.Add(this.btnSaveRelCategory);
this.groupBox3.Controls.Add(this.txtSiteID);
this.groupBox3.Controls.Add(this.comBoxCp);
@ -250,15 +253,16 @@
this.groupBox3.Controls.Add(this.label17);
this.groupBox3.Controls.Add(this.txtMachineID);
this.groupBox3.Controls.Add(this.label5);
resources.ApplyResources(this.groupBox3, "groupBox3");
this.groupBox3.ForeColor = System.Drawing.Color.White;
this.groupBox3.Name = "groupBox3";
this.groupBox3.TabStop = false;
//
// btnSaveRelCategory
//
resources.ApplyResources(this.btnSaveRelCategory, "btnSaveRelCategory");
this.btnSaveRelCategory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56)))));
this.btnSaveRelCategory.FlatAppearance.BorderColor = System.Drawing.Color.White;
resources.ApplyResources(this.btnSaveRelCategory, "btnSaveRelCategory");
this.btnSaveRelCategory.ForeColor = System.Drawing.Color.White;
this.btnSaveRelCategory.Name = "btnSaveRelCategory";
this.btnSaveRelCategory.UseVisualStyleBackColor = false;
@ -272,47 +276,47 @@
//
// comBoxCp
//
resources.ApplyResources(this.comBoxCp, "comBoxCp");
this.comBoxCp.FormattingEnabled = true;
this.comBoxCp.Items.AddRange(new object[] {
resources.GetString("comBoxCp.Items"),
resources.GetString("comBoxCp.Items1"),
resources.GetString("comBoxCp.Items2")});
resources.ApplyResources(this.comBoxCp, "comBoxCp");
this.comBoxCp.Name = "comBoxCp";
this.comBoxCp.SelectedIndexChanged += new System.EventHandler(this.comBoxCp_SelectedIndexChanged);
//
// comBoxRelCategory
//
resources.ApplyResources(this.comBoxRelCategory, "comBoxRelCategory");
this.comBoxRelCategory.FormattingEnabled = true;
this.comBoxRelCategory.Items.AddRange(new object[] {
resources.GetString("comBoxRelCategory.Items"),
resources.GetString("comBoxRelCategory.Items1"),
resources.GetString("comBoxRelCategory.Items2")});
resources.ApplyResources(this.comBoxRelCategory, "comBoxRelCategory");
this.comBoxRelCategory.Name = "comBoxRelCategory";
this.comBoxRelCategory.SelectedIndexChanged += new System.EventHandler(this.comBoxRelCategory_SelectedIndexChanged);
//
// cboxHostType
//
resources.ApplyResources(this.cboxHostType, "cboxHostType");
this.cboxHostType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboxHostType.FormattingEnabled = true;
this.cboxHostType.Items.AddRange(new object[] {
resources.GetString("cboxHostType.Items"),
resources.GetString("cboxHostType.Items1"),
resources.GetString("cboxHostType.Items2")});
resources.ApplyResources(this.cboxHostType, "cboxHostType");
this.cboxHostType.Name = "cboxHostType";
this.cboxHostType.SelectedIndexChanged += new System.EventHandler(this.cboxHostType_SelectedIndexChanged);
//
// cboxConfigName
//
resources.ApplyResources(this.cboxConfigName, "cboxConfigName");
this.cboxConfigName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboxConfigName.FormattingEnabled = true;
this.cboxConfigName.Items.AddRange(new object[] {
resources.GetString("cboxConfigName.Items"),
resources.GetString("cboxConfigName.Items1"),
resources.GetString("cboxConfigName.Items2")});
resources.ApplyResources(this.cboxConfigName, "cboxConfigName");
this.cboxConfigName.Name = "cboxConfigName";
this.cboxConfigName.SelectedIndexChanged += new System.EventHandler(this.cboxConfigName_SelectedIndexChanged);
//
@ -387,7 +391,6 @@
//
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.cboxEnableCheckStickMaterial);
this.groupBox1.Controls.Add(this.txtUphRefreshCycle);
this.groupBox1.Controls.Add(this.cboxMsgShowEn);
@ -430,6 +433,7 @@
this.groupBox1.Controls.Add(this.lblTakeTrayFromNg2InputSpeed);
this.groupBox1.Controls.Add(this.lblWholeSpeed);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.ForeColor = System.Drawing.Color.White;
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
@ -505,10 +509,10 @@
//
// panelEx1
//
resources.ApplyResources(this.panelEx1, "panelEx1");
this.panelEx1.Controls.Add(this.btnSaveSpeedParam);
this.panelEx1.Controls.Add(this.cboxCurRecipe);
this.panelEx1.Controls.Add(this.label4);
resources.ApplyResources(this.panelEx1, "panelEx1");
this.panelEx1.Name = "panelEx1";
//
// btnSaveSpeedParam
@ -523,10 +527,10 @@
//
// cboxCurRecipe
//
resources.ApplyResources(this.cboxCurRecipe, "cboxCurRecipe");
this.cboxCurRecipe.FormattingEnabled = true;
this.cboxCurRecipe.Items.AddRange(new object[] {
resources.GetString("cboxCurRecipe.Items")});
resources.ApplyResources(this.cboxCurRecipe, "cboxCurRecipe");
this.cboxCurRecipe.Name = "cboxCurRecipe";
//
// label4
@ -738,7 +742,6 @@
//
// groupBox4
//
resources.ApplyResources(this.groupBox4, "groupBox4");
this.groupBox4.Controls.Add(this.dataGridView1);
this.groupBox4.Controls.Add(this.label6);
this.groupBox4.Controls.Add(this.panel1);
@ -748,13 +751,13 @@
this.groupBox4.Controls.Add(this.txtControlCenterPort);
this.groupBox4.Controls.Add(this.cboxEnableExceptionHandlingNozzle);
this.groupBox4.Controls.Add(this.cboxEnableScanBarCodeByDownCamera);
resources.ApplyResources(this.groupBox4, "groupBox4");
this.groupBox4.ForeColor = System.Drawing.Color.White;
this.groupBox4.Name = "groupBox4";
this.groupBox4.TabStop = false;
//
// dataGridView1
//
resources.ApplyResources(this.dataGridView1, "dataGridView1");
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -763,6 +766,7 @@
this.,
this.,
this.});
resources.ApplyResources(this.dataGridView1, "dataGridView1");
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEndEdit);
@ -810,9 +814,9 @@
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.radioButton4);
this.panel1.Controls.Add(this.radioButton3);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// radioButton4
@ -833,9 +837,9 @@
//
// txtControlCenterIP
//
resources.ApplyResources(this.txtControlCenterIP, "txtControlCenterIP");
this.txtControlCenterIP.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtControlCenterIP.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
resources.ApplyResources(this.txtControlCenterIP, "txtControlCenterIP");
this.txtControlCenterIP.ForeColor = System.Drawing.Color.White;
this.txtControlCenterIP.Name = "txtControlCenterIP";
//
@ -851,9 +855,9 @@
//
// txtControlCenterPort
//
resources.ApplyResources(this.txtControlCenterPort, "txtControlCenterPort");
this.txtControlCenterPort.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtControlCenterPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
resources.ApplyResources(this.txtControlCenterPort, "txtControlCenterPort");
this.txtControlCenterPort.ForeColor = System.Drawing.Color.White;
this.txtControlCenterPort.Name = "txtControlCenterPort";
//
@ -869,6 +873,17 @@
this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera";
this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true;
//
// label14
//
resources.ApplyResources(this.label14, "label14");
this.label14.Name = "label14";
//
// txtHightChannel
//
resources.ApplyResources(this.txtHightChannel, "txtHightChannel");
this.txtHightChannel.Name = "txtHightChannel";
this.txtHightChannel.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtSysParam_KeyUp);
//
// CommonConfig
//
resources.ApplyResources(this, "$this");
@ -993,5 +1008,7 @@
private System.Windows.Forms.ComboBox cboxHostType;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.CheckBox cboxEnableCheckStickMaterial;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtHightChannel;
}
}

File diff suppressed because it is too large Load Diff

@ -28,7 +28,7 @@ namespace Rs.MotionPlat.SysConfig
private void CameraTemplate1_ManualGrab()
{
AxisControl.LoadX.ComparePulse(1);
AxisControl.LoadX.ComparePulse((ushort)GlobalVar.HightChannel);
}

@ -22,11 +22,6 @@ namespace Rs.MotionPlat.SysConfig
//cameraTemplate1.CustomDefineGrabEvent += CameraTemplate1_CustomDefineGrabEvent;
}
private void CameraTemplate1_CustomDefineGrabEvent()
{
AxisControl.LoadX.ComparePulse(2, false);
}
private void UpCameraCalibration_FormClosing(object sender, FormClosingEventArgs e)
{
//cameraTemplate1.RemoveGrabEvent();

@ -81,7 +81,7 @@ namespace Rs.MotionPlat
private void button22_Click(object sender, EventArgs e)
{
AxisControl.LoadY2.ComparePulse(1, false);
AxisControl.LoadY2.ComparePulse((ushort)GlobalVar.HightChannel, false);
}
bool stop = false;
@ -182,7 +182,7 @@ namespace Rs.MotionPlat
private void button4_Click(object sender, EventArgs e)
{
AxisControl.LoadY2.ComparePulse(1, false);
AxisControl.LoadY2.ComparePulse((ushort)GlobalVar.HightChannel, false);
}
static bool bContinueGrab = false;
@ -194,7 +194,7 @@ namespace Rs.MotionPlat
Task.Run(() => {
while (bContinueGrab)
{
AxisControl.LoadY2.ComparePulse(1, false);
AxisControl.LoadY2.ComparePulse((ushort)GlobalVar.HightChannel, false);
Thread.Sleep(500);
}
});

Loading…
Cancel
Save