Commit b1431631 LN

料架入库处理

1 个父辈 aece1f17
......@@ -94,7 +94,10 @@ namespace OnlineStore.Common
public static string Tool_TargetSpeed = "Tool_TargetSpeed";
public static string Tool_TargetPosition = "Tool_TargetPosition";
public static string CodeCount = "CodeCount";
public static string CodeCount = "CodeCount";
public static string CurrShelfNum = "CurrShelfNum";
public static string CurrShelfType = "CurrShelfType";
}
}
......@@ -17,7 +17,7 @@ using System.Net.NetworkInformation;
namespace OnlineStore.Common
{
public class HttpHelper
{
{
private static int isLog = ConfigAppSettings.GetIntValue(Setting_Init.Server_Log_Open);
public static bool PingURLIP(string url, int ms = 100)
{
......
......@@ -55,6 +55,10 @@
<add key="AutoShelfInstore" value="1" />
<!--进出轴位置-->
<add key ="InOutDefaultPosition" value ="3000"/>
<!--当前料架信息-料架号-->
<add key ="CurrShelfNum" value ="-1"/>
<!--当前料架信息-料架类型,0=空料架,1=入库料架,2=出库料架-->
<add key ="CurrShelfType" value ="0"/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -48,9 +48,9 @@ namespace OnlineStore.DUOStore
this.Close();
return;
}
// this.groupBox3.Text = "设备[" + BoxBean.CID + "]状态";
// this.groupBox3.Text = "设备[" + BoxBean.CID + "]状态";
this.Text = BoxBean.Name;
axisMoveControl1.LoadData(BoxBean, new AxisBean[] {BoxBean.MiddleAxis,BoxBean.UpdownAxis,BoxBean.InoutAxis,BoxBean.ComAxis });
axisMoveControl1.LoadData(BoxBean, new AxisBean[] { BoxBean.MiddleAxis, BoxBean.UpdownAxis, BoxBean.InoutAxis, BoxBean.ComAxis });
ACBoxPosition acPosition = null;
if (BoxBean.PositionNumList.Count > 0)
{
......@@ -66,12 +66,12 @@ namespace OnlineStore.DUOStore
txtUpdownP12.Text = BoxBean.Config.UpDownAxis_P12.ToString();
txtUpDownP1.Text = BoxBean.Config.UpDownAxis_P1.ToString();
txtInOutP1.Text = BoxBean.Config.InOutAxis_P1.ToString();
txtComP1.Text = BoxBean.Config.CompAxis_P1.ToString();
txtUpDownP2.Text = BoxBean.Config.UpDownAxis_P2.ToString();
txtComP1.Text = BoxBean.Config.CompAxis_P1.ToString();
txtUpDownP2.Text = BoxBean.Config.UpDownAxis_P2.ToString();
txtMiddleP11.Text = BoxBean.Config.MiddleAxis_P11.ToString();
txtInoutP11.Text = BoxBean.Config.InOutAxis_P11.ToString();
txtComP3.Text = BoxBean.Config.CompAxis_P3.ToString();
txtInOutP2.Text = BoxBean.Config.InOutAxis_P2.ToString();
txtInOutP2.Text = BoxBean.Config.InOutAxis_P2.ToString();
LoadPData(acPosition);
chbDebug.Checked = BoxBean.IsDebug;
......@@ -211,9 +211,9 @@ namespace OnlineStore.DUOStore
{
if (BoxBean.runStatus >= StoreRunStatus.HomeMoving)
{
string selectPositionNum = cmbPosition.Text;
string selectPositionNum = cmbPosition.Text;
LineMoveP ktk = LoadPostion();
InOutParam param = new InOutParam("", selectPositionNum, ktk);
InOutParam param = new InOutParam(MoveType.OutStore, "", selectPositionNum, ktk);
BoxBean.StartOutStoreMove(param);
}
else
......@@ -226,9 +226,9 @@ namespace OnlineStore.DUOStore
{
if (BoxBean.runStatus >= StoreRunStatus.HomeMoving)
{
string selectPositionNum = cmbPosition.Text;
string selectPositionNum = cmbPosition.Text;
LineMoveP ktk = LoadPostion();
BoxBean.StartInStoreMove(new InOutParam("", selectPositionNum, ktk));
BoxBean.StartInStoreMove(new InOutParam(MoveType.InStore, "", selectPositionNum, ktk));
}
else
{
......@@ -253,7 +253,7 @@ namespace OnlineStore.DUOStore
ktk.UpDown_P3 = FormUtil.GetIntValue(txtUpDownP3);
ktk.UpDown_P4 = FormUtil.GetIntValue(txtUpDownP4);
ktk.UpDown_P5 = FormUtil.GetIntValue(txtUpDownP5);
ktk.UpDown_P6 = FormUtil.GetIntValue(txtUpDownP6);
ktk.UpDown_P6 = FormUtil.GetIntValue(txtUpDownP6);
return ktk;
}
......@@ -278,9 +278,9 @@ namespace OnlineStore.DUOStore
txtUpDownP6.Text = acPosition.UpdownAxis_OL_P6.ToString();
txtInOutP3.Text = acPosition.InoutAxis_P3.ToString();
txtMiddleP2.Text = acPosition.MiddleAxis_P2.ToString();
int comP2 = BoxBean.Config.GetComP2(acPosition.BagHigh);
int comP2 = BoxBean.Config.GetComP2(acPosition.BagHigh);
txtComP2.Text = comP2.ToString();
lblSize.Text = "尺寸:" + acPosition.BagWidth + "*" + acPosition.BagHigh;
lblSize.Text = "尺寸:" + acPosition.BagWidth + "*" + acPosition.BagHigh;
}
}
......@@ -295,9 +295,9 @@ namespace OnlineStore.DUOStore
acPosition.MiddleAxis_P2 = FormUtil.GetIntValue(txtMiddleP2);
acPosition.InoutAxis_P3 = FormUtil.GetIntValue(txtInOutP3);
acPosition.UpdownAxis_IH_P3 = FormUtil.GetIntValue(txtUpDownP3);
acPosition.UpdownAxis_IL_P4 = FormUtil.GetIntValue(txtUpDownP4);
acPosition.UpdownAxis_IL_P4 = FormUtil.GetIntValue(txtUpDownP4);
acPosition.UpdownAxis_OH_P5 = FormUtil.GetIntValue(txtUpDownP5);
acPosition.UpdownAxis_OL_P6 = FormUtil.GetIntValue(txtUpDownP6);
acPosition.UpdownAxis_OL_P6 = FormUtil.GetIntValue(txtUpDownP6);
}
//位置配置
string appPath = Application.StartupPath;
......@@ -323,13 +323,13 @@ namespace OnlineStore.DUOStore
int comp2 = FormUtil.GetIntValue(txtComP2);
int comp3 = FormUtil.GetIntValue(txtComP3);
int mP1 = FormUtil.GetIntValue(txtMiddleP1);
int mP1 = FormUtil.GetIntValue(txtMiddleP1);
int mp11 = FormUtil.GetIntValue(txtMiddleP11);
int udp1 = FormUtil.GetIntValue(txtUpDownP1);
int upp2 = FormUtil.GetIntValue(txtUpDownP2);
int upp11 = FormUtil.GetIntValue(txtUpdownP11);
int upp12 = FormUtil.GetIntValue(txtUpdownP12);
int upp12 = FormUtil.GetIntValue(txtUpdownP12);
if (BoxBean.Config.MiddleAxis_P1 != mP1)
......@@ -342,7 +342,7 @@ namespace OnlineStore.DUOStore
BoxBean.Config.MiddleAxis_P11 = mp11;
needUpdate = true;
}
if (BoxBean.Config.InOutAxis_P1 != inoup1)
{
BoxBean.Config.InOutAxis_P1 = inoup1;
......@@ -365,7 +365,7 @@ namespace OnlineStore.DUOStore
needUpdate = true;
}
if (BoxBean.Config.UpDownAxis_P2 != upp2 )
if (BoxBean.Config.UpDownAxis_P2 != upp2)
{
BoxBean.Config.UpDownAxis_P2 = upp2;
needUpdate = true;
......@@ -376,25 +376,25 @@ namespace OnlineStore.DUOStore
BoxBean.Config.UpDownAxis_P11 = upp11;
needUpdate = true;
}
if (BoxBean.Config.UpDownAxis_P12 != upp12 )
if (BoxBean.Config.UpDownAxis_P12 != upp12)
{
BoxBean.Config.UpDownAxis_P12 = upp12;
needUpdate = true;
}
if (BoxBean.Config.CompAxis_P3 != comp3 )
if (BoxBean.Config.CompAxis_P3 != comp3)
{
BoxBean.Config.CompAxis_P3 = comp3;
needUpdate = true;
}
if (BoxBean.Config.GetComP2(acPosition.BagHigh) != comp2 )
if (BoxBean.Config.GetComP2(acPosition.BagHigh) != comp2)
{
BoxBean.Config.UpdateComP2(acPosition.BagHigh,comp2);
BoxBean.Config.UpdateComP2(acPosition.BagHigh, comp2);
needUpdate = true;
}
if (BoxBean.Config.CompAxis_P1 != comp1 )
if (BoxBean.Config.CompAxis_P1 != comp1)
{
BoxBean.Config.CompAxis_P1 = comp1;
needUpdate = true;
......@@ -406,7 +406,7 @@ namespace OnlineStore.DUOStore
}
}
private bool InOutIsIsP1()
{
int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InOutDefaultPosition);
......@@ -461,7 +461,7 @@ namespace OnlineStore.DUOStore
{
AxisABSMove(BoxBean.Config.UpDown_Axis, txtUpDownP6, BoxBean.Config.UpDownAxis_P6_Speed);
}
private void btnUpdownP11_Click(object sender, EventArgs e)
{
......@@ -542,7 +542,7 @@ namespace OnlineStore.DUOStore
BoxBean.AutoInout.autoMsg = "自动出库:" + poText;
LogUtil.info(BoxBean.Name + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!");
//BoxBean.StartOutStoreMove(new InOutStoreParam("", poText));
BoxBean.StartInStoreMove(new InOutParam("", poText));
BoxBean.StartInStoreMove(new InOutParam(MoveType.InStore, "", poText));
btnStartAuTo.Text = "停止自动出入库";
}
......@@ -614,15 +614,15 @@ namespace OnlineStore.DUOStore
btnAxisOn.Enabled = false;
LogUtil.info(BoxBean.Name + "点击:" + btnAxisOn.Text);
BoxBean.OpenAllAxis(false);
btnAxisOn.Enabled = true;
btnAxisOn.Enabled = true;
}
private void 料仓运转OFFToolStripMenuItem_Click(object sender, EventArgs e)
{
LogUtil.info(BoxBean.Name + "点击:" + btnAxisOff.Text);
BoxBean.CloseAllAxis();
BoxBean.CloseAllAxis();
}
private void FrmStoreBox_Shown(object sender, EventArgs e)
{
......@@ -759,7 +759,7 @@ namespace OnlineStore.DUOStore
roleindex++;
DOControlList.Add(ioValue.ProName, control);
}
this.SuspendLayout();
this.SuspendLayout();
}
private void ReadIOList()
......@@ -796,7 +796,7 @@ namespace OnlineStore.DUOStore
}
private void btnDoorDown_Click(object sender, EventArgs e)
{
{
BoxBean.CylinderMove(null, IO_Type.OutDoor_Up, IO_Type.OutDoor_Down);
}
......@@ -806,7 +806,7 @@ namespace OnlineStore.DUOStore
{
string selectPositionNum = cmbPosition.Text;
LineMoveP ktk = LoadPostion();
BoxBean.StartInStoreMove(new InOutParam("", selectPositionNum, ktk,1));
BoxBean.StartInStoreMove(new InOutParam(MoveType.InStore, "", selectPositionNum, ktk, 1));
}
else
{
......@@ -820,7 +820,7 @@ namespace OnlineStore.DUOStore
{
string selectPositionNum = cmbPosition.Text;
LineMoveP ktk = LoadPostion();
InOutParam param = new InOutParam("", selectPositionNum, ktk,1);
InOutParam param = new InOutParam(MoveType.OutStore, "", selectPositionNum, ktk, 1);
BoxBean.StartOutStoreMove(param);
}
else
......
......@@ -57,7 +57,7 @@
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(653, 572);
this.button1.Location = new System.Drawing.Point(689, 563);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(125, 37);
this.button1.TabIndex = 254;
......@@ -92,7 +92,7 @@
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(524, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(323, 544);
this.groupBox1.Size = new System.Drawing.Size(322, 544);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......@@ -101,7 +101,7 @@
//
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(168, 358);
this.btnCloseAll.Location = new System.Drawing.Point(167, 358);
this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(125, 34);
this.btnCloseAll.TabIndex = 302;
......@@ -113,7 +113,7 @@
//
this.btnRelax.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRelax.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRelax.Location = new System.Drawing.Point(168, 300);
this.btnRelax.Location = new System.Drawing.Point(167, 300);
this.btnRelax.Name = "btnRelax";
this.btnRelax.Size = new System.Drawing.Size(125, 34);
this.btnRelax.TabIndex = 297;
......@@ -125,7 +125,7 @@
//
this.btnClamp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClamp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClamp.Location = new System.Drawing.Point(168, 263);
this.btnClamp.Location = new System.Drawing.Point(167, 263);
this.btnClamp.Name = "btnClamp";
this.btnClamp.Size = new System.Drawing.Size(125, 34);
this.btnClamp.TabIndex = 296;
......@@ -137,7 +137,7 @@
//
this.btnLineStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLineStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLineStop.Location = new System.Drawing.Point(14, 300);
this.btnLineStop.Location = new System.Drawing.Point(31, 300);
this.btnLineStop.Name = "btnLineStop";
this.btnLineStop.Size = new System.Drawing.Size(125, 34);
this.btnLineStop.TabIndex = 295;
......@@ -149,7 +149,7 @@
//
this.btnLineRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLineRun.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLineRun.Location = new System.Drawing.Point(14, 263);
this.btnLineRun.Location = new System.Drawing.Point(31, 263);
this.btnLineRun.Name = "btnLineRun";
this.btnLineRun.Size = new System.Drawing.Size(125, 34);
this.btnLineRun.TabIndex = 294;
......@@ -161,7 +161,7 @@
//
this.btnDeviceLed.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDeviceLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDeviceLed.Location = new System.Drawing.Point(14, 398);
this.btnDeviceLed.Location = new System.Drawing.Point(31, 398);
this.btnDeviceLed.Name = "btnDeviceLed";
this.btnDeviceLed.Size = new System.Drawing.Size(125, 34);
this.btnDeviceLed.TabIndex = 293;
......@@ -173,7 +173,7 @@
//
this.btnCamerLed.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCamerLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCamerLed.Location = new System.Drawing.Point(14, 358);
this.btnCamerLed.Location = new System.Drawing.Point(31, 358);
this.btnCamerLed.Name = "btnCamerLed";
this.btnCamerLed.Size = new System.Drawing.Size(125, 34);
this.btnCamerLed.TabIndex = 290;
......@@ -185,7 +185,7 @@
//
this.btnTopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopDown.Location = new System.Drawing.Point(14, 206);
this.btnTopDown.Location = new System.Drawing.Point(31, 206);
this.btnTopDown.Name = "btnTopDown";
this.btnTopDown.Size = new System.Drawing.Size(125, 34);
this.btnTopDown.TabIndex = 289;
......@@ -197,7 +197,7 @@
//
this.btnTopUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopUp.Location = new System.Drawing.Point(14, 169);
this.btnTopUp.Location = new System.Drawing.Point(31, 169);
this.btnTopUp.Name = "btnTopUp";
this.btnTopUp.Size = new System.Drawing.Size(125, 34);
this.btnTopUp.TabIndex = 288;
......@@ -223,7 +223,7 @@
this.btnCloseDO.BackColor = System.Drawing.Color.White;
this.btnCloseDO.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseDO.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDO.Location = new System.Drawing.Point(165, 111);
this.btnCloseDO.Location = new System.Drawing.Point(167, 111);
this.btnCloseDO.Name = "btnCloseDO";
this.btnCloseDO.Size = new System.Drawing.Size(125, 34);
this.btnCloseDO.TabIndex = 281;
......@@ -289,7 +289,7 @@
//
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(168, 206);
this.btnBack.Location = new System.Drawing.Point(167, 206);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(125, 34);
this.btnBack.TabIndex = 251;
......@@ -313,7 +313,7 @@
//
this.btnFoward.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFoward.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFoward.Location = new System.Drawing.Point(168, 169);
this.btnFoward.Location = new System.Drawing.Point(167, 169);
this.btnFoward.Name = "btnFoward";
this.btnFoward.Size = new System.Drawing.Size(125, 34);
this.btnFoward.TabIndex = 250;
......@@ -396,7 +396,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(904, 621);
this.ClientSize = new System.Drawing.Size(858, 621);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
......
......@@ -32,6 +32,8 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStore));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.listView1 = new System.Windows.Forms.ListView();
this.chbSendShelfOut = new System.Windows.Forms.CheckBox();
this.lblServerMsg = new System.Windows.Forms.Label();
this.chbUseBuzzer = new System.Windows.Forms.CheckBox();
this.chkDebug = new System.Windows.Forms.CheckBox();
......@@ -91,6 +93,8 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.listView1);
this.tabPage1.Controls.Add(this.chbSendShelfOut);
this.tabPage1.Controls.Add(this.lblServerMsg);
this.tabPage1.Controls.Add(this.chbUseBuzzer);
this.tabPage1.Controls.Add(this.chkDebug);
......@@ -105,6 +109,35 @@
this.tabPage1.Text = " 日志信息 ";
this.tabPage1.UseVisualStyleBackColor = true;
//
// listView1
//
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listView1.BackColor = System.Drawing.Color.White;
this.listView1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listView1.FullRowSelect = true;
this.listView1.GridLines = true;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(3, 3);
this.listView1.MultiSelect = false;
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(1110, 117);
this.listView1.TabIndex = 203;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
//
// chbSendShelfOut
//
this.chbSendShelfOut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbSendShelfOut.AutoSize = true;
this.chbSendShelfOut.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbSendShelfOut.Location = new System.Drawing.Point(1132, 142);
this.chbSendShelfOut.Name = "chbSendShelfOut";
this.chbSendShelfOut.Size = new System.Drawing.Size(112, 24);
this.chbSendShelfOut.TabIndex = 202;
this.chbSendShelfOut.Text = "送出出料料架";
this.chbSendShelfOut.UseVisualStyleBackColor = true;
//
// lblServerMsg
//
this.lblServerMsg.AutoSize = true;
......@@ -119,7 +152,7 @@
this.chbUseBuzzer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbUseBuzzer.AutoSize = true;
this.chbUseBuzzer.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbUseBuzzer.Location = new System.Drawing.Point(1132, 55);
this.chbUseBuzzer.Location = new System.Drawing.Point(1132, 56);
this.chbUseBuzzer.Name = "chbUseBuzzer";
this.chbUseBuzzer.Size = new System.Drawing.Size(98, 24);
this.chbUseBuzzer.TabIndex = 195;
......@@ -132,7 +165,7 @@
this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkDebug.AutoSize = true;
this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkDebug.Location = new System.Drawing.Point(1132, 97);
this.chkDebug.Location = new System.Drawing.Point(1132, 99);
this.chkDebug.Name = "chkDebug";
this.chkDebug.Size = new System.Drawing.Size(132, 24);
this.chkDebug.TabIndex = 194;
......@@ -158,7 +191,7 @@
this.btnCopyLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopyLog.BackColor = System.Drawing.Color.White;
this.btnCopyLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyLog.Location = new System.Drawing.Point(1132, 139);
this.btnCopyLog.Location = new System.Drawing.Point(1145, 546);
this.btnCopyLog.Name = "btnCopyLog";
this.btnCopyLog.Size = new System.Drawing.Size(105, 35);
this.btnCopyLog.TabIndex = 191;
......@@ -171,7 +204,7 @@
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearLog.BackColor = System.Drawing.Color.White;
this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearLog.Location = new System.Drawing.Point(1132, 192);
this.btnClearLog.Location = new System.Drawing.Point(1145, 599);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 35);
this.btnClearLog.TabIndex = 190;
......@@ -185,9 +218,9 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(3, 3);
this.logBox.Location = new System.Drawing.Point(3, 126);
this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(1110, 635);
this.logBox.Size = new System.Drawing.Size(1110, 512);
this.logBox.TabIndex = 106;
this.logBox.Text = "";
this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged);
......@@ -199,9 +232,9 @@
this.lblWarnMsg.BackColor = System.Drawing.Color.Transparent;
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(526, 4);
this.lblWarnMsg.Location = new System.Drawing.Point(511, 4);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(775, 72);
this.lblWarnMsg.Size = new System.Drawing.Size(790, 72);
this.lblWarnMsg.TabIndex = 96;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
......@@ -463,6 +496,8 @@
private System.Windows.Forms.Label lblServerMsg;
private System.Windows.Forms.ToolStripMenuItem 扫码测试ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.CheckBox chbSendShelfOut;
private System.Windows.Forms.ListView listView1;
}
}
......@@ -91,6 +91,118 @@ namespace OnlineStore.DUOStore
tabPageList.Add(lineTabPage);
tabControl1.Controls.Add(lineTabPage);
}
private void LoadListView()
{
this.listView1.Columns.Clear();
AddHealder("名称", 90);
AddHealder("启用", 50);
AddHealder("报警", 130);
AddHealder("状态", 110);
AddHealder("料盘信息", listView1.Size.Width - 110 - 130 - 50 - 90 - 10);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
AddRow(store, true);
AddRow(store.BoxMap[1], store.BoxMap[1].IsDebug);
AddRow(store.BoxMap[2], store.BoxMap[2].IsDebug);
}
private void AddHealder(string name, int widht)
{
ColumnHeader preSendwire = new ColumnHeader();
preSendwire.Text = name; //设置列标题
preSendwire.Width = widht; //设置列宽度
preSendwire.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
this.listView1.Columns.Add(preSendwire); //将列头添加到ListView控件。
}
private void AddRow(EquipBase equip, bool isDebug)
{
ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name;
lvi.SubItems.Add(isDebug ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(equip.GetRunStr());
lvi.SubItems.Add("");
this.listView1.Items.Add(lvi);
}
private void UpdateListBox()
{
int item_debug_index = 1;
int item_alarm_index = 2;
int item_runStr_index = 3;
int item_move_info_index = 4;
int i = 0;
List<EquipBase> eqList = new List<EquipBase>(store.BoxMap.Values);
eqList.Insert(0, store);
foreach (EquipBase equip in store.BoxMap.Values)
{
if (i.Equals(0))
{
}
else
{
SetItemText(i, item_debug_index, equip.IsDebug ? "✘" : "✔");
}
SetItemText(i, item_alarm_index, equip.alarmType.ToString());
SetItemText(i, item_runStr_index, equip.GetRunStr());
StoreRunStatus s = equip.runStatus;
string trayInfo = "";
if (!equip.MoveInfo.MoveType.Equals(MoveType.None))
{
s = StoreRunStatus.Busy;
trayInfo = equip.MoveInfo.MoveParam.ToStr();
}
SetItemText(i, item_move_info_index, trayInfo);
SetItemColor(i, s, equip.alarmType);
i++;
}
}
private void SetItemColor(int i, StoreRunStatus runStatus, AlarmType alarmType)
{
if (runStatus.Equals(StoreRunStatus.Wait))
{
SetItemColor(i, Color.White);
//listView1.Items[i].BackColor = Color.White;
}
else if (alarmType.Equals(AlarmType.IoSingleTimeOut))
{
SetItemColor(i, Color.LightCoral);
}
else if (alarmType.Equals(AlarmType.None).Equals(false))
{
SetItemColor(i, Color.Red);
}
else if (runStatus.Equals(StoreRunStatus.HomeMoving) || runStatus.Equals(StoreRunStatus.Reset))
{
SetItemColor(i, Color.Orange);
}
else if (runStatus.Equals(StoreRunStatus.Busy))
{
SetItemColor(i, Color.LimeGreen);
}
else if (runStatus.Equals(StoreRunStatus.Runing))
{
SetItemColor(i, Color.LightBlue);
}
}
private void SetItemColor(int i, Color color)
{
if (!listView1.Items[i].BackColor.Equals(color))
{
listView1.Items[i].BackColor = color;
}
}
private void SetItemText(int rowIndex, int subIndex, string value)
{
if (this.listView1.Items[rowIndex].SubItems.Count > subIndex)
{
if (!this.listView1.Items[rowIndex].SubItems[subIndex].Text.Equals(value))
{
this.listView1.Items[rowIndex].SubItems[subIndex].Text = value;
}
}
}
/// <summary>
/// 隐藏窗口
/// </summary>
......@@ -339,8 +451,7 @@ namespace OnlineStore.DUOStore
if (!this.Visible)
{
return;
}
lblServerMsg.Text = HttpHelper.LastServerMsg;
}
string msg = "";
foreach(BoxBean box in StoreManager.Store.BoxMap.Values)
......
......@@ -13,10 +13,7 @@ using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 流水线自动料仓-Box类
/// </summary>
{
public partial class BoxBean : EquipBase
{
private bool IsIntSlvBlock = false;
......@@ -362,15 +359,18 @@ namespace OnlineStore.DeviceLibrary
public override void StopMove()
{
IOMove(IO_Type.UpdownAxis_Break, IO_VALUE.LOW);
{
MoveInfo.EndMove();
IOMove(IO_Type.UpdownAxis_Break, IO_VALUE.LOW);
//运动版停止
ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue());
MiddleAxis.SuddenStop(true);
UpdownAxis.SuddenStop(true);
InoutAxis.SuddenStop(true);
ComAxis.SuddenStop(true);
//ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
//ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue());
//ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
//ACServerManager.SuddenStop(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue());
CloseAllAxis();
LogInfo("StopMove");
isInPro = false;
......
......@@ -16,7 +16,7 @@ namespace OnlineStore.DeviceLibrary
{
public ConcurrentQueue<InOutParam> waitOutStoreList = new ConcurrentQueue<InOutParam>();
// public InOutParam waitOutStoreList = null;
public InOutParam waitInStoreList = null;
#region 出入库结果验证
private bool AcInPosition(ConfigMoveAxis axis,int p)
......@@ -42,7 +42,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
///是否已经接收到过出库信息
///</summary>
public bool IsReviceInPosId( string posId)
public bool IsReviceInPosId(string posId)
{
bool isReviceInfo = false;
try
......@@ -52,17 +52,13 @@ namespace OnlineStore.DeviceLibrary
LogInfo(" IsReviceInPosId 正在入库中:" + MoveInfo.MoveParam.ToStr());
isReviceInfo = true;
}
if (!isReviceInfo &&.Count > 0)
if (!isReviceInfo && (waitInStoreList != null))
{
//foreach (InOutParam inout in waitOutStoreList)
//{
// if (inout.PosID.Equals(posId) && (!inout.WareCode.Equals("")))
// {
// LogInfo(" IsReviceInPosId 已存在入库任务:" + inout.ToStr());
// isReviceInfo = true;
// break;
// }
//}
if (waitInStoreList.PosID.Equals(posId) && (!waitInStoreList.WareCode.Equals("")))
{
LogInfo(" IsReviceInPosId 已存在入库任务:" + waitInStoreList.ToStr());
isReviceInfo = true;
}
}
}
catch (Exception ex)
......@@ -77,7 +73,7 @@ namespace OnlineStore.DeviceLibrary
private DateTime startInStoreTime = DateTime.Now;
public override void StartInStoreMove(InOutParam param)
public override bool StartInStoreMove(InOutParam param)
{
startInStoreTime = DateTime.Now;
string posId = param != null ? param.PosID : "";
......@@ -86,13 +82,13 @@ namespace OnlineStore.DeviceLibrary
|| (!MoveInfo.MoveType.Equals(MoveType.None)))
{
LogUtil.error(Name + " 启动出库出错,忙碌或报警中 ,storeStatus=" + runStatus + ",MoveType=" + MoveInfo.MoveType + ",isInSuddenDown=" + isInSuddenDown + ",isNoAirCheck" + isNoAirCheck);
return;
return false ;
}
if (!StoreManager.LoadInoutParam(param, MoveType.InStore, true, this))
{
LogUtil.error(Name + " 启动入库【" + param.ToStr() + "】出错,找不到库位信息");
return;
return false ;
}
LogInfo(" 启动入库【" + param.ToStr() + "】 ");
runStatus = StoreRunStatus.Busy;
......@@ -100,12 +96,14 @@ namespace OnlineStore.DeviceLibrary
{
storeStatus = StoreStatus.InStoreExecute;
}
param.moveType = MoveType.InStore;
MoveInfo.NewMove(MoveType.InStore, param);
//新的料架库位
MoveInfo.NextMoveStep(StoreMoveStep.SI_01_InoutToP1);
InOutStoreLog("启动入料: 进出轴返回P1");
InoutAxis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P1_Speed);
InoutAxis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P1_Speed);
return true;
}
protected override void InStoreProcess()
......@@ -307,6 +305,7 @@ namespace OnlineStore.DeviceLibrary
storeStatus = StoreStatus.OutStoreExecute;
runStatus = StoreRunStatus.Busy;
param.moveType = MoveType.OutStore;
MoveInfo.NewMove(MoveType.OutStore, param);
LogInfo("启动出库【" + param.ToStr() + "】 ");
//出库前shelfPosID需要固定,出库时根据rfid判断是否需要出入料架
......
......@@ -4,6 +4,7 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Net;
......@@ -22,12 +23,14 @@ namespace OnlineStore.DeviceLibrary
public Store_Config Config { get; set; }
public bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1);
/// <summary>
/// 取料提升机构
/// 取料提升机构气缸
/// </summary>
public HoisterCylinder hoisterCylinder = new HoisterCylinder(0);
public AxisBean T1_BatchAxis = null;
public AxisBean T2_MiddleAxis = null;
public AxisBean T3_UpdownAxis = null;
#region 初始化
internal bool canStart = false;
......@@ -290,6 +293,13 @@ namespace OnlineStore.DeviceLibrary
equip.StopMove();
}
MoveInfo.EndMove();
hoisterCylinder.Stop();
//轴运动停止
T3_UpdownAxis.SuddenStop(true);
T2_MiddleAxis.SuddenStop(true);
T1_BatchAxis.SuddenStop(true);
CloseAllAxis();
}
......@@ -546,12 +556,60 @@ namespace OnlineStore.DeviceLibrary
CheckAxisAlarm(new AxisBean[] { T1_BatchAxis,T2_MiddleAxis,T3_UpdownAxis});
ShowTimeLog("轴报警检测完成");
}
if (runStatus.Equals(StoreRunStatus.Runing) || runStatus.Equals(StoreRunStatus.Busy))
{
ShelfOutProcess();
}
}
catch (Exception ex)
{
LogUtil.error(Name + "定时处理出错" + ex.ToString());
}
}
private bool LowProcess=false;
private Stopwatch lowWatch = new Stopwatch();
private void ShelfOutProcess()
{
try
{
if (IOValue(IO_Type.Line_OutCheck).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.Line_BackRun).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.Line_Run).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.Line_BufferCheck).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.Line_Stop3_Buffer).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.Line_Stop4_Out).Equals(IO_VALUE.LOW) &&
LowProcess.Equals(false))
{
if (StoreManager.checkWatch(lowWatch, 3000))
{
//左侧下层需要放个料架
Task.Factory.StartNew(delegate
{
LowProcess = true;
LogUtil.info(Name + "从料架堆积处放一个料架到后端");
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH, false, 30000);
IOMove(IO_Type.Line_Stop3_Buffer, IO_VALUE.HIGH, false, 2000);
if (WaitIo(IO_Type.Line_OutCheck, IO_VALUE.HIGH, 30000, "堆积处放料架到后端"))
{
LineStop();
}
LowProcess = false;
});
}
}
else
{
lowWatch.Stop();
}
}
catch (Exception ex)
{
LogUtil.error(Name + " ShelfOutProcess 出错:" + ex.ToString());
}
}
#endregion
public int GetShelfNum()
......
......@@ -13,6 +13,25 @@ namespace OnlineStore.DeviceLibrary
partial class DUOStoreBean
{
public int CurrShelfNum = 0;
/// <summary>
/// 料架类型,0=空料架,1=入库料架,2=出库料架
/// </summary>
public int CurrShelfType = 0;
/// <summary>
/// 更新料架信息
/// </summary>
/// <param name="num">料架编号</param>
/// <param name="type">料架类型,0=空料架,1=入库料架,2=出库料架</param>
private void UpdateShelfNum(int num,int type)
{
CurrShelfNum = num;
CurrShelfType = type;
ConfigAppSettings.SaveValue(Setting_Init.CurrShelfType, type);
ConfigAppSettings.SaveValue(Setting_Init.CurrShelfNum, num);
LogUtil.info(Name + "更新料架信息:【" + CurrShelfNum + "】【" + CurrShelfType + "】");
}
protected override bool CheckWaitResult(StoreMoveInfo moveInfo, WaitResultInfo wait)
{
if (wait.WaitType.Equals(WaitEnum.W008_BatchAxis))
......@@ -48,8 +67,6 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
public int CurrShelfNum = 0;
#region 料架出料
public override bool StartOutStoreMove(InOutParam param)
......@@ -74,7 +91,7 @@ namespace OnlineStore.DeviceLibrary
private bool StartInStoreP()
{
if (IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.HIGH) && (!InShelfInProcess))
if (IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.LOW) && (!InShelfInProcess))
{
ShelfEnterProcess();
}
......@@ -86,9 +103,7 @@ namespace OnlineStore.DeviceLibrary
if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.Line_WorkCheck).Equals(IO_VALUE.HIGH))
{
StartInStoreMove(null);
}
}
return false;
}
......@@ -100,13 +115,10 @@ namespace OnlineStore.DeviceLibrary
InShelfInProcess = true;
try
{
if (IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.LOW))
{
InShelfInProcess = true;
LineRun(null);
//等待进料检测信号
bool result = WaitIo(IO_Type.Line_InCheck, IO_VALUE.LOW, 10000);
}
InShelfInProcess = true;
LineRun(null);
//等待进料检测信号
bool result = WaitIo(IO_Type.Line_InCheck, IO_VALUE.LOW, 10000);
}
catch (Exception ex)
{
......@@ -132,8 +144,8 @@ namespace OnlineStore.DeviceLibrary
}
private void LI_04_LineStart()
{
CurrShelfNum = GetShelfNum();
{
UpdateShelfNum(GetShelfNum(), 1);
if (IOValue(IO_Type.Line_WorkCheck).Equals(IO_VALUE.HIGH))
{
LI_05_WaitTime();
......@@ -162,19 +174,35 @@ namespace OnlineStore.DeviceLibrary
}
}
public override void StartInStoreMove(InOutParam param)
public override bool StartInStoreMove(InOutParam param)
{
runStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NewMove(MoveType.InStore);
MoveInfo.MoveParam = new InOutParam();
//判断是哪个工位有料架
if (IOValue(IO_Type.Line_WorkCheck).Equals(IO_VALUE.HIGH))
{
LI_05_WaitTime();
if (CurrShelfNum < 0 || CurrShelfType.Equals(1))
{
runStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NewMove(MoveType.InStore,new InOutParam(MoveType.InStore));
LI_05_WaitTime();
return true;
}
else if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH))
{
runStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NewMove(MoveType.InStore, new InOutParam(MoveType.InStore));
//先将当前料架送出
LI_31_BatchAxisToP1();
}
}
else
else if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH))
{
runStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NewMove(MoveType.InStore, new InOutParam(MoveType.InStore));
if (T1_BatchAxis.IsInPosition(Config.BatchAxis_P1))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_02_HoisterBack);
......@@ -187,7 +215,9 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("检测到料架,提升轴先返回P1");
T1_BatchAxis.AbsMove(MoveInfo, Config.BatchAxis_P1, Config.BatchAxis_P1Speed);
}
return true;
}
return false ;
}
......@@ -242,7 +272,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_08_AxisUpToP2))
{
LI_09_ScanCode();
CheckHasTray();
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_09_ScanCode))
{
......@@ -268,7 +298,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LI_13_CylinderTighten))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_14_UpdownToP1);
InOutStoreLog("取料:升降轴到料串高点P2");
InOutStoreLog("取料:升降轴到料串高点P2");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_14_UpdownToP1))
......@@ -281,7 +311,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_16_BatchAxisToP2);
InOutStoreLog("取料:批量轴到P2,计算高度,");
BatchAxisToP2(false);
BatchAxisToP2(false);
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_16_BatchAxisToP2))
{
......@@ -302,13 +332,24 @@ namespace OnlineStore.DeviceLibrary
{
if (LastPosParam.InStoreNg)
{
int box = GetInstoreNgBox();
LastPosParam.TargetBox = box;
}
MoveInfo.NextMoveStep(StoreMoveStep.LI_19_ToBoxDoor);
else
{
int storeId = LastPosParam.GetStoreId();
if (storeId.Equals(1))
{
LastPosParam.TargetBox = 1;
}
else
{
LastPosParam.TargetBox = 2;
}
}
MoveInfo.NextMoveStep(StoreMoveStep.LI_21_WaitToBox);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
InOutStoreLog("料盘移栽:获取库位号完成,升降轴到料门口高点,旋转轴到料仓门口");
T3_UpdownAxis.AbsMove(Config.updo)
InOutStoreLog("料盘移栽:" + LastPosParam.ToStr() + " 等待料仓门口无信号");
ClearTimeoutAlarm("获取库位号超时");
}
else if (MoveInfo.IsTimeOut(120))
......@@ -317,46 +358,175 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(WarnMsg, ID * 1000 + 30);
Alarm(AlarmType.IoSingleTimeOut);
}
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_19_ToBoxDoor))
else if (MoveInfo.IsStep(StoreMoveStep.LI_21_WaitToBox))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_20_UpdownDown);
InOutStoreLog("料盘移栽: 升降轴到料门口低点,开始预扫码");
int storeId = LastPosParam.GetStoreId();
if (IOManager.IOValue(IO_Type.InDoor_Check, storeId).Equals(IO_VALUE.LOW))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_22_ToBoxDoor);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
//判断是左侧还是右侧
if (LastPosParam.TargetBox.Equals(1))
{
InOutStoreLog("料盘移栽:获取库位号完成, BOX " + storeId + " 升降轴到料门口高点[" + Config.UpdownAxis_P4 + "],旋转轴到料仓门口 [" + Config.MiddleAxis_P2 + "]");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P4, Config.UpdownAxis_P4Speed);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P2, Config.MiddleAxis_P2Speed);
}
else
{
InOutStoreLog("料盘移栽:获取库位号完成, BOX " + storeId + " 升降轴到料门口高点[" + Config.UpdownAxis_P6 + "],旋转轴到料仓门口 [" + Config.MiddleAxis_P3 + "]");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P6, Config.UpdownAxis_P6Speed);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P3, Config.MiddleAxis_P3Speed);
}
ClearTimeoutAlarm("入料口无料盘");
}
else if (MoveInfo.IsTimeOut(120))
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待BOX_" + storeId + " 入料口无料盘 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, ID * 1000 + 30);
Alarm(AlarmType.IoSingleTimeOut);
}
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_20_UpdownDown))
else if (MoveInfo.IsStep(StoreMoveStep.LI_22_ToBoxDoor))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_21_CylinderRelax);
MoveInfo.NextMoveStep(StoreMoveStep.LI_23_UpdownDown);
YuScanCode();
if (LastPosParam.TargetBox.Equals(1))
{
InOutStoreLog("料盘移栽: 升降轴到料门口低点[" + Config.UpdownAxis_P3 + "],开始预扫码");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P3, Config.UpdownAxis_P3Speed);
}
else
{
InOutStoreLog("料盘移栽: 升降轴到料门口低点[" + Config.UpdownAxis_P5 + "],开始预扫码");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P5, Config.UpdownAxis_P5Speed);
}
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_23_UpdownDown))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_24_CylinderRelax);
InOutStoreLog("料盘移栽: 上料气缸放松");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Clamp, IO_Type.ClampCylinder_Relax);
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_21_CylinderRelax))
else if (MoveInfo.IsStep(StoreMoveStep.LI_24_CylinderRelax))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_22_UpdownUp);
InOutStoreLog("料盘移栽: 升降轴到料门口高点");
MoveInfo.NextMoveStep(StoreMoveStep.LI_25_UpdownUp);
if (LastPosParam.TargetBox.Equals(1))
{
InOutStoreLog("料盘移栽: 升降轴到料门口高点[" + Config.UpdownAxis_P4 + "]");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P4, Config.UpdownAxis_P4Speed);
}
else
{
InOutStoreLog("料盘移栽: 升降轴到料门口高点[" + Config.UpdownAxis_P6 + "]");
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P6, Config.UpdownAxis_P6Speed);
}
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_22_UpdownUp))
else if (MoveInfo.IsStep(StoreMoveStep.LI_25_UpdownUp))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_23_AxisToWait);
MoveInfo.NextMoveStep(StoreMoveStep.LI_26_AxisToWait);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
InOutStoreLog("料盘移栽:旋转轴返回待机点P1,升降轴到料串高点P2");
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P1, Config.MiddleAxis_P1Speed);
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_26_AxisToWait))
{
CheckHasTray();
}
#region 送出料架处理
else if (MoveInfo.IsStep(StoreMoveStep.LI_31_BatchAxisToP1))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_32_HoisterBack);
InOutStoreLog("送出料架:升降盘定位气缸后退");
hoisterCylinder.StartBack(MoveInfo);
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_23_AxisToWait))
else if (MoveInfo.IsStep(StoreMoveStep.LI_32_HoisterBack))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_33_TopCylinderDown);
InOutStoreLog("送出料架:顶升气缸下降");
CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Up);
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_33_TopCylinderDown))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_24_ToNexTray);
InOutStoreLog("料盘移栽:判断是否还有料");
//判断是否需要送出料架,如果入口和等待区无料架,暂不送出
if (IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.LOW) && IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.LOW))
{
InOutStoreLog("送出料架:入口和等待区暂无料架,不需要送出料架");
MoveEndP();
}
else
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_34_WorkStopDown);
InOutStoreLog("送出料架:上料阻挡下降1秒,流水线开始转动");
UpdateShelfNum(-1, -1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500));
LineRun(MoveInfo);
IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.HIGH, false, 1500);
}
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_24_ToNexTray))
else if (MoveInfo.IsStep(StoreMoveStep.LI_34_WorkStopDown))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_06_TopUp);
InOutStoreLog("入料检测: 顶升气缸上升");
MoveInfo.NextMoveStep(StoreMoveStep.LI_35_WaitShelfGo);
InOutStoreLog("送出料架:等待上料无料架");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_WaitCheck, IO_VALUE.LOW));
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_35_WaitShelfGo))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_36_LineRun);
InOutStoreLog("送出料架:流水线再转动3秒");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
LineRun(MoveInfo);
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_36_LineRun))
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_37_LineStop);
InOutStoreLog("送出料架:流水线停止转动");
LineStop(MoveInfo);
}
else if (MoveInfo.IsStep(StoreMoveStep.LI_37_LineStop))
{
LineStop(MoveInfo);
MoveEndP();
}
#endregion
}
private int GetInstoreNgBox()
{
//空闲且门口无料盘
foreach(BoxBean box in BoxMap.Values)
{
if (box.MoveInfo.MoveType.Equals(MoveType.None) && IOManager.IOValue(IO_Type.InDoor_Check, box.ID).Equals(IO_VALUE.LOW))
{
return box.ID;
}
}
//忙碌且目标是出料口
foreach (BoxBean box in BoxMap.Values)
{
if (box.MoveInfo.MoveType.Equals(MoveType.None))
{
if (IOManager.IOValue(IO_Type.InDoor_Check, box.ID).Equals(IO_VALUE.LOW))
{
return box.ID;
}
}
else if (box.MoveInfo.MoveParam.TargetPosition.Equals(1))
{
return box.ID;
}
}
return 1;
}
protected void ClearTimeoutAlarm(string msg)
{
if (isInSuddenDown || isNoAirCheck)
......@@ -393,23 +563,23 @@ namespace OnlineStore.DeviceLibrary
GetPosResult result = StoreManager.GetPosId(Name, LastCodeList, LastHeight, LastWidth, CurrShelfNum);
if (result.IsTimeOut)
{
LogUtil.error(Name + "【" + code + "】第[" + count + "]次 FI_23_GetPosID 超时,等待1s后重新获取");
LogUtil.error(Name + "【" + code + "】第[" + count + "]次 LI_18_GetPosID 超时,等待1s后重新获取");
Thread.Sleep(1000);
}
else if (result.Result.Equals(99) || result.Result.Equals(100))
{
LogUtil.error(Name + "【" + code + "】第[" + count + "]次 FI_23_GetPosID 结果【" + result.Result + "】,等待3s后重新获取");
LogUtil.error(Name + "【" + code + "】第[" + count + "]次 LI_18_GetPosID 结果【" + result.Result + "】,等待3s后重新获取");
Thread.Sleep(3000);
}
else if (!result.Msg.Equals(""))
{
LastPosParam = result.Param;
LogUtil.error(Name + "【" + code + "】第[" + count + "]次 FI_23_GetPosID 入库NG:" + result.Msg);
LogUtil.error(Name + "【" + code + "】第[" + count + "]次 LI_18_GetPosID 入库NG:" + result.Msg);
break;
}
else
{
LastPosParam = result.Param;
LastPosParam = result.Param;
break;
}
count++;
......@@ -421,8 +591,10 @@ namespace OnlineStore.DeviceLibrary
}
});
}
MoveInfo.MoveParam = LastPosParam;
}
private void LI_11_AxisToTray()
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_11_AxisToTray);
......@@ -532,7 +704,7 @@ namespace OnlineStore.DeviceLibrary
if (chaz > T1_BatchAxis.Config.CanErrorCountMax)
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_08_AxisUpToP2);
InOutStoreLog(" CheckHasTray:上料轴开始慢速上升到P3点,等待检测到料盘");
InOutStoreLog(" CheckHasTray:上料轴开始慢速上升到P2点,等待检测到料盘");
ShelfNoTray = false;
BatchAxisToP2(false);
return;
......@@ -540,14 +712,18 @@ namespace OnlineStore.DeviceLibrary
}
//无料盘
ShelfNoTray = true;
MoveInfo.NextMoveStep(StoreMoveStep.LI_31_BatchAxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
InOutStoreLog("料盘移栽" + MoveInfo.SLog + ":未检测到料盘,提升伺服到P1点");
T1_BatchAxis.SuddenStop();
T1_BatchAxis.AbsMove(MoveInfo, Config.BatchAxis_P1, Config.BatchAxis_P2Speed);
LI_31_BatchAxisToP1();
}
}
private void LI_31_BatchAxisToP1()
{
MoveInfo.NextMoveStep(StoreMoveStep.LI_31_BatchAxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
InOutStoreLog("料盘移栽" + MoveInfo.SLog + ":未检测到料盘,提升伺服到P1点 ");
UpdateShelfNum(CurrShelfNum, 0);
T1_BatchAxis.SuddenStop();
T1_BatchAxis.AbsMove(MoveInfo, Config.BatchAxis_P1, Config.BatchAxis_P2Speed);
}
private void BatchAxisToP2(bool isFirstMove = true)
{
int targetP2 = Config.BatchAxis_P2;
......
......@@ -3,6 +3,7 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Ports;
using System.Linq;
......@@ -209,13 +210,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(box.Name + "GetPositon[" + param.PosID + "]=null,没有库位不能执行出入库");
return false;
}
if (String.IsNullOrEmpty(param.PlateH))
if (param.PlateH<=0)
{
param.PlateH = position.BagHigh.ToString();
param.PlateH = position.BagHigh;
}
if (string.IsNullOrEmpty(param.PlateW))
if (param.PlateW<=0)
{
param.PlateW = position.BagWidth.ToString();
param.PlateW = position.BagWidth;
}
p.ComPress_P2 = box.Config.GetComP2(position.BagHigh);
p.ComPress_P3 = box.Config.CompAxis_P3;
......@@ -374,14 +375,14 @@ namespace OnlineStore.DeviceLibrary
{
result.Msg = deviceName + " 【" + codeStr + "】结果:没有收到服务器反馈,调用 cancelPutInTask ";
cancelPutInTask(deviceName, codeStr);
result.Param = new InOutParam( codeStr, "", width,height,1, shelfNum, true, "没有收到服务器反馈");
result.Param = new InOutParam( MoveType.InStore, codeStr, "", width,height,1, shelfNum, true, "没有收到服务器反馈");
return result;
}
else if ((!string.IsNullOrEmpty(serverResult.msg)) || serverResult.result.Equals(0).Equals(false))
{
result.Result = serverResult.result;
result.Msg = deviceName + " 【" + codeStr + "】结果:" + serverResult.msg;
result.Param = new InOutParam(codeStr, "", width, height, 1, shelfNum, true, serverResult.msg);
result.Param = new InOutParam(MoveType.InStore, codeStr, "", width, height, 1, shelfNum, true, serverResult.msg);
return result;
}
......@@ -392,7 +393,7 @@ namespace OnlineStore.DeviceLibrary
//根据库位号查找移栽
// 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败
result.Param = new InOutParam( serverResult.barcode, posId, width, height,0, shelfNum, false,"");
result.Param = new InOutParam(MoveType.InStore, serverResult.barcode, posId, width, height,0, shelfNum, false,"");
int storeId = result.Param.GetStoreId();
if (Store.BoxMap.ContainsKey(storeId))
{
......@@ -401,16 +402,24 @@ namespace OnlineStore.DeviceLibrary
{
result.Param.InStoreNg = true;
result.Param.NgMsg = "入库库位重复";
result.Msg = deviceName + ("收到服务器入库命令 " + "入库库位重复: " + result.Param.ToStr() + " ,入库失败!");
result.Msg = deviceName + ("收到入库命令:" + "入库库位重复: " + result.Param.ToStr() + " ,入库失败!");
return result;
}
LogUtil.info(deviceName + "收到入库命令: " + result.Param.ToStr() + " ");
if (!box.StartInStoreMove(result.Param))
{
if (box.waitInStoreList == null)
{
result.Msg = deviceName + ("收到入库命令:" + "启动入库失败,缓存到waitInStoreList等待稍后入库: " + result.Param.ToStr() + " ");
box.waitInStoreList = result.Param;
}
}
}
else
{
result.Param.InStoreNg = true;
result.Param.NgMsg = "未找到料仓[" + storeId + "]";
result.Msg = deviceName + ("收到服务器入库命令 " + "未找到料仓[" + storeId + "]: " + result.Param.ToStr() + " ,入库失败!");
result.Msg = deviceName + ("收到入库命令:" + "未找到料仓[" + storeId + "]: " + result.Param.ToStr() + " ,入库失败!");
return result;
}
}
......@@ -421,34 +430,51 @@ namespace OnlineStore.DeviceLibrary
}
return result;
}
public static void SendPosToStoreCheck(string deviceName, InOutParam param)
//public static void SendPosToStoreCheck(string deviceName, InOutParam param)
//{
// if (param == null || param.InStoreNg)
// {
// return;
// }
// int storeId = param.GetStoreId();
// BoxBean moveEquip = Store.BoxMap[storeId];
// if (LineServer.BoxCanInStore(moveEquip.DeviceID))
// {
// LineServer.CheckInStorePos(storeId, param);
// }
// else
// {
// //等待3秒后重发验证
// Task.Factory.StartNew(delegate
// {
// LogUtil.error(deviceName + "[" + moveEquip.Name + " ]入库命令: " + param.ToStr() + " 给料仓发送验证失败,等待3秒后重发 ");
// Thread.Sleep(3000);
// LineServer.CheckInStorePos(storeId, param);
// });
// }
// lock (moveEquip.waitInListLock)
// {
// //如果当前正在出入库中,需要记录下来,等待空闲时执行
// LogUtil.info(deviceName + "[" + moveEquip.Name + " ]入库命令: " + param.ToStr() + "加入等待列表中!");
// moveEquip.waitInStoreList.Add(param);
// }
//}
public static bool checkWatch(Stopwatch watch, int targetMs, bool isStop = true)
{
if (param == null || param.InStoreNg)
{
return;
}
int storeId = param.GetStoreId();
MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId];
if (LineServer.BoxCanInStore(moveEquip.DeviceID))
if (!watch.IsRunning)
{
LineServer.CheckInStorePos(storeId, param);
watch.Restart();
return false;
}
else
else if (watch.ElapsedMilliseconds >= targetMs)
{
//等待3秒后重发验证
Task.Factory.StartNew(delegate
if (isStop)
{
LogUtil.error(deviceName + "[" + moveEquip.Name + " ]入库命令: " + param.ToStr() + " 给料仓发送验证失败,等待3秒后重发 ");
Thread.Sleep(3000);
LineServer.CheckInStorePos(storeId, param);
});
}
lock (moveEquip.waitInListLock)
{
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(deviceName + "[" + moveEquip.Name + " ]入库命令: " + param.ToStr() + "加入等待列表中!");
moveEquip.waitInStoreList.Add(param);
watch.Stop();
}
return true;
}
return false;
}
}
public class GetPosResult
......
......@@ -75,7 +75,7 @@ namespace OnlineStore.DeviceLibrary
positionIndex = newIndex;
string posid = boxBean.PositionNumList[positionIndex];
InOutParam param = new InOutParam("AutoOut", posid);
InOutParam param = new InOutParam(MoveType.OutStore, "AutoOut", posid);
//param.NeedOutShelf = false;
//param.NeedEnterShelf = false;
//判断是否需要重置
......@@ -114,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
else
{
string posid = boxBean.PositionNumList[newIndex];
InOutParam param = new InOutParam("AutoIn", posid);
InOutParam param = new InOutParam(MoveType.InStore, "AutoIn", posid);
// param.NeedOutShelf = false;
//判断是否需要重置
if (CurrInOutACount >= StoreManager.Config.Box_ResetACount)
......
......@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary
{
public class InOutParam
{
public InOutParam(string wareNo = "", string posId = "", int platew = 0, int plateh = 0, int targetP = 0,int shefNum,bool IsNg=false,string ngMsg="" )
public InOutParam(MoveType type, string wareNo = "", string posId = "", int platew = 0, int plateh = 0, int targetP = 0, int shefNum=0, bool IsNg = false, string ngMsg = "")
{
WareCode = wareNo;
PosID = posId;
......@@ -23,20 +23,19 @@ namespace OnlineStore.DeviceLibrary
this.shelfNum = shefNum;
this.InStoreNg = IsNg;
this.NgMsg = ngMsg;
this.moveType = type;
}
public InOutParam(string wareNo, string posId, LineMoveP linePosition, int targetP = 0)
public InOutParam(MoveType type, string wareNo, string posId, LineMoveP linePosition, int targetP = 0)
{
WareCode = wareNo;
PosID = posId;
MoveP = linePosition;
this.TargetPosition = targetP;
}
public InOutParam NewParam()
{
InOutParam newp = new InOutParam(WareCode, PosID, PlateW, PlateH);
return newp;
this.TargetPosition = targetP;
this.moveType = type;
}
public MoveType moveType = MoveType.None;
/// <summary>
/// 物品二维码信息
/// </summary>
......@@ -50,7 +49,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 料盘高度
/// </summary>
public int PlateH { get; set; }
public int PlateH { get; set; }
/// <summary>
/// 料盘宽度
/// </summary>
......@@ -67,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 料架编号
/// </summary>
public int shelfNum = 0;
public int shelfNum = 0;
/// <summary>
/// 出入库目标位置,
......@@ -76,6 +75,12 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public int TargetPosition = 0;
/// <summary>
/// 目标料仓,1=左侧,2=右侧
/// </summary>
public int TargetBox = 0;
/// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
/// </summary>
......@@ -109,7 +114,21 @@ namespace OnlineStore.DeviceLibrary
}
public string ToStr()
{
return " 库位 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
if (InStoreNg)
{
return " 入库失败[BOX_" + TargetBox + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
}
else
{
if (moveType.Equals(MoveType.InStore))
{
return " 入库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
}
else
{
return " 出库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
}
}
}
......
......@@ -251,7 +251,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 开始入库移动移动
/// </summary>
public abstract void StartInStoreMove(InOutParam param);
public abstract bool StartInStoreMove(InOutParam param);
protected abstract void InStoreProcess();
#endregion
......
......@@ -406,32 +406,33 @@ namespace OnlineStore.DeviceLibrary
LI_18_GetPosID,
/// <summary>
/// 料盘移栽:等待料仓门口无料盘信号
/// </summary>
LI_21_WaitToBox,
/// <summary>
/// 料盘移栽:获取库位号完成,升降轴到料门口高点,旋转轴到料仓门口
/// </summary>
LI_19_ToBoxDoor,
LI_22_ToBoxDoor,
/// <summary>
/// 料盘移栽: 升降轴到料门口低点,开始预扫码
/// </summary>
LI_20_UpdownDown,
LI_23_UpdownDown,
/// <summary>
/// 料盘移栽: 上料气缸放松
/// </summary>
LI_21_CylinderRelax,
LI_24_CylinderRelax,
/// <summary>
/// 料盘移栽: 升降轴到料门口高点
/// </summary>
LI_22_UpdownUp,
LI_25_UpdownUp,
/// <summary>
/// 料盘移栽:旋转轴返回待机点P1,升降轴到料串高点P2
/// </summary>
LI_23_AxisToWait,
/// <summary>
/// 料盘移栽:判断是否还有料
/// </summary>
LI_24_ToNexTray,
LI_26_AxisToWait,
/// <summary>
......@@ -460,9 +461,14 @@ namespace OnlineStore.DeviceLibrary
///送出料架, 流水线再转动3秒,
/// </summary>
LI_36_LineRun,
/// <summary>
///送出料架, 流水线停止转动,
/// </summary>
LI_37_LineStop,
#endregion
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!