Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6a892985
由
LN
编写于
2020-04-15 15:50:50 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
皮带线每次都扫码
1 个父辈
501ace35
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
32 行增加
和
21 行删除
source/AssemblyLineClient/Program.cs
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/AssemblyLineClient/Program.cs
查看文件 @
6a89298
...
...
@@ -53,8 +53,8 @@ namespace OnlineStore.AssemblyLine
/// </summary>
[
STAThread
]
static
void
Main
(
string
[]
Args
)
{
{
//string code = " (X: 380,Y: 148) L00000000000WG9D19055;E20191230 0180;B7H.10618.5B1008082019123004000;R0080820191230E9600";
//string r = CodeManager.ReplaceCode(code);
Application
.
SetUnhandledExceptionMode
(
UnhandledExceptionMode
.
CatchException
);
...
...
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
6a89298
...
...
@@ -519,12 +519,15 @@ namespace OnlineStore.DeviceLibrary
}
Thread
.
Sleep
(
300
);
if
(
IOValue
(
IO_Type
.
ExitTray_Check3
).
Equals
(
IO_VALUE
.
LOW
))
{
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
LOW
);
if
(
DeviceID
.
Equals
(
301
))
{
UpdateScanInfo
(
IO_VALUE
.
LOW
,
""
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
,
true
);
LastCode
=
SServerManager
.
ProcessCodeList
(
LastCodeList
);
if
(
LastCodeList
.
Count
>
0
)
{
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
UpdateScanInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
}
IsInScanCode
=
false
;
}
else
...
...
@@ -532,12 +535,12 @@ namespace OnlineStore.DeviceLibrary
try
{
LastCode
=
""
;
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
//
StationInfo_Scan = new StationTrayInfo(IO_VALUE.HIGH, LastCode);
UpdateScanInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
if
(
DeviceID
.
Equals
(
301
))
{
if
(
Line3LastTrayP
>
Line3MaxPosition
)
{
Line3LastTrayP
=
Line3MaxPosition
;
}
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
//
StationInfo_NG = new StationTrayInfo(StationInfo_Scan.TrayValue, StationInfo_Scan.CodeStr);
}
else
{
...
...
@@ -547,24 +550,20 @@ namespace OnlineStore.DeviceLibrary
}
}
LogUtil
.
info
(
hengyiName
+
"扫码工位:开始扫码,IsInScanCode="
+
IsInScanCode
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
,
true
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
,
true
);
if
(
LastCodeList
.
Count
<=
0
)
{
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
,
true
);
}
LastCode
=
SServerManager
.
ProcessCodeList
(
LastCodeList
);
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
,
true
);
}
LastCode
=
SServerManager
.
ProcessCodeList
(
LastCodeList
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"扫码错误:"
+
ex
.
ToString
());
}
finally
{
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
if
(
DeviceID
.
Equals
(
301
))
{
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
}
UpdateScanInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
IsInScanCode
=
false
;
LogUtil
.
info
(
hengyiName
+
" 扫码工位 : 扫码结束 ,"
+
StationInfo_Scan
.
ToStr
+
" IsInScanCode = "
+
IsInScanCode
);
...
...
@@ -572,6 +571,15 @@ namespace OnlineStore.DeviceLibrary
}
});
}
private
void
UpdateScanInfo
(
IO_VALUE
value
,
string
code
)
{
StationInfo_Scan
=
new
StationTrayInfo
(
value
,
code
);
if
(
DeviceID
.
Equals
(
301
))
{
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
}
}
protected
override
void
IOTimeOutProcess
()
{
try
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
6a89298
...
...
@@ -13,8 +13,9 @@ namespace OnlineStore.DeviceLibrary
#
region
出料流程
private
int
OutStoreHeight
=
-
1
;
private
int
OutStoreCount
=
-
1
;
private
TaskData
taskData
=
null
;
private
TaskData
taskData
=
null
;
private
InOutParam
LastOutParam
=
new
InOutParam
();
private
bool
NeedCheckShelf
=
true
;
internal
bool
CanStartCheckOut
(
int
trayNum
)
{
...
...
@@ -292,8 +293,10 @@ namespace OnlineStore.DeviceLibrary
//判断是否是第一次获取料架,需要从服务器获取此料架的虚拟料架号,若无虚拟料架号,料架可以用
//有虚拟料架号,从服务器获取此料架剩余任务,若无任务,需要送出料架
if
(
LastOutParam
.
rfid
.
Equals
(
""
))
if
(
LastOutParam
.
rfid
.
Equals
(
""
)
&&
NeedCheckShelf
)
{
//只有启动后第一个料架才需要验证
NeedCheckShelf
=
false
;
string
tempRfid
=
""
;
string
msg
=
SServerManager
.
findTempRfid
(
Name
,
CurrShelfId
,
out
tempRfid
);
if
(!
String
.
IsNullOrEmpty
(
msg
))
...
...
@@ -307,7 +310,7 @@ namespace OnlineStore.DeviceLibrary
return
;
}
}
//定位工位有料架,直接开始入料
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_05_LocationUp
);
OutLog
(
"定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 缓冲阻挡下降, 定位气缸上升,读取料架号"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论