Commit 9a5953e1 LN

压紧轴改为伺服。IO配置修改。

1 个父辈 3a3e1777
......@@ -238,7 +238,7 @@
//
// txtComPosition
//
this.txtComPosition.Location = new System.Drawing.Point(563, 290);
this.txtComPosition.Location = new System.Drawing.Point(563, 238);
this.txtComPosition.Name = "txtComPosition";
this.txtComPosition.Size = new System.Drawing.Size(108, 23);
this.txtComPosition.TabIndex = 26;
......@@ -246,11 +246,11 @@
// btnComMovej
//
this.btnComMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnComMovej.Location = new System.Drawing.Point(410, 279);
this.btnComMovej.Location = new System.Drawing.Point(410, 227);
this.btnComMovej.Name = "btnComMovej";
this.btnComMovej.Size = new System.Drawing.Size(144, 52);
this.btnComMovej.TabIndex = 25;
this.btnComMovej.Text = "压紧轴-(向)";
this.btnComMovej.Text = "压紧轴-(向)";
this.btnComMovej.UseVisualStyleBackColor = false;
this.btnComMovej.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnComMovej_MouseDown);
this.btnComMovej.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnComMovej_MouseUp);
......@@ -258,25 +258,25 @@
// btnComMove
//
this.btnComMove.BackColor = System.Drawing.SystemColors.Control;
this.btnComMove.Location = new System.Drawing.Point(263, 279);
this.btnComMove.Location = new System.Drawing.Point(263, 227);
this.btnComMove.Name = "btnComMove";
this.btnComMove.Size = new System.Drawing.Size(144, 52);
this.btnComMove.TabIndex = 24;
this.btnComMove.Text = "压紧轴+(向)";
this.btnComMove.Text = "压紧轴+(向)";
this.btnComMove.UseVisualStyleBackColor = false;
this.btnComMove.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnComMove_MouseDown);
this.btnComMove.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnComMove_MouseUp);
//
// txtComSpeed
//
this.txtComSpeed.Location = new System.Drawing.Point(156, 290);
this.txtComSpeed.Location = new System.Drawing.Point(156, 238);
this.txtComSpeed.Name = "txtComSpeed";
this.txtComSpeed.Size = new System.Drawing.Size(100, 23);
this.txtComSpeed.TabIndex = 23;
//
// label4
//
this.label4.Location = new System.Drawing.Point(9, 292);
this.label4.Location = new System.Drawing.Point(9, 240);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(141, 17);
this.label4.TabIndex = 22;
......@@ -285,7 +285,7 @@
//
// txtAutoPosition
//
this.txtAutoPosition.Location = new System.Drawing.Point(563, 235);
this.txtAutoPosition.Location = new System.Drawing.Point(563, 296);
this.txtAutoPosition.Name = "txtAutoPosition";
this.txtAutoPosition.Size = new System.Drawing.Size(108, 23);
this.txtAutoPosition.TabIndex = 31;
......@@ -293,7 +293,7 @@
// btnAutoMovej
//
this.btnAutoMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnAutoMovej.Location = new System.Drawing.Point(410, 224);
this.btnAutoMovej.Location = new System.Drawing.Point(410, 285);
this.btnAutoMovej.Name = "btnAutoMovej";
this.btnAutoMovej.Size = new System.Drawing.Size(144, 52);
this.btnAutoMovej.TabIndex = 30;
......@@ -305,7 +305,7 @@
// btnAutoMove
//
this.btnAutoMove.BackColor = System.Drawing.SystemColors.Control;
this.btnAutoMove.Location = new System.Drawing.Point(263, 224);
this.btnAutoMove.Location = new System.Drawing.Point(263, 285);
this.btnAutoMove.Name = "btnAutoMove";
this.btnAutoMove.Size = new System.Drawing.Size(144, 52);
this.btnAutoMove.TabIndex = 29;
......@@ -316,14 +316,14 @@
//
// txtAutoSpeed
//
this.txtAutoSpeed.Location = new System.Drawing.Point(156, 235);
this.txtAutoSpeed.Location = new System.Drawing.Point(156, 296);
this.txtAutoSpeed.Name = "txtAutoSpeed";
this.txtAutoSpeed.Size = new System.Drawing.Size(100, 23);
this.txtAutoSpeed.TabIndex = 28;
//
// label7
//
this.label7.Location = new System.Drawing.Point(9, 237);
this.label7.Location = new System.Drawing.Point(9, 298);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(141, 17);
this.label7.TabIndex = 27;
......@@ -344,7 +344,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(751, 450);
this.ClientSize = new System.Drawing.Size(751, 488);
this.Controls.Add(this.btnUpdate);
this.Controls.Add(this.txtAutoPosition);
this.Controls.Add(this.btnAutoMovej);
......
......@@ -24,6 +24,7 @@ namespace OnlineStore.AutoInOutStore
//private ConfigMoveAxis compress = null;
private ConfigMoveAxis inout = null;
private ConfigMoveAxis auto = null;
private ConfigMoveAxis comp = null;
private int compress_Slv = 0;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
......@@ -31,7 +32,8 @@ namespace OnlineStore.AutoInOutStore
{
middle = boxBean.Config.Middle_Axis;
updown = boxBean.Config.UpDown_Axis;
compress_Slv = boxBean.Config.CompressAxis_Slv;
comp = boxBean.Config.Comp_Axis;
// compress_Slv = boxBean.Config.CompressAxis_Slv;
inout = boxBean.Config.InOut_Axis;
auto = boxBean.Config.Batch_Axis;
InitializeComponent();
......@@ -50,13 +52,13 @@ namespace OnlineStore.AutoInOutStore
txtInOutSpeed.Text = (inout.TargetSpeed / 5).ToString();
txtUpDownSpeed.Text = (updown.TargetSpeed / 5).ToString();
txtAutoSpeed.Text = (auto.TargetSpeed / 5).ToString();
txtComSpeed.Text = (StoreManager.Config.CompressAxis_EndSpeed/2).ToString();
txtComSpeed.Text = (comp.TargetSpeed/2).ToString();
//timer1.Start();
UpdateMiddlePosition();
UpdateInOutPosition();
UpdateUpdownPosition();
UpdateAutoPosition();
txtComPosition.Text = ShuoKeControls.GetABSPosition(compress_Slv).ToString();
// txtComPosition.Text = ShuoKeControls.GetABSPosition(compress_Slv).ToString();
}
/// <summary>
/// 判断进出轴是否在P1点
......@@ -252,28 +254,75 @@ namespace OnlineStore.AutoInOutStore
UpdateInOutPosition();
}
}
//private void btnComMove_MouseDown(object sender, MouseEventArgs e)
//{
// int speed = FormUtil.GetIntValue(txtComSpeed);
// if (speed <= 0)
// {
// MessageBox.Show(ResourceCulture.GetString(ResourceCulture.MsgTitle,"提示"),ResourceCulture.GetString(ResourceCulture.PWSpeed, "请先输入正确的速度"));
// return;
// }
// this.btnComMove.BackColor = Color.Green;
// ShuoKeControls.SetSpeed(compress_Slv, ShuoKeCMD.SetEndSpeed, speed);
// ShuoKeControls.SetSpeed(compress_Slv, ShuoKeCMD.SetMaxSpeed, speed);
// ShuoKeControls.VolMove(compress_Slv, speed);
//}
//private void btnComMove_MouseUp(object sender, MouseEventArgs e)
//{
// if (this.btnComMove.BackColor == Color.Green)
// {
// btnComMove.BackColor = System.Drawing.SystemColors.Control;
// ShuoKeControls.SuddownStop(compress_Slv);
// txtComPosition.Text = ShuoKeControls.GetABSPosition(compress_Slv).ToString();
// }
//}
//private void btnComMovej_MouseDown(object sender, MouseEventArgs e)
//{
// int speed = FormUtil.GetIntValue(txtComSpeed);
// if (speed <= 0)
// {
// MessageBox.Show(ResourceCulture.GetString(ResourceCulture.MsgTitle,"提示"),ResourceCulture.GetString(ResourceCulture.PWSpeed, "请先输入正确的速度"));
// return;
// }
// this.btnComMovej.BackColor = Color.Green;
// ShuoKeControls.SetSpeed(compress_Slv, ShuoKeCMD.SetEndSpeed, speed);
// ShuoKeControls.SetSpeed(compress_Slv, ShuoKeCMD.SetMaxSpeed, speed);
// ShuoKeControls.VolMove(compress_Slv,-speed);
//}
//private void btnComMovej_MouseUp(object sender, MouseEventArgs e)
//{
// if (btnComMovej.BackColor.Equals(Color.Green))
// {
// btnComMovej.BackColor = System.Drawing.SystemColors.Control;
// ShuoKeControls.SuddownStop(compress_Slv);
// txtComPosition.Text = ShuoKeControls.GetABSPosition(compress_Slv).ToString();
// }
//}
private void btnComMove_MouseDown(object sender, MouseEventArgs e)
{
int speed = FormUtil.GetIntValue(txtComSpeed);
if (speed <= 0)
if (btnComMove.BackColor.Equals(System.Drawing.SystemColors.Control))
{
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.MsgTitle,"提示"),ResourceCulture.GetString(ResourceCulture.PWSpeed, "请先输入正确的速度"));
return;
int speed = FormUtil.GetIntValue(txtComSpeed);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
return;
}
this.btnComMove.BackColor = Color.Green;
AxisMove(comp, speed);
}
this.btnComMove.BackColor = Color.Green;
ShuoKeControls.SetSpeed(compress_Slv, ShuoKeCMD.SetEndSpeed, speed);
ShuoKeControls.SetSpeed(compress_Slv, ShuoKeCMD.SetMaxSpeed, speed);
ShuoKeControls.VolMove(compress_Slv, speed);
}
private void btnComMove_MouseUp(object sender, MouseEventArgs e)
{
if (this.btnComMove.BackColor == Color.Green)
{
btnComMove.BackColor = System.Drawing.SystemColors.Control;
ShuoKeControls.SuddownStop(compress_Slv);
txtComPosition.Text = ShuoKeControls.GetABSPosition(compress_Slv).ToString();
btnComMove.BackColor = System.Drawing.SystemColors.Control;
ACServerManager.SuddenStop(comp.DeviceName, comp.GetAxisValue());
UpdateCompPosition();
}
}
private void btnComMovej_MouseDown(object sender, MouseEventArgs e)
......@@ -281,13 +330,11 @@ namespace OnlineStore.AutoInOutStore
int speed = FormUtil.GetIntValue(txtComSpeed);
if (speed <= 0)
{
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.MsgTitle,"提示"),ResourceCulture.GetString(ResourceCulture.PWSpeed, "请先输入正确的速度"));
MessageBox.Show("提示", "请先输入正确的速度");
return;
}
this.btnComMovej.BackColor = Color.Green;
ShuoKeControls.SetSpeed(compress_Slv, ShuoKeCMD.SetEndSpeed, speed);
ShuoKeControls.SetSpeed(compress_Slv, ShuoKeCMD.SetMaxSpeed, speed);
ShuoKeControls.VolMove(compress_Slv,-speed);
this.btnComMovej.BackColor = Color.Green;
AxisMove(comp, -speed);
}
private void btnComMovej_MouseUp(object sender, MouseEventArgs e)
......@@ -295,8 +342,8 @@ namespace OnlineStore.AutoInOutStore
if (btnComMovej.BackColor.Equals(Color.Green))
{
btnComMovej.BackColor = System.Drawing.SystemColors.Control;
ShuoKeControls.SuddownStop(compress_Slv);
txtComPosition.Text = ShuoKeControls.GetABSPosition(compress_Slv).ToString();
ACServerManager.SuddenStop(comp.DeviceName, comp.GetAxisValue());
UpdateCompPosition();
}
}
......@@ -319,11 +366,19 @@ namespace OnlineStore.AutoInOutStore
UpdateInOutPosition();
UpdateUpdownPosition();
UpdateAutoPosition();
UpdateCompPosition();
//txtComPosition.Text = ShuoKeControls.GetLastPosition(compress_Slv).ToString();
}
}
private void UpdateCompPosition()
{
int compPosition = ACServerManager.GetTargetPosition(comp.DeviceName, comp.GetAxisValue());
if (!txtComPosition.Text.Equals(compPosition.ToString()))
{
txtComPosition.Text = compPosition.ToString();
}
}
private void UpdateUpdownPosition()
{
int updownPosition = ACServerManager.GetTargetPosition(updown.DeviceName, updown.GetAxisValue());
......@@ -414,7 +469,7 @@ namespace OnlineStore.AutoInOutStore
UpdateInOutPosition();
UpdateUpdownPosition();
UpdateAutoPosition();
txtComPosition.Text = ShuoKeControls.GetABSPosition(compress_Slv).ToString();
// txtComPosition.Text = ShuoKeControls.GetABSPosition(compress_Slv).ToString();
}
}
}
......@@ -108,9 +108,9 @@
this.groupBox1.Controls.Add(this.btnCloseDoor);
this.groupBox1.Controls.Add(this.btnOpenDoor);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(576, 11);
this.groupBox1.Location = new System.Drawing.Point(515, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(437, 617);
this.groupBox1.Size = new System.Drawing.Size(437, 649);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......@@ -424,9 +424,9 @@
//
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(33, 116);
this.label5.Location = new System.Drawing.Point(5, 116);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(75, 17);
this.label5.Size = new System.Drawing.Size(103, 17);
this.label5.TabIndex = 237;
this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -493,7 +493,7 @@
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.Location = new System.Drawing.Point(830, 634);
this.button1.Location = new System.Drawing.Point(765, 672);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(115, 34);
this.button1.TabIndex = 254;
......@@ -508,7 +508,7 @@
this.chbAutoRead.Checked = true;
this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRead.Location = new System.Drawing.Point(706, 639);
this.chbAutoRead.Location = new System.Drawing.Point(641, 677);
this.chbAutoRead.Name = "chbAutoRead";
this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.chbAutoRead.TabIndex = 244;
......@@ -520,9 +520,9 @@
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(293, 8);
this.groupBox4.Location = new System.Drawing.Point(262, 3);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(273, 665);
this.groupBox4.Size = new System.Drawing.Size(245, 712);
this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
......@@ -539,7 +539,7 @@
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(262, 645);
this.tableLayoutPanel2.Size = new System.Drawing.Size(234, 692);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
......@@ -547,9 +547,9 @@
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(12, 8);
this.groupBox3.Location = new System.Drawing.Point(12, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(273, 665);
this.groupBox3.Size = new System.Drawing.Size(245, 712);
this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
......@@ -566,14 +566,14 @@
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(262, 645);
this.tableLayoutPanel1.Size = new System.Drawing.Size(234, 692);
this.tableLayoutPanel1.TabIndex = 102;
//
// FrmIOStatus
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1036, 683);
this.ClientSize = new System.Drawing.Size(971, 721);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
......
......@@ -49,15 +49,8 @@ namespace OnlineStore.AutoInOutStore
this.tableLayoutPanel1.RowCount = boxBean.Config.StoreDIList.Count;
foreach (ConfigIO ioValue in boxBean.Config.StoreDIList.Values)
{
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl();
control.IOName = ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain);
control.IOValue = 0;
control.IoType = ioValue.ProName;
control.isCanClick = false;
control.Name = "IO_" + ioValue.ProName;
control.Size = new System.Drawing.Size(260, 25);
control.TabIndex = 0;
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName,240);
this.tableLayoutPanel1.Controls.Add(control, 0, roleindex);
roleindex++;
DIControlList.Add(ioValue.ProName, control);
......@@ -69,15 +62,7 @@ namespace OnlineStore.AutoInOutStore
foreach (ConfigIO ioValue in boxBean.Config.StoreDOList.Values)
{
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl();
control.IOName = ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain);
control.IOValue = 0;
control.IoType = ioValue.ProName;
control.isCanClick = true;
//control.Location = new System.Drawing.Point(0, 25*roleindex);
control.Name = "IO_" + ioValue.ProName;
control.Size = new System.Drawing.Size(260, 25);
control.TabIndex = 0;
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName, 240);
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
roleindex++;
DOControlList.Add(ioValue.ProName, control);
......@@ -151,6 +136,8 @@ namespace OnlineStore.AutoInOutStore
txtDoName.Text = io.DeviceName;
txtSlaveId.Text = io.SlaveID.ToString();
IOTextControl newControl = DOControlList[io.ProName];
if (selectControl != null) { selectControl.BackColor = Color.White; }
newControl.BackColor = Color.SkyBlue;
selectControl = newControl;
}
}
......@@ -280,14 +267,14 @@ namespace OnlineStore.AutoInOutStore
private void btnSuckingDiscUp_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.SuckingDisc_Down, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.SuckingDisc_Up, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.ClampingDisc_Down, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.ClampingDisc_Up, IO_VALUE.HIGH);
}
private void btnSuckingDiscDown_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.SuckingDisc_Up, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.SuckingDisc_Down, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.ClampingDisc_Up, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.ClampingDisc_Down, IO_VALUE.HIGH);
}
private void btnDOpen_Click(object sender, EventArgs e)
......
......@@ -110,35 +110,17 @@
this.cmbAxisList = new System.Windows.Forms.ComboBox();
this.label49 = new System.Windows.Forms.Label();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupComAxis = new System.Windows.Forms.GroupBox();
this.lblComMsg = new System.Windows.Forms.Label();
this.btnRelMove = new System.Windows.Forms.Button();
this.txtAddr = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.btnGetPosition = new System.Windows.Forms.Button();
this.cmbHomeType = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.txtSpeed = new System.Windows.Forms.TextBox();
this.btnVolMove = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.btnOpen = new System.Windows.Forms.Button();
this.btnStatusSearch = new System.Windows.Forms.Button();
this.label19 = new System.Windows.Forms.Label();
this.txtLinePosition = new System.Windows.Forms.TextBox();
this.btnHomeMove = new System.Windows.Forms.Button();
this.btnClearPosition = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.btnLineAbsMove = new System.Windows.Forms.Button();
this.label25 = new System.Windows.Forms.Label();
this.comboBoxPortName = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblAxisStatus = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.axis_5_Alarm = new UserFromControl.IOStatusControl();
this.txtBatchTarget = new System.Windows.Forms.TextBox();
this.lblCountPulse5 = new System.Windows.Forms.TextBox();
this.lblOutPulse5 = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox();
......@@ -256,10 +238,6 @@
this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.英文ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.axis_5_Alarm = new UserFromControl.IOStatusControl();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.contextMenuStrip1.SuspendLayout();
this.groupAuto.SuspendLayout();
this.groupBox6.SuspendLayout();
......@@ -268,7 +246,6 @@
this.tabPage2.SuspendLayout();
this.groupAxis.SuspendLayout();
this.tabPage3.SuspendLayout();
this.groupComAxis.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox7.SuspendLayout();
......@@ -288,20 +265,20 @@
this.显示ToolStripMenuItem,
this.toolStripMenuItem1});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(116, 48);
this.contextMenuStrip1.Size = new System.Drawing.Size(101, 48);
//
// 显示ToolStripMenuItem
//
this.显示ToolStripMenuItem.Name = "显示ToolStripMenuItem";
this.显示ToolStripMenuItem.Size = new System.Drawing.Size(115, 22);
this.显示ToolStripMenuItem.Text = "显示(&S)";
this.显示ToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
this.显示ToolStripMenuItem.Text = "显示";
this.显示ToolStripMenuItem.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(115, 22);
this.toolStripMenuItem1.Text = "退出(&E)";
this.toolStripMenuItem1.Size = new System.Drawing.Size(100, 22);
this.toolStripMenuItem1.Text = "退出";
this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
//
// notifyIcon1
......@@ -1286,253 +1263,14 @@
//
// tabPage3
//
this.tabPage3.Controls.Add(this.groupComAxis);
this.tabPage3.Controls.Add(this.groupBox1);
this.tabPage3.Location = new System.Drawing.Point(4, 26);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(655, 431);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "压紧轴调试";
this.tabPage3.Text = "伺服状态";
this.tabPage3.UseVisualStyleBackColor = true;
//
// groupComAxis
//
this.groupComAxis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupComAxis.Controls.Add(this.lblComMsg);
this.groupComAxis.Controls.Add(this.btnRelMove);
this.groupComAxis.Controls.Add(this.txtAddr);
this.groupComAxis.Controls.Add(this.label18);
this.groupComAxis.Controls.Add(this.btnGetPosition);
this.groupComAxis.Controls.Add(this.cmbHomeType);
this.groupComAxis.Controls.Add(this.label13);
this.groupComAxis.Controls.Add(this.label17);
this.groupComAxis.Controls.Add(this.txtSpeed);
this.groupComAxis.Controls.Add(this.btnVolMove);
this.groupComAxis.Controls.Add(this.btnClose);
this.groupComAxis.Controls.Add(this.btnOpen);
this.groupComAxis.Controls.Add(this.btnStatusSearch);
this.groupComAxis.Controls.Add(this.label19);
this.groupComAxis.Controls.Add(this.txtLinePosition);
this.groupComAxis.Controls.Add(this.btnHomeMove);
this.groupComAxis.Controls.Add(this.btnClearPosition);
this.groupComAxis.Controls.Add(this.btnStop);
this.groupComAxis.Controls.Add(this.btnLineAbsMove);
this.groupComAxis.Controls.Add(this.label25);
this.groupComAxis.Controls.Add(this.comboBoxPortName);
this.groupComAxis.Enabled = false;
this.groupComAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupComAxis.Location = new System.Drawing.Point(8, 4);
this.groupComAxis.Name = "groupComAxis";
this.groupComAxis.Size = new System.Drawing.Size(640, 184);
this.groupComAxis.TabIndex = 271;
this.groupComAxis.TabStop = false;
this.groupComAxis.Text = "压紧轴";
//
// lblComMsg
//
this.lblComMsg.AutoSize = true;
this.lblComMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblComMsg.ForeColor = System.Drawing.Color.Green;
this.lblComMsg.Location = new System.Drawing.Point(29, 156);
this.lblComMsg.Name = "lblComMsg";
this.lblComMsg.Size = new System.Drawing.Size(80, 17);
this.lblComMsg.TabIndex = 281;
this.lblComMsg.Text = "步进电机信息";
//
// btnRelMove
//
this.btnRelMove.Location = new System.Drawing.Point(351, 52);
this.btnRelMove.Name = "btnRelMove";
this.btnRelMove.Size = new System.Drawing.Size(133, 33);
this.btnRelMove.TabIndex = 96;
this.btnRelMove.Text = "相对运动";
this.btnRelMove.UseVisualStyleBackColor = true;
this.btnRelMove.Click += new System.EventHandler(this.btnRelMove_Click);
//
// txtAddr
//
this.txtAddr.Enabled = false;
this.txtAddr.Location = new System.Drawing.Point(316, 22);
this.txtAddr.Name = "txtAddr";
this.txtAddr.Size = new System.Drawing.Size(25, 23);
this.txtAddr.TabIndex = 95;
this.txtAddr.Text = "1";
//
// label18
//
this.label18.Location = new System.Drawing.Point(211, 25);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(103, 17);
this.label18.TabIndex = 94;
this.label18.Text = "地址";
this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnGetPosition
//
this.btnGetPosition.Location = new System.Drawing.Point(487, 52);
this.btnGetPosition.Name = "btnGetPosition";
this.btnGetPosition.Size = new System.Drawing.Size(133, 33);
this.btnGetPosition.TabIndex = 93;
this.btnGetPosition.Text = "查询位置";
this.btnGetPosition.UseVisualStyleBackColor = true;
this.btnGetPosition.Click += new System.EventHandler(this.btnGetPosition_Click);
//
// cmbHomeType
//
this.cmbHomeType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHomeType.FormattingEnabled = true;
this.cmbHomeType.Items.AddRange(new object[] {
"0=reverse direction",
"1=forward direction"});
this.cmbHomeType.Location = new System.Drawing.Point(184, 127);
this.cmbHomeType.Name = "cmbHomeType";
this.cmbHomeType.Size = new System.Drawing.Size(159, 25);
this.cmbHomeType.TabIndex = 92;
//
// label13
//
this.label13.Location = new System.Drawing.Point(5, 130);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(162, 17);
this.label13.TabIndex = 91;
this.label13.Text = "原点方向:";
this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label17
//
this.label17.Location = new System.Drawing.Point(5, 97);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(95, 17);
this.label17.TabIndex = 90;
this.label17.Text = "速度:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtSpeed
//
this.txtSpeed.Location = new System.Drawing.Point(104, 93);
this.txtSpeed.MaxLength = 15;
this.txtSpeed.Name = "txtSpeed";
this.txtSpeed.Size = new System.Drawing.Size(103, 23);
this.txtSpeed.TabIndex = 89;
this.txtSpeed.Text = "10000";
//
// btnVolMove
//
this.btnVolMove.Location = new System.Drawing.Point(213, 88);
this.btnVolMove.Name = "btnVolMove";
this.btnVolMove.Size = new System.Drawing.Size(133, 33);
this.btnVolMove.TabIndex = 88;
this.btnVolMove.Text = "匀速运动";
this.btnVolMove.UseVisualStyleBackColor = true;
this.btnVolMove.Click += new System.EventHandler(this.btnVolMove_Click);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(487, 17);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(133, 33);
this.btnClose.TabIndex = 87;
this.btnClose.Text = "关闭串口";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnOpen
//
this.btnOpen.Location = new System.Drawing.Point(351, 17);
this.btnOpen.Name = "btnOpen";
this.btnOpen.Size = new System.Drawing.Size(133, 33);
this.btnOpen.TabIndex = 86;
this.btnOpen.Text = "打开串口";
this.btnOpen.UseVisualStyleBackColor = true;
this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
//
// btnStatusSearch
//
this.btnStatusSearch.Location = new System.Drawing.Point(488, 124);
this.btnStatusSearch.Name = "btnStatusSearch";
this.btnStatusSearch.Size = new System.Drawing.Size(133, 33);
this.btnStatusSearch.TabIndex = 85;
this.btnStatusSearch.Text = "查询运动状态";
this.btnStatusSearch.UseVisualStyleBackColor = true;
this.btnStatusSearch.Click += new System.EventHandler(this.btnStatusSearch_Click);
//
// label19
//
this.label19.Location = new System.Drawing.Point(5, 63);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(95, 17);
this.label19.TabIndex = 84;
this.label19.Text = "位置:";
this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtLinePosition
//
this.txtLinePosition.Location = new System.Drawing.Point(104, 59);
this.txtLinePosition.MaxLength = 15;
this.txtLinePosition.Name = "txtLinePosition";
this.txtLinePosition.Size = new System.Drawing.Size(103, 23);
this.txtLinePosition.TabIndex = 83;
this.txtLinePosition.Text = "-10000";
//
// btnHomeMove
//
this.btnHomeMove.Location = new System.Drawing.Point(351, 124);
this.btnHomeMove.Name = "btnHomeMove";
this.btnHomeMove.Size = new System.Drawing.Size(133, 33);
this.btnHomeMove.TabIndex = 12;
this.btnHomeMove.Text = "原点返回";
this.btnHomeMove.UseVisualStyleBackColor = true;
this.btnHomeMove.Click += new System.EventHandler(this.btnHomeMove_Click);
//
// btnClearPosition
//
this.btnClearPosition.Location = new System.Drawing.Point(487, 87);
this.btnClearPosition.Name = "btnClearPosition";
this.btnClearPosition.Size = new System.Drawing.Size(133, 33);
this.btnClearPosition.TabIndex = 11;
this.btnClearPosition.Text = "清理位置";
this.btnClearPosition.UseVisualStyleBackColor = true;
this.btnClearPosition.Click += new System.EventHandler(this.btnClearPosition_Click);
//
// btnStop
//
this.btnStop.Location = new System.Drawing.Point(351, 88);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(133, 33);
this.btnStop.TabIndex = 10;
this.btnStop.Text = "紧急停止";
this.btnStop.UseVisualStyleBackColor = true;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// btnLineAbsMove
//
this.btnLineAbsMove.Location = new System.Drawing.Point(213, 54);
this.btnLineAbsMove.Name = "btnLineAbsMove";
this.btnLineAbsMove.Size = new System.Drawing.Size(133, 33);
this.btnLineAbsMove.TabIndex = 9;
this.btnLineAbsMove.Text = "绝对运动";
this.btnLineAbsMove.UseVisualStyleBackColor = true;
this.btnLineAbsMove.Click += new System.EventHandler(this.btnLineAbsMove_Click);
//
// label25
//
this.label25.Location = new System.Drawing.Point(5, 25);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(95, 17);
this.label25.TabIndex = 1;
this.label25.Text = "端口号:";
this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// comboBoxPortName
//
this.comboBoxPortName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxPortName.FormattingEnabled = true;
this.comboBoxPortName.Location = new System.Drawing.Point(104, 21);
this.comboBoxPortName.Name = "comboBoxPortName";
this.comboBoxPortName.Size = new System.Drawing.Size(103, 25);
this.comboBoxPortName.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -1564,7 +1302,7 @@
this.groupBox1.Controls.Add(this.label43);
this.groupBox1.Controls.Add(this.label42);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(8, 189);
this.groupBox1.Location = new System.Drawing.Point(8, 10);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(640, 235);
this.groupBox1.TabIndex = 217;
......@@ -1597,6 +1335,16 @@
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// axis_5_Alarm
//
this.axis_5_Alarm.IOName = "";
this.axis_5_Alarm.IOValue = 0;
this.axis_5_Alarm.isCanClick = false;
this.axis_5_Alarm.Location = new System.Drawing.Point(457, 54);
this.axis_5_Alarm.Name = "axis_5_Alarm";
this.axis_5_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_5_Alarm.TabIndex = 271;
//
// txtBatchTarget
//
this.txtBatchTarget.Location = new System.Drawing.Point(434, 156);
......@@ -1631,6 +1379,36 @@
this.label20.Text = "批量出入料轴";
this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(155, 54);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(357, 54);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(252, 54);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// label38
//
this.label38.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -2895,62 +2673,22 @@
// 清理日志ToolStripMenuItem
//
this.清理日志ToolStripMenuItem.Name = "清理日志ToolStripMenuItem";
this.清理日志ToolStripMenuItem.Size = new System.Drawing.Size(112, 26);
this.清理日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.清理日志ToolStripMenuItem.Text = "中文";
this.清理日志ToolStripMenuItem.Click += new System.EventHandler(this.清理日志ToolStripMenuItem_Click);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(109, 6);
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6);
//
// 英文ToolStripMenuItem
//
this.英文ToolStripMenuItem.Name = "英文ToolStripMenuItem";
this.英文ToolStripMenuItem.Size = new System.Drawing.Size(112, 26);
this.英文ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.英文ToolStripMenuItem.Text = "英文";
this.英文ToolStripMenuItem.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click);
//
// axis_5_Alarm
//
this.axis_5_Alarm.IOName = "";
this.axis_5_Alarm.IOValue = 0;
this.axis_5_Alarm.isCanClick = false;
this.axis_5_Alarm.Location = new System.Drawing.Point(457, 54);
this.axis_5_Alarm.Name = "axis_5_Alarm";
this.axis_5_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_5_Alarm.TabIndex = 271;
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(155, 54);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(357, 54);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(252, 54);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -2983,8 +2721,6 @@
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.groupComAxis.ResumeLayout(false);
this.groupComAxis.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabPage1.ResumeLayout(false);
......@@ -3144,27 +2880,6 @@
private System.Windows.Forms.TextBox txtHomeSingle;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.GroupBox groupComAxis;
private System.Windows.Forms.Button btnRelMove;
private System.Windows.Forms.TextBox txtAddr;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Button btnGetPosition;
private System.Windows.Forms.ComboBox cmbHomeType;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtSpeed;
private System.Windows.Forms.Button btnVolMove;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOpen;
private System.Windows.Forms.Button btnStatusSearch;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtLinePosition;
private System.Windows.Forms.Button btnHomeMove;
private System.Windows.Forms.Button btnClearPosition;
private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.Button btnLineAbsMove;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.ComboBox comboBoxPortName;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
......@@ -3218,7 +2933,6 @@
public System.Windows.Forms.Button btnUpdownP2;
private System.Windows.Forms.Label lblBatchMsg;
public System.Windows.Forms.Button btnUpdateSpeed;
private System.Windows.Forms.Label lblComMsg;
private System.Windows.Forms.Label lblOutInfo;
public System.Windows.Forms.TextBox txtInoutP4;
public System.Windows.Forms.Button btnInOutP4;
......
......@@ -87,14 +87,14 @@ namespace OnlineStore.AutoInOutStore
txtInoutP4.Text = Position.InOutAxis_DoorOutPosition_P4.ToString();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString();
}
txtSpeed.Text = store.Config.CompressAxis_EndSpeed.ToString();
List<string> port = new List<string>(SerialPort.GetPortNames());
comboBoxPortName.DataSource = port;
if (port.IndexOf(store.Config.CompressAxis_PortName) >= 0)
{
comboBoxPortName.SelectedIndex = port.IndexOf(store.Config.CompressAxis_PortName);
}
cmbHomeType.SelectedIndex = 0;
//txtSpeed.Text = store.Config.CompressAxis_EndSpeed.ToString();
//List<string> port = new List<string>(SerialPort.GetPortNames());
//comboBoxPortName.DataSource = port;
//if (port.IndexOf(store.Config.CompressAxis_PortName) >= 0)
//{
// comboBoxPortName.SelectedIndex = port.IndexOf(store.Config.CompressAxis_PortName);
//}
//cmbHomeType.SelectedIndex = 0;
timer1.Enabled = true;
}
#endregion
......@@ -232,7 +232,7 @@ namespace OnlineStore.AutoInOutStore
this.toolStripSeparator18.Visible = StoreManager.HasDisableDoorControl;
txtTempPort.Text = store.Config.Humiture_Port;
LoadOk = true;
cmbHomeType.SelectedIndex = 1;
// cmbHomeType.SelectedIndex = 1;
timer1.Start();
store.ResetEvent += Store_ResetEvent;
cmbJianGe.Items.Clear();
......@@ -255,14 +255,14 @@ namespace OnlineStore.AutoInOutStore
{
try
{
if (this.Visible.Equals(false) )
if (this.Visible.Equals(false))
{
return;
}
lblTemp.Text = store.currTempStr;
lblBatchMsg.Text = AutomaticBaiting.WarnObj.WarnMsg;
lblWarnMsg.Text = store.WarnObj.WarnMsg ;
BatchInoutStatus();
lblWarnMsg.Text = store.WarnObj.WarnMsg;
BatchInoutStatus();
//忙碌状态不读取状态
if (!store.storeRunStatus.Equals(StoreRunStatus.Busy))
{
......@@ -282,13 +282,13 @@ namespace OnlineStore.AutoInOutStore
}
else
{
lblServerOn.Text =ResourceCulture.GetString(ResourceCulture.ServoOff, "伺服OFF");
lblServerOn.Text = ResourceCulture.GetString(ResourceCulture.ServoOff, "伺服OFF");
}
}
}
lblBatchStatus.Text = store.GetRunStr(AutomaticBaiting.AutoBaitingStatus, false);
//ReadPosistion();
if (store.storeRunStatus > StoreRunStatus.Wait)
{
......@@ -339,7 +339,7 @@ namespace OnlineStore.AutoInOutStore
}
}
}
//string deviceMsg = "叉子上有料盘,请打开仓门检查";
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && store.StoreMove.MoveType.Equals(StoreMoveType.None) && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
......@@ -347,12 +347,23 @@ namespace OnlineStore.AutoInOutStore
}
if (store.TempOrHumidityIsAlarm)
{
lblWarnMsg.Text = lblWarnMsg.Text + " "+ResourceCulture.GetString("温湿度报警")+"[" + store.TempAlarmTime.ToLongTimeString() + "]";
lblWarnMsg.Text = lblWarnMsg.Text + " " + ResourceCulture.GetString("温湿度报警") + "[" + store.TempAlarmTime.ToLongTimeString() + "]";
}
if (ShuoKeControls.CheckErrorCount > 10)
if (store.Config.IsHasDoorLimit.Equals(1))
{
lblWarnMsg.Text = lblWarnMsg.Text + " " + ResourceCulture.GetString("压紧轴通信异常") + "[" + ShuoKeControls.CheckErrorCount + "]";
if (IOManager.IOValue(IO_Type.LeftDoorColse_Single).Equals(IO_VALUE.LOW))
{
lblWarnMsg.Text = lblWarnMsg.Text + " 左侧门未关";
}
else if (IOManager.IOValue(IO_Type.RightDoorColse_Single).Equals(IO_VALUE.LOW))
{
lblWarnMsg.Text = lblWarnMsg.Text + " 右侧门未关";
}
}
//if (ShuoKeControls.CheckErrorCount > 10)
//{
// lblWarnMsg.Text = lblWarnMsg.Text + " " + ResourceCulture.GetString("压紧轴通信异常") + "[" + ShuoKeControls.CheckErrorCount + "]";
//}
if (store.autoNext)
{
string msg = store.autoMsg;
......@@ -377,8 +388,8 @@ namespace OnlineStore.AutoInOutStore
}
else
{
groupAuto.Text =ResourceCulture.GetString( "自动出入库操作");
btnStart.Text = StartAuto;
groupAuto.Text = ResourceCulture.GetString("自动出入库操作");
btnStart.Text = StartAuto;
}
}
else
......@@ -386,13 +397,14 @@ namespace OnlineStore.AutoInOutStore
groupAuto.Text = StartAuto;
lblThisSta.Text = WaitStart;
//lblWarnMsg.Text = "";
btnStart.Text =StartAuto;
lblDoorStatus.Text =ResourceCulture.GetString(ResourceCulture.NoDoorStatus, "仓门状态未知");
btnStart.Text = StartAuto;
lblDoorStatus.Text = ResourceCulture.GetString(ResourceCulture.NoDoorStatus, "仓门状态未知");
}
}catch(Exception ex)
}
catch (Exception ex)
{
LogUtil.error("主界面定时器出错:"+ex.StackTrace);
LogUtil.error("主界面定时器出错:" + ex.StackTrace);
}
}
......@@ -1001,19 +1013,22 @@ namespace OnlineStore.AutoInOutStore
private void btnComP2_Click(object sender, EventArgs e)
{
int value = FormUtil.GetIntValue(txtComP2);
ShuoKeControls.AbsMove(store.Config.CompressAxis_Slv, value);
AxisABSMove(store.Config.Comp_Axis, value, store.Config.CompAxis_P2_Speed);
//ShuoKeControls.AbsMove(store.Config.CompressAxis_Slv, value);
}
private void btnComP1_Click(object sender, EventArgs e)
{
int value = FormUtil.GetIntValue(txtComP1);
ShuoKeControls.AbsMove(store.Config.CompressAxis_Slv, value);
AxisABSMove(store.Config.Comp_Axis, value, store.Config.CompAxis_P1_Speed);
//ShuoKeControls.AbsMove(store.Config.CompressAxis_Slv, value);
}
private void btnComP3_Click(object sender, EventArgs e)
{
int value = FormUtil.GetIntValue(txtComP3);
ShuoKeControls.AbsMove(store.Config.CompressAxis_Slv, value);
AxisABSMove(store.Config.Comp_Axis, value, store.Config.CompAxis_P3_Speed);
//ShuoKeControls.AbsMove(store.Config.CompressAxis_Slv, value);
}
int xWidth = SystemInformation.PrimaryMonitorSize.Width;//获取显示器屏幕宽度
int yHeight = SystemInformation.PrimaryMonitorSize.Height;//高度
......@@ -1376,70 +1391,70 @@ namespace OnlineStore.AutoInOutStore
int value = ACServerManager.GetHomeSingle(GetPortName(), GetSlaveAddr());
this.txtHomeSingle.Text = value.ToString();
}
private void btnOpen_Click(object sender, EventArgs e)
{
if (StoreManager.OpenShuoKe(store))
{
ShuoKeControls.SetConfigSpeed(StoreManager.Config);
FormComStatus(true);
}
}
private void btnClose_Click(object sender, EventArgs e)
{
ShuoKeControls.ClosePort();
FormComStatus(false);
}
private void btnVolMove_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtSpeed);
ShuoKeControls.VolMove(store.Config.CompressAxis_Slv, speed);
}
private void btnGetPosition_Click(object sender, EventArgs e)
{
int value = ShuoKeControls.GetABSPosition(store.Config.CompressAxis_Slv);
lblComMsg.Text = DateTime.Now.ToLongTimeString() + ":" + value;
}
private void btnStop_Click(object sender, EventArgs e)
{
ShuoKeControls.SuddownStop(this.store.Config.CompressAxis_Slv);
}
private void btnClearPosition_Click(object sender, EventArgs e)
{
ShuoKeControls.PositionClear(this.store.Config.CompressAxis_Slv, ShuoKeCMD.AbsPositionClear);
ShuoKeControls.PositionClear(this.store.Config.CompressAxis_Slv, ShuoKeCMD.RelPositionClear);
}
private void btnHomeMove_Click(object sender, EventArgs e)
{
ShuoKeControls.HomeMove(this.store.Config.CompressAxis_Slv, byte.Parse(cmbHomeType.SelectedIndex.ToString()));
}
private void btnLineAbsMove_Click(object sender, EventArgs e)
{
int posi = FormUtil.GetIntValue(txtLinePosition);
ShuoKeControls.AbsMove(this.store.Config.CompressAxis_Slv, posi);
}
private void btnRelMove_Click(object sender, EventArgs e)
{
int posi = FormUtil.GetIntValue(txtLinePosition);
ShuoKeControls.RelativeMove(this.store.Config.CompressAxis_Slv, posi);
}
private void btnStatusSearch_Click(object sender, EventArgs e)
{
ShuoKeInfo info = ShuoKeControls.GetStatus(store.Config.CompressAxis_Slv);
lblComMsg.Text = info.ToShowStr();
}
private void FormComStatus(bool isOpen)
{
btnOpen.Enabled = !isOpen;
btnClose.Enabled = isOpen;
btnClearPosition.Enabled = isOpen;
btnVolMove.Enabled = isOpen;
btnGetPosition.Enabled = isOpen;
btnHomeMove.Enabled = isOpen;
btnLineAbsMove.Enabled = isOpen;
btnStatusSearch.Enabled = isOpen;
// Bt_ClearCounter.Enabled = isOpen;
}
//private void btnOpen_Click(object sender, EventArgs e)
//{
// if (StoreManager.OpenShuoKe(store))
// {
// ShuoKeControls.SetConfigSpeed(StoreManager.Config);
// FormComStatus(true);
// }
//}
//private void btnClose_Click(object sender, EventArgs e)
//{
// ShuoKeControls.ClosePort();
// FormComStatus(false);
//}
//private void btnVolMove_Click(object sender, EventArgs e)
//{
// int speed = FormUtil.GetIntValue(txtSpeed);
// ShuoKeControls.VolMove(store.Config.CompressAxis_Slv, speed);
//}
//private void btnGetPosition_Click(object sender, EventArgs e)
//{
// int value = ShuoKeControls.GetABSPosition(store.Config.CompressAxis_Slv);
// lblComMsg.Text = DateTime.Now.ToLongTimeString() + ":" + value;
//}
//private void btnStop_Click(object sender, EventArgs e)
//{
// ShuoKeControls.SuddownStop(this.store.Config.CompressAxis_Slv);
//}
//private void btnClearPosition_Click(object sender, EventArgs e)
//{
// ShuoKeControls.PositionClear(this.store.Config.CompressAxis_Slv, ShuoKeCMD.AbsPositionClear);
// ShuoKeControls.PositionClear(this.store.Config.CompressAxis_Slv, ShuoKeCMD.RelPositionClear);
//}
//private void btnHomeMove_Click(object sender, EventArgs e)
//{
// ShuoKeControls.HomeMove(this.store.Config.CompressAxis_Slv, byte.Parse(cmbHomeType.SelectedIndex.ToString()));
//}
//private void btnLineAbsMove_Click(object sender, EventArgs e)
//{
// int posi = FormUtil.GetIntValue(txtLinePosition);
// ShuoKeControls.AbsMove(this.store.Config.CompressAxis_Slv, posi);
//}
//private void btnRelMove_Click(object sender, EventArgs e)
//{
// int posi = FormUtil.GetIntValue(txtLinePosition);
// ShuoKeControls.RelativeMove(this.store.Config.CompressAxis_Slv, posi);
//}
//private void btnStatusSearch_Click(object sender, EventArgs e)
//{
// ShuoKeInfo info = ShuoKeControls.GetStatus(store.Config.CompressAxis_Slv);
// lblComMsg.Text = info.ToShowStr();
//}
//private void FormComStatus(bool isOpen)
//{
// btnOpen.Enabled = !isOpen;
// btnClose.Enabled = isOpen;
// btnClearPosition.Enabled = isOpen;
// btnVolMove.Enabled = isOpen;
// btnGetPosition.Enabled = isOpen;
// btnHomeMove.Enabled = isOpen;
// btnLineAbsMove.Enabled = isOpen;
// btnStatusSearch.Enabled = isOpen;
// // Bt_ClearCounter.Enabled = isOpen;
//}
private void btnBatchOutTest_Click(object sender, EventArgs e)
{
......@@ -1687,7 +1702,7 @@ namespace OnlineStore.AutoInOutStore
出入库调试ToolStripMenuItem.Text = ResourceCulture.GetString("启用调试", "启用调试");
}
groupAxis.Enabled = status;
groupComAxis.Enabled = status;
// groupComAxis.Enabled = status;
//groupInout.Enabled = status;
if (!status)
{
......
......@@ -218,6 +218,9 @@ IO模块读取时间改为可配置。
后面自动上下料 RC1252 修改。
DI9 不要,只判断DI10
20190801 新建分支:RC1252-AutoInOutStore
压紧轴改为伺服,压紧轴计量检测信号去掉。
IO配置修改,改为新的IO配置。
20190801 新建分支:RC1252-AutoInOutStore
\ No newline at end of file
......@@ -73,8 +73,6 @@
<Compile Include="DeviceLibrary\PanasonicServo\ACServerManager.cs" />
<Compile Include="DeviceLibrary\PanasonicServo\ACServerManager_Partial.cs" />
<Compile Include="DeviceLibrary\PanasonicServo\BatchAxisController.cs" />
<Compile Include="DeviceLibrary\ShuoKe\MeteringSignalBean.cs" />
<Compile Include="DeviceLibrary\ShuoKe\ShuoKeController.cs" />
<Compile Include="ResourceControl.cs" />
<Compile Include="store\LineMoveP.cs" />
<Compile Include="store\LineAlarm.cs">
......@@ -110,7 +108,9 @@
<Name>LoadCSVLibrary</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="DeviceLibrary\ShuoKe\" />
</ItemGroup>
<ItemGroup>
<None Include="StoreConfig\AC\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
......
......@@ -328,12 +328,12 @@ namespace OnlineStore.DeviceLibrary
public static void SetConfigSpeed(AUTO_SA_Config Config)
{
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetAddSpeed, Config.CompressAxis_AddSpeed);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetDelSpeed, Config.CompressAxis_DelSpeed);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetEndSpeed, Config.CompressAxis_EndSpeed);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetHomeSpeed, Config.CompressAxis_HomeSpeed);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetMaxSpeed, Config.CompressAxis_MaxSpeed);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetStartSpeed, Config.CompressAxis_StartSpeed);
//ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetAddSpeed, Config.CompressAxis_AddSpeed);
//ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetDelSpeed, Config.CompressAxis_DelSpeed);
//ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetEndSpeed, Config.CompressAxis_EndSpeed);
//ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetHomeSpeed, Config.CompressAxis_HomeSpeed);
//ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetMaxSpeed, Config.CompressAxis_MaxSpeed);
//ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetStartSpeed, Config.CompressAxis_StartSpeed);
}
......
......@@ -5,8 +5,8 @@ DI,自动启动,AutoRun_Single,2,192.168.200.11,0,自动启动,X03,DI-03,0,
DI,安全光栅,SafetyLightCurtains,3,192.168.200.11,0,安全光栅,X04,DI-04,0,
DI,进料口门上升端,Door_Up,4,192.168.200.11,0,进料口门上升端,X05,DI-05,0,
DI,进料口门下降端,Door_Down,5,192.168.200.11,0,进料口门下降端,X06,DI-06,0,
DI,吸盘气缸上升端,SuckingDisc_Up,6,192.168.200.11,0,吸盘气缸上升端,X07,DI-07,0,
DI,吸盘气缸下降端,SuckingDisc_Down,7,192.168.200.11,0,吸盘气缸下降端,X08,DI-08,0,
DI,抓取气缸上升端,ClampingDisc_Up,6,192.168.200.11,0,抓取气缸上升端,X07,DI-07,0,
DI,抓取气缸下降端,ClampingDisc_Down,7,192.168.200.11,0,抓取气缸下降端,X08,DI-08,0,
DI,料盘宽度检测1,WidthCheck1,8,192.168.200.11,0,料盘宽度检测1,X09,DI-09,0,
DI,料盘宽度检测2,WidthCheck2,9,192.168.200.11,0,料盘宽度检测2,X10,DI-10,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial,10,192.168.200.11,0,料盘检测1(上料机构),X11,DI-11,0,
......@@ -22,27 +22,50 @@ DO,吹气SOL ON,StartOrStopBlow,19,192.168.200.11,0,吹气SOL ON,Y04,DO-04,0,
DO,料仓运转ON,Run_Sign,20,192.168.200.11,0,料仓运转ON,Y05,DO-05,0,
DO,轴2刹车电源ON,Axis_Brake,21,192.168.200.11,0,轴2刹车电源ON,Y06,DO-06,0,
DO,相机照明开,CameraLight_Power,22,192.168.200.11,0,相机照明开,Y07,DO-07,0,
DO,吸盘吸料SOL,SuckingDisc_Work,23,192.168.200.11,0,吸盘吸料SOL,Y08,DO-08,0,
,备用,,23,192.168.200.11,0,备用,Y08,DO-08,0,
DO,进料口门上升SOL,Door_Up,24,192.168.200.11,0,进料口门上升SOL,Y09,DO-09,0,
DO,进料口门下降SOL,Door_Down,25,192.168.200.11,0,进料口门下降SOL,Y10,DO-10,0,
DO,吸盘气缸上升SOL,SuckingDisc_Up,26,192.168.200.11,0,吸盘气缸上升SOL,Y11,DO-11,0,
DO,吸盘气缸下降SOL,SuckingDisc_Down,27,192.168.200.11,0,吸盘气缸下降SOL,Y12,DO-12,0,
DO,抓取气缸上升SOL,ClampingDisc_Up,26,192.168.200.11,0,抓取气缸上升SOL,Y11,DO-11,0,
DO,抓取气缸下降SOL,ClampingDisc_Down,27,192.168.200.11,0,抓取气缸下降SOL,Y12,DO-12,0,
DO,门锁气缸打开SOL,BatchDoor_Open,28,192.168.200.11,0,门锁气缸打开SOL,Y13,DO-13,0,
DO,门锁气缸关闭SOL,BatchDoor_Close,29,192.168.200.11,0,门锁气缸关闭SOL,Y14,DO-14,0,
DO,门禁功能屏蔽,DisableDoorControl,30,192.168.200.11,0,门禁功能屏蔽,Y15,DO-15,0,
DO,报警蜂鸣器,Buzzer_Sign,31,192.168.200.11,0,报警蜂鸣器,Y16,DO-16,0,
DI,上料机构门关闭,DoorClose_LoadMaterial,0,192.168.200.12,0,上料机构门关闭,X21,DI-21,0,
DI,气压检测,Airpressure_Check,1,192.168.200.12,0,气压检测,X22,DI-22,0,
DI,吸盘压力确认信号,SuckingDisc_Air,2,192.168.200.12,0,吸盘压力确认信号,X23,DI-23,0,
DI,左侧门关闭,DoorColse_Single,3,192.168.200.12,0,左侧门关闭,X24,DI-24,0,
DI,左侧门关闭,LeftDoorColse_Single,2,192.168.200.12,0,左侧门关闭,X23,DI-23,0,
DI,右侧门关闭,RightDoorColse_Single,3,192.168.200.12,0,右侧门关闭,X24,DI-24,0,
DI,门锁气缸打开端2,BatchDoor_Open2,4,192.168.200.12,0,门锁气缸打开端2,X25,DI-25,0,
DI,门锁气缸关闭端2,BatchDoor_Close2,5,192.168.200.12,0,门锁气缸关闭端2,X26,DI-26,0,
DI,批量轴极限信号,BatchAxis_Limit,6,192.168.200.12,0,批量轴极限信号,X27,DI-27,0,
DI,仓门料盘检测信号,TrayCheck_Door,7,192.168.200.12,0,仓门料盘检测信号,X28,DI-28,0,
,,,16,192.168.200.12,0,,Y21,DO-21,0,
,,,17,192.168.200.12,0,,Y22,DO-22,0,
DI,上料机构上极限,BatchAxis_Limit,6,192.168.200.12,0,上料机构上极限,X27,DI-27,0,
DI,入料口料盘检测,TrayCheck_Door,7,192.168.200.12,0,入料口料盘检测,X28,DI-28,0,
DI,夹爪气缸夹紧端,Clamping_Work,8,192.168.200.12,0,夹爪气缸夹紧端,X29,DI-29,0,
DI,夹爪气缸放松端,Clamping_Relax,9,192.168.200.12,0,夹爪气缸放松端,X30,DI-30,0,
,,,10,192.168.200.12,0,,X31,DI-31,0,
,,,11,192.168.200.12,0,,X32,DI-32,0,
,,,12,192.168.200.12,0,,X33,DI-33,0,
,,,13,192.168.200.12,0,,X34,DI-34,0,
,,,14,192.168.200.12,0,,X35,DI-35,0,
,,,15,192.168.200.12,0,,X36,DI-36,0,
DO,夹爪气缸夹紧SOL,Clamping_Work,16,192.168.200.12,0,,Y21,DO-21,0,
DO,夹爪气缸放松SOL,Clamping_Relax,17,192.168.200.12,0,,Y22,DO-22,0,
,,,18,192.168.200.12,0,,Y23,DO-23,0,
,,,19,192.168.200.12,0,,Y24,DO-24,0,
,,,20,192.168.200.12,0,,Y25,DO-25,0,
,,,21,192.168.200.12,0,,Y26,DO-26,0,
,,,22,192.168.200.12,0,,Y27,DO-27,0,
,,,23,192.168.200.12,0,,Y28,DO-28,0,
,,,24,192.168.200.12,0,,Y29,DO-29,0,
,,,25,192.168.200.12,0,,Y30,DO-30,0,
,,,26,192.168.200.12,0,,Y31,DO-31,0,
,,,27,192.168.200.12,0,,Y32,DO-32,0,
,,,28,192.168.200.12,0,,Y33,DO-33,0,
,,,29,192.168.200.12,0,,Y34,DO-34,0,
,,,30,192.168.200.12,0,,Y35,DO-35,0,
,,,31,192.168.200.12,0,,Y36,DO-36,0,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.21#16;192.168.200.22#16,,,,,, ,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.21#16;192.168.200.22#16,,,,,,,
,,,,,,,,,,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM1,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM1,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
......@@ -121,17 +144,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,30,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,1,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM5,,,,,,,
,,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM6,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,50000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,100000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,100000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,60000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,60000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,30000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
,,,,,,,,,,
,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,800,,,,,,,
PRO,(轴五)上料轴慢速匀速上升速度,BatchAxis_SlowSpeed,150,,,,,,,
......@@ -152,8 +165,16 @@ PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,10000
PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,250,,,,,,,
PRO,最后一盘料需要补充的高度,LastTrayAddHeight,0,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.21#16;192.168.200.22#4,,,,,, ,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.21#16;192.168.200.22#4,,,,,,,
PRO,(轴二)升降轴单盘入库抬升料盘的高度,UpdownAxis_UpPosition,3000,,,,,,,
PRO,(轴五)上料轴出库上升最大高度,BatchAxis_OutMaxValue,1610000,,,,,,,
,,,,,,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,5,COM1,0,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,100,,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,300,,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,300,,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,100,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,100,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,100,,,,,,,
......@@ -186,11 +186,14 @@ namespace OnlineStore.DeviceLibrary
moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis);
moveAxisList.Add(Config.InOut_Axis);
moveAxisList.Add(Config.Comp_Axis);
moveAxisList.Add(Config.Batch_Axis);
this.AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>();
this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(Config.InOut_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(this.Config.Middle_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(this.Config.Batch_Axis.GetNameStr(), new AxisAlarmInfo());
}
......@@ -204,16 +207,16 @@ namespace OnlineStore.DeviceLibrary
runTimeWatch.Restart();
LogUtil.info(LOGGER, StoreName + "开始启动,启动时间:" + DateTime.Now.ToLongTimeString());
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
if (IsHasCompress_Axis)
{
if (ShuoKeControls.isRun == false && (!StoreManager.OpenShuoKe(this)))
{
// WarnMsg = ResourceControl.GetString(ResourceControl.PreConnectFail, "启动失败:压紧轴连接失败");
SetWarnMsgAndLog(ResourceControl.PreConnectFail);
// LogUtil.error(StoreName + "打开驱动器串口失败,启动失败!");
return false;
}
}
//if (IsHasCompress_Axis)
//{
// if (ShuoKeControls.isRun == false && (!StoreManager.OpenShuoKe(this)))
// {
// // WarnMsg = ResourceControl.GetString(ResourceControl.PreConnectFail, "启动失败:压紧轴连接失败");
// SetWarnMsgAndLog(ResourceControl.PreConnectFail);
// // LogUtil.error(StoreName + "打开驱动器串口失败,启动失败!");
// return false;
// }
//}
string canStart = AutomaticBaiting.CanStart();
if (!canStart.Equals(""))
{
......@@ -295,7 +298,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisHomeMove(Config.InOut_Axis);
LogUtil.info(LOGGER, StoreName + "开始原点返回,先把进出轴回原点");
//设置速度
ShuoKeControls.SetConfigSpeed(Config);
//ShuoKeControls.SetConfigSpeed(Config);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
}
......@@ -306,7 +309,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_InOutToP1);
LogUtil.info(LOGGER, StoreName + "到待机状态,进出轴到P1,压紧轴先相对走-2000");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
ComBeforeHomeMove();
//ComBeforeHomeMove();
ResetCloseDoor();
}
public override void Reset()
......@@ -351,7 +354,7 @@ namespace OnlineStore.DeviceLibrary
{
InoutStartReset();
//硕科压紧轴回原点
ShuoKeControls.SetConfigSpeed(Config);
//ShuoKeControls.SetConfigSpeed(Config);
}
else
{
......@@ -409,7 +412,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutToP1);
ResetLog("复位中:进出轴到待机点P1,压紧轴先相对走-2000");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
ComBeforeHomeMove();
//ComBeforeHomeMove();
ResetCloseDoor();
break;
case StoreMoveStep.BOX_H_InOutToP1:
......@@ -423,8 +426,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
if (IsHasCompress_Axis)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true));
ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 1);
ACAxisHomeMove(Config.Comp_Axis);
}
ACAxisHomeMove(Config.Middle_Axis);
ACAxisHomeMove(Config.UpDown_Axis);
......@@ -436,7 +438,7 @@ namespace OnlineStore.DeviceLibrary
ResetLog("复位中:旋转轴到P1,上下轴到P7门口位置,压紧轴到P1");
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed);
ComMoveToPosition(Config.CompressAxis_P1_Position);
ComMoveToPosition( Config.CompressAxis_P1_Position,Config.CompAxis_P1_Speed);
CloseDoorAndWait();
break;
case StoreMoveStep.BOX_H_MiddleAxisToP1:
......@@ -452,8 +454,7 @@ namespace OnlineStore.DeviceLibrary
ResetLog("到待机状态,压紧轴回原点");
if (IsHasCompress_Axis)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 1, true));
ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 1);
ACAxisHomeMove(Config.Comp_Axis);
}
break;
case StoreMoveStep.BOX_M_H_TOP1_CompressHome:
......@@ -461,7 +462,7 @@ namespace OnlineStore.DeviceLibrary
ResetLog("复位中:旋转轴到P1,升降轴到门口位置P7,压紧轴到P1");
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed);
ComMoveToPosition(Config.CompressAxis_P1_Position);
ComMoveToPosition(Config.CompressAxis_P1_Position, Config.CompAxis_P1_Speed);
CloseDoorAndWait();
break;
case StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1:
......@@ -519,8 +520,8 @@ namespace OnlineStore.DeviceLibrary
{
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
if (IOManager.IOValue(IO_Type.SuckingDisc_Down).Equals(IO_VALUE.HIGH) ||
IOManager.IOValue(IO_Type.SuckingDisc_Up).Equals(IO_VALUE.LOW))
if (IOManager.IOValue(IO_Type.ClampingDisc_Down).Equals(IO_VALUE.HIGH) ||
IOManager.IOValue(IO_Type.ClampingDisc_Up).Equals(IO_VALUE.LOW))
{
LogUtil.info(LOGGER, StoreName + "复位完成检测到叉子有料,启动清料失败:吸盘不在上升端");
return false;
......@@ -545,40 +546,27 @@ namespace OnlineStore.DeviceLibrary
}
}
return false;
}
private void ComBeforeHomeMove()
{
if (IsHasCompress_Axis)
{
int relValue = -2000;
LogUtil.debug("压紧轴相对位置:" + relValue);
MeteringSignal.StopCheck();
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, relValue, false));
ShuoKeControls.RelativeMove(Config.CompressAxis_Slv, relValue);
Thread.Sleep(100);
}
}
private void ComMoveToPosition(int targetPosition)
{
ComMoveToPosition(targetPosition, false);
}
private void ComMoveToPosition(int targetPosition, bool isNeedCheckSingle)
}
private void ComMoveToPosition(int targetPosition, int targetSpeed)
{
if (IsHasCompress_Axis)
{
LogUtil.debug("压紧轴绝对运动目标位置:" + targetPosition);
if (isNeedCheckSingle)
{
MeteringSignal.StartCheck(targetPosition, ShuoKeControls.GetABSPosition(Config.CompressAxis_Slv));
}
else
{
MeteringSignal.StopCheck();
}
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, targetPosition, false));
ShuoKeControls.AbsMove(Config.CompressAxis_Slv, targetPosition);
Thread.Sleep(100);
ACAxisMove(Config.Comp_Axis, targetPosition, targetSpeed);
}
//LogUtil.debug("压紧轴绝对运动目标位置:" + targetPosition);
//if (isNeedCheckSingle)
//{
// MeteringSignal.StartCheck(targetPosition, ShuoKeControls.GetABSPosition(Config.CompressAxis_Slv));
//}
//else
//{
// MeteringSignal.StopCheck();
//}
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, targetPosition, false));
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, targetPosition);
//Thread.Sleep(100);
}
private void OpenDoorAndWait()
{
......@@ -662,7 +650,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutToP1);
ResetLog("原点返回中,进出轴退回P1点,关闭仓门,压紧轴先相对走-2000");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
ComBeforeHomeMove();
//ComBeforeHomeMove();
ResetCloseDoor();
break;
......@@ -679,8 +667,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
if (IsHasCompress_Axis)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true));
ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 1);
ACAxisHomeMove(Config.Comp_Axis);
}
ACAxisHomeMove(Config.Middle_Axis);
ACAxisHomeMove(Config.UpDown_Axis);
......@@ -692,7 +679,7 @@ namespace OnlineStore.DeviceLibrary
ResetLog("回原点:旋转轴到P1,上下轴到门口位置P7,压紧轴到P1");
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P7_Speed);
ComMoveToPosition(Config.CompressAxis_P1_Position);
ComMoveToPosition(Config.CompressAxis_P1_Position, Config.CompAxis_P1_Speed);
CloseDoorAndWait();
break;
case StoreMoveStep.BOX_H_MiddleAxisToP1:
......@@ -851,10 +838,10 @@ namespace OnlineStore.DeviceLibrary
AutomaticBaiting.StopRun();
LogUtil.info("StopRun:关闭所有DO");
IOManager.instance.CloseAllDO();
if (IsHasCompress_Axis)
{
ShuoKeControls.ClosePort();
}
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.ClosePort();
//}
HumitureController.Release();
//StoreManager.CurrInOutType = 0;
......@@ -1408,20 +1395,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "调用StopMove");
BatchAxisController.StopCheck();
AxisSuddenStop();
if (IsHasCompress_Axis)
{
ShuoKeControls.SuddownStop(Config.CompressAxis_Slv);
}
else
{
if (Config.IsHasLocationCylinder >= 1)
{
//定位气缸停止
IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW);
}
if (IsHasCompress_Axis.Equals(false) && Config.IsHasLocationCylinder >= 1)
{
//定位气缸停止
IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW);
}
MeteringSignal.StopCheck();
// MeteringSignal.StopCheck();
AutomaticBaiting.StopMove();
if (IsCloseAxis)
{
......
......@@ -225,9 +225,9 @@ namespace OnlineStore.DeviceLibrary
}
else if (wait.WaitType == (int)Wait_Type.ShuoKe_5)
{
string msg = "";
wait.IsEnd = ShuoKeIsEnd(wait, out msg);
NotOkMsg = NotOkMsg + " " + msg;
//string msg = "";
//wait.IsEnd = ShuoKeIsEnd(wait, out msg);
//NotOkMsg = NotOkMsg + " " + msg;
}
if (wait.IsEnd)
{
......@@ -259,37 +259,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(WarnObj.WarnMsg, 15);
Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnObj.WarnMsg, StoreMove.MoveType);
}
}
private bool ShuoKeIsEnd(WaitResultInfo wait, out string msg)
{
//bool result = false;
msg = "";
if (wait.IsHomeMove)
{
return ShuoKeControls.IsHomeMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime, out msg);
}
else
{
bool isend = ShuoKeControls.IsMoveEnd(wait.SlvAddr, wait.TargetPosition, StoreMove.LastSetpTime, out msg);
if (isend)
{
bool isCheckOk = (MeteringSignal.TargetChangeCount <= MeteringSignal.SignalChangeCount);
if (isCheckOk || MeteringSignal.TargetChangeCount <= 0)
{
MeteringSignal.StopCheck();
return true;
}
else
{
msg = "压紧轴计量检测目标【" + MeteringSignal.TargetChangeCount + "】实际【" + MeteringSignal.SignalChangeCount + "】";
LogUtil.error("压紧轴已经停止运动,但是 " + msg,110);
return false;
}
}
}
return false;
}
}
#endregion
......@@ -360,10 +330,10 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:SI_03 所有轴回待机点,轴2、轴1 到P1, 轴4到P3,吸盘在上升端");
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
bool needMove = false;
if (!ShuoKeControls.IsInPosition(Config.CompressAxis_Slv, moveP.ComPress_P3))
if (!ACServerManager.isInPosition(Config.Comp_Axis, moveP.ComPress_P3))
{
needMove = true;
ComMoveToPosition(moveP.ComPress_P3);
ComMoveToPosition(moveP.ComPress_P3,Config.CompAxis_P3_Speed);
}
if (!ACServerManager.isInPosition(Config.UpDown_Axis, moveP.UpDown_P1))
{
......@@ -375,10 +345,10 @@ namespace OnlineStore.DeviceLibrary
needMove = true;
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Up, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Down, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Up, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Down, IO_VALUE.LOW));
//如果不需要回待机点,直接到下一个步骤
if (!needMove && IOManager.IOValue(IO_Type.SuckingDisc_Down).Equals(IO_VALUE.LOW) && IOManager.IOValue(IO_Type.SuckingDisc_Up).Equals(IO_VALUE.HIGH))
if (!needMove && IOManager.IOValue(IO_Type.ClampingDisc_Down).Equals(IO_VALUE.LOW) && IOManager.IOValue(IO_Type.ClampingDisc_Up).Equals(IO_VALUE.HIGH))
{
SI_04_DeviceToDoor();
}
......@@ -459,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
int targetPosition = moveP.UpDown_P1 - Config.UpDownAxis_DownValue;
InStoreLog("入库:SI_06 压紧轴压紧,压紧轴到P2,升降轴下降【" + Config.UpDownAxis_DownValue + "】目标【" + targetPosition + "】 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_06_CompressWork);
ComMoveToPosition(moveP.ComPress_P2, true);
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, targetPosition, Config.UpDownAxis_P4_Speed);
}
else
......@@ -535,7 +505,7 @@ namespace OnlineStore.DeviceLibrary
//Task.Factory.StartNew(delegate { SendLineStatus(); });
StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag);
ComMoveToPosition(moveP.ComPress_P3, true);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
Thread.Sleep(100);
}
......@@ -550,7 +520,7 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog("入库:SI_14 返回待机点,轴2/轴1到P1,轴4到P3");
StoreMove.NextMoveStep(StoreMoveStep.SI_14_GoBack);
ComMoveToPosition(moveP.ComPress_P3);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
}
......@@ -578,7 +548,7 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog("送出料盘:SI_22 ,压紧轴到压紧前点 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_23_ComToP3);
ComMoveToPosition(moveP.ComPress_P3);
ComMoveToPosition(moveP.ComPress_P3,Config.CompAxis_P3_Speed);
//if (IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH))
//{
// InStoreLog("送出料盘:SI_22 ,打开仓门 ");
......@@ -637,7 +607,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:SIS_32 单盘入库:叉子走到门口位置P4, 打开仓门 ,压紧轴到P3");
StoreMove.NextMoveStep(StoreMoveStep.SIS_32_InoutToDoor);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P4, Config.InOutAxis_P2_Speed);
ComMoveToPosition(moveP.ComPress_P3);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
OpenDoorAndWait();
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.SIS_32_InoutToDoor))
......@@ -667,7 +637,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SIS_34_GetTray);
CloseDoorAndWait();
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_Door_P7, Config.UpDownAxis_P4_Speed);
ComMoveToPosition(moveP.ComPress_P2);
ComMoveToPosition(moveP.ComPress_P2,Config.CompAxis_P2_Speed);
}
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.SIS_34_GetTray))
......@@ -900,7 +870,7 @@ namespace OnlineStore.DeviceLibrary
}
OutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)");
ComMoveToPosition(moveP.ComPress_P3);
ComMoveToPosition(moveP.ComPress_P3,Config.CompAxis_P3_Speed);
ACAxisMove(Config.Middle_Axis, StoreMove.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
Thread.Sleep(100);
......@@ -923,7 +893,7 @@ namespace OnlineStore.DeviceLibrary
{
OutStoreLog("出库:SO_05 拿起物品,升降轴至P6(库位出料缓冲点),压紧轴至P2(压紧点) ");
StoreMove.NextMoveStep(StoreMoveStep.SO_05_BagWareToDevice);
ComMoveToPosition(moveP.ComPress_P2, true);
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P6, Config.UpDownAxis_P6_Speed);
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_05_BagWareToDevice)
......@@ -986,7 +956,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.SO_11_PutTray);
OutStoreLog("出库:SO_11_PutTray 放下料盘,升降轴到P8(出库低点),压紧轴至P3(压紧前点)");
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3, true);
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_OutLow_P8, Config.UpDownAxis_P8_Speed);
AutomaticBaiting.BatchOutStoreHeight += StoreMove.MoveParam.PlateH;
AutomaticBaiting.BatchOutStoreCount++;
......@@ -996,7 +966,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.SO_21_OpenDoor);
OutStoreLog("出库:SO_21打开仓门,压紧轴至P3(压紧前点),定位气缸下降");
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3);
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3,Config.CompAxis_P3_Speed);
OpenDoorAndWait();
LocationDownAndWait();
}
......@@ -1106,7 +1076,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P1, Config.InOutAxis_P1_Speed);
if (IsHasCompress_Axis)
{
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3);
ComMoveToPosition(StoreMove.MoveParam.MoveP.ComPress_P3, Config.CompAxis_P3_Speed);
}
}
/// <summary>
......@@ -1130,10 +1100,10 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
//此处需要等待吸盘在上升位置
IOManager.IOMove(IO_Type.SuckingDisc_Up, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.SuckingDisc_Down, IO_VALUE.LOW);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Up, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Down, IO_VALUE.LOW));
IOManager.IOMove(IO_Type.ClampingDisc_Up, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.ClampingDisc_Down, IO_VALUE.LOW);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Up, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Down, IO_VALUE.LOW));
}
private void SO_10_DeviceToDoorPro()
{
......
......@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.EndMove();
ClearInStoreInfo();
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, false);
CylinderMove(IO_Type.ClampingDisc_Up, IO_Type.ClampingDisc_Down, false);
BatchDoorClose(false);
}
/// <summary>
......@@ -214,7 +214,7 @@ namespace OnlineStore.DeviceLibrary
//关闭门,轴回原点,检测
BatchDoorClose(true);
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, true);
CylinderMove(IO_Type.ClampingDisc_Up, IO_Type.ClampingDisc_Down, true);
LogUtil.info(Name + "复位中:关闭门锁");
break;
case StoreMoveStep.AUTO_R01_CloseDoor:
......@@ -352,7 +352,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I04_SuckingDisc_Down);
LogUtil.info(Name + "入料: 扫码结束,二维码【" + LastCode + "】 吸盘开始下降");
CylinderMove(IO_Type.SuckingDisc_Down, IO_Type.SuckingDisc_Up, true);
CylinderMove(IO_Type.ClampingDisc_Down, IO_Type.ClampingDisc_Up, true);
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I04_SuckingDisc_Down))
{
......@@ -365,8 +365,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I06_SuckingDisc_Up);
LogUtil.info(Name + "入料: 吸盘上升");
CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, false );
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Down, IO_VALUE.LOW));
CylinderMove(IO_Type.ClampingDisc_Up, IO_Type.ClampingDisc_Down, false );
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Down, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1500));
}
......@@ -390,7 +390,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I07_BatchAxisUp);
LogUtil.info(Name + "入料: 批量轴匀速上升【" + StoreManager.Config.BatchAxis_SlowSpeed + "】");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_SlowSpeed, IO_Type.TrayCheck_LoadMaterial);
CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, true);
CylinderMove(IO_Type.ClampingDisc_Up, IO_Type.ClampingDisc_Down, true);
if (StoreManager.Config.Default_TrayWidth.Equals(7))
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.WidthCheck1, IO_VALUE.HIGH));
......
......@@ -119,14 +119,14 @@ namespace OnlineStore.DeviceLibrary
//如果是气缸动作,若Do未输出,重新写一遍
if (!wait.IsEnd && span.TotalSeconds > 2)
{
if (wait.IoType.Equals(IO_Type.SuckingDisc_Down) || wait.IoType.Equals(IO_Type.SuckingDisc_Up))
if (wait.IoType.Equals(IO_Type.ClampingDisc_Down) || wait.IoType.Equals(IO_Type.ClampingDisc_Up))
{
IO_VALUE doValue = IOManager.DOValue(wait.IoType);
if (!doValue.Equals(wait.IoValue))
{
LogUtil.error("等待[" + NotOkMsg + "],重写DO(" + wait.IoType + "=" + wait.IoValue + ")");
IOManager.IOMove(wait.IoType, wait.IoValue);
string ioType = wait.IoType.Equals(IO_Type.SuckingDisc_Down) ? IO_Type.SuckingDisc_Up : IO_Type.SuckingDisc_Down;
string ioType = wait.IoType.Equals(IO_Type.ClampingDisc_Down) ? IO_Type.ClampingDisc_Up : IO_Type.ClampingDisc_Down;
IO_VALUE ioValue = wait.IoValue.Equals(IO_VALUE.LOW) ? IO_VALUE.HIGH : IO_VALUE.LOW;
LogUtil.error("等待[" + wait.ToStr() + "],重写气缸DO(" + ioType + "=" + ioValue + ")");
IOManager.IOMove(ioType, ioValue);
......
......@@ -29,25 +29,7 @@ namespace OnlineStore.DeviceLibrary
public static bool IsConnectServer=!ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
public StoreManager()
{
}
public static bool OpenShuoKe(AC_SA_BoxBean box)
{
//打开硕科步进驱动器端口
Parity parity = (Parity)box.Config.CompressAxis_PortParity;
StopBits bit = (StopBits)box.Config.CompressAxis_StopBits;
bool result = ShuoKeControls.InitPort(box.Config.CompressAxis_PortName, box.Config.CompressAxis_PortBaudrate,
box.Config.CompressAxis_PortParity, 8, bit);
if (result)
{
LogUtil.info(box.StoreName + "打开硕科步进控制器【" + box.Config.CompressAxis_PortName + "】成功");
return true;
}
else
{
LogUtil.error(LOGGER, box.StoreName + "打开硕科步进控制器【" + box.Config.CompressAxis_PortName + "】失败,启动失败!");
return false;
}
}
}
public static void CheckEnum(Type type)
{
if (type.IsEnum)
......
......@@ -198,16 +198,16 @@ namespace OnlineStore.DeviceLibrary
wait.IsEnd = false;
return wait;
}
public static WaitResultInfo WaitShuoKe(int slvAddr, int targetPosition, bool isHome)
{
WaitResultInfo wait = new WaitResultInfo();
wait.CanWhileMoveCount = 0;
wait.WaitType = (int)Wait_Type.ShuoKe_5 ;
wait.SlvAddr =(byte) slvAddr;
wait.TargetPosition = targetPosition;
wait.IsHomeMove = isHome;
return wait;
}
//public static WaitResultInfo WaitShuoKe(int slvAddr, int targetPosition, bool isHome)
//{
// WaitResultInfo wait = new WaitResultInfo();
// wait.CanWhileMoveCount = 0;
// wait.WaitType = (int)Wait_Type.ShuoKe_5 ;
// wait.SlvAddr =(byte) slvAddr;
// wait.TargetPosition = targetPosition;
// wait.IsHomeMove = isHome;
// return wait;
//}
public static WaitResultInfo WaitTime(int MScends)
{
WaitResultInfo wait = new WaitResultInfo();
......
......@@ -399,61 +399,61 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[ConfigProAttribute("Batch_Axis")]
public ConfigMoveAxis Batch_Axis { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制端口号 CompressAxis_PortName COM4
/// </summary>
[ConfigProAttribute("CompressAxis_PortName")]
public string CompressAxis_PortName { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制波特率 CompressAxis_PortBaudrate 9600
/// </summary>
[ConfigProAttribute("CompressAxis_PortBaudrate")]
public int CompressAxis_PortBaudrate { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制奇偶校验 CompressAxis_PortParity 2
/// </summary>
[ConfigProAttribute("CompressAxis_PortParity")]
public int CompressAxis_PortParity { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制停止位 CompressAxis_StopBits 1
/// </summary>
[ConfigProAttribute("CompressAxis_StopBits")]
public int CompressAxis_StopBits { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制初速度 CompressAxis_StartSpeed 100
/// </summary>
[ConfigProAttribute("CompressAxis_StartSpeed")]
public int CompressAxis_StartSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制最大速度 CompressAxis_MaxSpeed 10000
/// </summary>
[ConfigProAttribute("CompressAxis_MaxSpeed")]
public int CompressAxis_MaxSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制末速度 CompressAxis_EndSpeed 10000
/// </summary>
[ConfigProAttribute("CompressAxis_EndSpeed")]
public int CompressAxis_EndSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制加速度 CompressAxis_AddSpeed 5000
/// </summary>
[ConfigProAttribute("CompressAxis_AddSpeed")]
public int CompressAxis_AddSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制减速度 CompressAxis_DelSpeed 1000
/// </summary>
[ConfigProAttribute("CompressAxis_DelSpeed")]
public int CompressAxis_DelSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制归零速度(原点返回速度) CompressAxis_HomeSpeed 10000
/// </summary>
[ConfigProAttribute("CompressAxis_HomeSpeed")]
public int CompressAxis_HomeSpeed { get; set; }
/// <summary>
/// PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,,
/// </summary>
[ConfigProAttribute("CompressAxis_Slv")]
public int CompressAxis_Slv { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制端口号 CompressAxis_PortName COM4
///// </summary>
//[ConfigProAttribute("CompressAxis_PortName")]
//public string CompressAxis_PortName { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制波特率 CompressAxis_PortBaudrate 9600
///// </summary>
//[ConfigProAttribute("CompressAxis_PortBaudrate")]
//public int CompressAxis_PortBaudrate { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制奇偶校验 CompressAxis_PortParity 2
///// </summary>
//[ConfigProAttribute("CompressAxis_PortParity")]
//public int CompressAxis_PortParity { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制停止位 CompressAxis_StopBits 1
///// </summary>
//[ConfigProAttribute("CompressAxis_StopBits")]
//public int CompressAxis_StopBits { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制初速度 CompressAxis_StartSpeed 100
///// </summary>
//[ConfigProAttribute("CompressAxis_StartSpeed")]
//public int CompressAxis_StartSpeed { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制最大速度 CompressAxis_MaxSpeed 10000
///// </summary>
//[ConfigProAttribute("CompressAxis_MaxSpeed")]
//public int CompressAxis_MaxSpeed { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制末速度 CompressAxis_EndSpeed 10000
///// </summary>
//[ConfigProAttribute("CompressAxis_EndSpeed")]
//public int CompressAxis_EndSpeed { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制加速度 CompressAxis_AddSpeed 5000
///// </summary>
//[ConfigProAttribute("CompressAxis_AddSpeed")]
//public int CompressAxis_AddSpeed { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制减速度 CompressAxis_DelSpeed 1000
///// </summary>
//[ConfigProAttribute("CompressAxis_DelSpeed")]
//public int CompressAxis_DelSpeed { get; set; }
///// <summary>
///// PRO 硕科步进电机(压紧轴)控制归零速度(原点返回速度) CompressAxis_HomeSpeed 10000
///// </summary>
//[ConfigProAttribute("CompressAxis_HomeSpeed")]
//public int CompressAxis_HomeSpeed { get; set; }
///// <summary>
///// PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,,
///// </summary>
//[ConfigProAttribute("CompressAxis_Slv")]
//public int CompressAxis_Slv { get; set; }
/// <summary>
/// PRO (轴一)旋转轴最小限位 MiddleAxis_PositionMin
......@@ -637,6 +637,63 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("UpDownAxis_DownValue")]
public int UpDownAxis_DownValue { get; set; }
/// <summary>
/// 轴3压紧轴
/// </summary>
[ConfigProAttribute("Comp_Axis")]
public ConfigMoveAxis Comp_Axis { get; set; }
/// <summary>
/// PRO (轴四)压紧轴目标速度 CompAxis_TargetSpeed 100
/// </summary>
[ConfigProAttribute("CompAxis_TargetSpeed")]
public int CompAxis_TargetSpeed { get; set; }
/// <summary>
/// PRO (轴四)压紧轴加速度 CompAxis_AddSpeed 300
/// </summary>
[ConfigProAttribute("CompAxis_AddSpeed")]
public short CompAxis_AddSpeed { get; set; }
/// <summary>
/// PRO (轴四)压紧轴减速度 CompAxis_DelSpeed 300
/// </summary>
[ConfigProAttribute("CompAxis_DelSpeed")]
public short CompAxis_DelSpeed { get; set; }
/// <summary>
/// PRO (轴四)压紧轴原点低速 CompAxis_HomeLowSpeed 20
/// </summary>
[ConfigProAttribute("CompAxis_HomeLowSpeed")]
public int CompAxis_HomeLowSpeed { get; set; }
/// <summary>
/// PRO (轴四)压紧轴原点高速 CompAxis_HomeHighSpeed 60
/// </summary>
[ConfigProAttribute("CompAxis_HomeHighSpeed")]
public int CompAxis_HomeHighSpeed { get; set; }
/// <summary>
/// PRO (轴四)压紧轴原点加速度 CompAxis_HomeAddSpeed 200
/// </summary>
[ConfigProAttribute("CompAxis_HomeAddSpeed")]
public int CompAxis_HomeAddSpeed { get; set; }
/// <summary>
/// PRO 压紧轴(轴4)P1速度 CompAxis_P1_Speed 100
/// </summary>
[ConfigProAttribute("CompAxis_P1_Speed")]
public int CompAxis_P1_Speed { get; set; }
/// <summary>
/// PRO 压紧轴(轴4)P2速度 CompAxis_P2_Speed 100
/// </summary>
[ConfigProAttribute("CompAxis_P2_Speed")]
public int CompAxis_P2_Speed { get; set; }
/// <summary>
///PRO 压紧轴(轴4)P3速度 CompAxis_P3_Speed 100
/// </summary>
[ConfigProAttribute("CompAxis_P3_Speed")]
public int CompAxis_P3_Speed { get; set; }
private Dictionary<string, ushort> DILengthMap = null;
private Dictionary<string, ushort> DOLengthMap = null;
......@@ -851,8 +908,8 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDIList.Add(IO_Type.Door_Up);
MustHaveDIList.Add(IO_Type.Door_Down);
MustHaveDIList.Add(IO_Type.SuckingDisc_Up);
MustHaveDIList.Add(IO_Type.SuckingDisc_Down);
MustHaveDIList.Add(IO_Type.ClampingDisc_Up);
MustHaveDIList.Add(IO_Type.ClampingDisc_Down);
MustHaveDIList.Add(IO_Type.WidthCheck1);
MustHaveDIList.Add(IO_Type.WidthCheck2);
MustHaveDIList.Add(IO_Type.TrayCheck_LoadMaterial);
......@@ -865,9 +922,13 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDIList.Add(IO_Type.DoorClose_LoadMaterial);
MustHaveDIList.Add(IO_Type.Airpressure_Check);
MustHaveDIList.Add(IO_Type.SuckingDisc_Air);
// MustHaveDIList.Add(IO_Type.SuckingDisc_Air);
MustHaveDIList.Add(IO_Type.BatchDoor_Close2);
MustHaveDIList.Add(IO_Type.BatchDoor_Open2);
MustHaveDIList.Add(IO_Type.LeftDoorColse_Single);
MustHaveDIList.Add(IO_Type.RightDoorColse_Single);
MustHaveDIList.Add(IO_Type.Clamping_Work);
MustHaveDIList.Add(IO_Type.Clamping_Relax);
//MustHaveDIList.Add(IO_Type.DoorColse_Single);
......@@ -878,14 +939,16 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList.Add(IO_Type.Run_Sign);
MustHaveDOList.Add(IO_Type.Axis_Brake);
MustHaveDOList.Add(IO_Type.CameraLight_Power);
MustHaveDOList.Add(IO_Type.SuckingDisc_Work);
// MustHaveDOList.Add(IO_Type.SuckingDisc_Work);
MustHaveDOList.Add(IO_Type.Door_Up);
MustHaveDOList.Add(IO_Type.Door_Down);
MustHaveDOList.Add(IO_Type.SuckingDisc_Up);
MustHaveDOList.Add(IO_Type.SuckingDisc_Down);
MustHaveDOList.Add(IO_Type.ClampingDisc_Up);
MustHaveDOList.Add(IO_Type.ClampingDisc_Down);
MustHaveDOList.Add(IO_Type.BatchDoor_Open);
MustHaveDOList.Add(IO_Type.BatchDoor_Close);
MustHaveDOList.Add(IO_Type.Buzzer_Sign);
MustHaveDOList.Add(IO_Type.Clamping_Work);
MustHaveDOList.Add(IO_Type.Clamping_Relax);
}
public static void ConfigAxis(AUTO_SA_Config Config)
{
......@@ -910,8 +973,15 @@ namespace OnlineStore.LoadCSVLibrary
Config.UpDown_Axis.HomeHighSpeed = Config.UpdownAxis_HomeHighSpeed;
Config.UpDown_Axis.HomeLowSpeed = Config.UpdownAxis_HomeLowSpeed;
Config.Comp_Axis.TargetSpeed = Config.CompAxis_TargetSpeed;
Config.Comp_Axis.AddSpeed = Config.CompAxis_AddSpeed;
Config.Comp_Axis.DelSpeed = Config.CompAxis_DelSpeed;
Config.Comp_Axis.HomeAddSpeed = Config.CompAxis_HomeAddSpeed;
Config.Comp_Axis.HomeHighSpeed = Config.CompAxis_HomeHighSpeed;
Config.Comp_Axis.HomeLowSpeed = Config.CompAxis_HomeLowSpeed;
Config.Middle_Axis.CanErrorCountMin = Config.MiddleAxis_ErrorCountMin;
Config.InOut_Axis.CanErrorCountMin = Config.InoutAxis_ErrorCountMin;
Config.UpDown_Axis.CanErrorCountMin = Config.UpdownAxis_ErrorCountMin;
......@@ -941,6 +1011,7 @@ namespace OnlineStore.LoadCSVLibrary
Config.Middle_Axis.DefaultPosition = Config.MiddleAxis_P1_Position;
Config.InOut_Axis.DefaultPosition = Config.InOutAxis_P1_Position;
Config.UpDown_Axis.DefaultPosition = Config.UpDownAxis_Door_P7;
Config.Comp_Axis.DefaultPosition = Config.CompressAxis_P1_Position;
}
}
}
......@@ -72,7 +72,7 @@ namespace OnlineStore.LoadCSVLibrary
///料仓IO。 定位气缸下降端(料仓) LocationCylinder2_Down
/// </summary>
public static string LocationCylinder2_Down = "LocationCylinder2_Down";
/// <summary>
/// 流水线 DO。流水线上的黄灯, 运行状态(指示灯) RunSign_HddLed
/// </summary>
......@@ -99,8 +99,8 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public static string StartOrStopBlow = "StartOrStopBlow";
/// <summary>
/// 进出料口门上升端 Door_Up
/// </summary>
......@@ -114,10 +114,8 @@ namespace OnlineStore.LoadCSVLibrary
/// DI 上料机构门关闭 DoorClose_LoadMaterial X17 DI-21
/// </summary>
public static string DoorClose_LoadMaterial = "DoorClose_LoadMaterial";
/// <summary>
/// 吸盘压力确认信号 SuckingDisc_Air 202 192.168.200.11 0 吸盘压力确认信号 X19 DI-23
/// </summary>
public static string SuckingDisc_Air = "SuckingDisc_Air";
///// <summary>
///// 左侧门关闭 DoorColse_Single X20 DI-24
///// </summary>
......@@ -126,11 +124,11 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// 吸盘气缸上升端 SuckingDisc_Up X07 DI-07
/// </summary>
public static string SuckingDisc_Up = "SuckingDisc_Up";
public static string ClampingDisc_Up = "SuckingDisc_Up";
/// <summary>
/// 吸盘气缸下降端 SuckingDisc_Down X08 DI-08
/// </summary>
public static string SuckingDisc_Down = "SuckingDisc_Down";
public static string ClampingDisc_Down = "SuckingDisc_Down";
/// <summary>
/// 料盘宽度检测1 WidthCheck1 208 X09 DI-09
/// </summary>
......@@ -163,8 +161,8 @@ namespace OnlineStore.LoadCSVLibrary
/// 压紧机构计量检测 CompressAxis_Check X16 DI-16
/// </summary>
public static string CompressAxis_Check = "CompressAxis_Check";
/// <summary>
/// 安全光栅
/// </summary>
......@@ -175,10 +173,7 @@ namespace OnlineStore.LoadCSVLibrary
public static string CameraLight_Power = "CameraLight_Power";
/// <summary>
/// DO 吸盘吸料SOL SuckingDisc_Work 107 192.168.200.10 0 吸盘吸料SOL Y08 DO-08
/// </summary>
public static string SuckingDisc_Work = "SuckingDisc_Work";
/// <summary>
/// DO DisableDoorControl 禁用门禁功能
/// </summary>
......@@ -212,5 +207,35 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public static string TrayCheck_Door = "TrayCheck_Door";
/// <summary>
/// DI 左侧门关闭 LeftDoorColse_Single
/// </summary>
public static string LeftDoorColse_Single = "LeftDoorColse_Single";
/// <summary>
/// DI 右侧门关闭 RightDoorColse_Single
/// </summary>
public static string RightDoorColse_Single = "RightDoorColse_Single";
/// <summary>
/// 夹爪气缸夹紧端 Clamping_Work
/// </summary>
public static string Clamping_Work = "Clamping_Work";
/// <summary>
/// 夹爪气缸放松端 Clamping_Relax
/// </summary>
public static string Clamping_Relax = "Clamping_Relax";
/// <summary>
/// 吸盘压力确认信号 SuckingDisc_Air 202 192.168.200.11 0 吸盘压力确认信号 X19 DI-23
/// </summary>
public static string SuckingDisc_Air = "SuckingDisc_Air";
/// <summary>
/// DO 吸盘吸料SOL SuckingDisc_Work 107 192.168.200.10 0 吸盘吸料SOL Y08 DO-08
/// </summary>
public static string SuckingDisc_Work = "SuckingDisc_Work";
}
}
......@@ -34,7 +34,26 @@ namespace UserFromControl
pictureBox2.Visible = false;
isCanClick = false;
}
public IOTextControl(string ioName, string name, int widht = 220, int height = 25, int ioValue = 0, bool canClick = false, int tabIndex = 0)
{
InitializeComponent();
if (ImageManager.IsInit == false)
{
ImageManager.Init();
}
this.pictureBox1.BackgroundImage = ImageManager.imgGrey;
this.pictureBox2.BackgroundImage = ImageManager.imgGreen;
pictureBox1.Visible = true;
pictureBox2.Visible = false;
isCanClick = false;
IOName = ioName;
IOValue = IOValue;
isCanClick = canClick;
Name = "IO_" + name;
Size = new System.Drawing.Size(widht, height);
TabIndex = tabIndex;
}
public void ShowData()
{
label1.Text = IOName;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!