Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b96e30eb
由
LN
编写于
2020-03-12 09:16:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
皮带线判断修改
1 个父辈
ab2d5cda
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
93 行增加
和
93 行删除
source/AssemblyLineClient/记录.txt
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/AssemblyLineClient/记录.txt
查看文件 @
b96e30e
...
@@ -288,6 +288,9 @@ IO_Value增加None的定义,防止误操作
...
@@ -288,6 +288,9 @@ IO_Value增加None的定义,防止误操作
扫码获取图片方式修改。
扫码获取图片方式修改。
料盘到达接驳台后,给服务器发送条码信息,arriveRobotLocation增加barcode参数
料盘到达接驳台后,给服务器发送条码信息,arriveRobotLocation增加barcode参数
20200312
皮带线判断修改
...
...
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
b96e30e
...
@@ -124,7 +124,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -124,7 +124,7 @@ namespace OnlineStore.DeviceLibrary
CheckAndMove
(
IO_Type
.
DLine_Run2
,
IO_VALUE
.
LOW
);
CheckAndMove
(
IO_Type
.
DLine_Run2
,
IO_VALUE
.
LOW
);
CheckAndMove
(
IO_Type
.
DLine_Run3
,
IO_VALUE
.
LOW
);
CheckAndMove
(
IO_Type
.
DLine_Run3
,
IO_VALUE
.
LOW
);
CheckAndMove
(
IO_Type
.
SeparateDevice_Run
,
IO_VALUE
.
LOW
);
CheckAndMove
(
IO_Type
.
SeparateDevice_Run
,
IO_VALUE
.
LOW
);
if
(
DeviceID
.
Equals
(
302
)
)
if
(
IsNewType
)
{
{
LogInfo
(
"后退NG气缸,后退扫码NG气缸"
);
LogInfo
(
"后退NG气缸,后退扫码NG气缸"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
NGCylinder_Before
,
IO_Type
.
NGCylinder_After
);
CylinderMove
(
MoveInfo
,
IO_Type
.
NGCylinder_Before
,
IO_Type
.
NGCylinder_After
);
...
@@ -313,7 +313,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -313,7 +313,7 @@ namespace OnlineStore.DeviceLibrary
}
}
internal
bool
InStoreNgISBack
()
internal
bool
InStoreNgISBack
()
{
{
if
(
DeviceID
.
Equals
(
302
)
)
if
(
IsNewType
)
{
{
if
(
IOValue
(
IO_Type
.
NGCylinder_After
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
NGCylinder_Before
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
NGCylinder_After
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
NGCylinder_Before
).
Equals
(
IO_VALUE
.
LOW
))
{
{
...
@@ -437,71 +437,64 @@ namespace OnlineStore.DeviceLibrary
...
@@ -437,71 +437,64 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
NewTypeScan
(
bool
isfirst
=
false
)
private
void
NewTypeScan
(
bool
isfirst
=
false
)
{
{
IsInScanCode
=
true
;
// if (IsNewType)
string
LastCode
=
""
;
Task
.
Factory
.
StartNew
(
delegate
{
{
IsInScanCode
=
true
;
if
(
isfirst
)
string
LastCode
=
""
;
//LastCodeList = new List<string
Task
.
Factory
.
StartNew
(
delegate
{
{
if
(
isfirst
)
StationInfo_NG
=
new
StationTrayInfo
(
IO_VALUE
.
HIGH
);
{
}
StationInfo_NG
=
new
StationTrayInfo
(
IO_VALUE
.
HIGH
);
else
}
{
else
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
}
Thread
.
Sleep
(
300
);
if
(
IOValue
(
IO_Type
.
ExitTray_Check3
).
Equals
(
IO_VALUE
.
LOW
))
{
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
LOW
);
if
(
DeviceID
.
Equals
(
301
))
{
{
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
}
}
Thread
.
Sleep
(
300
);
IsInScanCode
=
false
;
if
(
IOValue
(
IO_Type
.
ExitTray_Check3
).
Equals
(
IO_VALUE
.
LOW
))
}
else
{
try
{
{
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
LOW
);
LogUtil
.
info
(
hengyiName
+
"扫码工位:开始扫码,IsInScanCode="
+
IsInScanCode
);
if
(
DeviceID
.
Equals
(
301
))
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
if
(
LastCodeList
.
Count
<=
0
)
{
{
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
Thread
.
Sleep
(
300
);
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
}
}
IsInScanCode
=
false
;
if
(
LastCodeList
.
Count
<=
0
)
}
else
{
try
{
{
LogUtil
.
info
(
hengyiName
+
"扫码工位:开始扫码,IsInScanCode="
+
IsInScanCode
);
Thread
.
Sleep
(
300
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
if
(
LastCodeList
.
Count
<=
0
)
{
Thread
.
Sleep
(
300
);
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
}
if
(
LastCodeList
.
Count
<=
0
)
{
Thread
.
Sleep
(
300
);
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
}
LastCode
=
SServerManager
.
ProcessCodeList
(
LastCodeList
);
// Thread.Sleep(5000);
}
}
catch
(
Exception
ex
)
LastCode
=
SServerManager
.
ProcessCodeList
(
LastCodeList
);
{
// Thread.Sleep(5000);
LogUtil
.
error
(
Name
+
"扫码错误:"
+
ex
.
ToString
());
}
}
finally
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"扫码错误:"
+
ex
.
ToString
());
}
finally
{
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
if
(
DeviceID
.
Equals
(
301
))
{
{
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
if
(
DeviceID
.
Equals
(
301
))
{
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
}
IsInScanCode
=
false
;
LogUtil
.
info
(
hengyiName
+
" 扫码工位 : 扫码结束 ,"
+
StationInfo_Scan
.
ToStr
+
" IsInScanCode = "
+
IsInScanCode
);
}
}
}
IsInScanCode
=
false
;
});
LogUtil
.
info
(
hengyiName
+
" 扫码工位 : 扫码结束 ,"
+
StationInfo_Scan
.
ToStr
+
" IsInScanCode = "
+
IsInScanCode
);
}
}
}
});
}
}
protected
override
void
IOTimeOutProcess
()
protected
override
void
IOTimeOutProcess
()
{
{
...
@@ -624,7 +617,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -624,7 +617,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
void
ScanNgForward
(
LineMoveInfo
moveInfo
=
null
)
public
void
ScanNgForward
(
LineMoveInfo
moveInfo
=
null
)
{
{
if
(
DeviceID
.
Equals
(
302
)
)
if
(
IsNewType
)
{
{
if
(
moveInfo
!=
null
)
if
(
moveInfo
!=
null
)
{
{
...
@@ -637,7 +630,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -637,7 +630,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
void
ScanNgBack
(
LineMoveInfo
moveInfo
)
public
void
ScanNgBack
(
LineMoveInfo
moveInfo
)
{
{
if
(
DeviceID
.
Equals
(
302
)
)
if
(
IsNewType
)
{
{
if
(
moveInfo
!=
null
)
if
(
moveInfo
!=
null
)
{
{
...
...
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
查看文件 @
b96e30e
...
@@ -24,6 +24,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -24,6 +24,16 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
private
int
GetRobotIndex
()
{
int
robotIndex
=
1
;
if
(
DeviceID
.
Equals
(
301
))
{
robotIndex
=
2
;
}
return
robotIndex
;
}
#
region
是否可移栽料盘
#
region
是否可移栽料盘
...
@@ -109,11 +119,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -109,11 +119,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DO_03_GetTraySize
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DO_03_GetTraySize
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
LastWidth
=
0
;
LastWidth
=
0
;
int
robotIndex
=
1
;
int
robotIndex
=
GetRobotIndex
();
if
(
DeviceID
.
Equals
(
301
))
{
robotIndex
=
2
;
}
string
result
=
SServerManager
.
GetTraySize
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
,
out
LastWidth
);
string
result
=
SServerManager
.
GetTraySize
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
,
out
LastWidth
);
LogUtil
.
info
(
hengyiName
+
"出口有料,二维码["
+
StationInfo_Move
.
CodeStr
+
"] 获取料盘尺寸【"
+
LastWidth
+
"】【"
+
result
+
"】"
);
LogUtil
.
info
(
hengyiName
+
"出口有料,二维码["
+
StationInfo_Move
.
CodeStr
+
"] 获取料盘尺寸【"
+
LastWidth
+
"】【"
+
result
+
"】"
);
}
}
...
@@ -181,14 +187,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -181,14 +187,9 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DO_08_CRun
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DO_08_CRun
);
if
(
IOValue
(
IO_Type
.
SeparateDevice_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SeparateDevice_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
int
robotIndex
=
1
;
int
robotIndex
=
GetRobotIndex
();
if
(
DeviceID
.
Equals
(
301
))
LogUtil
.
info
(
hengyiName
+
"出口有料,转动接驳台皮带线2000 , 收到SeparateDevice_Check信号,调用arriveRobotLocation="
+
robotIndex
);
{
robotIndex
=
2
;
}
LogUtil
.
info
(
hengyiName
+
"出口有料,转动接驳台皮带线2000 , 收到SeparateDevice_Check信号,调用arriveRobotLocation="
+
robotIndex
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
);
}
}
else
else
...
@@ -274,14 +275,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -274,14 +275,9 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
DON_01_WaitTime
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
DON_01_WaitTime
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DON_03_GetTraySize
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DON_03_GetTraySize
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
LastWidth
=
0
;
LastWidth
=
0
;
int
robotIndex
=
GetRobotIndex
();
int
robotIndex
=
1
;
if
(
DeviceID
.
Equals
(
301
))
{
robotIndex
=
2
;
}
string
result
=
SServerManager
.
GetTraySize
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
,
out
LastWidth
);
string
result
=
SServerManager
.
GetTraySize
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
,
out
LastWidth
);
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料: ["
+
StationInfo_Move
.
CodeStr
+
"] 获取尺寸【"
+
LastWidth
+
"】【"
+
result
+
"】"
);
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料: ["
+
StationInfo_Move
.
CodeStr
+
"] 获取尺寸【"
+
LastWidth
+
"】【"
+
result
+
"】"
);
}
}
...
@@ -334,11 +330,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -334,11 +330,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DON_08_CRun
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DON_08_CRun
);
if
(
IOValue
(
IO_Type
.
SeparateDevice_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SeparateDevice_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
int
robotIndex
=
1
;
int
robotIndex
=
GetRobotIndex
();
if
(
DeviceID
.
Equals
(
301
))
{
robotIndex
=
2
;
}
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料,接驳台有料盘,等待2000,调用arriveRobotLocation="
+
robotIndex
);
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料,接驳台有料盘,等待2000,调用arriveRobotLocation="
+
robotIndex
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
);
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
b96e30e
...
@@ -495,15 +495,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -495,15 +495,21 @@ namespace OnlineStore.DeviceLibrary
//{
//{
// wait.IsEnd = LineManager.Line.SideWay34HasTray().Equals(false);
// wait.IsEnd = LineManager.Line.SideWay34HasTray().Equals(false);
//}
//}
if
(
wait
.
IsEnd
&&
moveInfo
.
OneWaitCanEndStep
)
if
(
wait
.
IsEnd
)
{
{
isOk
=
true
;
if
(
MoveInfo
.
OneWaitCanEndStep
)
break
;
{
isOk
=
true
;
break
;
}
}
}
else
if
(!
moveInfo
.
OneWaitCanEndStep
)
else
{
{
isOk
=
false
;
if
(!
MoveInfo
.
OneWaitCanEndStep
)
break
;
{
isOk
=
false
;
break
;
}
}
}
}
}
if
(
isOk
)
if
(
isOk
)
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
b96e30e
...
@@ -152,15 +152,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -152,15 +152,21 @@ namespace OnlineStore.DeviceLibrary
{
{
wait
.
IsEnd
=
SwCanUpMove
(
wait
.
TargetPosition
);
wait
.
IsEnd
=
SwCanUpMove
(
wait
.
TargetPosition
);
}
}
if
(
wait
.
IsEnd
&&
checkWaitInfo
.
OneWaitCanEndStep
)
if
(
wait
.
IsEnd
)
{
{
isOk
=
true
;
if
(
MoveInfo
.
OneWaitCanEndStep
)
break
;
{
isOk
=
true
;
break
;
}
}
}
else
if
(!
checkWaitInfo
.
OneWaitCanEndStep
&&
wait
.
IsEnd
.
Equals
(
false
))
else
{
{
isOk
=
false
;
if
(!
MoveInfo
.
OneWaitCanEndStep
)
break
;
{
isOk
=
false
;
break
;
}
}
}
}
}
if
(
isOk
)
if
(
isOk
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论