Commit 020e8c88 LN

料叉检测信号和仓门口检测信号功能改为可配置

1 个父辈 53b5febe
...@@ -105,14 +105,10 @@ ...@@ -105,14 +105,10 @@
this.cmbAxisList = new System.Windows.Forms.ComboBox(); this.cmbAxisList = new System.Windows.Forms.ComboBox();
this.label49 = new System.Windows.Forms.Label(); this.label49 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.axis_4_Alarm = new UserFromControl.IOStatusControl();
this.txt4Target = new System.Windows.Forms.TextBox(); this.txt4Target = new System.Windows.Forms.TextBox();
this.lblTargetP4 = new System.Windows.Forms.TextBox(); this.lblTargetP4 = new System.Windows.Forms.TextBox();
this.lblActual4 = new System.Windows.Forms.TextBox(); this.lblActual4 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.label38 = new System.Windows.Forms.Label(); this.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox(); this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox(); this.txtInoutTarget = new System.Windows.Forms.TextBox();
...@@ -190,6 +186,11 @@ ...@@ -190,6 +186,11 @@
this.btnUpDownP6 = new System.Windows.Forms.Button(); this.btnUpDownP6 = new System.Windows.Forms.Button();
this.btnUpDownP3 = new System.Windows.Forms.Button(); this.btnUpDownP3 = new System.Windows.Forms.Button();
this.btnUpDownP4 = new System.Windows.Forms.Button(); this.btnUpDownP4 = new System.Windows.Forms.Button();
this.lblConfigInfo = new System.Windows.Forms.Label();
this.axis_4_Alarm = new UserFromControl.IOStatusControl();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.tabControl2.SuspendLayout(); this.tabControl2.SuspendLayout();
this.tabPage4.SuspendLayout(); this.tabPage4.SuspendLayout();
...@@ -266,9 +267,9 @@ ...@@ -266,9 +267,9 @@
// //
// tabPage4 // tabPage4
// //
this.tabPage4.Controls.Add(this.lblConfigInfo);
this.tabPage4.Controls.Add(this.btnStoreExit); this.tabPage4.Controls.Add(this.btnStoreExit);
this.tabPage4.Controls.Add(this.chbDebug); this.tabPage4.Controls.Add(this.chbDebug);
this.tabPage4.Controls.Add(this.btnStoreHome);
this.tabPage4.Controls.Add(this.chbAuto); this.tabPage4.Controls.Add(this.chbAuto);
this.tabPage4.Controls.Add(this.btnSotreReset); this.tabPage4.Controls.Add(this.btnSotreReset);
this.tabPage4.Controls.Add(this.btnStoreStop); this.tabPage4.Controls.Add(this.btnStoreStop);
...@@ -284,7 +285,7 @@ ...@@ -284,7 +285,7 @@
// btnStoreExit // btnStoreExit
// //
this.btnStoreExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnStoreExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStoreExit.Location = new System.Drawing.Point(539, 4); this.btnStoreExit.Location = new System.Drawing.Point(406, 4);
this.btnStoreExit.Name = "btnStoreExit"; this.btnStoreExit.Name = "btnStoreExit";
this.btnStoreExit.Size = new System.Drawing.Size(132, 39); this.btnStoreExit.Size = new System.Drawing.Size(132, 39);
this.btnStoreExit.TabIndex = 4; this.btnStoreExit.TabIndex = 4;
...@@ -308,12 +309,13 @@ ...@@ -308,12 +309,13 @@
// btnStoreHome // btnStoreHome
// //
this.btnStoreHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnStoreHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStoreHome.Location = new System.Drawing.Point(406, 4); this.btnStoreHome.Location = new System.Drawing.Point(352, 48);
this.btnStoreHome.Name = "btnStoreHome"; this.btnStoreHome.Name = "btnStoreHome";
this.btnStoreHome.Size = new System.Drawing.Size(132, 39); this.btnStoreHome.Size = new System.Drawing.Size(132, 39);
this.btnStoreHome.TabIndex = 3; this.btnStoreHome.TabIndex = 3;
this.btnStoreHome.Text = "回待机位"; this.btnStoreHome.Text = "回待机位";
this.btnStoreHome.UseVisualStyleBackColor = true; this.btnStoreHome.UseVisualStyleBackColor = true;
this.btnStoreHome.Visible = false;
this.btnStoreHome.Click += new System.EventHandler(this.回待机点ToolStripMenuItem_Click); this.btnStoreHome.Click += new System.EventHandler(this.回待机点ToolStripMenuItem_Click);
// //
// chbAuto // chbAuto
...@@ -520,6 +522,7 @@ ...@@ -520,6 +522,7 @@
this.tabPage3.Controls.Add(this.btnImgSave); this.tabPage3.Controls.Add(this.btnImgSave);
this.tabPage3.Controls.Add(this.btnFcomp); this.tabPage3.Controls.Add(this.btnFcomp);
this.tabPage3.Controls.Add(this.btnForig); this.tabPage3.Controls.Add(this.btnForig);
this.tabPage3.Controls.Add(this.btnStoreHome);
this.tabPage3.Controls.Add(this.btnClearLog); this.tabPage3.Controls.Add(this.btnClearLog);
this.tabPage3.Controls.Add(this.btnCloseDoor); this.tabPage3.Controls.Add(this.btnCloseDoor);
this.tabPage3.Controls.Add(this.btnOpenDoor); this.tabPage3.Controls.Add(this.btnOpenDoor);
...@@ -612,7 +615,7 @@ ...@@ -612,7 +615,7 @@
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(3, 96); this.richTextBox1.Location = new System.Drawing.Point(3, 96);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(558, 404); this.richTextBox1.Size = new System.Drawing.Size(558, 397);
this.richTextBox1.TabIndex = 256; this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = ""; this.richTextBox1.Text = "";
this.richTextBox1.VisibleChanged += new System.EventHandler(this.richTextBox1_VisibleChanged); this.richTextBox1.VisibleChanged += new System.EventHandler(this.richTextBox1_VisibleChanged);
...@@ -1199,17 +1202,6 @@ ...@@ -1199,17 +1202,6 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态"; this.groupBox1.Text = "伺服状态";
// //
// axis_4_Alarm
//
this.axis_4_Alarm.IOName = "";
this.axis_4_Alarm.IOValue = 0;
this.axis_4_Alarm.isCanClick = false;
this.axis_4_Alarm.Location = new System.Drawing.Point(432, 39);
this.axis_4_Alarm.Margin = new System.Windows.Forms.Padding(4);
this.axis_4_Alarm.Name = "axis_4_Alarm";
this.axis_4_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_4_Alarm.TabIndex = 271;
//
// txt4Target // txt4Target
// //
this.txt4Target.Location = new System.Drawing.Point(409, 143); this.txt4Target.Location = new System.Drawing.Point(409, 143);
...@@ -1244,39 +1236,6 @@ ...@@ -1244,39 +1236,6 @@
this.label7.TabIndex = 267; this.label7.TabIndex = 267;
this.label7.Text = "轴四:压紧轴"; this.label7.Text = "轴四:压紧轴";
// //
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(127, 40);
this.axis_1_Alarm.Margin = new System.Windows.Forms.Padding(4);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(329, 40);
this.axis_3_Alarm.Margin = new System.Windows.Forms.Padding(4);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(224, 40);
this.axis_2_Alarm.Margin = new System.Windows.Forms.Padding(4);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// label38 // label38
// //
this.label38.AutoSize = true; this.label38.AutoSize = true;
...@@ -2342,6 +2301,61 @@ ...@@ -2342,6 +2301,61 @@
this.btnUpDownP4.UseVisualStyleBackColor = false; this.btnUpDownP4.UseVisualStyleBackColor = false;
this.btnUpDownP4.Click += new System.EventHandler(this.btnUpDownP4_Click); this.btnUpDownP4.Click += new System.EventHandler(this.btnUpDownP4_Click);
// //
// lblConfigInfo
//
this.lblConfigInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblConfigInfo.ForeColor = System.Drawing.Color.Blue;
this.lblConfigInfo.Location = new System.Drawing.Point(543, 4);
this.lblConfigInfo.Name = "lblConfigInfo";
this.lblConfigInfo.Size = new System.Drawing.Size(260, 36);
this.lblConfigInfo.TabIndex = 273;
this.lblConfigInfo.Text = "移栽状态";
this.lblConfigInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// axis_4_Alarm
//
this.axis_4_Alarm.IOName = "";
this.axis_4_Alarm.IOValue = 0;
this.axis_4_Alarm.isCanClick = false;
this.axis_4_Alarm.Location = new System.Drawing.Point(432, 39);
this.axis_4_Alarm.Margin = new System.Windows.Forms.Padding(4);
this.axis_4_Alarm.Name = "axis_4_Alarm";
this.axis_4_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_4_Alarm.TabIndex = 271;
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(127, 40);
this.axis_1_Alarm.Margin = new System.Windows.Forms.Padding(4);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(329, 40);
this.axis_3_Alarm.Margin = new System.Windows.Forms.Padding(4);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(224, 40);
this.axis_2_Alarm.Margin = new System.Windows.Forms.Padding(4);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// FrmStoreBox // FrmStoreBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
...@@ -2555,6 +2569,7 @@ ...@@ -2555,6 +2569,7 @@
private System.Windows.Forms.Button btnFcomp; private System.Windows.Forms.Button btnFcomp;
private System.Windows.Forms.Button btnForig; private System.Windows.Forms.Button btnForig;
private System.Windows.Forms.Button btnImgSave; private System.Windows.Forms.Button btnImgSave;
private System.Windows.Forms.Label lblConfigInfo;
} }
} }
...@@ -58,6 +58,16 @@ namespace OnlineStore.ACSingleStore ...@@ -58,6 +58,16 @@ namespace OnlineStore.ACSingleStore
btnFcomp.Visible = canCom; btnFcomp.Visible = canCom;
btnForig.Visible = canCom; btnForig.Visible = canCom;
btnImgSave.Visible = !String.IsNullOrEmpty(store.Config.PhotoCamera_Name); btnImgSave.Visible = !String.IsNullOrEmpty(store.Config.PhotoCamera_Name);
string text = "";
if (store.Config.IsUse_Tray_Check.Equals(1))
{
text += "启用料叉料盘检测\r";
}
if (store.Config.IsUse_Door_Check.Equals(1))
{
text += "启用仓门口料盘检测";
}
lblConfigInfo.Text = text;
LoadOk = true; LoadOk = true;
} }
private void LoadStore() private void LoadStore()
...@@ -211,6 +221,7 @@ namespace OnlineStore.ACSingleStore ...@@ -211,6 +221,7 @@ namespace OnlineStore.ACSingleStore
chbDebug.Checked = store.IsDebug; chbDebug.Checked = store.IsDebug;
LoadOk = true; LoadOk = true;
} }
lblTemp.Text = store.currTempStr; lblTemp.Text = store.currTempStr;
lblMoveEquipInfo.Text = "移栽状态:"+(LineConnect.CanStartOut() ? "可出库":"不可出库" )+" "+LineConnect.LastUpdateTime.ToLongTimeString()+"" ; lblMoveEquipInfo.Text = "移栽状态:"+(LineConnect.CanStartOut() ? "可出库":"不可出库" )+" "+LineConnect.LastUpdateTime.ToLongTimeString()+"" ;
//忙碌状态不读取状态 //忙碌状态不读取状态
......
...@@ -58,3 +58,13 @@ ...@@ -58,3 +58,13 @@
StoreConfig.csv增加配置: StoreConfig.csv增加配置:
PRO,,仓门口相机IP,Camera_IP,192.168.1.123,,,,,,,,,,,, PRO,,仓门口相机IP,Camera_IP,192.168.1.123,,,,,,,,,,,,
PRO,,拍照相机名称,PhotoCamera_Name,,,,,,,,,,,,, PRO,,拍照相机名称,PhotoCamera_Name,,,,,,,,,,,,,
20210611更新说明:
修改内容:
启用料叉检测信号为1时,出入库取料之后会若料叉料盘检测信号没亮会报警。
启用仓门口料盘检测为1时,出库到仓门口,入库开始时,若仓门检测信号没亮会报警。
StoreConfig.csv需要增加一行配置:
PRO,是否启用仓门口料盘检测信号,IsUse_Door_Check,1,,,,,,,,,,,
\ No newline at end of file \ No newline at end of file
...@@ -88,7 +88,8 @@ PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,, ...@@ -88,7 +88,8 @@ PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,,,,, PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,,, PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,, PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,,,,, PRO,是否使用料叉料盘检测信号,IsUse_Tray_Check,1,,,,,,,,,,,
PRO,是否启用仓门口料盘检测信号,IsUse_Door_Check,1,,,,,,,,,,,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,,,,, PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,,,,, PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,,,,, PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,,,,,
......
...@@ -172,11 +172,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -172,11 +172,13 @@ namespace OnlineStore.DeviceLibrary
{ {
wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue); wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue);
int timeOutMs = Config.IOSingle_TimerOut; int timeOutMs = Config.IOSingle_TimerOut;
if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_29_WaitTake)) if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_31_WaitTake))
{ {
timeOutMs = 650000; timeOutMs = 650000;
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_27_CheckTray)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_29_CheckTray)
|| StoreMove.MoveStep.Equals(StoreMoveStep.SO_22_WaitTray)
||StoreMove.MoveStep.Equals(StoreMoveStep.SO_27_WaitDoorTray))
{ {
timeOutMs = 5000; timeOutMs = 5000;
} }
...@@ -199,7 +201,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -199,7 +201,7 @@ namespace OnlineStore.DeviceLibrary
isOk = false; isOk = false;
break; break;
} }
else if ((!wait.IsEnd) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_29_WaitTake) && LineConnect.CanReSend()) else if ((!wait.IsEnd) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_31_WaitTake) && LineConnect.CanReSend())
{ {
//判断是否需要重发入库结束命令 //判断是否需要重发入库结束命令
SendOutStoreEnd(StoreMove); SendOutStoreEnd(StoreMove);
...@@ -295,12 +297,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -295,12 +297,12 @@ namespace OnlineStore.DeviceLibrary
{ {
if (!LoadParamPosition(param)) if (!LoadParamPosition(param))
{ {
LogUtil.error( StoreName + " 启动入库【" + posId + "】出错,找不到库位信息"); LogUtil.error(StoreName + " 启动入库【" + posId + "】出错,找不到库位信息");
return; return;
} }
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error( StoreName + " 启动入库【" + posId + "】出错,叉子料盘检测有料"); LogUtil.error(StoreName + " 启动入库【" + posId + "】出错,叉子料盘检测有料");
return; return;
} }
LogUtil.info(LOGGER, StoreName + " 启动入库【" + posId + "】", storeMoveColor); LogUtil.info(LOGGER, StoreName + " 启动入库【" + posId + "】", storeMoveColor);
...@@ -323,21 +325,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -323,21 +325,31 @@ namespace OnlineStore.DeviceLibrary
{ {
doorCheckWatch.Stop(); doorCheckWatch.Stop();
} }
if (Config.IsUse_Door_Check.Equals(1) && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
//料盘检测
StoreMove.NextMoveStep(StoreMoveStep.SI_00_TrayCheck);
InStoreLog("入库:等待仓门口有料");
StoreMove.TimeOutSeconds = 5;
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(100));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
}
else
{
SI_02_Move(param.MoveP); SI_02_Move(param.MoveP);
}
} }
else else
{ {
LogUtil.error( StoreName + " 启动【" + posId + "】入库出错,当前状态,storeStatus=" + storeRunStatus); LogUtil.error(StoreName + " 启动【" + posId + "】入库出错,当前状态,storeStatus=" + storeRunStatus);
} }
} }
private void SI_02_Move(LineMoveP moveP) private void SI_02_Move(LineMoveP moveP)
{ {
InStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门");
StoreMove.NextMoveStep(StoreMoveStep.SI_02_InOutAxisHome); StoreMove.NextMoveStep(StoreMoveStep.SI_02_InOutAxisHome);
InStoreLog("入库: 进出轴(叉子)动作至P1,打开舱门");
OpenDoor(); OpenDoor();
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
...@@ -400,14 +412,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -400,14 +412,14 @@ namespace OnlineStore.DeviceLibrary
if (VisionComp(out Dictionary<string, bool> exist)) if (VisionComp(out Dictionary<string, bool> exist))
{ {
string fileName = SaveComName(); string fileName = SaveComName();
InStoreLog("入库:门口检测信号不亮,但视觉识别有料盘,认为有料:"+fileName); InStoreLog("入库:门口检测信号不亮,但视觉识别有料盘,认为有料:" + fileName);
SI_02_Move(moveP); SI_02_Move(moveP);
return; return;
} }
} }
WarnMsg = StoreName + "入库 等待料仓门口检测到料盘 [" + StoreMove.MoveParam.PosInfo.barcode + "] [" + StoreMove.MoveParam.PosInfo.PosId + "] 超时 [" + Math.Round(StoreMove.StepSpan().TotalSeconds, 1) + "]秒 "; WarnMsg = StoreName + "入库 等待料仓门口检测到料盘 [" + StoreMove.MoveParam.PosInfo.barcode + "] [" + StoreMove.MoveParam.PosInfo.PosId + "] 超时 [" + Math.Round(StoreMove.StepSpan().TotalSeconds, 1) + "]秒 ";
LogUtil.error( WarnMsg, 100); LogUtil.error(WarnMsg, 100);
Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnMsg, StoreMove.MoveType); Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnMsg, StoreMove.MoveType);
} }
} }
...@@ -416,11 +428,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -416,11 +428,11 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : "";
CodeMsg = "" + posId + "_"+StoreMove.MoveParam.PosInfo.barcode+"_空入"; CodeMsg = "" + posId + "_" + StoreMove.MoveParam.PosInfo.barcode + "_空入";
LogUtil.error(CodeMsg); LogUtil.error(CodeMsg);
} }
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome); StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
InStoreLog("入库:SI_03 所有轴回到待机点,升降轴到P1 [" + moveP.UpDown_P1 + "],旋转轴到P1 [" + moveP.Middle_P1 + "],,压紧轴到P3 [" + moveP.ComPress_P3 + "],打开仓门"); InStoreLog("入库 : 所有轴回到待机点,升降轴到P1 [" + moveP.UpDown_P1 + "],旋转轴到P1 [" + moveP.Middle_P1 + "],,压紧轴到P3 [" + moveP.ComPress_P3 + "],打开仓门");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000));
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
...@@ -430,7 +442,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -430,7 +442,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
InStoreLog("入库:SI_03 升降轴已在P1[" + moveP.UpDown_P1 + "]"); InStoreLog("入库: 升降轴已在P1[" + moveP.UpDown_P1 + "]");
} }
if (!ACServerManager.isInPosition(Config.Middle_Axis, moveP.Middle_P1)) if (!ACServerManager.isInPosition(Config.Middle_Axis, moveP.Middle_P1))
{ {
...@@ -438,7 +450,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -438,7 +450,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
InStoreLog("入库:SI_03 旋转轴已在P1 [" + moveP.Middle_P1 + "]"); InStoreLog("入库:旋转轴已在P1 [" + moveP.Middle_P1 + "]");
} }
OpenDoor(); OpenDoor();
} }
...@@ -453,19 +465,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -453,19 +465,28 @@ namespace OnlineStore.DeviceLibrary
else if (StoreMove.MoveStep == StoreMoveStep.SI_05_DeviceToDoor) else if (StoreMove.MoveStep == StoreMoveStep.SI_05_DeviceToDoor)
{ {
//NeedCheckSafetyLight = 0; //NeedCheckSafetyLight = 0;
InStoreLog("入库:SI_06 拿物品,压紧轴至P2(压紧点))[" + moveP.ComPress_P2 + "] 升降轴至P7(进料口取料缓冲点) [" + moveP.UpDown_P7 + "]"); StoreMove.NextMoveStep(StoreMoveStep.SI_06_GetWare);
StoreMove.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice); InStoreLog("入库: 拿物品,压紧轴至P2(压紧点))[" + moveP.ComPress_P2 + "] 升降轴至P7(进料口取料缓冲点) [" + moveP.UpDown_P7 + "]");
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed); ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_06_DoorWarToDevice) else if (StoreMove.MoveStep == StoreMoveStep.SI_06_GetWare)
{ {
InStoreLog("入库:SI_07 叉子 从入料口抽出,进出轴至P1(待机点)[" + moveP.InOut_P1 + "] "); StoreMove.NextMoveStep(StoreMoveStep.SI_07_InoutToP1);
StoreMove.NextMoveStep(StoreMoveStep.SI_07_DeviceBackFromDoor); InStoreLog("入库:进出轴至P1(待机点)[" + moveP.InOut_P1 + "] ");
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed); //ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_07_DeviceBackFromDoor) else if (StoreMove.MoveStep == StoreMoveStep.SI_07_InoutToP1)
{
if (Config.IsUse_Tray_Check.Equals(1) && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
StoreMove.NextMoveStep(StoreMoveStep.SI_07_InoutToP1);
InStoreLog("入库:等待料叉有料 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
StoreMove.TimeOutSeconds = 5;
}
else
{ {
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{ {
...@@ -473,56 +494,47 @@ namespace OnlineStore.DeviceLibrary ...@@ -473,56 +494,47 @@ namespace OnlineStore.DeviceLibrary
CodeMsg = "入库[" + posId + "]叉子取料后退后,未检测到料叉有料"; CodeMsg = "入库[" + posId + "]叉子取料后退后,未检测到料叉有料";
LogUtil.error(CodeMsg); LogUtil.error(CodeMsg);
} }
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0)) SI_11_MoveToBag();
{
InStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点)[" + moveP.Middle_P2 + "], 升降轴至P3(库位入库前点)[" + moveP.UpDown_P3 + "] ");
StoreMove.NextMoveStep(StoreMoveStep.SI_09_MoveToBag);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
CloseDoor(false);
} }
else
{
InStoreLog("入库:SI_08 定位气缸伸出 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_08_LocationCylinder_Up);
LocationUpAndWait();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_08_WaitTray)
{
SI_11_MoveToBag();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_08_LocationCylinder_Up) else if (StoreMove.MoveStep == StoreMoveStep.SI_09_LocationUp)
{ {
InStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点)[" + moveP.Middle_P2 + "],升降轴至P3(库位入库前点))[" + moveP.UpDown_P3 + "],关闭舱门 "); StoreMove.NextMoveStep(StoreMoveStep.SI_11_MoveToBag);
StoreMove.NextMoveStep(StoreMoveStep.SI_09_MoveToBag); InStoreLog("入库: 移动到库位点,旋转轴至P2(库位点)[" + moveP.Middle_P2 + "],升降轴至P3(库位入库前点))[" + moveP.UpDown_P3 + "],关闭舱门 ");
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
CloseDoor(false); CloseDoor(false);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_09_MoveToBag) else if (StoreMove.MoveStep == StoreMoveStep.SI_11_MoveToBag)
{ {
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0)) if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
{ {
InStoreLog("入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) [" + moveP.InOut_P3 + "]"); StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutToP3);
StoreMove.NextMoveStep(StoreMoveStep.SI_11_DeviceToBag); InStoreLog("入库: 叉子进入库位中,进出轴至P3(库位取放料点) [" + moveP.InOut_P3 + "]");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
} }
else else
{ {
InStoreLog("入库:SI_10 定位气缸退回 "); StoreMove.NextMoveStep(StoreMoveStep.SI_12_LocationDown);
StoreMove.NextMoveStep(StoreMoveStep.SI_10_LocationCylinder_Down); InStoreLog("入库: 定位气缸退回 ");
LocationDownAndWait(); LocationDownAndWait();
} }
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_10_LocationCylinder_Down) else if (StoreMove.MoveStep == StoreMoveStep.SI_12_LocationDown)
{ {
//IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW); //IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
InStoreLog("入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) [" + moveP.InOut_P3 + "] "); StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutToP3);
StoreMove.NextMoveStep(StoreMoveStep.SI_11_DeviceToBag); InStoreLog("入库:叉子进入库位中,进出轴至P3(库位取放料点) [" + moveP.InOut_P3 + "] ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_11_DeviceToBag) else if (StoreMove.MoveStep == StoreMoveStep.SI_13_InoutToP3)
{ {
InStoreLog("入库:SI_12 放下物品,升降轴至P4(库位入料缓冲点)[" + moveP.UpDown_P4 + "] ,压紧轴至P3(压紧前点) [" + moveP.ComPress_P3 + "]");
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态) // 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : "";
lastPosId = posId; lastPosId = posId;
...@@ -531,33 +543,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -531,33 +543,34 @@ namespace OnlineStore.DeviceLibrary
//手动发给服务器状态,防止没有手动 //手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd); //SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag); StoreMove.NextMoveStep(StoreMoveStep.SI_14_PutWareToBag);
InStoreLog("入库: 放下物品,升降轴至P4(库位入料缓冲点)[" + moveP.UpDown_P4 + "] ,压紧轴至P3(压紧前点) [" + moveP.ComPress_P3 + "]");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_12_PutWareToBag) else if (StoreMove.MoveStep == StoreMoveStep.SI_14_PutWareToBag)
{ {
InStoreLog("入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) "); StoreMove.NextMoveStep(StoreMoveStep.SI_15_InoutBack);
StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutBack); InStoreLog("入库: 叉子从库位中返回,进出轴动作至P1(待机点) ");
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_13_InoutBack) else if (StoreMove.MoveStep == StoreMoveStep.SI_15_InoutBack)
{ {
InStoreLog("入库:SI_14_GoBack 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭"); StoreMove.NextMoveStep(StoreMoveStep.SI_16_GoBack);
StoreMove.NextMoveStep(StoreMoveStep.SI_14_GoBack); InStoreLog("入库: 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭");
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor(); CloseDoor();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_15_WaitNoReel) else if (StoreMove.MoveStep == StoreMoveStep.SI_17_WaitNoReel)
{ {
InStoreLog("入库:SI_15_WaitNoReel 等待料叉无信号 "); StoreMove.NextMoveStep(StoreMoveStep.SI_17_WaitNoReel);
StoreMove.NextMoveStep(StoreMoveStep.SI_15_WaitNoReel); InStoreLog("入库: 等待料叉无信号 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_14_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SI_16_GoBack)
{ {
TimeSpan span = DateTime.Now - startInStoreTime; TimeSpan span = DateTime.Now - startInStoreTime;
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : "";
...@@ -574,6 +587,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -574,6 +587,25 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void SI_11_MoveToBag()
{
LineMoveP moveP = StoreMove.MoveParam.MoveP;
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
{
StoreMove.NextMoveStep(StoreMoveStep.SI_11_MoveToBag);
InStoreLog("入库:移动到库位点,旋转轴至P2(库位点)[" + moveP.Middle_P2 + "], 升降轴至P3(库位入库前点)[" + moveP.UpDown_P3 + "] ");
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
CloseDoor(false);
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.SI_09_LocationUp);
InStoreLog("入库: 定位气缸伸出 ");
LocationUpAndWait();
}
}
#endregion #endregion
...@@ -769,54 +801,90 @@ namespace OnlineStore.DeviceLibrary ...@@ -769,54 +801,90 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
else if (StoreMove.MoveStep == StoreMoveStep.SO_21_ToDoorP) else if (StoreMove.MoveStep == StoreMoveStep.SO_21_ToDoorP)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_22_WaitNoTray); //判断叉子是否有料
OutStoreLog("出库定位:打开仓门,等待门口无料盘信号 "); if (Config.IsUse_Tray_Check.Equals(1) && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
StoreMove.NextMoveStep(StoreMoveStep.SO_22_WaitTray);
OutStoreLog("出库:打开仓门,等待料叉有料 ");
StoreMove.TimeOutSeconds = 5;
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
OpenDoor(false);
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_23_WaitNoTray);
OutStoreLog("出库:打开仓门,等待门口无料盘信号 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
OpenDoor(); OpenDoor();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_22_WaitNoTray) }
else if (StoreMove.MoveStep == StoreMoveStep.SO_22_WaitTray)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_23_WaitNoTray);
OutStoreLog("出库:打开仓门,等待门口无料盘信号 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
OpenDoor();
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_23_WaitNoTray)
{ {
if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW) && VisionComp(out Dictionary<string, bool> exist)) if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW) && VisionComp(out Dictionary<string, bool> exist))
{ {
string fileName = SaveComName(); string fileName = SaveComName();
LogUtil.error(StoreName + "_"+StoreMove.MoveStep+"_"+StoreMove.MoveParam.PosInfo.PosId+ "出库:门口检测信号无料,但视觉识别有料盘:"+fileName); LogUtil.error(StoreName + "_" + StoreMove.MoveStep + "_" + StoreMove.MoveParam.PosInfo.PosId + "出库:门口检测信号无料,但视觉识别有料盘:" + fileName);
} }
SO_53_InoutToP2(); SO_53_InoutToP2();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_23_InoutToP2) else if (StoreMove.MoveStep == StoreMoveStep.SO_24_InoutToP2)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_24_PutWare); StoreMove.NextMoveStep(StoreMoveStep.SO_25_PutWare);
OutStoreLog("出库:升降轴至P8(进料口出料缓冲点) "); OutStoreLog("出库:升降轴至P8(进料口出料缓冲点) ");
//NeedCheckSafetyLight = 0; //NeedCheckSafetyLight = 0;
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P8, Config.UpDownAxis_P8_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P8, Config.UpDownAxis_P8_Speed);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_24_PutWare) else if (StoreMove.MoveStep == StoreMoveStep.SO_25_PutWare)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_25_InoutToP1); StoreMove.NextMoveStep(StoreMoveStep.SO_26_InoutToP1);
OutStoreLog("出库:进出轴动作至P1(待机点) "); OutStoreLog("出库:进出轴动作至P1(待机点) ");
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_25_InoutToP1) else if (StoreMove.MoveStep == StoreMoveStep.SO_26_InoutToP1)
{
if (Config.IsUse_Door_Check.Equals(1) && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_26_CloseDoor); StoreMove.NextMoveStep(StoreMoveStep.SO_27_WaitDoorTray);
OutStoreLog("出库:等待仓门口有料");
StoreMove.TimeOutSeconds = 5;
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_28_CloseDoor);
OutStoreLog("出库:轴2至P1(待机点) ,关闭舱门");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000));
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor();
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_27_WaitDoorTray)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_28_CloseDoor);
OutStoreLog("出库:轴2至P1(待机点) ,关闭舱门"); OutStoreLog("出库:轴2至P1(待机点) ,关闭舱门");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000));
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor(); CloseDoor();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_26_CloseDoor) else if (StoreMove.MoveStep == StoreMoveStep.SO_28_CloseDoor)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_27_CheckTray); StoreMove.NextMoveStep(StoreMoveStep.SO_29_CheckTray);
OutStoreLog("出库:检测料仓门口料盘信号 ,最多1000"); OutStoreLog("出库:检测料仓门口料盘信号 ,最多1000");
StoreMove.OneWaitCanEndStep = true; StoreMove.OneWaitCanEndStep = true;
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_27_CheckTray)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_29_CheckTray))
{ {
if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
...@@ -827,7 +895,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -827,7 +895,7 @@ namespace OnlineStore.DeviceLibrary
if (hasReel) if (hasReel)
{ {
string fileName = SaveComName(); string fileName = SaveComName();
LogUtil.error(StoreName + "" + posId + "_" + barcode + "_料盘到仓门口未检测到信号,但视觉识别有料盘:"+fileName); LogUtil.error(StoreName + "" + posId + "_" + barcode + "_料盘到仓门口未检测到信号,但视觉识别有料盘:" + fileName);
} }
else else
{ {
...@@ -845,7 +913,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -845,7 +913,7 @@ namespace OnlineStore.DeviceLibrary
} }
SO_28_GoBack(); SO_28_GoBack();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_28_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SO_30_GoBack)
{ {
int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds); int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds);
if (OutStoreWaitSeconds <= 0) if (OutStoreWaitSeconds <= 0)
...@@ -853,14 +921,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -853,14 +921,14 @@ namespace OnlineStore.DeviceLibrary
OutStoreWaitSeconds = 600; OutStoreWaitSeconds = 600;
} }
int ms = OutStoreWaitSeconds * 1000; int ms = OutStoreWaitSeconds * 1000;
StoreMove.NextMoveStep(StoreMoveStep.SO_29_WaitTake); StoreMove.NextMoveStep(StoreMoveStep.SO_31_WaitTake);
OutStoreLog("出库: 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒"); OutStoreLog("出库: 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0)); // StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove.OneWaitCanEndStep = true; StoreMove.OneWaitCanEndStep = true;
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_29_WaitTake) else if (StoreMove.MoveStep == StoreMoveStep.SO_31_WaitTake)
{ {
TimeSpan span = DateTime.Now - startOutStoreTime; TimeSpan span = DateTime.Now - startOutStoreTime;
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : "";
...@@ -873,13 +941,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -873,13 +941,13 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error( StoreName + " 出库处理,moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!"); LogUtil.error(StoreName + " 出库处理,moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!");
} }
} }
public bool OutCheckAlarm() public bool OutCheckAlarm()
{ {
if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut) && StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_27_CheckTray)) if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut) && StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_29_CheckTray))
{ {
return true; return true;
} }
...@@ -896,7 +964,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -896,7 +964,7 @@ namespace OnlineStore.DeviceLibrary
} }
private void SO_28_GoBack() private void SO_28_GoBack()
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_28_GoBack); StoreMove.NextMoveStep(StoreMoveStep.SO_30_GoBack);
OutStoreLog("出库:发送出库完成消息给流水线"); OutStoreLog("出库:发送出库完成消息给流水线");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(500)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(500));
//ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed); //ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
...@@ -946,7 +1014,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -946,7 +1014,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//判断仓门是否打开 //判断仓门是否打开
LineMoveP moveP = StoreMove.MoveParam.MoveP; LineMoveP moveP = StoreMove.MoveParam.MoveP;
StoreMove.NextMoveStep(StoreMoveStep.SO_23_InoutToP2); StoreMove.NextMoveStep(StoreMoveStep.SO_24_InoutToP2);
OutStoreLog("出库:进出轴至P2(进料口取料点) "); OutStoreLog("出库:进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
//NeedCheckSafetyLight = 1; //NeedCheckSafetyLight = 1;
...@@ -954,7 +1022,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -954,7 +1022,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
InStoreLog("出库:SO_09 叉子即将取料,发现门未上升到位,重新打开门 "); InStoreLog("出库:SO_09 叉子即将取料,发现门未上升到位,重新打开门 ");
StoreMove.NextMoveStep(StoreMoveStep.SO_22_WaitNoTray); StoreMove.NextMoveStep(StoreMoveStep.SO_23_WaitNoTray);
OpenDoor(); OpenDoor();
} }
...@@ -1121,13 +1189,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -1121,13 +1189,13 @@ namespace OnlineStore.DeviceLibrary
private void InStoreLog(string msg) private void InStoreLog(string msg)
{ {
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : ""; string posId = StoreMove.MoveParam != null ? "【" + StoreMove.MoveParam.PosInfo.PosId + "】" : " ";
LogUtil.info(LOGGER, "【" + posId + "】" + msg, storeMoveColor); LogUtil.info(LOGGER, posId + StoreMove.MoveStep .ToString().Substring(0,6)+ msg, storeMoveColor);
} }
private void OutStoreLog(string msg) private void OutStoreLog(string msg)
{ {
string posId = StoreMove.MoveParam != null ? "【" + StoreMove.MoveParam.PosInfo.PosId + "】" : " "; string posId = StoreMove.MoveParam != null ? "【" + StoreMove.MoveParam.PosInfo.PosId + "】" : " ";
LogUtil.info(LOGGER, posId + StoreMove.MoveStep + " " + msg, storeMoveColor); LogUtil.info(LOGGER, posId + StoreMove.MoveStep.ToString().Substring(0,6) + " " + msg, storeMoveColor);
} }
} }
} }
...@@ -262,38 +262,48 @@ namespace OnlineStore.DeviceLibrary ...@@ -262,38 +262,48 @@ namespace OnlineStore.DeviceLibrary
/// 料仓出库,,所有设备运行到门,,旋转轴到P1( 待机点)升降轴到P2( 进料口出料前点) /// 料仓出库,,所有设备运行到门,,旋转轴到P1( 待机点)升降轴到P2( 进料口出料前点)
/// </summary> /// </summary>
SO_21_ToDoorP = 121, SO_21_ToDoorP = 121,
/// <summary>
/// 料仓出库:等待夹爪有料
/// </summary>
SO_22_WaitTray,
/// <summary> /// <summary>
/// 等待门口无料盘 /// 等待门口无料盘
/// </summary> /// </summary>
SO_22_WaitNoTray, SO_23_WaitNoTray,
/// <summary> /// <summary>
/// 料仓出库,,叉子进出料口,,进出轴到P2( 进料口取料点) /// 料仓出库,,叉子进出料口,,进出轴到P2( 进料口取料点)
/// /// </summary> /// /// </summary>
SO_23_InoutToP2, SO_24_InoutToP2,
/// <summary> /// <summary>
/// 料仓出库,,把物品放下,,升降轴到P8( 进料口出料缓冲点)压紧轴到P1( 待机点) /// 料仓出库,,把物品放下,,升降轴到P8( 进料口出料缓冲点)压紧轴到P1( 待机点)
/// </summary> /// </summary>
SO_24_PutWare, SO_25_PutWare,
/// <summary> /// <summary>
/// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点) /// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点)
/// </summary> /// </summary>
SO_25_InoutToP1, SO_26_InoutToP1,
/// <summary>
/// 料仓出库:等待仓门口有料
/// </summary>
SO_27_WaitDoorTray,
/// <summary> /// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点),关闭仓门 /// 料仓出库,,升降轴返回,, 轴2至P1( 待机点),关闭仓门
/// </summary> /// </summary>
SO_26_CloseDoor, SO_28_CloseDoor,
/// <summary> /// <summary>
/// 料仓出库,检测料仓门口信号 /// 料仓出库,检测料仓门口信号
/// </summary> /// </summary>
SO_27_CheckTray, SO_29_CheckTray,
/// <summary> /// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点) /// 料仓出库,,升降轴返回,, 轴2至P1( 待机点)
/// </summary> /// </summary>
SO_28_GoBack, SO_30_GoBack,
/// <summary> /// <summary>
/// 等待拿走物品 /// 等待拿走物品
/// </summary> /// </summary>
SO_29_WaitTake, SO_31_WaitTake,
#endregion #endregion
...@@ -309,60 +319,65 @@ namespace OnlineStore.DeviceLibrary ...@@ -309,60 +319,65 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 入库。。进出轴(叉子)先返回P1 /// 入库。。进出轴(叉子)先返回P1
/// </summary> /// </summary>
SI_02_InOutAxisHome = 202, SI_02_InOutAxisHome ,
/// <summary> /// <summary>
/// 入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3 /// 入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3
/// </summary> /// </summary>
SI_03_ReturnHome = 203, SI_03_ReturnHome ,
/// <summary> /// <summary>
/// 入库。。压紧物品(有压紧轴的才需要此步骤),压紧轴到P3(压紧前点) /// 入库。。压紧物品(有压紧轴的才需要此步骤),压紧轴到P3(压紧前点)
/// </summary> /// </summary>
SI_04_CompressWare = 204, SI_04_CompressWare,
/// <summary> /// <summary>
/// 入库。。叉子进入入料口,进出轴到P2( 进料口取料点) /// 入库。。叉子进入入料口,进出轴到P2( 进料口取料点)
/// </summary> /// </summary>
SI_05_DeviceToDoor = 205, SI_05_DeviceToDoor,
/// <summary> /// <summary>
/// 入库。。把物品放入叉子上,升降轴到P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),压紧轴到P2(压紧点) /// 入库。。把物品放入叉子上,升降轴到P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),压紧轴到P2(压紧点)
/// </summary> /// </summary>
SI_06_DoorWarToDevice = 206, SI_06_GetWare,
/// <summary> /// <summary>
/// 入库。。叉子 从入料口抽出,进出轴到P1( 待机点) /// 入库。。叉子 从入料口抽出,进出轴到P1( 待机点)
/// </summary> /// </summary>
SI_07_DeviceBackFromDoor = 207, SI_07_InoutToP1,
/// <summary>
/// 入库:等待叉子有料
/// </summary>
SI_08_WaitTray,
/// <summary> /// <summary>
/// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤) /// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤)
/// </summary> /// </summary>
SI_08_LocationCylinder_Up = 208, SI_09_LocationUp,
/// <summary> /// <summary>
/// 入库。。移动到库位点,旋转轴到P2( 库位点)升降轴到P3(库位入库前点) /// 入库。。移动到库位点,旋转轴到P2( 库位点)升降轴到P3(库位入库前点)
/// </summary> /// </summary>
SI_09_MoveToBag = 209, SI_11_MoveToBag,
/// <summary> /// <summary>
/// 入库。。定位气缸退回 (有压紧轴的不需要此步骤) /// 入库。。定位气缸退回 (有压紧轴的不需要此步骤)
/// </summary> /// </summary>
SI_10_LocationCylinder_Down = 210, SI_12_LocationDown,
/// <summary> /// <summary>
/// 入库。。叉子进入库位中,进出轴到P3(库位取放料点) /// 入库。。叉子进入库位中,进出轴到P3(库位取放料点)
/// </summary> /// </summary>
SI_11_DeviceToBag = 211, SI_13_InoutToP3,
/// <summary> /// <summary>
/// 入库。。放下物品,升降轴到P4( 库位入料缓冲点)压紧轴到P3( 压紧前点) /// 入库。。放下物品,升降轴到P4( 库位入料缓冲点)压紧轴到P3( 压紧前点)
/// </summary> /// </summary>
SI_12_PutWareToBag = 212, SI_14_PutWareToBag,
/// <summary> /// <summary>
/// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点) /// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点)
/// </summary> /// </summary>
SI_13_InoutBack, SI_15_InoutBack,
/// <summary> /// <summary>
/// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始 /// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始
/// </summary> /// </summary>
SI_14_GoBack, SI_16_GoBack,
/// <summary> /// <summary>
/// 入库。等待叉子无信号 /// 入库。等待叉子无信号
/// </summary> /// </summary>
SI_15_WaitNoReel, SI_17_WaitNoReel,
#endregion #endregion
......
...@@ -332,6 +332,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -332,6 +332,12 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("IsUse_Tray_Check")] [ConfigProAttribute("IsUse_Tray_Check")]
public int IsUse_Tray_Check { get; set; } public int IsUse_Tray_Check { get; set; }
/// <summary>
/// PRO,是否使用仓门料盘检测信号,IsUse_Door_Check,0,,,,,, ,,,,,
/// </summary>
[ConfigProAttribute("IsUse_Door_Check")]
public int IsUse_Door_Check { get; set; }
/// <summary> /// <summary>
///轴2升降轴 运动上下轴 ///轴2升降轴 运动上下轴
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!