Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit cbc10d1b
由
LN
编写于
2020-04-01 11:31:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
紧急出料优化
1 个父辈
ba4b5bf5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
72 行增加
和
54 行删除
source/AssemblyLineClient/FrmDischargeLine.cs
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/AssemblyLineClient/FrmDischargeLine.cs
查看文件 @
cbc10d1
...
...
@@ -399,7 +399,7 @@ namespace OnlineStore.AssemblyLine
private
void
btnScan_Click
(
object
sender
,
EventArgs
e
)
{
List
<
string
>
camers
=
equipBean
.
Config
.
GetCameraList
();
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
camers
,
equipBean
.
Name
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
camers
,
equipBean
.
Name
,
true
);
string
cameraStr
=
""
;
foreach
(
string
ca
in
camers
)
{
...
...
@@ -407,15 +407,7 @@ namespace OnlineStore.AssemblyLine
}
cameraStr
=
cameraStr
.
Substring
(
0
,
cameraStr
.
Length
-
1
);
string
msg
=
CodeManager
.
ProcessCode
(
LastCodeList
);
//if (LastCodeList.Count > 0)
//{
// foreach (string str in LastCodeList)
// {
// msg = str + "\r\n";
// }
//}
string
msg
=
CodeManager
.
ProcessCode
(
LastCodeList
);
LogUtil
.
info
(
equipBean
.
Name
+
"["
+
cameraStr
+
"]扫码测试结果:\r\n"
+
msg
);
MessageBox
.
Show
(
equipBean
.
Name
+
"["
+
cameraStr
+
"]扫码测试结果:"
+
msg
);
}
...
...
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
cbc10d1
...
...
@@ -547,18 +547,12 @@ namespace OnlineStore.DeviceLibrary
}
}
LogUtil
.
info
(
hengyiName
+
"扫码工位:开始扫码,IsInScanCode="
+
IsInScanCode
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
,
true
);
if
(
LastCodeList
.
Count
<=
0
)
{
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
);
}
//if (LastCodeList.Count <= 0)
//{
// Thread.Sleep(300);
// LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name);
//}
LastCode
=
SServerManager
.
ProcessCodeList
(
LastCodeList
);
// Thread.Sleep(5000);
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
,
true
);
}
LastCode
=
SServerManager
.
ProcessCodeList
(
LastCodeList
);
}
catch
(
Exception
ex
)
{
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
cbc10d1
...
...
@@ -59,21 +59,32 @@ namespace OnlineStore.DeviceLibrary
}
OutLog
(
"出库移栽 "
+
MoveInfo
.
SLog
+
" :提升伺服下降"
+
height
+
"mm,目标:"
+
targetPosition
);
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_P2Speed
);
if
(
MoveCylineIsUp
())
if
(
MoveCylineIsUp
()
||
MoveInfo
.
MoveParam
.
PlateW
.
Equals
(
7
)
)
{
//已经在取料端
if
(
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
))
{
int
targetP
=
Config
.
GetUpdownP2Detial
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetP
,
Config
.
UpdownAxis_P2Speed
);
if
(
MoveInfo
.
MoveParam
.
PlateW
.
Equals
(
7
))
{
//升降先下降
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
}
}
else
if
(
MoveCylineIsUp
())
{
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
}
else
{
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
else
{
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
return
true
;
}
...
...
@@ -388,48 +399,63 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if
(
MoveCylineIsUp
())
if
(
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
))
{
if
(
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
))
{
int
targetP
=
Config
.
GetUpdownP2Detial
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
if
(
UpdownAxis
.
IsInPosition
(
targetP
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_214_CylinderDown
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
}
else
int
targetP
=
Config
.
GetUpdownP2Detial
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
if
(
UpdownAxis
.
IsInPosition
(
targetP
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_214_CylinderDown
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
}
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_213_UpdownAxisToP2
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":升降伺服下降到P2:"
+
targetP
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetP
,
Config
.
UpdownAxis_P2Speed
);
if
(
MoveInfo
.
MoveParam
.
PlateW
.
Equals
(
7
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_213_UpdownAxisToP2
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":升降伺服下降到P2:"
+
targetP
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetP
,
Config
.
UpdownAxis_P2Speed
);
//升降先下降
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
}
}
else
}
else
{
if
(
MoveCylineIsUp
())
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_212_CylinderTake
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构取料端"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
}
}
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_211_AxisDownMove
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构取料端 前先上升横移气缸"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_211_AxisDownMove
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构取料端 前先上升横移气缸"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_212_CylinderTake
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_213_UpdownAxisToP2
);
int
targetP
=
Config
.
GetUpdownP2Detial
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":升降伺服下降到P2:"
+
targetP
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetP
,
Config
.
UpdownAxis_P2Speed
);
if
(
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_213_UpdownAxisToP2
);
int
targetP
=
Config
.
GetUpdownP2Detial
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":升降伺服下降到P2:"
+
targetP
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetP
,
Config
.
UpdownAxis_P2Speed
);
}
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_212_CylinderTake
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构取料端"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_213_UpdownAxisToP2
))
{
...
...
@@ -448,18 +474,24 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_216_CylinderUp
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
if
(
Config
.
SidesWayNum
.
Equals
(
3
)
&&
MoveInfo
.
MoveParam
.
PlateW
.
Equals
(
7
))
if
(
Config
.
SidesWayNum
.
Equals
(
3
)
&&
MoveInfo
.
MoveParam
.
PlateW
.
Equals
(
7
))
{
InLog
(
MoveInfo
.
SLog
+
" 提前下降顶升气缸 ,环形线定位气缸先下降,顶升气缸同时下降"
);
CylinderMove
(
null
,
IO_Type
.
SW_LocationCylinder_Up
,
IO_Type
.
SW_LocationCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
//七寸时伺服可以先动作
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_216_CylinderUp
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_217_UpdownAxisToP1
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":升降伺服到P1"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
if
(!
UpdownAxis
.
IsInPosition
(
Config
.
UpDownAxisP1
))
{
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
}
int
trayNum
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
TrayNumber
:
currTrayNum
;
//更新此托盘为空托盘
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
cbc10d1
...
...
@@ -98,7 +98,7 @@ namespace OnlineStore.DeviceLibrary
private
static
int
ScanCount
=
0
;
private
static
int
codeCount
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
CodeCount
);
[
HandleProcessCorruptedStateExceptions
]
public
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraList
,
string
deviceName
,
bool
isSaveImg
=
false
)
public
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraList
,
string
deviceName
,
bool
findRightCodeBreak
=
false
)
{
List
<
string
>
codeList
=
new
List
<
string
>();
if
(
cameraList
==
null
||
cameraList
.
Count
<=
0
)
...
...
@@ -157,7 +157,7 @@ namespace OnlineStore.DeviceLibrary
}
}
if
(
findRightCode
)
if
(
findRightCode
Break
&&
findRightCode
)
{
break
;
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论