Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b80344c7
由
LN
编写于
2020-10-14 17:02:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库时不判断料盘检测。出库放到仓门口时,如果没有料盘,发送取消任务给服务器。
1 个父辈
f7c25fd2
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
129 行增加
和
58 行删除
source/ACSingleStore/记录.txt
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/StoreManager.cs
source/DeviceLibrary/store/StoreStep.cs
source/ACSingleStore/记录.txt
查看文件 @
b80344c
...
...
@@ -44,3 +44,10 @@
入库时,回到仓门后在检测叉子上是否有料盘。
20200924
大料盘定位时,第二次定位需要压紧轴放松,在压紧。
20201009
入库时暂不判断是否有料盘
出库时不判断叉子上是否有料盘,待料盘放到仓门口时,如果没有料盘,发送提示信息到服务器,并调用取消任务接口
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
b80344c
...
...
@@ -1579,19 +1579,23 @@ namespace OnlineStore.DeviceLibrary
lineOperation
.
msg
=
WarnMsg
;
if
(
WarnMsg
.
Equals
(
""
))
{
boxStatus
.
msg
=
CodeMsg
;
lineOperation
.
msg
=
CodeMsg
;
}
if
(
CodeMsg
.
Equals
(
""
))
{
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
CodeMsg
.
Equals
(
""
))
{
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
boxStatus
.
msg
=
"叉子料盘检测有料,请检查"
;
lineOperation
.
msg
=
"叉子料盘检测有料,请检查"
;
}
}
else
{
boxStatus
.
msg
=
"叉子料盘检测有料,请检查"
;
lineOperation
.
msg
=
"叉子料盘检测有料,请检查"
;
boxStatus
.
msg
=
CodeMsg
;
lineOperation
.
msg
=
CodeMsg
;
LogUtil
.
info
(
"给服务器发送报警:"
+
CodeMsg
);
CodeMsg
=
""
;
}
}
CodeMsg
=
""
;
//WarnMsg = "";
//状态
boxStatus
.
status
=
(
int
)
storeStatus
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
b80344c
...
...
@@ -172,11 +172,11 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
8
_WaitTake
))
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
9
_WaitTake
))
{
timeOutMs
=
650000
;
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
6
_CheckTray
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
7
_CheckTray
))
{
timeOutMs
=
5000
;
}
...
...
@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary
isOk
=
false
;
break
;
}
else
if
((!
wait
.
IsEnd
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
8
_WaitTake
)
&&
LineConnect
.
CanReSend
())
else
if
((!
wait
.
IsEnd
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
9
_WaitTake
)
&&
LineConnect
.
CanReSend
())
{
//判断是否需要重发入库结束命令
SendOutStoreEnd
(
StoreMove
);
...
...
@@ -307,16 +307,14 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
StoreMove
.
NewMove
(
StoreMoveType
.
InStore
,
param
);
//if (isNeedCheckIO)
//{
//料盘检测
InStoreLog
(
" 入库:SI_00 入库等待仓门口料盘信号"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_00_TrayCheck
);
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
// StoreMove.WaitList.Add(WaitResultInfo.WaitTime(10000));
// StoreMove.OneWaitCanEndStep = true;
////料盘检测
//InStoreLog(" 入库:SI_00 入库等待仓门口料盘信号");
//StoreMove.NextMoveStep(StoreMoveStep.SI_00_TrayCheck);
//StoreMove.TimeOutSeconds = 5;
//StoreMove.WaitList.Add(WaitResultInfo.WaitTime(100));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
HIGH
))
{
doorCheckWatch
.
Restart
();
...
...
@@ -325,11 +323,9 @@ namespace OnlineStore.DeviceLibrary
{
doorCheckWatch
.
Stop
();
}
//}
//else
//{
// SI_02_Move(param.MoveP);
//}
SI_02_Move
(
param
.
MoveP
);
}
else
{
...
...
@@ -424,7 +420,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
CodeMsg
=
"
入库["
+
posId
+
"]叉子去取料前,未检测到进料口有料
"
;
CodeMsg
=
"
"
+
posId
+
"_"
+
StoreMove
.
MoveParam
.
PosInfo
.
barcode
+
"_空入
"
;
LogUtil
.
error
(
CodeMsg
);
}
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
...
...
@@ -452,17 +448,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_03_ReturnHome
)
{
//if (IsHasCompress_Axis)
//{
//StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
//InStoreLog("入库:SI_04_CompressWare 压紧轴至P3(压紧前点)[" + moveP.ComPress_P3 + "] 开始");
//ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
//OpenDoor();
//}
//else
{
SI_05_DeviceToDoor
();
}
SI_05_DeviceToDoor
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_04_CompressWare
)
{
...
...
@@ -749,11 +735,13 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SOL_17_UpdownToP42
);
OutStoreLog
(
"出库定位2:放下物品,升降轴到P4( 库位入料缓冲点) "
);
//压紧轴放松,压紧轴到压紧前点P3
ACAxisMove
(
Config
.
Comp_Axis
,
StoreMove
.
MoveParam
.
LocationPos
.
CompressAxis_CPosition_P3
,
Config
.
CompAxis_P3_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
LocationPos
.
UpDownAxis_ILPosition_P4
,
Config
.
UpDownAxis_P4_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SOL_17_UpdownToP42
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SOL_18_WaitTime2
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SOL_18_WaitTime2
);
OutStoreLog
(
"出库定位2:放下物品后等待200 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
}
...
...
@@ -780,6 +768,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_21_ToDoorP
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_22_WaitNoTray
);
OutStoreLog
(
"出库定位:打开仓门,等待门口无料盘信号 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
OpenDoor
();
}
...
...
@@ -789,8 +778,8 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_23_InoutToP2
)
{
OutStoreLog
(
"出库:升降轴至P8(进料口出料缓冲点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_24_PutWare
);
OutStoreLog
(
"出库:升降轴至P8(进料口出料缓冲点) "
);
//NeedCheckSafetyLight = 0;
ComMoveToPosition
(
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P8
,
Config
.
UpDownAxis_P8_Speed
);
...
...
@@ -803,15 +792,35 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_25_InoutToP1
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_26_CheckTray
);
OutStoreLog
(
"出库:检测料仓门口料盘信号 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_26_CloseDoor
);
OutStoreLog
(
"出库:轴2至P1(待机点) ,关闭舱门"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoor
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_26_CloseDoor
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_27_CheckTray
);
OutStoreLog
(
"出库:检测料仓门口料盘信号 ,最多1000"
);
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
6
_CheckTray
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
7
_CheckTray
))
{
SO_27_GoBack
();
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
string
barcode
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
barcode
:
""
;
CodeMsg
=
""
+
posId
+
"_"
+
barcode
+
"_空出"
;
LogUtil
.
error
(
CodeMsg
+
",取消出库任务"
);
StoreManager
.
cancelOutTask
(
barcode
);
}
SO_28_GoBack
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
7
_GoBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
8
_GoBack
)
{
int
OutStoreWaitSeconds
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OutStoreWaitSeconds
);
if
(
OutStoreWaitSeconds
<=
0
)
...
...
@@ -819,14 +828,14 @@ namespace OnlineStore.DeviceLibrary
OutStoreWaitSeconds
=
600
;
}
int
ms
=
OutStoreWaitSeconds
*
1000
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
8
_WaitTake
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_2
9
_WaitTake
);
OutStoreLog
(
"出库: 等待拿走物品,最多等待"
+
OutStoreWaitSeconds
+
"秒"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
ms
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove
.
OneWaitCanEndStep
=
true
;
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
8
_WaitTake
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_2
9
_WaitTake
)
{
TimeSpan
span
=
DateTime
.
Now
-
startOutStoreTime
;
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
...
...
@@ -845,7 +854,7 @@ namespace OnlineStore.DeviceLibrary
}
public
bool
OutCheckAlarm
()
{
if
(
alarmType
.
Equals
(
StoreAlarmType
.
IoSingleTimeOut
)
&&
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
6
_CheckTray
))
if
(
alarmType
.
Equals
(
StoreAlarmType
.
IoSingleTimeOut
)
&&
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_2
7
_CheckTray
))
{
return
true
;
}
...
...
@@ -860,12 +869,13 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
EndStepWait
();
}
}
private
void
SO_2
7
_GoBack
()
private
void
SO_2
8
_GoBack
()
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_27_GoBack
);
OutStoreLog
(
"出库:轴2至P1(待机点) ,关闭舱门"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoor
();
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_28_GoBack
);
OutStoreLog
(
"出库:发送出库完成消息给流水线"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
//ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
//CloseDoor();
//发送消息给流水线
SendOutStoreEnd
(
StoreMove
);
}
...
...
source/DeviceLibrary/acSingleStore/StoreManager.cs
查看文件 @
b80344c
...
...
@@ -218,5 +218,51 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
// 取消出库任务地址: /cancelOutTask //参数: barcode
private
static
string
Addr_cancelPutInTask
=
"/rest/api/qisda/device/cancelOutTask"
;
public
static
string
cancelOutTask
(
string
barcode
)
{
string
msg
=
""
;
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"barcode"
,
barcode
);
string
server
=
GetAddr
(
Addr_cancelPutInTask
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
"cancelOutTask "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
ResultData
data
=
JsonHelper
.
DeserializeJsonToObject
<
ResultData
>(
resultStr
);
if
(
data
==
null
)
{
return
msg
=
" cancelOutTask【 "
+
barcode
+
"】 没有收到服务器反馈"
;
}
else
if
(
data
.
code
.
Equals
(
0
).
Equals
(
false
))
{
return
msg
=
" cancelOutTask【 "
+
barcode
+
"】 :"
+
data
.
msg
;
}
return
""
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" cancelOutTask error :"
+
ex
.
ToString
());
}
return
msg
;
}
}
public
class
ResultData
{
//{"code":0,"msg":"ok","data":"7"}
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
Dictionary
<
string
,
string
>
data
{
get
;
set
;
}
}
}
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
b80344c
...
...
@@ -279,17 +279,21 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
SO_25_InoutToP1
,
/// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点),关闭仓门
/// </summary>
SO_26_CloseDoor
,
/// <summary>
/// 料仓出库,检测料仓门口信号
/// </summary>
SO_2
6
_CheckTray
,
SO_2
7
_CheckTray
,
/// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点)
/// </summary>
SO_2
7
_GoBack
,
SO_2
8
_GoBack
,
/// <summary>
/// 等待拿走物品
/// </summary>
SO_2
8
_WaitTake
,
SO_2
9
_WaitTake
,
#
endregion
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论