Commit e42042fd 刘韬

加入T4进出轴代码

1 个父辈 6847c33d
...@@ -101,6 +101,8 @@ namespace OnlineStore.Common ...@@ -101,6 +101,8 @@ namespace OnlineStore.Common
public static string CurrShelfNum = "CurrShelfNum"; public static string CurrShelfNum = "CurrShelfNum";
public static string CurrShelfType = "CurrShelfType"; public static string CurrShelfType = "CurrShelfType";
//是否有T4进出轴
public static string HasT4Axis = "HasT4Axis";
} }
} }
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<add key ="CurrShelfNum" value ="-1"/> <add key ="CurrShelfNum" value ="-1"/>
<!--当前料架信息-料架类型,0=空料架,1=入库料架,2=出库料架--> <!--当前料架信息-料架类型,0=空料架,1=入库料架,2=出库料架-->
<add key ="CurrShelfType" value ="-1"/> <add key ="CurrShelfType" value ="-1"/>
<add key ="HasT4Axis" value ="true"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -56,6 +56,14 @@ namespace OnlineStore.DUOStore ...@@ -56,6 +56,14 @@ namespace OnlineStore.DUOStore
this.txtMiddleP3 = new System.Windows.Forms.TextBox(); this.txtMiddleP3 = new System.Windows.Forms.TextBox();
this.btnMiddleP3 = new System.Windows.Forms.Button(); this.btnMiddleP3 = new System.Windows.Forms.Button();
this.axisMoveControl1 = new OnlineStore.DUOStore.AxisMoveControl(); this.axisMoveControl1 = new OnlineStore.DUOStore.AxisMoveControl();
this.btnInOutP3 = new System.Windows.Forms.Button();
this.txtInOutP3 = new System.Windows.Forms.TextBox();
this.btnInOutP2 = new System.Windows.Forms.Button();
this.btnInOutP1 = new System.Windows.Forms.Button();
this.txtInOutP2 = new System.Windows.Forms.TextBox();
this.txtInOutP1 = new System.Windows.Forms.TextBox();
this.btnInOutP4 = new System.Windows.Forms.Button();
this.txtInOutP4 = new System.Windows.Forms.TextBox();
this.groupInout.SuspendLayout(); this.groupInout.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -75,20 +83,28 @@ namespace OnlineStore.DUOStore ...@@ -75,20 +83,28 @@ namespace OnlineStore.DUOStore
this.groupInout.Controls.Add(this.btnAxisOn); this.groupInout.Controls.Add(this.btnAxisOn);
this.groupInout.Controls.Add(this.txtUpdownP5); this.groupInout.Controls.Add(this.txtUpdownP5);
this.groupInout.Controls.Add(this.btnUpdownP5); this.groupInout.Controls.Add(this.btnUpdownP5);
this.groupInout.Controls.Add(this.txtInOutP4);
this.groupInout.Controls.Add(this.txtUpdownP4); this.groupInout.Controls.Add(this.txtUpdownP4);
this.groupInout.Controls.Add(this.btnInOutP4);
this.groupInout.Controls.Add(this.btnUpdownP4); this.groupInout.Controls.Add(this.btnUpdownP4);
this.groupInout.Controls.Add(this.txtInOutP1);
this.groupInout.Controls.Add(this.txtUpdownP1); this.groupInout.Controls.Add(this.txtUpdownP1);
this.groupInout.Controls.Add(this.txtInOutP2);
this.groupInout.Controls.Add(this.txtUpdownP2); this.groupInout.Controls.Add(this.txtUpdownP2);
this.groupInout.Controls.Add(this.txtMiddleP1); this.groupInout.Controls.Add(this.txtMiddleP1);
this.groupInout.Controls.Add(this.txtBatchP1); this.groupInout.Controls.Add(this.txtBatchP1);
this.groupInout.Controls.Add(this.txtBatchP2); this.groupInout.Controls.Add(this.txtBatchP2);
this.groupInout.Controls.Add(this.txtMiddleP2); this.groupInout.Controls.Add(this.txtMiddleP2);
this.groupInout.Controls.Add(this.btnInOutP1);
this.groupInout.Controls.Add(this.btnInOutP2);
this.groupInout.Controls.Add(this.btnUpdownP1); this.groupInout.Controls.Add(this.btnUpdownP1);
this.groupInout.Controls.Add(this.btnUpdownP2); this.groupInout.Controls.Add(this.btnUpdownP2);
this.groupInout.Controls.Add(this.btnMiddleP1); this.groupInout.Controls.Add(this.btnMiddleP1);
this.groupInout.Controls.Add(this.btnBatchP1); this.groupInout.Controls.Add(this.btnBatchP1);
this.groupInout.Controls.Add(this.btnBatchP2); this.groupInout.Controls.Add(this.btnBatchP2);
this.groupInout.Controls.Add(this.txtInOutP3);
this.groupInout.Controls.Add(this.btnMiddleP2); this.groupInout.Controls.Add(this.btnMiddleP2);
this.groupInout.Controls.Add(this.btnInOutP3);
this.groupInout.Controls.Add(this.txtUpdownP3); this.groupInout.Controls.Add(this.txtUpdownP3);
this.groupInout.Controls.Add(this.btnUpdownP3); this.groupInout.Controls.Add(this.btnUpdownP3);
this.groupInout.Controls.Add(this.txtMiddleP3); this.groupInout.Controls.Add(this.txtMiddleP3);
...@@ -96,7 +112,7 @@ namespace OnlineStore.DUOStore ...@@ -96,7 +112,7 @@ namespace OnlineStore.DUOStore
this.groupInout.Enabled = false; this.groupInout.Enabled = false;
this.groupInout.Location = new System.Drawing.Point(12, 308); this.groupInout.Location = new System.Drawing.Point(12, 308);
this.groupInout.Name = "groupInout"; this.groupInout.Name = "groupInout";
this.groupInout.Size = new System.Drawing.Size(851, 274); this.groupInout.Size = new System.Drawing.Size(1163, 274);
this.groupInout.TabIndex = 100; this.groupInout.TabIndex = 100;
this.groupInout.TabStop = false; this.groupInout.TabStop = false;
this.groupInout.Text = "提升机构位置信息"; this.groupInout.Text = "提升机构位置信息";
...@@ -104,7 +120,7 @@ namespace OnlineStore.DUOStore ...@@ -104,7 +120,7 @@ namespace OnlineStore.DUOStore
// btnSaveP // btnSaveP
// //
this.btnSaveP.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSaveP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveP.Location = new System.Drawing.Point(682, 187); this.btnSaveP.Location = new System.Drawing.Point(1014, 180);
this.btnSaveP.Name = "btnSaveP"; this.btnSaveP.Name = "btnSaveP";
this.btnSaveP.Size = new System.Drawing.Size(128, 39); this.btnSaveP.Size = new System.Drawing.Size(128, 39);
this.btnSaveP.TabIndex = 313; this.btnSaveP.TabIndex = 313;
...@@ -164,7 +180,7 @@ namespace OnlineStore.DUOStore ...@@ -164,7 +180,7 @@ namespace OnlineStore.DUOStore
// btnAxisOff // btnAxisOff
// //
this.btnAxisOff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAxisOff.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisOff.Location = new System.Drawing.Point(682, 107); this.btnAxisOff.Location = new System.Drawing.Point(1014, 100);
this.btnAxisOff.Name = "btnAxisOff"; this.btnAxisOff.Name = "btnAxisOff";
this.btnAxisOff.Size = new System.Drawing.Size(128, 39); this.btnAxisOff.Size = new System.Drawing.Size(128, 39);
this.btnAxisOff.TabIndex = 276; this.btnAxisOff.TabIndex = 276;
...@@ -194,7 +210,7 @@ namespace OnlineStore.DUOStore ...@@ -194,7 +210,7 @@ namespace OnlineStore.DUOStore
// btnAxisOn // btnAxisOn
// //
this.btnAxisOn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAxisOn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisOn.Location = new System.Drawing.Point(682, 62); this.btnAxisOn.Location = new System.Drawing.Point(1014, 55);
this.btnAxisOn.Name = "btnAxisOn"; this.btnAxisOn.Name = "btnAxisOn";
this.btnAxisOn.Size = new System.Drawing.Size(128, 39); this.btnAxisOn.Size = new System.Drawing.Size(128, 39);
this.btnAxisOn.TabIndex = 275; this.btnAxisOn.TabIndex = 275;
...@@ -549,11 +565,147 @@ namespace OnlineStore.DUOStore ...@@ -549,11 +565,147 @@ namespace OnlineStore.DUOStore
this.axisMoveControl1.Size = new System.Drawing.Size(735, 305); this.axisMoveControl1.Size = new System.Drawing.Size(735, 305);
this.axisMoveControl1.TabIndex = 274; this.axisMoveControl1.TabIndex = 274;
// //
// btnInOutP3
//
this.btnInOutP3.AutoSize = true;
this.btnInOutP3.BackColor = System.Drawing.SystemColors.Control;
this.btnInOutP3.Cursor = System.Windows.Forms.Cursors.Default;
this.btnInOutP3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP3.ForeColor = System.Drawing.Color.DarkGoldenrod;
this.btnInOutP3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP3.Location = new System.Drawing.Point(683, 104);
this.btnInOutP3.Name = "btnInOutP3";
this.btnInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP3.Size = new System.Drawing.Size(205, 33);
this.btnInOutP3.TabIndex = 226;
this.btnInOutP3.Text = "T4_进出轴13寸取料点P3";
this.btnInOutP3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP3.UseVisualStyleBackColor = false;
this.btnInOutP3.Click += new System.EventHandler(this.btnInOutP3_Click);
//
// txtInOutP3
//
this.txtInOutP3.AcceptsReturn = true;
this.txtInOutP3.BackColor = System.Drawing.SystemColors.Window;
this.txtInOutP3.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP3.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP3.Location = new System.Drawing.Point(894, 109);
this.txtInOutP3.MaxLength = 0;
this.txtInOutP3.Name = "txtInOutP3";
this.txtInOutP3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtInOutP3.Size = new System.Drawing.Size(89, 23);
this.txtInOutP3.TabIndex = 227;
this.txtInOutP3.Text = "999999";
//
// btnInOutP2
//
this.btnInOutP2.AutoSize = true;
this.btnInOutP2.BackColor = System.Drawing.SystemColors.Control;
this.btnInOutP2.Cursor = System.Windows.Forms.Cursors.Default;
this.btnInOutP2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP2.ForeColor = System.Drawing.Color.DarkGoldenrod;
this.btnInOutP2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP2.Location = new System.Drawing.Point(683, 66);
this.btnInOutP2.Name = "btnInOutP2";
this.btnInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP2.Size = new System.Drawing.Size(205, 33);
this.btnInOutP2.TabIndex = 303;
this.btnInOutP2.Text = "T4_进出轴7寸取料点P2";
this.btnInOutP2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP2.UseVisualStyleBackColor = false;
this.btnInOutP2.Click += new System.EventHandler(this.btnInOutP2_Click);
//
// btnInOutP1
//
this.btnInOutP1.AutoSize = true;
this.btnInOutP1.BackColor = System.Drawing.SystemColors.Control;
this.btnInOutP1.Cursor = System.Windows.Forms.Cursors.Default;
this.btnInOutP1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP1.ForeColor = System.Drawing.Color.DarkGoldenrod;
this.btnInOutP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP1.Location = new System.Drawing.Point(683, 28);
this.btnInOutP1.Name = "btnInOutP1";
this.btnInOutP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP1.Size = new System.Drawing.Size(205, 33);
this.btnInOutP1.TabIndex = 305;
this.btnInOutP1.Text = "T4_进出轴待机点 P1";
this.btnInOutP1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP1.UseVisualStyleBackColor = false;
this.btnInOutP1.Click += new System.EventHandler(this.btnInOutP1_Click);
//
// txtInOutP2
//
this.txtInOutP2.AcceptsReturn = true;
this.txtInOutP2.BackColor = System.Drawing.SystemColors.Window;
this.txtInOutP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP2.Location = new System.Drawing.Point(894, 71);
this.txtInOutP2.MaxLength = 20;
this.txtInOutP2.Name = "txtInOutP2";
this.txtInOutP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtInOutP2.Size = new System.Drawing.Size(89, 23);
this.txtInOutP2.TabIndex = 304;
this.txtInOutP2.Text = "999999";
//
// txtInOutP1
//
this.txtInOutP1.AcceptsReturn = true;
this.txtInOutP1.BackColor = System.Drawing.SystemColors.Window;
this.txtInOutP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP1.Location = new System.Drawing.Point(895, 33);
this.txtInOutP1.MaxLength = 20;
this.txtInOutP1.Name = "txtInOutP1";
this.txtInOutP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtInOutP1.Size = new System.Drawing.Size(89, 23);
this.txtInOutP1.TabIndex = 306;
this.txtInOutP1.Text = "999999";
//
// btnInOutP4
//
this.btnInOutP4.AutoSize = true;
this.btnInOutP4.BackColor = System.Drawing.SystemColors.Control;
this.btnInOutP4.Cursor = System.Windows.Forms.Cursors.Default;
this.btnInOutP4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutP4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutP4.ForeColor = System.Drawing.Color.DarkGoldenrod;
this.btnInOutP4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP4.Location = new System.Drawing.Point(683, 142);
this.btnInOutP4.Name = "btnInOutP4";
this.btnInOutP4.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnInOutP4.Size = new System.Drawing.Size(205, 33);
this.btnInOutP4.TabIndex = 307;
this.btnInOutP4.Text = "T4_进出轴放料点P4";
this.btnInOutP4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnInOutP4.UseVisualStyleBackColor = false;
this.btnInOutP4.Click += new System.EventHandler(this.btnInOutP4_Click);
//
// txtInOutP4
//
this.txtInOutP4.AcceptsReturn = true;
this.txtInOutP4.BackColor = System.Drawing.SystemColors.Window;
this.txtInOutP4.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtInOutP4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutP4.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtInOutP4.Location = new System.Drawing.Point(894, 147);
this.txtInOutP4.MaxLength = 0;
this.txtInOutP4.Name = "txtInOutP4";
this.txtInOutP4.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtInOutP4.Size = new System.Drawing.Size(89, 23);
this.txtInOutP4.TabIndex = 308;
this.txtInOutP4.Text = "999999";
//
// FrmAxisMove // FrmAxisMove
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(964, 630); this.ClientSize = new System.Drawing.Size(1231, 630);
this.Controls.Add(this.groupInout); this.Controls.Add(this.groupInout);
this.Controls.Add(this.axisMoveControl1); this.Controls.Add(this.axisMoveControl1);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -601,6 +753,14 @@ namespace OnlineStore.DUOStore ...@@ -601,6 +753,14 @@ namespace OnlineStore.DUOStore
private System.Windows.Forms.Button btnSaveP; private System.Windows.Forms.Button btnSaveP;
public System.Windows.Forms.TextBox txtT2P4; public System.Windows.Forms.TextBox txtT2P4;
public System.Windows.Forms.Button btnT2P4; public System.Windows.Forms.Button btnT2P4;
public System.Windows.Forms.TextBox txtInOutP4;
public System.Windows.Forms.Button btnInOutP4;
public System.Windows.Forms.TextBox txtInOutP1;
public System.Windows.Forms.TextBox txtInOutP2;
public System.Windows.Forms.Button btnInOutP1;
public System.Windows.Forms.Button btnInOutP2;
public System.Windows.Forms.TextBox txtInOutP3;
public System.Windows.Forms.Button btnInOutP3;
} }
} }
...@@ -56,6 +56,13 @@ namespace OnlineStore.DUOStore ...@@ -56,6 +56,13 @@ namespace OnlineStore.DUOStore
txtUpdownP5.Text = StoreManager.Store.Config.UpdownAxis_P5.ToString(); txtUpdownP5.Text = StoreManager.Store.Config.UpdownAxis_P5.ToString();
txtUpdownP6.Text = StoreManager.Store.Config.UpdownAxis_P6.ToString(); txtUpdownP6.Text = StoreManager.Store.Config.UpdownAxis_P6.ToString();
txtInOutP1.Text = StoreManager.Store.Config.InOutAxis_P1.ToString();
txtInOutP2.Text = StoreManager.Store.Config.InOutAxis_P2.ToString();
txtInOutP3.Text = StoreManager.Store.Config.InOutAxis_P3.ToString();
txtInOutP4.Text = StoreManager.Store.Config.InOutAxis_P4.ToString();
} }
internal void DebugStatus(bool isDebug) internal void DebugStatus(bool isDebug)
{ {
...@@ -136,6 +143,25 @@ namespace OnlineStore.DUOStore ...@@ -136,6 +143,25 @@ namespace OnlineStore.DUOStore
AxisABSMove(StoreManager.Store.T3_UpdownAxis, txtUpdownP6, StoreManager.Store.Config.UpdownAxis_P6Speed); AxisABSMove(StoreManager.Store.T3_UpdownAxis, txtUpdownP6, StoreManager.Store.Config.UpdownAxis_P6Speed);
} }
private void btnInOutP1_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T4_InOut_Axis, txtInOutP1, StoreManager.Store.Config.InOutAxis_P1Speed);
}
private void btnInOutP2_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T4_InOut_Axis, txtInOutP2, StoreManager.Store.Config.InOutAxis_P2Speed);
}
private void btnInOutP3_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T4_InOut_Axis, txtInOutP3, StoreManager.Store.Config.InOutAxis_P3Speed);
}
private void btnInOutP4_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T4_InOut_Axis, txtInOutP4, StoreManager.Store.Config.InOutAxis_P4Speed);
}
private void btnSaveP_Click(object sender, EventArgs e) private void btnSaveP_Click(object sender, EventArgs e)
{ {
Store_Config config = StoreManager.Config; Store_Config config = StoreManager.Config;
...@@ -152,6 +178,11 @@ namespace OnlineStore.DUOStore ...@@ -152,6 +178,11 @@ namespace OnlineStore.DUOStore
config.UpdownAxis_P5 = FormUtil.GetIntValue(txtUpdownP5); config.UpdownAxis_P5 = FormUtil.GetIntValue(txtUpdownP5);
config.UpdownAxis_P6 = FormUtil.GetIntValue(txtUpdownP6); config.UpdownAxis_P6 = FormUtil.GetIntValue(txtUpdownP6);
config.InOutAxis_P1 = FormUtil.GetIntValue(txtInOutP1);
config.InOutAxis_P2 = FormUtil.GetIntValue(txtInOutP2);
config.InOutAxis_P3 = FormUtil.GetIntValue(txtInOutP3);
config.InOutAxis_P4 = FormUtil.GetIntValue(txtInOutP4);
bool result = StoreManager.UpdateStoreConfig(config); bool result = StoreManager.UpdateStoreConfig(config);
if (result) if (result)
{ {
...@@ -183,5 +214,6 @@ namespace OnlineStore.DUOStore ...@@ -183,5 +214,6 @@ namespace OnlineStore.DUOStore
{ {
AxisABSMove(StoreManager.Store.T2_MiddleAxis, txtT2P4, StoreManager.Store.Config.MiddleAxis_P4Speed); AxisABSMove(StoreManager.Store.T2_MiddleAxis, txtT2P4, StoreManager.Store.Config.MiddleAxis_P4Speed);
} }
} }
} }
...@@ -305,12 +305,12 @@ namespace OnlineStore.DUOStore ...@@ -305,12 +305,12 @@ namespace OnlineStore.DUOStore
private void btnClamp_Click(object sender, EventArgs e) private void btnClamp_Click(object sender, EventArgs e)
{ {
ElectricClamp.Clamp(); ElectricGripper.Clamp();
} }
private void btnRelax_Click(object sender, EventArgs e) private void btnRelax_Click(object sender, EventArgs e)
{ {
ElectricClamp.Release(); ElectricGripper.Release();
} }
private void btnLDoorUp_Click(object sender, EventArgs e) private void btnLDoorUp_Click(object sender, EventArgs e)
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<Compile Include="duoStore\BoxBean_Partial.cs" /> <Compile Include="duoStore\BoxBean_Partial.cs" />
<Compile Include="duoStore\BoxBean_Shelf.cs" /> <Compile Include="duoStore\BoxBean_Shelf.cs" />
<Compile Include="duoStore\DUOStoreBean_Partial.cs" /> <Compile Include="duoStore\DUOStoreBean_Partial.cs" />
<Compile Include="duoStore\ElectricClamp.cs" /> <Compile Include="duoStore\ElectricGripper.cs" />
<Compile Include="duoStore\EquipBase.cs" /> <Compile Include="duoStore\EquipBase.cs" />
<Compile Include="duoStore\HumitureBean.cs" /> <Compile Include="duoStore\HumitureBean.cs" />
<Compile Include="duoStore\DUOStoreBean.cs" /> <Compile Include="duoStore\DUOStoreBean.cs" />
......
...@@ -125,6 +125,14 @@ PRO,0,T3_升降轴P4速度/快速度,UpdownAxis_P4Speed,503,,,,,,,,,,,, ...@@ -125,6 +125,14 @@ PRO,0,T3_升降轴P4速度/快速度,UpdownAxis_P4Speed,503,,,,,,,,,,,,
PRO,0,T3_升降轴P5速度/慢速度,UpdownAxis_P5Speed,504,,,,,,,,,,,, PRO,0,T3_升降轴P5速度/慢速度,UpdownAxis_P5Speed,504,,,,,,,,,,,,
PRO,0,T32_升降轴P6速度/快速度,UpdownAxis_P6Speed,505,,,,,,,,,,,, PRO,0,T32_升降轴P6速度/快速度,UpdownAxis_P6Speed,505,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,T4_进出轴待机点 P1,InOutAxis_P1,5000,,,,,,,,,,,,
PRO,0,T4_进出轴7寸取料点P2,InOutAxis_P2,5000,,,,,,,,,,,,
PRO,0,T4_进出轴13寸取料点P3,InOutAxis_P3,5000,,,,,,,,,,,,
PRO,0,T4_进出轴放料点P4,InOutAxis_P4,5000,,,,,,,,,,,,
PRO,0,T4_进出轴待机点 P1Speed,InOutAxis_P1Speed,5000,,,,,,,,,,,,
PRO,0,T4_进出轴7寸取料点P2Speed,InOutAxis_P2Speed,5000,,,,,,,,,,,,
PRO,0,T4_进出轴13寸取料点P3Speed,InOutAxis_P3Speed,5000,,,,,,,,,,,,
PRO,0,T4_进出轴放料点P4Speed,InOutAxis_P4Speed,5000,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,, PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,,
PRO,,预警湿度,WarnHumidity,80,,,,,,,,,,,, PRO,,预警湿度,WarnHumidity,80,,,,,,,,,,,,
......
...@@ -26,12 +26,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -26,12 +26,12 @@ namespace OnlineStore.DeviceLibrary
/// 取料提升机构气缸 /// 取料提升机构气缸
/// </summary> /// </summary>
//public HoisterCylinder hoisterCylinder = new HoisterCylinder(0); //public HoisterCylinder hoisterCylinder = new HoisterCylinder(0);
public ElectricClamp electricClamp = new ElectricClamp(0); public ElectricGripper electricClamp = new ElectricGripper(0);
public AxisBean T1_BatchAxis = null; public AxisBean T1_BatchAxis = null;
public AxisBean T2_MiddleAxis = null; public AxisBean T2_MiddleAxis = null;
public AxisBean T3_UpdownAxis = null; public AxisBean T3_UpdownAxis = null;
public AxisBean T4_InOut_Axis = null; public AxisBean T4_InOut_Axis = null;
public bool HasT4Axis = false;
#region 初始化 #region 初始化
...@@ -75,9 +75,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,9 +75,10 @@ namespace OnlineStore.DeviceLibrary
CodeManager.LoadConfig(); CodeManager.LoadConfig();
CurrShelfNum = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfNum); CurrShelfNum = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfNum);
CurrShelfType = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfType); CurrShelfType = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfType);
HasT4Axis = Convert.ToBoolean(ConfigAppSettings.GetValue(Setting_Init.HasT4Axis));
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
// RFIDManager.RfidReader.Open(rfidList.ToArray()); //RFIDManager.RfidReader.Open(rfidList.ToArray());
IOManager.instance.ConnectionIOList(ioList); IOManager.instance.ConnectionIOList(ioList);
IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW); IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
...@@ -218,9 +219,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -218,9 +219,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LR_02_LineRun)) else if (MoveInfo.IsStep(StoreMoveStep.LR_02_LineRun))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LR_03_BatchAxisHome); MoveInfo.NextMoveStep(StoreMoveStep.LR_03_BatchAxisHome);
LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :夹爪放松,提升轴回原点,上下轴回原点,流水线停止"); LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :夹爪回原点,提升轴回原点,上下轴回原点,流水线停止");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
ElectricClamp.Release(MoveInfo); ElectricGripper.HomeReset(MoveInfo);
T1_BatchAxis.HomeMove(MoveInfo); T1_BatchAxis.HomeMove(MoveInfo);
T3_UpdownAxis.HomeMove(MoveInfo); T3_UpdownAxis.HomeMove(MoveInfo);
LineStop(MoveInfo); LineStop(MoveInfo);
...@@ -228,11 +230,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -228,11 +230,11 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LR_03_BatchAxisHome)) else if (MoveInfo.IsStep(StoreMoveStep.LR_03_BatchAxisHome))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LR_04_BatchToP1); MoveInfo.NextMoveStep(StoreMoveStep.LR_04_BatchToP1);
LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :提升轴到P1点["+ Config.BatchAxis_P1 + "],上下轴到待机点P2["+ Config.UpdownAxis_P2 + "]"); LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :夹爪放松,提升轴到P1点["+ Config.BatchAxis_P1 + "],上下轴到待机点P2["+ Config.UpdownAxis_P2 + "]");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
T1_BatchAxis.AbsMove(MoveInfo, Config.BatchAxis_P1, Config.BatchAxis_P1Speed); T1_BatchAxis.AbsMove(MoveInfo, Config.BatchAxis_P1, Config.BatchAxis_P1Speed);
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
ElectricGripper.Release(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LR_04_BatchToP1)) else if (MoveInfo.IsStep(StoreMoveStep.LR_04_BatchToP1))
{ {
......
...@@ -247,12 +247,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -247,12 +247,16 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("取料, BOX1 升降轴到料门口高点[" + Config.UpdownAxis_P4 + "],旋转轴到料仓门口 P2 [" + Config.MiddleAxis_P2 + "]"); InOutStoreLog("取料, BOX1 升降轴到料门口高点[" + Config.UpdownAxis_P4 + "],旋转轴到料仓门口 P2 [" + Config.MiddleAxis_P2 + "]");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P4, Config.UpdownAxis_P4Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P4, Config.UpdownAxis_P4Speed);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P2, Config.MiddleAxis_P2Speed); T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P2, Config.MiddleAxis_P2Speed);
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P2, Config.InOutAxis_P2Speed);
} }
else else
{ {
InOutStoreLog("取料, BOX2 升降轴到料门口高点[" + Config.UpdownAxis_P6 + "],旋转轴到料仓门口 P3 [" + Config.MiddleAxis_P3 + "]"); InOutStoreLog("取料, BOX2 升降轴到料门口高点[" + Config.UpdownAxis_P6 + "],旋转轴到料仓门口 P3 [" + Config.MiddleAxis_P3 + "]");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P6, Config.UpdownAxis_P6Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P6, Config.UpdownAxis_P6Speed);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P3, Config.MiddleAxis_P3Speed); T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P3, Config.MiddleAxis_P3Speed);
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P3, Config.InOutAxis_P3Speed);
} }
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_12_ToBoxDoor)) else if (MoveInfo.IsStep(StoreMoveStep.LO_12_ToBoxDoor))
...@@ -273,7 +277,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -273,7 +277,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LO_14_CylinderTighten); MoveInfo.NextMoveStep(StoreMoveStep.LO_14_CylinderTighten);
InOutStoreLog("取料:夹爪气缸夹紧"); InOutStoreLog("取料:夹爪气缸夹紧");
ElectricClamp.Clamp(MoveInfo); ElectricGripper.Clamp(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_14_CylinderTighten)) else if (MoveInfo.IsStep(StoreMoveStep.LO_14_CylinderTighten))
{ {
...@@ -294,6 +298,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -294,6 +298,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LO_16_MiddleToP1); MoveInfo.NextMoveStep(StoreMoveStep.LO_16_MiddleToP1);
InOutStoreLog("取料:旋转轴到料串位置P1 ["+Config.MiddleAxis_P1+"]"); InOutStoreLog("取料:旋转轴到料串位置P1 ["+Config.MiddleAxis_P1+"]");
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P1, Config.MiddleAxis_P1Speed); T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P1, Config.MiddleAxis_P1Speed);
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P4, Config.InOutAxis_P4Speed);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_16_MiddleToP1)) else if (MoveInfo.IsStep(StoreMoveStep.LO_16_MiddleToP1))
{ {
...@@ -311,13 +317,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -311,13 +317,15 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LO_19_CylinderRelax); MoveInfo.NextMoveStep(StoreMoveStep.LO_19_CylinderRelax);
InOutStoreLog("料盘移栽: 夹爪气缸放松"); InOutStoreLog("料盘移栽: 夹爪气缸放松");
ElectricClamp.Release(MoveInfo); ElectricGripper.Release(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_19_CylinderRelax)) else if (MoveInfo.IsStep(StoreMoveStep.LO_19_CylinderRelax))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LO_20_UpdownUp); MoveInfo.NextMoveStep(StoreMoveStep.LO_20_UpdownUp);
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P1Speed);
//只有提升轴位置过低时才需要到P3 //只有提升轴位置过低时才需要到P3
int currPosition = T1_BatchAxis.GetAclPosition(); int currPosition = T1_BatchAxis.GetAclPosition();
if (currPosition <= (Config.BatchAxis_P1 + Config.BatchAxis_ChangeValue * 40)) if (currPosition <= (Config.BatchAxis_P1 + Config.BatchAxis_ChangeValue * 40))
...@@ -648,6 +656,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -648,6 +656,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LI_11_AxisToTray); MoveInfo.NextMoveStep(StoreMoveStep.LI_11_AxisToTray);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
InOutStoreLog("入料检测:有料盘:升降轴到料串高点P2["+ Config.UpdownAxis_P2 + "],旋转轴到料串位置P4["+ Config.MiddleAxis_P4 + "]"); InOutStoreLog("入料检测:有料盘:升降轴到料串高点P2["+ Config.UpdownAxis_P2 + "],旋转轴到料串位置P4["+ Config.MiddleAxis_P4 + "]");
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P4, Config.InOutAxis_P1Speed);
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P4, Config.MiddleAxis_P4Speed); T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P4, Config.MiddleAxis_P4Speed);
} }
...@@ -664,7 +674,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -664,7 +674,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LI_13_CylinderTighten); MoveInfo.NextMoveStep(StoreMoveStep.LI_13_CylinderTighten);
InOutStoreLog("取料:夹爪气缸夹紧"); InOutStoreLog("取料:夹爪气缸夹紧");
ElectricClamp.Clamp(MoveInfo); ElectricGripper.Clamp(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_13_CylinderTighten)) else if (MoveInfo.IsStep(StoreMoveStep.LI_13_CylinderTighten))
{ {
...@@ -687,14 +697,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -687,14 +697,16 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LI_16_BatchAxisToP2)) else if (MoveInfo.IsStep(StoreMoveStep.LI_16_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LI_17_SaveSize); MoveInfo.NextMoveStep(StoreMoveStep.LI_17_SaveSize);
InOutStoreLog("取料:记录高度尺寸");
LastWidth = GetWidth(); LastWidth = GetWidth();
LastHeight = GetHeight(); LastHeight = GetHeight();
InOutStoreLog($"取料:记录高度尺寸 LastWidth:{LastWidth}, LastHeight{LastHeight}");
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_17_SaveSize)) else if (MoveInfo.IsStep(StoreMoveStep.LI_17_SaveSize))
{ {
LI_18_GetPosID(); LI_18_GetPosID();
InOutStoreLog("取料:进出轴回到待机点到P1 [" + Config.InOutAxis_P1 + "],计算高度,");
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P1Speed);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_18_GetPosID)) else if (MoveInfo.IsStep(StoreMoveStep.LI_18_GetPosID))
...@@ -744,12 +756,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -744,12 +756,16 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("料盘移栽:获取库位号完成, BOX " + storeId + " 升降轴到料门口高点P4[" + Config.UpdownAxis_P4 + "],旋转轴到料仓门口 P2[" + Config.MiddleAxis_P2 + "]"); InOutStoreLog("料盘移栽:获取库位号完成, BOX " + storeId + " 升降轴到料门口高点P4[" + Config.UpdownAxis_P4 + "],旋转轴到料仓门口 P2[" + Config.MiddleAxis_P2 + "]");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P4, Config.UpdownAxis_P4Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P4, Config.UpdownAxis_P4Speed);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P2, Config.MiddleAxis_P2Speed); T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P2, Config.MiddleAxis_P2Speed);
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P2, Config.InOutAxis_P2Speed);
} }
else else
{ {
InOutStoreLog("料盘移栽:获取库位号完成, BOX " + storeId + " 升降轴到料门口高点P6[" + Config.UpdownAxis_P6 + "],旋转轴到料仓门口 P3[" + Config.MiddleAxis_P3 + "]"); InOutStoreLog("料盘移栽:获取库位号完成, BOX " + storeId + " 升降轴到料门口高点P6[" + Config.UpdownAxis_P6 + "],旋转轴到料仓门口 P3[" + Config.MiddleAxis_P3 + "]");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P6, Config.UpdownAxis_P6Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P6, Config.UpdownAxis_P6Speed);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P3, Config.MiddleAxis_P3Speed); T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P3, Config.MiddleAxis_P3Speed);
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P3, Config.InOutAxis_P3Speed);
} }
ClearTimeoutAlarm("入料口无料盘"); ClearTimeoutAlarm("入料口无料盘");
...@@ -780,7 +796,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -780,7 +796,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LI_24_CylinderRelax); MoveInfo.NextMoveStep(StoreMoveStep.LI_24_CylinderRelax);
InOutStoreLog("料盘移栽: 上料气缸放松"); InOutStoreLog("料盘移栽: 上料气缸放松");
ElectricClamp.Release(MoveInfo); ElectricGripper.Release(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_24_CylinderRelax)) else if (MoveInfo.IsStep(StoreMoveStep.LI_24_CylinderRelax))
{ {
...@@ -803,6 +819,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -803,6 +819,8 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("料盘移栽:旋转轴返回待机点P1["+ Config.MiddleAxis_P1 + "],升降轴到料串高点P2["+ Config.UpdownAxis_P2 + "]"); InOutStoreLog("料盘移栽:旋转轴返回待机点P1["+ Config.MiddleAxis_P1 + "],升降轴到料串高点P2["+ Config.UpdownAxis_P2 + "]");
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P1, Config.MiddleAxis_P1Speed); T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P1, Config.MiddleAxis_P1Speed);
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P1Speed);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_26_AxisToWait)) else if (MoveInfo.IsStep(StoreMoveStep.LI_26_AxisToWait))
{ {
...@@ -1179,6 +1197,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -1179,6 +1197,9 @@ namespace OnlineStore.DeviceLibrary
public int GetWidth() public int GetWidth()
{ {
if (IOManager.IOValue(IO_Type.TrayCheck_11to15, 0).Equals(IO_VALUE.HIGH))
return 13;
return 7; return 7;
} }
......
...@@ -7,44 +7,55 @@ using System.Threading.Tasks; ...@@ -7,44 +7,55 @@ using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class ElectricClamp public class ElectricGripper
{ {
private static int subType = 0; private static int subType = 0;
public static bool needClamp = false; public static Enum GripperType = GripperTypeE.None;
public ElectricClamp(int subType) public ElectricGripper(int subType)
{ {
//this.subType = subType; //this.subType = subType;
} }
public static void Clamp(StoreMoveInfo moveInfo = null) public static void Clamp(StoreMoveInfo moveInfo = null)
{ {
needClamp = true; GripperType = GripperTypeE.Gripper;
if (!IsBusy) if (!IsBusy)
{ {
IOManager.IOMove(IO_Type.Clamp_SetPos0, IO_VALUE.LOW, subType); setAction("01000");
IOManager.IOMove(IO_Type.Clamp_SetPos1, IO_VALUE.HIGH, subType);
IOManager.IOMove(IO_Type.Clamp_DoAction, IO_VALUE.HIGH, subType); IOManager.IOMove(IO_Type.Clamp_DoAction, IO_VALUE.HIGH, subType);
} }
if (moveInfo != null) if (moveInfo != null)
moveInfo.WaitList.Add(WaitResultInfo.WaitElectricClamp()); moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction)));
} }
public static bool Release(StoreMoveInfo moveInfo = null) public static bool Release(StoreMoveInfo moveInfo = null)
{ {
needClamp = false; GripperType = GripperTypeE.Release;
if (!IsBusy) if (!IsBusy)
{ {
IOManager.IOMove(IO_Type.Clamp_SetPos0, IO_VALUE.HIGH, subType); setAction("10000");
IOManager.IOMove(IO_Type.Clamp_SetPos1, IO_VALUE.LOW, subType);
IOManager.IOMove(IO_Type.Clamp_DoAction, IO_VALUE.HIGH, subType); IOManager.IOMove(IO_Type.Clamp_DoAction, IO_VALUE.HIGH, subType);
moveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); moveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
return true; return true;
} }
else else
{ {
return false;
if (moveInfo != null) if (moveInfo != null)
moveInfo.WaitList.Add(WaitResultInfo.WaitElectricClamp()); moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction)));
return false;
} }
} }
public static void HomeReset(StoreMoveInfo moveInfo = null) {
GripperType = GripperTypeE.Reset;
if (!IsBusy)
{
setAction("11111");
IOManager.IOMove(IO_Type.Clamp_DoAction, IO_VALUE.HIGH, subType);
}
if (moveInfo != null)
//moveInfo.WaitList.Add(WaitResultInfo.WaitElectricClamp());
moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction)));
}
public static bool IsBusy { public static bool IsBusy {
get { get {
return IOManager.IOValue(IO_Type.Clamp_Busy, subType).Equals(IO_VALUE.HIGH); return IOManager.IOValue(IO_Type.Clamp_Busy, subType).Equals(IO_VALUE.HIGH);
...@@ -56,5 +67,62 @@ namespace OnlineStore.DeviceLibrary ...@@ -56,5 +67,62 @@ namespace OnlineStore.DeviceLibrary
return IOManager.IOValue(IO_Type.Clamp_OnPosition, subType).Equals(IO_VALUE.HIGH); return IOManager.IOValue(IO_Type.Clamp_OnPosition, subType).Equals(IO_VALUE.HIGH);
} }
} }
static bool WaitAction(WaitResultInfo w)
{
if (ElectricGripper.IsBusy)
return false;
if (ElectricGripper.GripperType.Equals(ElectricGripper.GripperTypeE.Gripper))
{
if (ElectricGripper.IsClamp)
return true;
else
{
ElectricGripper.Clamp();
return false; ;
}
}
else if (ElectricGripper.GripperType.Equals(ElectricGripper.GripperTypeE.Release))
{
return ElectricGripper.Release();
}
else if (ElectricGripper.GripperType.Equals(ElectricGripper.GripperTypeE.Reset))
{
return ElectricGripper.IsBusy;
}
else {
return true;
}
}
public static int state
{
get
{
int s1 = (int)IOManager.IOValue(IO_Type.Clamp_Abnormal1, subType);
int s2 = (int)IOManager.IOValue(IO_Type.Clamp_Abnormal2, subType);
int s3 = (int)IOManager.IOValue(IO_Type.Clamp_ObjRecognize1, subType);
int s4 = (int)IOManager.IOValue(IO_Type.Clamp_ObjRecognize2, subType);
int s5 = (int)IOManager.IOValue(IO_Type.Clamp_ObjRecognize3, subType);
string b = s1.ToString() + s2 + s3 + s4 + s5;
return Convert.ToInt32(b, 2);
}
}
public static void setAction(string s) {
for (int i = 0; i < 5; i++)
{
IOManager.IOMove("Clamp_SetPos"+i,s[i]=='1'? IO_VALUE.HIGH : IO_VALUE.LOW, subType);
}
}
public enum GripperTypeE
{
Gripper,
Release,
Reset,
None
}
} }
} }
...@@ -237,11 +237,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -237,11 +237,11 @@ namespace OnlineStore.DeviceLibrary
} }
else if (wait.IoType.Equals(IO_Type.Clamp_OnPosition)) else if (wait.IoType.Equals(IO_Type.Clamp_OnPosition))
{ {
ElectricClamp.Clamp(); ElectricGripper.Clamp();
} }
else if (span.TotalMilliseconds > timeOutMs && NoAlarm()) else if (span.TotalMilliseconds > timeOutMs && NoAlarm())
{ {
WarnMsg = Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "] 等待(" + io.DisplayStr + "=" + wait.IoValue + ") 超时"; WarnMsg = Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "] 等待(" + io.DisplayStr + "=" + wait.IoValue + ") 超时";
Alarm(AlarmType.IoSingleTimeOut, io.ElectricalDefinition, WarnMsg, MoveInfo.MoveType); Alarm(AlarmType.IoSingleTimeOut, io.ElectricalDefinition, WarnMsg, MoveInfo.MoveType);
LogUtil.error(Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "] 等待(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", logType + 14); LogUtil.error(Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "] 等待(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", logType + 14);
...@@ -257,23 +257,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -257,23 +257,29 @@ namespace OnlineStore.DeviceLibrary
{ {
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds); wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
} }
else if (wait.WaitType.Equals(WaitEnum.W012_ElectricClampEvent)) else if (wait.WaitType.Equals(WaitEnum.W013_Action))
{
wait.IsEnd = wait.Action.Invoke(wait);
LogUtil.info($"{Name} 自定义等待 IsEnd={wait.IsEnd},Type={wait.Action.GetType()}");
}
else if (wait.WaitType.Equals(WaitEnum.W012_ElectricGripperEvent))
{ {
if (ElectricClamp.IsBusy) if (ElectricGripper.IsBusy)
break; break;
if (ElectricClamp.needClamp) if (ElectricGripper.GripperType.Equals(ElectricGripper.GripperTypeE.Gripper))
{ {
if (ElectricClamp.IsClamp) if (ElectricGripper.IsClamp)
wait.IsEnd = true; wait.IsEnd = true;
else else
{ {
ElectricClamp.Clamp(); ElectricGripper.Clamp();
break; break;
} }
} }
else { else if (ElectricGripper.GripperType.Equals(ElectricGripper.GripperTypeE.Release))
wait.IsEnd = ElectricClamp.Release(); {
wait.IsEnd = ElectricGripper.Release();
} }
} }
else else
......
...@@ -214,10 +214,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -214,10 +214,16 @@ namespace OnlineStore.DeviceLibrary
wait.WaitType = WaitEnum.W011_DoorCloseEvent; wait.WaitType = WaitEnum.W011_DoorCloseEvent;
return wait; return wait;
} }
public static WaitResultInfo WaitAction(Func<WaitResultInfo, bool> a) {
WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = WaitEnum.W013_Action;
wait.Action = a;
return wait;
}
public static WaitResultInfo WaitElectricClamp() public static WaitResultInfo WaitElectricClamp()
{ {
WaitResultInfo wait = new WaitResultInfo(); WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = WaitEnum.W012_ElectricClampEvent; wait.WaitType = WaitEnum.W012_ElectricGripperEvent;
return wait; return wait;
} }
public string ToStr() public string ToStr()
...@@ -324,6 +330,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -324,6 +330,11 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public bool IsEnd { get; set; } public bool IsEnd { get; set; }
/// <summary>
/// 等待事件代理
/// </summary>
public Func<WaitResultInfo, bool> Action { get; set; }
public int AgvAction = 0; public int AgvAction = 0;
} }
...@@ -376,7 +387,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -376,7 +387,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 等待电夹爪事件 /// 等待电夹爪事件
/// </summary> /// </summary>
internal static int W012_ElectricClampEvent = 12; internal static int W012_ElectricGripperEvent = 12;
/// <summary>
/// 通用代理等待方法
/// </summary>
internal static int W013_Action = 13;
} }
public enum MoveType public enum MoveType
{ {
......
...@@ -257,6 +257,37 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -257,6 +257,37 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P6Speed")] [ConfigProAttribute("UpdownAxis_P6Speed")]
public int UpdownAxis_P6Speed { get; set; } public int UpdownAxis_P6Speed { get; set; }
/// <summary>
/// T4_进出轴待机点 P1
/// </summary>
[ConfigProAttribute("InOutAxis_P1")]
public int InOutAxis_P1 { get; set; }
/// <summary>
/// T4_进出轴7寸取料点P2
/// </summary>
[ConfigProAttribute("InOutAxis_P2")]
public int InOutAxis_P2 { get; set; }
/// <summary>
/// T4_进出轴13寸取料点P3
/// </summary>
[ConfigProAttribute("InOutAxis_P3")]
public int InOutAxis_P3 { get; set; }
/// <summary>
/// T4_进出轴放料点P4
/// </summary>
[ConfigProAttribute("InOutAxis_P4")]
public int InOutAxis_P4 { get; set; }
[ConfigProAttribute("InOutAxis_P1Speed")]
public int InOutAxis_P1Speed { get; set; }
[ConfigProAttribute("InOutAxis_P2Speed")]
public int InOutAxis_P2Speed { get; set; }
[ConfigProAttribute("InOutAxis_P3Speed")]
public int InOutAxis_P3Speed { get; set; }
[ConfigProAttribute("InOutAxis_P4Speed")]
public int InOutAxis_P4Speed { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!