Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 322170bb
由
张东亮
编写于
2021-11-12 10:33:42 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
存储机构-添加进出轴扭矩打印
1 个父辈
1fa71d78
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
52 行增加
和
9 行删除
source/DeviceLibrary/deviceLibrary/AXIS/HC/HCAxisManager.cs
source/DeviceLibrary/manager/model/DeviceStep.cs
source/DeviceLibrary/storeBean/EquipBase.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
source/DeviceLibrary/deviceLibrary/AXIS/HC/HCAxisManager.cs
查看文件 @
322170b
...
@@ -158,6 +158,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -158,6 +158,14 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
/// <summary>
/// 获取轴扭矩
/// </summary>
/// <param name="slvAddr"></param>
/// <returns></returns>
public
short
GetAxActTorq
(
short
slvAddr
)
{
return
HCBoardManager
.
GetAxActTorq
(
slvAddr
);
}
}
}
}
}
source/DeviceLibrary/manager/model/DeviceStep.cs
查看文件 @
322170b
...
@@ -454,7 +454,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -454,7 +454,10 @@ namespace OnlineStore.DeviceLibrary
/// 料仓入库:料斗拉取进出轴到P1(待机点),检查另一边入库情况
/// 料仓入库:料斗拉取进出轴到P1(待机点),检查另一边入库情况
/// </summary>
/// </summary>
SI_19_InoutBack
,
SI_19_InoutBack
,
/// <summary>
/// 料仓入库:如果上料机构入料口有料,则去待机点
/// </summary>
SI_20_ToStandby
,
#
endregion
#
endregion
#
region
存储机构自动对位功能
400
开始
#
region
存储机构自动对位功能
400
开始
...
...
source/DeviceLibrary/storeBean/EquipBase.cs
查看文件 @
322170b
...
@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
}
}
this
.
alarmType
=
alarmType
;
this
.
alarmType
=
alarmType
;
if
(
alarmType
.
Equals
(
AlarmType
.
SuddenStop
)
||
alarmType
.
Equals
(
AlarmType
.
NoAirpressure_Check
)
||
if
(
alarmType
.
Equals
(
AlarmType
.
SuddenStop
)
||
alarmType
.
Equals
(
AlarmType
.
NoAirpressure_Check
)
||
alarmType
.
Equals
(
AlarmType
.
AxisAlarm
)
||
alarmType
.
Equals
(
AlarmType
.
AxisMoveError
))
alarmType
.
Equals
(
AlarmType
.
AxisAlarm
)
||
alarmType
.
Equals
(
AlarmType
.
AxisMoveError
))
{
{
StopMove
();
StopMove
();
}
}
...
@@ -198,16 +198,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -198,16 +198,16 @@ namespace OnlineStore.DeviceLibrary
string
canResult
=
StoreManager
.
XLRStore
.
CanStart
();
string
canResult
=
StoreManager
.
XLRStore
.
CanStart
();
if
(
String
.
IsNullOrEmpty
(
canResult
).
Equals
(
false
))
if
(
String
.
IsNullOrEmpty
(
canResult
).
Equals
(
false
))
{
{
SetWarnMsg
(
Name
+
canResult
);
SetWarnMsg
(
Name
+
canResult
);
return
false
;
return
false
;
}
}
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
{
SetWarnMsg
(
Name
+
"启动失败:急停未开"
);
SetWarnMsg
(
Name
+
"启动失败:急停未开"
);
return
false
;
return
false
;
}
}
else
if
(
this
.
baseConfig
.
DType
.
Equals
(
DeviceType
.
InputEquip
)&&
IOValue
(
IO_Type
.
Airpressure_Check
).
Equals
(
IO_VALUE
.
LOW
))
else
if
(
this
.
baseConfig
.
DType
.
Equals
(
DeviceType
.
InputEquip
)
&&
IOValue
(
IO_Type
.
Airpressure_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
SetWarnMsg
(
Name
+
"启动失败:没有气压信号"
);
SetWarnMsg
(
Name
+
"启动失败:没有气压信号"
);
return
false
;
return
false
;
...
@@ -267,6 +267,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -267,6 +267,7 @@ namespace OnlineStore.DeviceLibrary
#
region
CheckWait
处理
#
region
CheckWait
处理
protected
DateTime
preRWTime
=
DateTime
.
Now
;
protected
DateTime
preRWTime
=
DateTime
.
Now
;
short
curTor
,
preTor
;
internal
void
CheckWait
(
DeviceMoveInfo
moveInfo
)
internal
void
CheckWait
(
DeviceMoveInfo
moveInfo
)
{
{
try
try
...
@@ -312,6 +313,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -312,6 +313,21 @@ namespace OnlineStore.DeviceLibrary
// LogInfo($"移栽升降轴 目标位置:{wait.TargetPosition},当前位置:{outCount}");
// LogInfo($"移栽升降轴 目标位置:{wait.TargetPosition},当前位置:{outCount}");
//}
//}
wait
.
IsEnd
=
AxisBean
.
ACAxisMoveIsEnd
(
moveInfo
,
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
wait
.
IsEnd
=
AxisBean
.
ACAxisMoveIsEnd
(
moveInfo
,
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
try
{
if
(
wait
.
AxisInfo
.
DeviceName
.
Equals
(
"料斗拉取进出轴"
))
{
short
axisNo
=
wait
.
AxisInfo
.
GetAxisValue
();
preTor
=
curTor
;
curTor
=
((
HCAxisManager
)
AxisManager
.
instance
).
GetAxActTorq
(
axisNo
);
if
(!
preTor
.
Equals
(
curTor
))
LogInfo
(
$
"料斗拉取进出轴 扭矩:{curTor}"
);
}
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"获取料斗拉取进出轴轴距失败"
,
e
);
}
}
}
if
(!
msg
.
Equals
(
""
))
if
(!
msg
.
Equals
(
""
))
{
{
...
@@ -403,7 +419,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -403,7 +419,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
moveInfo
.
WaitList
.
Count
>
cutWLcount
&&
!
moveInfo
.
OneWaitCanEndStep
)
if
(
moveInfo
.
WaitList
.
Count
>
cutWLcount
&&
!
moveInfo
.
OneWaitCanEndStep
)
{
{
LogUtil
.
info
(
moveInfo
.
Name
+
" moveInfo.WaitList.Count:"
+
moveInfo
.
WaitList
.
Count
.
ToString
()+
",cutWLcount:"
+
cutWLcount
.
ToString
());
;
LogUtil
.
info
(
moveInfo
.
Name
+
" moveInfo.WaitList.Count:"
+
moveInfo
.
WaitList
.
Count
.
ToString
()
+
",cutWLcount:"
+
cutWLcount
.
ToString
());
;
}
}
moveInfo
.
EndStepWait
();
moveInfo
.
EndStepWait
();
...
@@ -442,7 +458,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -442,7 +458,7 @@ namespace OnlineStore.DeviceLibrary
#
region
日志打印
#
region
日志打印
internal
int
WorkLogLevel
=
1
;
internal
int
WorkLogLevel
=
1
;
protected
void
InoutLog
(
string
msg
,
int
level
=
1
)
protected
void
InoutLog
(
string
msg
,
int
level
=
1
)
{
{
if
(
level
<
0
)
if
(
level
<
0
)
{
{
...
@@ -453,7 +469,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -453,7 +469,7 @@ namespace OnlineStore.DeviceLibrary
level
=
WorkLogLevel
;
level
=
WorkLogLevel
;
}
}
string
code
=
""
;
string
code
=
""
;
if
(
MoveInfo
.
MoveParam
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfo
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
!=
null
)
if
(
MoveInfo
.
MoveParam
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfo
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
!=
null
)
{
{
if
(!
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
Equals
(
""
))
if
(!
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
Equals
(
""
))
{
{
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
查看文件 @
322170b
...
@@ -371,11 +371,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -371,11 +371,21 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SI_19_InoutBack
:
case
StepEnum
.
SI_19_InoutBack
:
if
(!
CheckInStoreOtherSideInfo
())
if
(!
CheckInStoreOtherSideInfo
())
{
{
if
(
InDoorSigCheck
())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_20_ToStandby
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入料口有料,行走机构去待机点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveAxisToP1
();
}
else
{
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
}
}
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
...
@@ -387,6 +397,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -387,6 +397,12 @@ namespace OnlineStore.DeviceLibrary
}
}
break
;
break
;
case
StepEnum
.
SI_20_ToStandby
:
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveInfo
.
EndMove
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
break
;
}
}
}
}
#
endregion
#
endregion
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论