Commit e0268c21 张东亮

监控相机

1 个父辈 19246ac9
...@@ -119,10 +119,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -119,10 +119,10 @@ namespace OnlineStore.DeviceLibrary
#region 监控保存 #region 监控保存
public const string boxACamName = "box_A"; public const string boxACamName = "box_A";
public const string boxBCamName = "box_B"; public const string boxBCamName = "box_B";
public void StartRecord(string boxAFileName, string boxBFileName) public void StartRecord(string fileName)
{ {
StartBoxARecord(boxAFileName); StartBoxARecord(fileName);
StartBoxBRecord(boxBFileName); StartBoxBRecord(fileName);
} }
public void StartBoxARecord(string filename) public void StartBoxARecord(string filename)
{ {
......
...@@ -147,7 +147,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -147,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
if (CheckASide()) if (CheckASide())
{ {
//if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo))) //if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo)))
if(PreInStoreCheck(BufferDataManager.BInStoreInfo)) if (PreInStoreCheck(BufferDataManager.BInStoreInfo))
{ {
inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy(); inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy();
return true; return true;
...@@ -173,7 +173,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -173,7 +173,7 @@ namespace OnlineStore.DeviceLibrary
PullAxisToP1("入库"); PullAxisToP1("入库");
break; break;
case StepEnum.SI_01_PullAxis_Ready: case StepEnum.SI_01_PullAxis_Ready:
SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId,MoveInfo.MoveParam.PosInfo.barcode); SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
MoveInfo.NextMoveStep(StepEnum.SI_01_Pull_Updown_ToPosition); MoveInfo.NextMoveStep(StepEnum.SI_01_Pull_Updown_ToPosition);
if (!IsMoveAxisInSafePos()) if (!IsMoveAxisInSafePos())
{ {
...@@ -428,16 +428,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -428,16 +428,8 @@ namespace OnlineStore.DeviceLibrary
{ {
SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing); SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
LogInfo($"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("f2")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("f2")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
StopRecord();
MoveInfo.EndMove(); MoveInfo.EndMove();
//停止记录
if (CheckASide())
{
StopBoxARecord();
}
else
{
StopBoxBRecord();
}
AutoInout.InOutEndProcess(this, MoveType.InStore); AutoInout.InOutEndProcess(this, MoveType.InStore);
} }
...@@ -458,14 +450,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -458,14 +450,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo($"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("f2")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("f2")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MoveInfo.EndMove(); MoveInfo.EndMove();
//停止记录 //停止记录
if (CheckASide()) StopRecord();
{
StopBoxARecord();
}
else
{
StopBoxBRecord();
}
AutoInout.InOutEndProcess(this, MoveType.InStore); AutoInout.InOutEndProcess(this, MoveType.InStore);
break; break;
} }
......
...@@ -301,14 +301,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -301,14 +301,7 @@ namespace OnlineStore.DeviceLibrary
case StepEnum.SO_20_Finish: case StepEnum.SO_20_Finish:
SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing); SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
//停止记录 //停止记录
if (CheckASide()) StopRecord();
{
StopBoxARecord();
}
else
{
StopBoxBRecord();
}
MoveInfo.EndMove(); MoveInfo.EndMove();
AutoInout.InOutEndProcess(this, MoveType.OutStore); AutoInout.InOutEndProcess(this, MoveType.OutStore);
break; break;
......
...@@ -877,7 +877,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -877,7 +877,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
SetWarnMsg($"相机检查库位异常 {MoveInfo.SLog}:Mark点Y轴坐标{ocsFXYR.fY},模板Mark点Y轴坐标{GetValidateDrawerY()},Y轴偏差{(GetValidateDrawerY() - ocsFXYR.fY)};" + SetWarnMsg($"相机检查库位异常 {MoveInfo.SLog}:Mark点Y轴坐标{ocsFXYR.fY},模板Mark点Y轴坐标{GetValidateDrawerY()},Y轴偏差{(GetValidateDrawerY() - ocsFXYR.fY)};" +
$"Mark点X轴坐标{ ocsFXYR.fX},模板Mark点X轴坐标{GetValidateDrawerX()},X轴偏差{ (GetValidateDrawerX() - ocsFXYR.fX)},"); $"Mark点X轴坐标{ocsFXYR.fX},模板Mark点X轴坐标{GetValidateDrawerX()},X轴偏差{(GetValidateDrawerX() - ocsFXYR.fX)},");
} }
CamDetectError = true; CamDetectError = true;
return false; return false;
...@@ -943,17 +943,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -943,17 +943,10 @@ namespace OnlineStore.DeviceLibrary
startInStoreTime = DateTime.Now; startInStoreTime = DateTime.Now;
LogInfo(" 启动入库【" + param.PosInfo.ToStr() + "】 "); LogInfo(" 启动入库【" + param.PosInfo.ToStr() + "】 ");
param.MoveP = new LineMoveP(Config, param.PosInfo.PosId); param.MoveP = new LineMoveP(Config, param.PosInfo.PosId);
// LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP)); // LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP));
MoveInfo.NewMove(MoveType.InStore, param); MoveInfo.NewMove(MoveType.InStore, param);
///开始记录 ///开始记录
if (CheckASide()) StartRecord($"IN-{param.PosInfo.barcode}-{param.PosInfo.PosId}");
{
StartBoxARecord($"IN-{param.PosInfo.barcode}-{param.PosInfo.PosId}");
}
else
{
StartBoxBRecord($"IN-{param.PosInfo.barcode}-{param.PosInfo.PosId}");
}
IgnoreCamDect = false; IgnoreCamDect = false;
SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, param.PosInfo.PosId, param.PosInfo.barcode); SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, param.PosInfo.PosId, param.PosInfo.barcode);
MoveInfo.NextMoveStep(StepEnum.SI_00_StartInstore); MoveInfo.NextMoveStep(StepEnum.SI_00_StartInstore);
...@@ -1182,14 +1175,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1182,14 +1175,7 @@ namespace OnlineStore.DeviceLibrary
CurHSerial = param.PosInfo.hSerial; CurHSerial = param.PosInfo.hSerial;
LogInfo("启动出库【" + param.PosInfo.ToStr() + "】 "); LogInfo("启动出库【" + param.PosInfo.ToStr() + "】 ");
///开始记录 ///开始记录
if (CheckASide()) StartRecord($"OUT-{param.PosInfo.barcode}-{param.PosInfo.PosId}");
{
StartBoxARecord($"OUT-{param.PosInfo.barcode}-{param.PosInfo.PosId}");
}
else
{
StartBoxBRecord($"OUT-{param.PosInfo.barcode}-{param.PosInfo.PosId}");
}
//LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP)); //LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP));
IgnoreCamDect = false; IgnoreCamDect = false;
MoveInfo.NextMoveStep(StepEnum.SO_00_StartOutstore); MoveInfo.NextMoveStep(StepEnum.SO_00_StartOutstore);
...@@ -1212,7 +1198,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1212,7 +1198,7 @@ namespace OnlineStore.DeviceLibrary
OutstoreExecute(); OutstoreExecute();
} }
#endregion #endregion
private void SaveSpecifiedImage(bool open=false) private void SaveSpecifiedImage(bool open = false)
{ {
if (!open) if (!open)
return; return;
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupDO = new System.Windows.Forms.GroupBox(); this.groupDO = new System.Windows.Forms.GroupBox();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
...@@ -58,6 +60,7 @@ ...@@ -58,6 +60,7 @@
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupDO.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.groupBox5.SuspendLayout(); this.groupBox5.SuspendLayout();
...@@ -277,6 +280,8 @@ ...@@ -277,6 +280,8 @@
// //
this.groupDO.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupDO.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupDO.Controls.Add(this.button2);
this.groupDO.Controls.Add(this.button1);
this.groupDO.Location = new System.Drawing.Point(414, 128); this.groupDO.Location = new System.Drawing.Point(414, 128);
this.groupDO.Name = "groupDO"; this.groupDO.Name = "groupDO";
this.groupDO.Size = new System.Drawing.Size(565, 381); this.groupDO.Size = new System.Drawing.Size(565, 381);
...@@ -284,6 +289,26 @@ ...@@ -284,6 +289,26 @@
this.groupDO.TabStop = false; this.groupDO.TabStop = false;
this.groupDO.Text = "IO操作测试"; this.groupDO.Text = "IO操作测试";
// //
// button2
//
this.button2.Location = new System.Drawing.Point(209, 60);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(120, 57);
this.button2.TabIndex = 1;
this.button2.Text = "结束监控";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(22, 60);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(120, 57);
this.button1.TabIndex = 0;
this.button1.Text = "开始监控";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// lblThisSta // lblThisSta
// //
this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
...@@ -567,6 +592,7 @@ ...@@ -567,6 +592,7 @@
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.groupBox4.ResumeLayout(false); this.groupBox4.ResumeLayout(false);
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupDO.ResumeLayout(false);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.groupBox5.ResumeLayout(false); this.groupBox5.ResumeLayout(false);
...@@ -622,6 +648,8 @@ ...@@ -622,6 +648,8 @@
private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button btnIgnoreCam; private System.Windows.Forms.Button btnIgnoreCam;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
} }
} }
...@@ -549,6 +549,16 @@ namespace OnlineStore.XLRStore ...@@ -549,6 +549,16 @@ namespace OnlineStore.XLRStore
{ {
boxBean.IgnoreCamDect = true; boxBean.IgnoreCamDect = true;
} }
private void button1_Click(object sender, EventArgs e)
{
boxBean.StartRecord("manual");
}
private void button2_Click(object sender, EventArgs e)
{
boxBean.StopRecord();
}
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!