Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1057-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e747d3a2
由
张东亮
编写于
2024-02-01 10:17:27 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入料机构执行一定次数,只回原入料机构的轴,AB料口不动
1 个父辈
4dba1553
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
76 行增加
和
14 行删除
source/DeviceLibrary/manager/model/InOutParam.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
source/DeviceLibrary/manager/model/InOutParam.cs
查看文件 @
e747d3a
...
@@ -133,7 +133,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -133,7 +133,7 @@ namespace OnlineStore.DeviceLibrary
public
bool
singleOut
=
false
;
public
bool
singleOut
=
false
;
public
string
ToStr
()
public
string
ToStr
()
{
{
return
" ["
+
barcode
+
"] ["
+
PosId
+
"] ["
+
PlateW
+
"x"
+
PlateH
+
"]"
+
$
",hSerial[{hSerial}]"
+
",urgentReel ["
+
urgentReel
return
" ["
+
barcode
+
"] ["
+
PosId
+
"] ["
+
PlateW
+
"x"
+
PlateH
+
"]"
+
$
",hSerial[{hSerial}]"
+
$
",isNg[{IsNG}],NgMsg[{NgMsg}]"
+
",urgentReel ["
+
urgentReel
+
"],cutReel ["
+
cutReel
+
"],smallReel ["
+
smallReel
+
"],rfid ["
+
rfid
+
"],rfidLoc ["
+
rfidLoc
+
"],singleOut["
+
singleOut
+
"]"
;
+
"],cutReel ["
+
cutReel
+
"],smallReel ["
+
smallReel
+
"],rfid ["
+
rfid
+
"],rfidLoc ["
+
rfidLoc
+
"],singleOut["
+
singleOut
+
"]"
;
}
}
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
查看文件 @
e747d3a
...
@@ -135,7 +135,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -135,7 +135,29 @@ namespace OnlineStore.DeviceLibrary
return
true
;
return
true
;
}
}
/// <summary>
/// 仅复位入料机构的轴,不复位AB料口
/// </summary>
bool
OnlyResetInputAxis
=
false
;
/// <summary>
/// 出入库次数达到指定数值时,仅复位入料机构的轴
/// </summary>
int
resetCnt
=
ConfigHelper
.
Config
.
Get
(
"InputAxisResetMaxCnt"
,
100
);
/// <summary>
/// 出入库次数
/// </summary>
int
inoutCnt
=
0
;
void
InoutEndEvent
()
{
inoutCnt
++;
if
(
inoutCnt
>
resetCnt
)
{
OnlyResetInputAxis
=
true
;
LogUtil
.
info
(
$
"入料机构出入库到达{resetCnt},准备复位"
);
Reset
();
}
}
public
override
bool
Reset
()
public
override
bool
Reset
()
{
{
SetAllTimer
(
false
);
SetAllTimer
(
false
);
...
@@ -150,6 +172,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -150,6 +172,8 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"Reset 开始重置 "
);
LogInfo
(
"Reset 开始重置 "
);
runStatus
=
RunStatus
.
Reset
;
runStatus
=
RunStatus
.
Reset
;
MoveInfo
.
NewMove
(
MoveType
.
Reset
,
new
InOutParam
());
MoveInfo
.
NewMove
(
MoveType
.
Reset
,
new
InOutParam
());
if
(!
OnlyResetInputAxis
)
{
if
(!
BatchMove_A
.
Reset
())
if
(!
BatchMove_A
.
Reset
())
{
{
SetWarnMsg
(
"复位失败:A料口复位失败"
);
SetWarnMsg
(
"复位失败:A料口复位失败"
);
...
@@ -164,6 +188,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -164,6 +188,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"复位失败:B料口复位失败"
);
LogUtil
.
error
(
"复位失败:B料口复位失败"
);
return
false
;
return
false
;
}
}
}
StartReset
();
StartReset
();
SetAllTimer
(
true
);
SetAllTimer
(
true
);
return
true
;
return
true
;
...
@@ -173,15 +199,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -173,15 +199,20 @@ namespace OnlineStore.DeviceLibrary
private
void
StartReset
()
private
void
StartReset
()
{
{
//复位时设置状态为none
//复位时设置状态为none
if
(!
OnlyResetInputAxis
)
{
AgvClient
.
SetStatus
(
Config
.
AgvName_B
);
AgvClient
.
SetStatus
(
Config
.
AgvName_B
);
AgvClient
.
SetStatus
(
Config
.
AgvName_A
);
AgvClient
.
SetStatus
(
Config
.
AgvName_A
);
}
SetWarnMsg
(
""
);
SetWarnMsg
(
""
);
inoutCnt
=
0
;
alarmType
=
AlarmType
.
None
;
alarmType
=
AlarmType
.
None
;
isInSuddenDown
=
false
;
isInSuddenDown
=
false
;
isNoAirpressure_Check
=
false
;
isNoAirpressure_Check
=
false
;
MoveInfo
.
NextMoveStep
(
StepEnum
.
IR01_Wait
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IR01_Wait
);
OnlyResetInputAxis
=
false
;
LogInfo
(
$
"复位 {MoveInfo.SLog} :批量轴开始复位"
);
LogInfo
(
$
"复位 {MoveInfo.SLog} :批量轴开始复位"
);
}
}
...
@@ -341,6 +372,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -341,6 +372,13 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IR08_WaitBatchMove
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IR08_WaitBatchMove
))
{
{
if
(
OnlyResetInputAxis
)
{
LogInfo
(
"仅复位入料机构轴完成"
);
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
return
;
}
if
((
BatchMove_A
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
).
Equals
(
false
))
if
((
BatchMove_A
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
).
Equals
(
false
))
&&
(
BatchMove_B
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
).
Equals
(
false
)))
&&
(
BatchMove_B
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
).
Equals
(
false
)))
{
{
...
@@ -439,17 +477,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -439,17 +477,20 @@ namespace OnlineStore.DeviceLibrary
internal
override
void
StopMove
()
internal
override
void
StopMove
()
{
{
//StopMove时设置状态为none
//StopMove时设置状态为none
if
(!
OnlyResetInputAxis
)
{
AgvClient
.
SetStatus
(
Config
.
AgvName_A
);
AgvClient
.
SetStatus
(
Config
.
AgvName_A
);
AgvClient
.
SetStatus
(
Config
.
AgvName_B
);
AgvClient
.
SetStatus
(
Config
.
AgvName_B
);
MoveInfo
.
EndMove
();
BatchMove_A
.
StopMove
();
BatchMove_A
.
StopMove
();
BatchMove_B
.
StopMove
();
BatchMove_B
.
StopMove
();
}
MoveInfo
.
EndMove
();
UpdownAxis
.
SuddenStop
();
UpdownAxis
.
SuddenStop
();
MiddleAxis
.
SuddenStop
();
MiddleAxis
.
SuddenStop
();
InOutAxis
.
SuddenStop
();
CloseAllAxis
();
CloseAllAxis
();
}
}
...
@@ -535,6 +576,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -535,6 +576,8 @@ namespace OnlineStore.DeviceLibrary
DoorInfo
doorinfo
=
null
;
DoorInfo
doorinfo
=
null
;
if
(
posInfo
!=
null
&&
ioval
.
Equals
(
IO_VALUE
.
HIGH
))
if
(
posInfo
!=
null
&&
ioval
.
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
None
)
&&
NoErrorAlarm
())
{
if
(!
posInfo
.
IsNG
&&
string
.
IsNullOrEmpty
(
posInfo
.
hSerial
))
if
(!
posInfo
.
IsNG
&&
string
.
IsNullOrEmpty
(
posInfo
.
hSerial
))
{
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
...
@@ -542,12 +585,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -542,12 +585,21 @@ namespace OnlineStore.DeviceLibrary
StartOutstore
(
param
);
StartOutstore
(
param
);
return
true
;
return
true
;
}
}
else
if
(
posInfo
.
IsNG
)
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到NG箱"
);
StartOutstore
(
param
);
return
true
;
}
}
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
{
{
if
(
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
)
||
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
RHome
))
if
(
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
)
||
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
RHome
))
continue
;
continue
;
LogUtil
.
debug
(
$
"{moveBean.Name} CheckStartOutPos 处理"
);
LogUtil
.
debug
(
$
"{moveBean.Name} CheckStartOutPos 处理"
);
var
curhSerial
=
moveBean
.
MoveInfo
.
MoveParam
?.
PosInfo
?.
hSerial
??
""
;
var
curhSerial
=
moveBean
.
MoveInfo
.
MoveParam
?.
PosInfo
?.
hSerial
??
""
;
if
(!
string
.
IsNullOrEmpty
(
curhSerial
)
&&
curhSerial
!=
posInfo
.
hSerial
)
if
(!
string
.
IsNullOrEmpty
(
curhSerial
)
&&
curhSerial
!=
posInfo
.
hSerial
)
{
{
LogInfo
(
$
"{posType}的料 hSerial:{posInfo.hSerial},与{moveBean.Name}的 hSerial:{curhSerial} 不符"
);
LogInfo
(
$
"{posType}的料 hSerial:{posInfo.hSerial},与{moveBean.Name}的 hSerial:{curhSerial} 不符"
);
...
@@ -567,13 +619,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -567,13 +619,6 @@ namespace OnlineStore.DeviceLibrary
StartOutstore
(
param
);
StartOutstore
(
param
);
return
true
;
return
true
;
}
}
else
if
(
posInfo
.
IsNG
)
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到NG箱"
);
StartOutstore
(
param
);
return
true
;
}
if
(
moveBean
.
MoveInfo
.
MoveType
==
MoveType
.
None
)
if
(
moveBean
.
MoveInfo
.
MoveType
==
MoveType
.
None
)
{
{
doorinfo
=
moveBean
.
doorInfo
;
doorinfo
=
moveBean
.
doorInfo
;
...
@@ -596,6 +641,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -596,6 +641,8 @@ namespace OnlineStore.DeviceLibrary
if
(
posInfo
!=
null
&&
IOValue
(
ioType
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
posInfo
!=
null
&&
IOValue
(
ioType
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
// LogUtil.debug($"CheckStartOutPos 处理0");
// LogUtil.debug($"CheckStartOutPos 处理0");
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
None
)
&&
NoErrorAlarm
())
{
if
(!
posInfo
.
IsNG
&&
string
.
IsNullOrEmpty
(
posInfo
.
hSerial
))
if
(!
posInfo
.
IsNG
&&
string
.
IsNullOrEmpty
(
posInfo
.
hSerial
))
{
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
...
@@ -604,6 +651,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -604,6 +651,15 @@ namespace OnlineStore.DeviceLibrary
// LogUtil.debug($"CheckStartOutPos 处理1");
// LogUtil.debug($"CheckStartOutPos 处理1");
return
true
;
return
true
;
}
}
else
if
(
posInfo
.
IsNG
)
{
InOutParam
param
=
new
InOutParam
(
posInfo
.
ToCopy
());
LogInfo
(
$
"{posType}物料{param.PosInfo.ToStr()},准备出库到NG箱"
);
StartOutstore
(
param
);
return
true
;
}
}
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
{
{
// LogUtil.debug($"{moveBean.Name} CheckStartOutPos {moveBean.MoveInfo.MoveType}");
// LogUtil.debug($"{moveBean.Name} CheckStartOutPos {moveBean.MoveInfo.MoveType}");
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
查看文件 @
e747d3a
...
@@ -387,6 +387,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -387,6 +387,7 @@ namespace OnlineStore.DeviceLibrary
BufferDataManager
.
AInStoreInfo
=
MoveInfo
.
MoveParam
.
PosInfo
;
BufferDataManager
.
AInStoreInfo
=
MoveInfo
.
MoveParam
.
PosInfo
;
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
runStatus
=
RunStatus
.
Runing
;
runStatus
=
RunStatus
.
Runing
;
InoutEndEvent
();
}
}
#
endregion
#
endregion
...
@@ -481,6 +482,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -481,6 +482,7 @@ namespace OnlineStore.DeviceLibrary
BufferDataManager
.
BInStoreInfo
=
MoveInfo
.
MoveParam
.
PosInfo
;
BufferDataManager
.
BInStoreInfo
=
MoveInfo
.
MoveParam
.
PosInfo
;
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
runStatus
=
RunStatus
.
Runing
;
runStatus
=
RunStatus
.
Runing
;
InoutEndEvent
();
}
}
#
endregion
#
endregion
...
@@ -538,6 +540,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -538,6 +540,7 @@ namespace OnlineStore.DeviceLibrary
MoveLog
(
$
" 入料->NG箱放料结束,耗时【{FormUtil.GetSpanStr(span)}】"
);
MoveLog
(
$
" 入料->NG箱放料结束,耗时【{FormUtil.GetSpanStr(span)}】"
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
runStatus
=
RunStatus
.
Runing
;
runStatus
=
RunStatus
.
Runing
;
InoutEndEvent
();
}
}
#
endregion
#
endregion
...
@@ -1190,6 +1193,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1190,6 +1193,7 @@ namespace OnlineStore.DeviceLibrary
runStatus
=
RunStatus
.
Runing
;
runStatus
=
RunStatus
.
Runing
;
TimeSpan
span
=
DateTime
.
Now
-
startOutTime
;
TimeSpan
span
=
DateTime
.
Now
-
startOutTime
;
MoveLog
(
$
"出库->料串 {MoveInfo.SLog}: 放料完成,耗时【{FormUtil.GetSpanStr(span)}】"
);
MoveLog
(
$
"出库->料串 {MoveInfo.SLog}: 放料完成,耗时【{FormUtil.GetSpanStr(span)}】"
);
InoutEndEvent
();
}
}
#
endregion
#
endregion
...
@@ -1248,6 +1252,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1248,6 +1252,7 @@ namespace OnlineStore.DeviceLibrary
MoveLog
(
$
" 出料->NG箱放料结束,耗时【{FormUtil.GetSpanStr(span)}】"
);
MoveLog
(
$
" 出料->NG箱放料结束,耗时【{FormUtil.GetSpanStr(span)}】"
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
runStatus
=
RunStatus
.
Runing
;
runStatus
=
RunStatus
.
Runing
;
InoutEndEvent
();
}
}
#
endregion
#
endregion
...
@@ -1307,6 +1312,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1307,6 +1312,7 @@ namespace OnlineStore.DeviceLibrary
MoveLog
(
$
" 出料->紧急箱放料结束,耗时【{FormUtil.GetSpanStr(span)}】"
);
MoveLog
(
$
" 出料->紧急箱放料结束,耗时【{FormUtil.GetSpanStr(span)}】"
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
runStatus
=
RunStatus
.
Runing
;
runStatus
=
RunStatus
.
Runing
;
InoutEndEvent
();
}
}
#
endregion
#
endregion
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论