Commit e1dd1d77 张东亮

存储机构-最新版

1 个父辈 c3fa2e42
......@@ -68,15 +68,15 @@
"Name": "box_A",
"IP": "192.168.107.21",
"User": "admin",
"Pwd": "Acc123",
"Port": "8000"
"Password": "acc123456",
"Port": 8000
},
{
"Name": "box_B",
"IP": "192.168.108.22",
"User": "admin",
"Pwd": "Acc123",
"Port": "8000"
"Password": "acc123456",
"Port": 8000
}
]
}
\ No newline at end of file
......@@ -44,8 +44,8 @@ DI,2,料屉第15层检测信号,Row_Check_15,30,HC,X30,,,,,,,,,,,,
DI,2,左前门门禁信号(存储机构),LeftDoor_Limit,32,HC,X32,,,,,,,,,,,,
DI,2,右前门门禁信号(存储机构),RightDoor_Limit,33,HC,X33,,,,,,,,,,,,
DI,2,后门门禁信号(存储机构),BackDoor_Limit,34,HC,X34,,,,,,,,,,,,
DI,1,急停(取料机构),SuddenStop_BTN,35,HC,X35,,,,,,,,,,,,
DI,1,复位(取料机构),Reset_BTN,36,HC,X36,,,,,,,,,,,,
,1,急停(取料机构),SuddenStop_BTN,35,HC,X35,,,,,,,,,,,,
,1,复位(取料机构),Reset_BTN,36,HC,X36,,,,,,,,,,,,
DI,1,光栅信号,SafetyRasterSignal,37,HC,X37,,,,,,,,,,,,
DI,1,旋转臂A料口侧检测,MAxis_Check_A,38,HC,X38,,,,,,,,,,,,
DI,1,旋转臂B料口侧检测,MAxis_Check_B,39,HC,X39,,,,,,,,,,,,
......
......@@ -125,7 +125,9 @@
<Content Include="device_config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="eyemLib.dll" />
<Content Include="eyemLib.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="halcon.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
此文件类型无法预览
......@@ -122,7 +122,7 @@ namespace OnlineStore.DeviceLibrary
AutoFindPosSaveImage($"NG_Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)}");
LogInfo($"视觉对位 {MoveInfo.SLog}:Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)}," +
$"行走机构相对移动{(Config.Drawer_X - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MoveAxis.AbsMove(MoveInfo, Convert.ToInt32(MoveAxis.GetAclPosition() + (Config.Drawer_X - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse), Config.MoveAxis_P1_Speed / 2);
MoveAxis.AbsMove(MoveInfo, Convert.ToInt32(MoveAxis.GetAclPosition() + (Config.Drawer_X - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse), Config.MoveAxis_P1_Speed / 10);
return false;
}
private bool CheckMarkYPoint(EyemOcsFXYR eyemOcsFXYR)
......@@ -135,8 +135,8 @@ namespace OnlineStore.DeviceLibrary
return true;
}
AutoFindPosSaveImage($"NG_Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)}");
UpdownAxis.AbsMove(MoveInfo, Convert.ToInt32(UpdownAxis.GetAclPosition() + (Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse), Config.Updown_P1_Speed / 2);
PullAxis_Updown.AbsMove(MoveInfo, Convert.ToInt32(PullAxis_Updown.GetAclPosition() + (Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse), Config.Updown_P1_Speed / 2);
UpdownAxis.AbsMove(MoveInfo, Convert.ToInt32(UpdownAxis.GetAclPosition() + (Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse), Config.Updown_P1_Speed / 10);
PullAxis_Updown.AbsMove(MoveInfo, Convert.ToInt32(PullAxis_Updown.GetAclPosition() + (Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse), Config.Updown_P1_Speed / 10);
LogInfo($"视觉对位 {MoveInfo.SLog}:Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)}," +
$"移栽升降轴、料屉升降轴相对移动{(Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
return false;
......@@ -244,10 +244,10 @@ namespace OnlineStore.DeviceLibrary
//Bitmap bitmap = null;
Bitmap bitmap = AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
int res = AutoFindPos.GetMarkInfo(bitmap, $"{MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4)}",$"row{autoFindPos.CurRow}_col{autoFindPos.CurColumn}", out ocsFXYR);
LogInfo($"视觉对位 {MoveInfo.SLog}:取图[ret={res}],行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
if (res == 0)
{
MoveInfo.NextMoveStep(StepEnum.SA_03_Pos_AcqImg);
LogInfo($"视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
else if (res == -4)
{
......@@ -319,10 +319,10 @@ namespace OnlineStore.DeviceLibrary
//Bitmap bitmap1 = null;
Bitmap bitmap1 = AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
int res1 = AutoFindPos.GetMarkInfo(bitmap1, $"{MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4)}", $"row{autoFindPos.CurRow}_col{autoFindPos.CurColumn}", out ocsFXYR);
LogInfo($"视觉对位 {MoveInfo.SLog}:取图[ret={res1}],行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
if (res1 == 0)
{
MoveInfo.NextMoveStep(StepEnum.SA_08_Neg_AcqImg);
LogInfo($"视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
else if (res1 == -4)
{
......@@ -481,15 +481,17 @@ namespace OnlineStore.DeviceLibrary
string path = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ImagePath) + subpath+"\\"+DateTime.Now.ToString("yyyyMMdd");
string path1 = path + "\\" + "Src\\";
string path2 = path + "\\" + "ResOut\\";
string time = DateTime.Now.ToString("HHmmss");
if (!System.IO.Directory.Exists(path1))
Directory.CreateDirectory(path1);
if (!System.IO.Directory.Exists(path2))
Directory.CreateDirectory(path2);
bitmap.Save(path1+filename+".bmp",System.Drawing.Imaging.ImageFormat.Bmp);
bitmap.Save(path1 + filename + $"_{flag}_{time}" + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp);
resBitmap = eyemCvtToBitmap(tpDstImg);
if (resBitmap != null)
{
resBitmap.Save(string.Format("{0}{1}_{2}_{3}_{4}.bmp",path2,filename, markCoor.fX, markCoor.fY, markCoor.fR));
resBitmap.Save(string.Format("{0}{1}_{2}_{3}_{4}_{5}_{6}.bmp", path2, filename, flag, time, markCoor.fX, markCoor.fY, markCoor.fR));
}
Marshal.FreeHGlobal(image.vpImage);
eyemImageFree(ref tpDstImg);
......@@ -505,15 +507,16 @@ namespace OnlineStore.DeviceLibrary
string path = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ImagePath) + subpath + "\\" + DateTime.Now.ToString("yyyyMMdd");
string path1 = path + "\\" + "Src\\";
string path2 = path + "\\" + "ResOut\\";
string time = DateTime.Now.ToString("HHmmss");
if (!System.IO.Directory.Exists(path1))
Directory.CreateDirectory(path1);
if (!System.IO.Directory.Exists(path2))
Directory.CreateDirectory(path2);
bitmap.Save(path1 + filename + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp);
bitmap.Save(path1 + filename+$"_{flag}_{time}" + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp);
Bitmap resBitmap = eyemCvtToBitmap(tpDstImg);
if (resBitmap != null)
{
resBitmap.Save(string.Format("{0}{1}_{2}_{3}_{4}.bmp", path2, filename, markCoor.fX, markCoor.fY, markCoor.fR));
resBitmap.Save(string.Format("{0}{1}_{2}_{3}_{4}_{5}_{6}.bmp", path2, filename, flag, time,markCoor.fX, markCoor.fY, markCoor.fR));
}
Marshal.FreeHGlobal(image.vpImage);
eyemImageFree(ref tpDstImg);
......
......@@ -594,7 +594,7 @@ namespace eyemLib_Sharp
#region 项目
//圆形mark点定位
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
public static extern int eyemMarkerTracing(EyemImage tpImage, double dThreshold, ref EyemOcsFXYR tpCircle,out EyemImage tpDstImg, bool bHighAccuracy = false);
public static extern int eyemMarkerTracing(EyemImage tpImage, double dThreshold, ref EyemOcsFXYR tpCircle,out EyemImage tpDstImg, bool bHighAccuracy = true);
#endregion
#region 通用
......
......@@ -592,7 +592,7 @@
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(100, 23);
this.textBox7.TabIndex = 17;
this.textBox7.Text = "489";
this.textBox7.Text = "100";
//
// label16
//
......@@ -609,7 +609,7 @@
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(100, 23);
this.textBox8.TabIndex = 15;
this.textBox8.Text = "489";
this.textBox8.Text = "100";
//
// button10
//
......
......@@ -179,7 +179,6 @@ namespace OnlineStore.XLRStore
{
ktkPosition.ComAxis_AB_P2 = srcPosition.ComAxis_AB_P2;
ktkPosition.ComAxis_AB_P3 = srcPosition.ComAxis_AB_P3;
ktkPosition.MoveAxis_P3 = srcPosition.MoveAxis_P3;
ktkPosition.PullAxis_Inout_P2_P4 = srcPosition.PullAxis_Inout_P2_P4;
ktkPosition.PullAxis_Inout_P3_P5 = srcPosition.PullAxis_Inout_P3_P5;
//ktkPosition.PullAxis_Updown_P3 = srcPosition.PullAxis_Updown_P3;
......@@ -219,6 +218,8 @@ namespace OnlineStore.XLRStore
}
}
info = $"更新完成!";
label8.Text = info;
label8.BackColor =Color.Green;
}));
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!