Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 43b8e0f3
由
LN
编写于
2019-12-28 10:17:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
65acfca6
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
43 行增加
和
19 行删除
dll/CodeLibrary.dll
source/Common/util/AcSerialBean.cs
source/Common/util/TcpServer.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
dll/CodeLibrary.dll
查看文件 @
43b8e0f
此文件类型无法预览
source/Common/util/AcSerialBean.cs
查看文件 @
43b8e0f
...
...
@@ -288,7 +288,7 @@ namespace OnlineStore.Common
if
(
_serialPort
.
IsOpen
)
{
//lock (lockObj)
if
(
Monitor
.
TryEnter
(
lockObj
,
10
))
if
(
Monitor
.
TryEnter
(
lockObj
,
Overtime
))
{
//Monitor.Enter(lockObj);
try
...
...
@@ -358,7 +358,7 @@ namespace OnlineStore.Common
if
(
_serialPort
.
IsOpen
)
{
if
(
Monitor
.
TryEnter
(
lockObj
,
10
))
if
(
Monitor
.
TryEnter
(
lockObj
,
Overtime
))
{
//Monitor.Enter(lockObj);
try
...
...
source/Common/util/TcpServer.cs
查看文件 @
43b8e0f
...
...
@@ -115,7 +115,7 @@ namespace OnlineStore.Common
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
LOGGER
,
ex
.
Message
);
LogUtil
.
error
(
LOGGER
,
"ReceiveAccept方法,客户端【"
+
client
.
AddStr
+
"】:"
+
ex
.
Message
);
//throw new Exception(ex.Message);
}
}
...
...
@@ -159,18 +159,18 @@ namespace OnlineStore.Common
i
++;
}
}
}
}
Thread
.
Sleep
(
ReviceMsgMS
);
}
}
catch
(
SocketException
e
)
{
LogUtil
.
error
(
e
.
ToString
(),
1006
);
LogUtil
.
error
(
"客户端{"
+
client
.
AddStr
+
"]:"
+
e
.
ToString
(),
1006
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
ex
.
ToString
(),
1005
);
LogUtil
.
error
(
"客户端{"
+
client
.
AddStr
+
"]:"
+
ex
.
ToString
(),
1005
);
}
}
//private void ReceiveMessages(Client client)
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
43b8e0f
...
...
@@ -237,9 +237,10 @@ namespace OnlineStore.DeviceLibrary
case
LineMoveStep
.
FR_13_LocationCylinder_Down
:
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_14_TopCylinderDown
);
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
SLog
+
":SL1定位气缸下降SOL,出口顶升气缸下降"
);
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
SLog
+
":SL1定位气缸下降SOL,出口顶升气缸下降
,夹紧气缸放松
"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Up
,
IO_Type
.
SL_LocationCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Tighten
,
IO_Type
.
SL_MoveCylinder_Slack
);
break
;
case
LineMoveStep
.
FR_14_TopCylinderDown
:
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
43b8e0f
...
...
@@ -299,7 +299,10 @@ namespace OnlineStore.DeviceLibrary
}
else
{
bool
result
=
moveEquip
.
StartRun
();
Task
.
Factory
.
StartNew
(
delegate
{
bool
result
=
moveEquip
.
StartRun
();
});
}
}
...
...
@@ -397,7 +400,9 @@ namespace OnlineStore.DeviceLibrary
if
(
isNeedAllReset
||
TrayManager
.
ErrorDeviceId
.
Equals
(
equip
.
DeviceID
)
||
(!
NoAlarm
()))
{
LogUtil
.
info
(
Name
+
"收到复位信号,"
+
equip
.
Name
+
" 需要复位"
);
equip
.
Reset
();
Task
.
Factory
.
StartNew
(
delegate
{
equip
.
Reset
();
});
}
else
{
...
...
@@ -893,13 +898,17 @@ namespace OnlineStore.DeviceLibrary
foreach
(
EquipBase
moveEquip
in
this
.
AllEquipMap
.
Values
)
{
if
((
moveEquip
.
runStatus
.
Equals
(
LineRunStatus
.
HomeMoving
)
||
moveEquip
.
runStatus
.
Equals
(
LineRunStatus
.
Reset
))
&&
moveEquip
.
IsDebug
.
Equals
(
false
))
if
(
moveEquip
.
IsDebug
)
{
continue
;
}
if
(
moveEquip
.
runStatus
.
Equals
(
LineRunStatus
.
HomeMoving
)
||
moveEquip
.
runStatus
.
Equals
(
LineRunStatus
.
Reset
)
||
moveEquip
.
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
{
if
(
moveEquip
.
NoAlarm
())
{
if
(
moveEquip
.
baseConfig
.
DType
.
Equals
(
DeviceType
.
FeedingEquip
)
&&
moveEquip
.
MoveInfo
.
MoveStep
>=
LineMoveStep
.
FR_11_BatchAxisHome
)
{
continue
;
continue
;
}
isOk
=
false
;
break
;
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
43b8e0f
...
...
@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_52_UpDownCylinderDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_53_UpDownCylinderDownWait
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
":
上下气缸1下降 后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作)
"
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
":
等待300ms后夹紧
"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_53_UpDownCylinderDownWait
))
...
...
@@ -214,7 +214,7 @@ namespace OnlineStore.DeviceLibrary
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_07_UpDownCylinderDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_07_UpDownCylinderDownWait
);
InLog
(
"入库 "
+
MoveInfo
.
SLog
+
":
编码与仓位一致,上下气缸1下降后等待0.3秒再夹紧,防止没有下降到位就
夹紧"
);
InLog
(
"入库 "
+
MoveInfo
.
SLog
+
":
等待300ms后
夹紧"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
}
//只有当BOX可以进行出入库时,移栽物品,防止卡住
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
43b8e0f
...
...
@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary
}
list
.
Add
(
str
.
Trim
());
//string code = "=1+0x0-" + width + "x" + height + "=" + str.Trim();
string
code
=
width
+
"x"
+
height
+
"="
+
str
.
Trim
();
string
code
=
"="
+
width
+
"x"
+
height
+
"="
+
str
.
Trim
();
codeStr
=
codeStr
+
code
+
spiltStr
;
}
if
(
String
.
IsNullOrEmpty
(
codeStr
))
...
...
@@ -79,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
//code: 条码内容
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"cids"
,
LineServer
.
GetAllCID
());
paramMap
.
Add
(
"code"
,
"="
+
codeStr
);
paramMap
.
Add
(
"code"
,
codeStr
);
string
server
=
GetAddr
(
Addr_PosForPutin
,
paramMap
);
//string server = GetAddr(Addr_PosForPutin) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr;
...
...
@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
lock
(
moveEquip
.
waitInListLock
)
{
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil
.
info
(
moveEquip
.
Name
+
" 入库命令: "
+
" + param.ToStr() + "
+
"加入等待列表中!"
);
LogUtil
.
info
(
moveEquip
.
Name
+
" 入库命令: "
+
param
.
ToStr
()
+
"加入等待列表中!"
);
moveEquip
.
waitInStoreList
.
Add
(
param
);
}
}
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
43b8e0f
...
...
@@ -73,7 +73,14 @@ namespace OnlineStore.DeviceLibrary
if
(
names
!=
null
)
{
hikNameList
.
AddRange
(
names
);
foreach
(
string
n
in
names
)
{
if
(!
hikNameList
.
Contains
(
n
))
{
hikNameList
.
Add
(
n
);
}
}
// hikNameList.AddRange(names);
foreach
(
string
name
in
hikNameList
)
{
LogUtil
.
info
(
"加载到HIK相机:"
+
name
);
...
...
@@ -82,7 +89,14 @@ namespace OnlineStore.DeviceLibrary
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
if
(
names
!=
null
)
{
balserNameList
.
AddRange
(
names
);
foreach
(
string
n
in
names
)
{
if
(!
balserNameList
.
Contains
(
n
))
{
balserNameList
.
Add
(
n
);
}
}
// balserNameList.AddRange(names);
foreach
(
string
name
in
balserNameList
)
{
LogUtil
.
info
(
"加载到Balser相机:"
+
name
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论