Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8903455d
由
张东亮
编写于
2021-10-29 13:47:12 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
春初机构-库位调试开启
1 个父辈
bd392c11
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
65 行增加
和
63 行删除
source/DeviceLibrary/Config/linePositions.csv
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_PosDebug.cs
source/XLRStoreClient/App.config
source/XLRStoreClient/boxForm/FrmAutoFindPos.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
source/XLRStoreClient/boxForm/FrmPosDebug.cs
source/DeviceLibrary/Config/linePositions.csv
查看文件 @
8903455
此文件的差异太大,无法显示。
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
查看文件 @
8903455
...
...
@@ -595,8 +595,8 @@ namespace OnlineStore.DeviceLibrary
{
int
row
=
1
;
int
col
=
1
;
string
side
=
"BB"
;
string
PosId
=
"05
BB01010101"
;
string
side
=
"BB"
;
string
PosId
=
CID
+
"
BB01010101"
;
for
(
int
i
=
1
;
i
<=
trayRows
.
Length
;
i
++)
{
if
(
i
==
trayRows
.
Length
)
...
...
@@ -621,7 +621,7 @@ namespace OnlineStore.DeviceLibrary
side
=
"BB"
;
atBside
=
true
;
col
=
i
;
PosId
=
$
"
05
{side}{row.ToString().PadLeft(2, '0')}{col.ToString().PadLeft(2, '0')}0101"
;
PosId
=
$
"
{CID}
{side}{row.ToString().PadLeft(2, '0')}{col.ToString().PadLeft(2, '0')}0101"
;
MoveInfo
.
MoveParam
=
new
InOutParam
(
new
InOutPosInfo
(
"Reset"
,
PosId
));
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
return
true
;
...
...
@@ -640,14 +640,14 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
$
"复位 检测到料屉在A面[col={i}]"
);
side
=
"AA"
;
col
=
i
;
PosId
=
$
"
05
{side}{row.ToString().PadLeft(2, '0')}{col.ToString().PadLeft(2, '0')}0101"
;
PosId
=
$
"
{CID}
{side}{row.ToString().PadLeft(2, '0')}{col.ToString().PadLeft(2, '0')}0101"
;
MoveInfo
.
MoveParam
=
new
InOutParam
(
new
InOutPosInfo
(
"Reset"
,
PosId
));
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
return
true
;
}
}
}
PosId
=
$
"
05
{side}{row.ToString().PadLeft(2, '0')}{col.ToString().PadLeft(2, '0')}0101"
;
PosId
=
$
"
{CID}
{side}{row.ToString().PadLeft(2, '0')}{col.ToString().PadLeft(2, '0')}0101"
;
MoveInfo
.
MoveParam
=
new
InOutParam
(
new
InOutPosInfo
(
"Reset"
,
PosId
));
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
return
false
;
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_PosDebug.cs
查看文件 @
8903455
...
...
@@ -36,37 +36,37 @@ namespace OnlineStore.DeviceLibrary
PullAxis_Inout_To_P1
();
}
public
void
Test
()
{
Random
random
=
new
Random
();
Task
.
Factory
.
StartNew
(
new
Action
(
delegate
{
while
(!
posDebugInfo
.
IsLastDrawer
())
{
while
(!
posDebugInfo
.
IsLastGrid
())
{
PosDebugResultManager
.
SetGridResult
(
posDebugInfo
.
CurGrid
,
1
);
posDebugInfo
.
NextGrid
();
System
.
Threading
.
Thread
.
Sleep
(
500
);
}
PosDebugResultManager
.
SetGridResult
(
posDebugInfo
.
CurGrid
,
1
);
PosDebugResultManager
.
SetDrawerResult
(
posDebugInfo
.
CurDrawer
,
1
);
PosDebugResultManager
.
SetDrawerResultWithGrid
(
posDebugInfo
.
CurDrawer
);
posDebugInfo
.
NextDrawer
();
System
.
Threading
.
Thread
.
Sleep
(
500
);
}
while
(!
posDebugInfo
.
IsLastGrid
())
{
PosDebugResultManager
.
SetGridResult
(
posDebugInfo
.
CurGrid
,
1
);
//random.Next(0, 2)
posDebugInfo
.
NextGrid
();
System
.
Threading
.
Thread
.
Sleep
(
500
);
}
PosDebugResultManager
.
SetGridResult
(
posDebugInfo
.
CurGrid
,
1
);
PosDebugResultManager
.
SetDrawerResultWithGrid
(
posDebugInfo
.
CurDrawer
);
posDebugInfo
.
NextDrawer
();
}));
PosDebugResultManager
.
SaveResult
();
}
//
public void Test()
//
{
//
Random random = new Random();
//
Task.Factory.StartNew(new Action(delegate
//
{
//
while (!posDebugInfo.IsLastDrawer())
//
{
//
while (!posDebugInfo.IsLastGrid())
//
{
//
PosDebugResultManager.SetGridResult(posDebugInfo.CurGrid, 1);
//
posDebugInfo.NextGrid();
//
System.Threading.Thread.Sleep(500);
//
}
//
PosDebugResultManager.SetGridResult(posDebugInfo.CurGrid, 1);
//
PosDebugResultManager.SetDrawerResult(posDebugInfo.CurDrawer, 1);
//
PosDebugResultManager.SetDrawerResultWithGrid(posDebugInfo.CurDrawer);
//
posDebugInfo.NextDrawer();
//
System.Threading.Thread.Sleep(500);
//
}
//
while (!posDebugInfo.IsLastGrid())
//
{
//
PosDebugResultManager.SetGridResult(posDebugInfo.CurGrid, 1);//random.Next(0, 2)
//
posDebugInfo.NextGrid();
//
System.Threading.Thread.Sleep(500);
//
}
//
PosDebugResultManager.SetGridResult(posDebugInfo.CurGrid, 1);
//
PosDebugResultManager.SetDrawerResultWithGrid(posDebugInfo.CurDrawer);
//
posDebugInfo.NextDrawer();
//
}));
//
PosDebugResultManager.SaveResult();
//
}
/// <summary>
/// 更新移动信息
/// </summary>
...
...
@@ -120,13 +120,13 @@ namespace OnlineStore.DeviceLibrary
XAxis_To_P1
(
true
);
break
;
case
StepEnum
.
SP_01_ToBufferArea
:
if
(!
InDoorCheck
(
MoveInfo
.
MoveParam
))
{
SetWarnMsg
(
$
"库位调试 {MoveInfo.SLog}:入口料盘无信息[barcode={MoveInfo.MoveParam.PosInfo.barcode},PosSide={MoveInfo.MoveParam.PosInfo.GetPosSide()}],结束调试"
);
SetBoxStatus
(
DeviceStatus
.
Debugging
,
RunStatus
.
Runing
);
MoveInfo
.
EndMove
();
}
else
//
if (!InDoorCheck(MoveInfo.MoveParam))
//
{
//
SetWarnMsg($"库位调试 {MoveInfo.SLog}:入口料盘无信息[barcode={MoveInfo.MoveParam.PosInfo.barcode},PosSide={MoveInfo.MoveParam.PosInfo.GetPosSide()}],结束调试");
//
SetBoxStatus(DeviceStatus.Debugging, RunStatus.Runing);
//
MoveInfo.EndMove();
//
}
//
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SP_02_VerifyBufferState
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:入料口料盘信息确认[barcode={MoveInfo.MoveParam.PosInfo.barcode}][posId={MoveInfo.MoveParam.PosInfo.PosId}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面],开始取料"
);
...
...
@@ -134,17 +134,17 @@ namespace OnlineStore.DeviceLibrary
break
;
case
StepEnum
.
SP_02_VerifyBufferState
:
if
(!
CheckInputMiddleAxisInBuff
())
//
if (!CheckInputMiddleAxisInBuff())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SP_03_XAxisToBuff
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:移栽X轴到暂存区取放点P2,行走机构到取放点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
XAxis_To_P2
(
true
);
MoveAxisToP2
(
true
);
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
SetWarnMsg
(
$
"等待上料机构旋转轴离开{MoveInfo.MoveParam.PosInfo.GetPosSide()}面暂存区超时"
);
}
//
else if (MoveInfo.IsTimeOut())
//
{
//
SetWarnMsg($"等待上料机构旋转轴离开{MoveInfo.MoveParam.PosInfo.GetPosSide()}面暂存区超时");
//
}
break
;
case
StepEnum
.
SP_03_XAxisToBuff
:
...
...
@@ -261,15 +261,15 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SP_19_CheckDrawerFinish
);
int
drawerRescode
=
PosDebugResultManager
.
SetDrawerResultWithGrid
(
posDebugInfo
.
CurDrawer
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:{posDebugInfo.Cur
Drawer}{posDebugInfo.Cur
Grid}是抽屉的最后一个库位,统计抽屉结果:{drawerRescode}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:{posDebugInfo.CurGrid}是抽屉的最后一个库位,统计抽屉结果:{drawerRescode}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
}
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SP_25_ToNextGrid
);
PosDebugResultManager
.
SetGridResult
(
posDebugInfo
.
CurGrid
,
1
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:{posDebugInfo.Cur
Drawer}{posDebugInfo.Cur
Grid}库位调试OK,切换到下一个库位[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:{posDebugInfo.CurGrid}库位调试OK,切换到下一个库位[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
posDebugInfo
.
NextGrid
();
UpdateMoveInfo
(
posDebugInfo
.
Cur
Drawer
+
posDebugInfo
.
Cur
Grid
);
UpdateMoveInfo
(
posDebugInfo
.
CurGrid
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
}
break
;
...
...
@@ -318,7 +318,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SP_25_ToNextDrawer
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:{posDebugInfo.CurDrawer}调试结束,切换到下一个抽屉[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
posDebugInfo
.
NextDrawer
();
UpdateMoveInfo
(
posDebugInfo
.
Cur
Drawer
+
posDebugInfo
.
Cur
Grid
);
UpdateMoveInfo
(
posDebugInfo
.
CurGrid
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
}
...
...
@@ -335,7 +335,7 @@ namespace OnlineStore.DeviceLibrary
PullAxis_Inout_To_P3_P5
(
true
);
break
;
case
StepEnum
.
SP_26_ToBufferArea
:
if
(!
CheckInputMiddleAxisInBuff
())
//
if (!CheckInputMiddleAxisInBuff())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SP_27_XAxisToBuffer
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:到下暂存区碗里,移栽X轴到进出料暂存区取放点P2,行走机构到进出料机构取放点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
...
...
@@ -343,10 +343,10 @@ namespace OnlineStore.DeviceLibrary
MoveAxisToP2
(
true
);
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
SetWarnMsg
(
$
"等待上料机构旋转轴离开{MoveInfo.MoveParam.PosInfo.GetPosSide()}面暂存区超时"
);
}
//
else if (MoveInfo.IsTimeOut())
//
{
//
SetWarnMsg($"等待上料机构旋转轴离开{MoveInfo.MoveParam.PosInfo.GetPosSide()}面暂存区超时");
//
}
break
;
case
StepEnum
.
SP_27_XAxisToBuffer
:
...
...
source/XLRStoreClient/App.config
查看文件 @
8903455
...
...
@@ -24,7 +24,7 @@
<
add
key
=
"ConfigPath_TrayList"
value
=
"\LineConfig\TrayList.data"
/>
<
add
key
=
"ConfigPath_PosDebugInfo"
value
=
"\Config\PosDebugInfo.json"
/>
<
add
key
=
"ImagePath"
value
=
"\Images\"
/>
<
add
key
=
"Line_CID"
value
=
"0
5
"
/>
<
add
key
=
"Line_CID"
value
=
"0
4
"
/>
<!--
end
one
store
config
-->
<!--二维码类型列表配置,用
#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200#QR Code"
/>
...
...
source/XLRStoreClient/boxForm/FrmAutoFindPos.cs
查看文件 @
8903455
...
...
@@ -147,7 +147,7 @@ namespace OnlineStore.XLRStore
private
void
button10_Click
(
object
sender
,
EventArgs
e
)
{
boxEquip
.
autoFindPos
.
SetParam
(
int
.
Parse
(
txtCurRow
.
Text
),
int
.
Parse
(
txtCurCol
.
Text
),
int
.
Parse
(
txtStartRow
.
Text
),
int
.
Parse
(
txtStartCol
.
Text
),
float
.
Parse
(
txtCoffX
.
Text
),
float
.
Parse
(
txtCoofY
.
Text
));
StringBuilder
head2
=
new
StringBuilder
(
boxEquip
.
CID
+
posSide
+
txt
StartRow
.
Text
.
PadLeft
(
2
,
'0'
)
+
txtStart
Col
.
Text
.
PadLeft
(
2
,
'0'
));
StringBuilder
head2
=
new
StringBuilder
(
boxEquip
.
CID
+
posSide
+
txt
CurRow
.
Text
.
PadLeft
(
2
,
'0'
)
+
txtCur
Col
.
Text
.
PadLeft
(
2
,
'0'
));
head2
.
Append
(
"0101"
);
LineMoveP
lineMoveP
=
new
LineMoveP
();
lineMoveP
.
UpdatePosById
(
head2
.
ToString
());
...
...
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
查看文件 @
8903455
...
...
@@ -43,8 +43,8 @@ namespace OnlineStore.XLRStore
chbDebug
.
Checked
=
boxBean
.
IsDebug
;
FrmAutoFindPos
frmAutoFindPos
=
new
FrmAutoFindPos
();
AddForm
(
tabControl1
,
" 视觉对位 "
,
frmAutoFindPos
);
FrmTongsLearn
learn
=
new
FrmTongsLearn
();
AddForm
(
tabControl1
,
" 抓手训练 "
,
learn
);
//
FrmTongsLearn learn = new FrmTongsLearn();
//
AddForm(tabControl1, " 抓手训练 ", learn);
FrmPosDebug
frmPosDebug
=
new
FrmPosDebug
();
AddForm
(
tabControl1
,
" 库位调试 "
,
frmPosDebug
);
boxBean
.
camera_event
+=
BoxBean_camera_event
;
...
...
source/XLRStoreClient/boxForm/FrmPosDebug.cs
查看文件 @
8903455
...
...
@@ -36,7 +36,9 @@ namespace OnlineStore.XLRStore
int
endColInDrawer
=
int
.
Parse
(
txtEndColInDrawer
.
Text
);
boxEquip
.
posDebugInfo
.
SetDrawerParam
(
startDrawerRow
,
startDrawerCol
,
endDrawerRow
,
endDrawerCol
);
boxEquip
.
posDebugInfo
.
SetGridParam
(
startRowInDrawer
,
startColInDrawer
,
endRowInDrawer
,
endColInDrawer
);
boxEquip
.
Test
();
InOutParam
inOutParam
=
new
InOutParam
(
new
InOutPosInfo
(
"PosDebug"
,
$
"{boxEquip.posDebugInfo.CurGrid}"
));
//boxEquip.Test();
boxEquip
.
StartPosDebug
(
inOutParam
);
}
}
...
...
@@ -52,7 +54,7 @@ namespace OnlineStore.XLRStore
private
void
btnStop_Click
(
object
sender
,
EventArgs
e
)
{
if
(
MessageBox
.
Show
(
"确认停止库位调试?"
,
"提示"
,
MessageBoxButtons
.
OKCancel
).
Equals
(
MessageBoxButtons
.
OK
))
if
(
MessageBox
.
Show
(
"确认停止库位调试?"
,
"提示"
,
MessageBoxButtons
.
OKCancel
).
Equals
(
DialogResult
.
OK
))
boxEquip
.
posDebugInfo
.
IsBreak
=
true
;
}
FrmPosResult
frmPosResult
=
null
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论