Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 646d3dfa
由
LN
编写于
2020-02-24 09:29:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加料架的目标位置
1 个父辈
34a486f9
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
81 行增加
和
11 行删除
source/ACPackingStore/FrmStore.cs
source/ACPackingStore/记录.txt
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/StoreManager.cs
source/DeviceLibrary/agvClient/AgvClient.cs
source/ACPackingStore/FrmStore.cs
查看文件 @
646d3df
...
...
@@ -6,6 +6,7 @@ using System;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Linq
;
using
System.Reflection
;
...
...
@@ -340,7 +341,36 @@ namespace OnlineStore.ACPackingStore
Clipboard
.
SetDataObject
(
logBox
.
Text
);
MessageBox
.
Show
(
"已复制日志到粘贴板!"
);
}
private
DateTime
lastLogTime
=
DateTime
.
Now
;
private
void
LogM
()
{
try
{
TimeSpan
sp
=
DateTime
.
Now
-
lastLogTime
;
if
(
sp
.
TotalMinutes
>
3
)
{
lastLogTime
=
DateTime
.
Now
;
Process
[]
processes
=
Process
.
GetProcesses
();
long
totalMemery
=
0
;
StringBuilder
sbResult
=
new
StringBuilder
();
foreach
(
Process
process
in
processes
)
{
if
(
process
.
ProcessName
.
EndsWith
(
"ACPackingStore"
))
{
sbResult
.
AppendFormat
(
DateTime
.
Now
.
ToLongTimeString
()
+
", 名称:{0} 内存大小:{1}M "
,
process
.
ProcessName
,
process
.
PrivateMemorySize64
/
1024
/
1024F
);
totalMemery
+=
process
.
PrivateMemorySize64
/
1024
;
// string result = string.Format("进程总数 {0} 个,共占内存:{1}MB \n", processes.Length, totalMemery / 1024) + sbResult.ToString();
LogUtil
.
info
(
sbResult
.
ToString
());
}
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"LogM Error: "
+
ex
.
ToString
());
}
}
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
if
(!
this
.
Visible
)
...
...
@@ -358,6 +388,7 @@ namespace OnlineStore.ACPackingStore
}
}
lblWarnMsg
.
Text
=
msg
;
LogM
();
}
private
void
chbAutoRun_CheckedChanged
(
object
sender
,
EventArgs
e
)
...
...
source/ACPackingStore/记录.txt
查看文件 @
646d3df
...
...
@@ -65,6 +65,13 @@ agv客户端启动时需要设置状态为none。
20200222
修改:出库时没有给agv发mark
20200223
增加料架的目标位置。
//包装料会发往分盘区, 紧急料区, 包装线区
// urgentReel 这个为true是紧急料 出到紧急料区
// cutReel 为true是分盘料,AGV会拉到到分盘区
//料串会发到分盘区和紧急料区
//两个都为false 包装料默认拉到包装线体, 料串默认拉到紧急料区
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
646d3df
...
...
@@ -865,10 +865,11 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_11_DeviceToShelf
)
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_12_DevicePutWare
);
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":放下物品,压紧轴到P1,升降轴至P101 "
);
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":放下物品,压紧轴到P1,升降轴至P101
,清空serverShelfData=null
"
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_LP101
,
Config
.
UpDownAxis_P101_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
serverShelfData
=
null
;
Task
.
Factory
.
StartNew
(
delegate
{
int
posLoc
=
StoreManager
.
GetLocByShelfPosID
(
MoveInfo
.
MoveParam
.
ShelfPosID
,
ShelfPosList
);
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
646d3df
...
...
@@ -170,8 +170,9 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_01_TopDown
);
if
(
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
InOutStoreLog
(
"送出出库料架:顶升气缸下降,调用 NeedLeave["
+
CurrShelfID
+
"]["
+
CurrShelfID
+
"],清空料架clearPutInRfid["
+
CurrShelfID
+
"]"
);
AgvClient
.
NeedLeave
(
Config
.
AgvNodeName
,
CurrShelfID
,
CurrShelfID
);
string
mark
=
GetMarkInfo
();
InOutStoreLog
(
"送出出库料架:顶升气缸下降,调用 NeedLeave["
+
mark
+
"]["
+
CurrShelfID
+
"],清空料架clearPutInRfid["
+
CurrShelfID
+
"]"
);
AgvClient
.
NeedLeave
(
Config
.
AgvNodeName
,
mark
,
CurrShelfID
);
}
else
{
...
...
@@ -181,17 +182,42 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Up
,
IO_Type
.
TopCylinder_Down
);
StoreManager
.
clearPutInRfid
(
Name
,
CurrShelfID
);
}
private
string
GetMarkInfo
()
{
string
mark
=
"0"
;
if
(
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
//包装料会发往分盘区, 紧急料区, 包装线区
// urgentReel 这个为true是紧急料 出到紧急料区
// cutReel 为true是分盘料,AGV会拉到到分盘区
//料串会发到分盘区和紧急料区
//两个都为false 包装料默认拉到包装线体, 料串默认拉到紧急料区
if
(
MoveInfo
.
MoveParam
.
urgentReel
)
{
//紧急料,需要到紧急料区
mark
=
CurrShelfID
+
",urgent"
;
}
else
if
(
MoveInfo
.
MoveParam
.
cutReel
)
{
//cutReel 为true是分盘料,AGV会拉到到分盘区
mark
=
CurrShelfID
+
",cut"
;
}
else
{
mark
=
CurrShelfID
+
",pack"
;
}
}
return
mark
;
}
private
void
ShelfOutProcess
()
{
string
moveName
=
"送出空料架"
;
string
mark
=
"0"
;
string
mark
=
GetMarkInfo
()
;
//bool instoreShelf = true;
if
(
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
// instoreShelf = false;
moveName
=
"送出出库料架"
;
mark
=
CurrShelfID
;
}
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_01_TopDown
))
...
...
source/DeviceLibrary/ACPackingStore/StoreManager.cs
查看文件 @
646d3df
...
...
@@ -320,7 +320,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
+
ex
.
ToString
());
LogUtil
.
error
(
deviceName
+
"
PutShelfFinished error :
"
+
ex
.
ToString
());
}
return
""
;
}
...
...
@@ -364,7 +364,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
+
ex
.
ToString
());
LogUtil
.
error
(
deviceName
+
"
UpdateTrayLoc error
"
+
ex
.
ToString
());
}
return
msg
;
}
...
...
@@ -388,7 +388,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
+
ex
.
ToString
());
LogUtil
.
error
(
deviceName
+
"
clearPutInRfid error
"
+
ex
.
ToString
());
}
return
msg
;
}
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
646d3df
...
...
@@ -154,6 +154,11 @@ namespace OnlineStore.DeviceLibrary
}
public
static
bool
NeedLeave
(
string
id
,
string
mark
,
string
shelfId
)
{
//包装料会发往分盘区, 紧急料区, 包装线区
// urgentReel 这个为true是紧急料 出到紧急料区
// cutReel 为true是分盘料,AGV会拉到到分盘区
//料串会发到分盘区和紧急料区
//两个都为false 包装料默认拉到包装线体, 料串默认拉到紧急料区
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
)||
currA
.
Equals
(
ClientAction
.
FinishLeave
))
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论