Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 65166571
由
张东亮
编写于
2020-06-04 21:44:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
包装仓入库逻辑优化
1 个父辈
e8dd2942
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
70 行增加
和
42 行删除
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/StoreManager.cs
source/LoadCVSLibrary/position/CSVPositionReader.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
6516657
...
@@ -63,11 +63,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -63,11 +63,12 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
wait
.
IsEnd
=
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_08_WaitLineIn
)||
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_08_WaitLineIn
)
||
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_04_WaitTakeSingle
))
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_04_WaitTakeSingle
))
{
{
timeOutMs
=
30000
;
timeOutMs
=
30000
;
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_03_LineRun
))
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_03_LineRun
))
{
{
timeOutMs
=
40000
;
timeOutMs
=
40000
;
}
}
...
@@ -76,13 +77,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -76,13 +77,13 @@ namespace OnlineStore.DeviceLibrary
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
;
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
;
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
MoveInfo
.
MoveType
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
MoveInfo
.
MoveType
);
LogUtil
.
error
(
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
logType
+
14
);
LogUtil
.
error
(
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
logType
+
14
);
if
(!
MoveInfo
.
OneWaitCanEndStep
)
if
(!
MoveInfo
.
OneWaitCanEndStep
)
{
{
isOk
=
false
;
isOk
=
false
;
break
;
break
;
}
}
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
Compress_Check
)
&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_07_CheckComSig
))
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
Compress_Check
)
&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_07_CheckComSig
))
{
{
CompressSigTimeOut
=
true
;
CompressSigTimeOut
=
true
;
}
}
...
@@ -143,7 +144,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -143,7 +144,7 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
true
;
wait
.
IsEnd
=
true
;
}
}
}
}
else
if
(
wait
.
AgvAction
.
Equals
((
int
)
ClientAction
.
Arrive
)
&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_WaitEmptyAgv
))
else
if
(
wait
.
AgvAction
.
Equals
((
int
)
ClientAction
.
Arrive
)
&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_WaitEmptyAgv
))
{
{
if
(
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
LineIn_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
LineIn_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
...
@@ -158,7 +159,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -158,7 +159,7 @@ namespace OnlineStore.DeviceLibrary
if
(
AgvClient
.
closeDoorTimeMap
.
ContainsKey
(
Config
.
AgvNodeName
))
if
(
AgvClient
.
closeDoorTimeMap
.
ContainsKey
(
Config
.
AgvNodeName
))
{
{
DateTime
time
=
AgvClient
.
closeDoorTimeMap
[
Config
.
AgvNodeName
];
DateTime
time
=
AgvClient
.
closeDoorTimeMap
[
Config
.
AgvNodeName
];
if
(
time
>=
MoveInfo
.
LastSetpTime
)
if
(
time
>=
MoveInfo
.
LastSetpTime
)
{
{
wait
.
IsEnd
=
true
;
wait
.
IsEnd
=
true
;
}
}
...
@@ -190,7 +191,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -190,7 +191,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
int
second
=
10
;
int
second
=
10
;
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
if
(
second
>
120
)
if
(
second
>
120
)
{
{
...
@@ -200,7 +201,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -200,7 +201,7 @@ namespace OnlineStore.DeviceLibrary
{
{
second
=
10
;
second
=
10
;
}
}
LogUtil
.
error
(
WarnMsg
,
logType
+
100
,
second
);
LogUtil
.
error
(
WarnMsg
,
logType
+
100
,
second
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
MoveInfo
.
MoveType
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
MoveInfo
.
MoveType
);
}
}
}
}
...
@@ -210,7 +211,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -210,7 +211,7 @@ namespace OnlineStore.DeviceLibrary
//判断是否在P1,如果是,不需要运行
//判断是否在P1,如果是,不需要运行
if
(
ACServerManager
.
isInPosition
(
Config
.
InOut_Axis
,
InOut_P1
))
if
(
ACServerManager
.
isInPosition
(
Config
.
InOut_Axis
,
InOut_P1
))
{
{
LogUtil
.
debug
(
Name
+
"进出轴当前已经在P1,不需要再回P1"
);
LogUtil
.
debug
(
Name
+
"进出轴当前已经在P1,不需要再回P1"
);
}
}
else
else
{
{
...
@@ -230,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -230,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
/// 最后一次使用的料架号
/// 最后一次使用的料架号
/// </summary>
/// </summary>
// private string LastRfidID = "";//服务器发送的出库rfid
// private string LastRfidID = "";//服务器发送的出库rfid
private
InOutParam
LastOutParam
=
new
InOutParam
()
;
private
InOutParam
LastOutParam
=
new
InOutParam
();
private
string
GetLastRfid
()
private
string
GetLastRfid
()
{
{
...
@@ -298,7 +299,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -298,7 +299,7 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
// EmprtShelfList = new ConcurrentQueue<string>();
// EmprtShelfList = new ConcurrentQueue<string>();
if
(
IOValue
(
IO_Type
.
LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
MoveInfo
.
NewMove
(
StoreMoveType
.
InStore
,
new
InOutParam
());
MoveInfo
.
NewMove
(
StoreMoveType
.
InStore
,
new
InOutParam
());
...
@@ -336,12 +337,32 @@ namespace OnlineStore.DeviceLibrary
...
@@ -336,12 +337,32 @@ namespace OnlineStore.DeviceLibrary
//读取RFID
//读取RFID
RFIDData
data
=
RFIDManager
.
ReadRFID
(
Config
.
RFID_IP
,
true
);
RFIDData
data
=
RFIDManager
.
ReadRFID
(
Config
.
RFID_IP
,
true
);
CurrShelfID
=
data
.
NumStr
();
CurrShelfID
=
data
.
NumStr
();
LogUtil
.
info
(
Name
+
"更新当前料架号CurrShelfID=【"
+
CurrShelfID
+
"】,LastRfidID=【"
+
GetLastRfid
()
+
"】"
);
LogUtil
.
info
(
Name
+
"更新当前料架号CurrShelfID=【"
+
CurrShelfID
+
"】,LastRfidID=【"
+
GetLastRfid
()
+
"】"
);
}
}
private
void
GetPosId
()
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_30_SetInstoreParam
);
InOutStoreLog
(
"不扫码 "
+
MoveInfo
.
SLog
+
": 获取库位号"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
if
(
MoveInfo
.
IsShelfLocked
)
{
bool
result
=
GetPosIdByCode
();
if
(!
result
)
//获取库位失败
{
MoveInfo
.
MoveParam
.
PosID
=
""
;
StartSendTray
(
"锁定库位:获取入库库位失败"
);
}
else
{
MoveInfo
.
EndStepWait
();
}
}
}
private
void
StartMoveToBag
()
private
void
StartMoveToBag
()
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_51_MoveToBag
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_51_MoveToBag
);
InOutStoreLog
(
"入库 "
+
MoveInfo
.
SLog
+
":到库位点,旋转轴至P2( 库位点)轴2(上下) 至P3(库位入库前点)"
);
InOutStoreLog
(
"入库 "
+
MoveInfo
.
SLog
+
":到库位点,旋转轴至P2( 库位点)轴2(上下) 至P3(库位入库前点)"
);
ACAxisMove
(
Config
.
Middle_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
...
@@ -378,7 +399,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -378,7 +399,7 @@ namespace OnlineStore.DeviceLibrary
#
region
料架取料盘扫码获取
POSID
#
region
料架取料盘扫码获取
POSID
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_10_StartGetTray
))
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_10_StartGetTray
))
{
{
if
(
MoveInfo
.
IsShelfLocked
)
if
(
MoveInfo
.
IsShelfLocked
)
{
{
if
(
MoveInfo
.
NextLockedShelfPos
())
if
(
MoveInfo
.
NextLockedShelfPos
())
{
{
...
@@ -477,11 +498,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -477,11 +498,16 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_17_InoutBack
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_17_InoutBack
))
{
{
if
(
MoveInfo
.
SingleInstore
||
MoveInfo
.
IsShelfLocked
)
if
(
MoveInfo
.
SingleInstore
)
{
{
//单盘入库
或者该料架已锁定库位
,不需要扫码
//单盘入库,不需要扫码
StartMoveToBag
();
StartMoveToBag
();
}
}
else
if
(
MoveInfo
.
IsShelfLocked
)
{
//该料架已锁定库位,不需要扫码,直接查询服务器
GetPosId
();
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_21_ToScanPosition
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_21_ToScanPosition
);
...
@@ -539,7 +565,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -539,7 +565,7 @@ namespace OnlineStore.DeviceLibrary
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
LastScanCodes
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
LastScanCodes
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
if
(
LastScanCodes
.
Count
<=
0
)
if
(
LastScanCodes
.
Count
<=
0
)
{
{
Thread
.
Sleep
(
1
);
Thread
.
Sleep
(
1
);
...
@@ -587,10 +613,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -587,10 +613,10 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_30_SetInstoreParam
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_30_SetInstoreParam
);
InOutStoreLog
(
"扫码 "
+
MoveInfo
.
SLog
+
": 获取库位号"
);
InOutStoreLog
(
"扫码 "
+
MoveInfo
.
SLog
+
": 获取库位号"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
bool
result
=
GetPosIdByCode
(
MoveInfo
.
currShelfIndex
,
out
CodeResultType
codeResult
);
bool
result
=
GetPosIdByCode
(
MoveInfo
.
currShelfIndex
,
out
CodeResultType
codeResult
);
if
(!
result
)
//获取库位失败
if
(!
result
)
//获取库位失败
{
{
if
(
codeResult
==
CodeResultType
.
NotFoundPos
)
//库位不在该料仓,将该料盘放回料架
if
(
codeResult
==
CodeResultType
.
NotFoundPos
)
//库位不在该料仓,将该料盘放回料架
{
{
//MoveInfo.MoveParam.PosID = "";
//MoveInfo.MoveParam.PosID = "";
StartMoveTrayBack
(
"此料盘不属于该仓库,放回料架"
);
StartMoveTrayBack
(
"此料盘不属于该仓库,放回料架"
);
...
@@ -866,8 +892,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -866,8 +892,8 @@ namespace OnlineStore.DeviceLibrary
//出库前shelfPosID需要固定,出库时根据rfid判断是否需要出入料架
//出库前shelfPosID需要固定,出库时根据rfid判断是否需要出入料架
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_01_InoutBack
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_01_InoutBack
);
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":进出轴到P1 开始"
);
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":进出轴到P1 开始"
);
InOutBackToP1
(
MoveInfo
.
MoveParam
.
MoveP
.
InOut_P1
);
InOutBackToP1
(
MoveInfo
.
MoveParam
.
MoveP
.
InOut_P1
);
return
true
;
return
true
;
}
}
private
void
SO_03_ToBagPosition
()
private
void
SO_03_ToBagPosition
()
{
{
...
@@ -991,7 +1017,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -991,7 +1017,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_07_CheckComSig
)
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_07_CheckComSig
)
{
{
if
(
IOValue
(
IO_Type
.
Compress_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IsIgnoreComSig
)
if
(
IOValue
(
IO_Type
.
Compress_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IsIgnoreComSig
)
{
{
IsIgnoreComSig
=
false
;
IsIgnoreComSig
=
false
;
CompressSigTimeOut
=
false
;
CompressSigTimeOut
=
false
;
...
@@ -999,7 +1025,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -999,7 +1025,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":走到料架位置,旋转轴至P101,升降轴至P102 "
);
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":走到料架位置,旋转轴至P101,升降轴至P102 "
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_HP102
,
Config
.
UpDownAxis_P102_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_HP102
,
Config
.
UpDownAxis_P102_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P101
,
Config
.
MiddleAxis_P101_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P101
,
Config
.
MiddleAxis_P101_Speed
);
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_08_ToShelfPosition
)
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_08_ToShelfPosition
)
{
{
...
@@ -1151,7 +1177,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1151,7 +1177,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
#
endregion
#
endregion
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
6516657
...
@@ -162,6 +162,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -162,6 +162,7 @@ namespace OnlineStore.DeviceLibrary
if
(
instoreShelf
)
if
(
instoreShelf
)
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_10_StartGetTray
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_10_StartGetTray
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
//获取料架的锁定状态
//获取料架的锁定状态
bool
lockState
=
StoreManager
.
GetShelfLockInfo
(
Name
,
CID
,
CurrShelfID
,
out
MoveInfo
.
shelfLockDatas
);
bool
lockState
=
StoreManager
.
GetShelfLockInfo
(
Name
,
CID
,
CurrShelfID
,
out
MoveInfo
.
shelfLockDatas
);
...
@@ -169,14 +170,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -169,14 +170,14 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
IsShelfLocked
=
true
;
MoveInfo
.
IsShelfLocked
=
true
;
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始到料架指定位置取料盘 "
);
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始到料架指定位置取料盘 "
);
}
}
else
else
{
{
MoveInfo
.
IsShelfLocked
=
false
;
MoveInfo
.
IsShelfLocked
=
false
;
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始循环料架取料盘 "
);
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
"开始循环料架取料盘 "
);
}
}
MoveInfo
.
EndStepWait
();
}
}
else
else
{
{
...
@@ -690,7 +691,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -690,7 +691,7 @@ namespace OnlineStore.DeviceLibrary
#
region
扫码获取库位
#
region
扫码获取库位
/// <summary>
/// <summary>
///
扫码枪
数据接收
/// 数据接收
/// </summary>
/// </summary>
/// <param name="message"></param>
/// <param name="message"></param>
private
bool
GetPosIdByCode
()
private
bool
GetPosIdByCode
()
...
@@ -701,7 +702,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -701,7 +702,8 @@ namespace OnlineStore.DeviceLibrary
{
{
LastWidth
=
7
;
LastWidth
=
7
;
}
}
string
message
=
StoreManager
.
ProcessCode
(
LastWidth
,
LastHeight
,
LastScanCodes
);
//string message = StoreManager.ProcessCode(LastWidth, LastHeight, LastScanCodes);
string
message
=
MoveInfo
.
shelfLockDatas
[
MoveInfo
.
currShelfIndex
].
barcode
;
if
(
message
.
Equals
(
""
)
||
string
.
IsNullOrEmpty
(
message
))
if
(
message
.
Equals
(
""
)
||
string
.
IsNullOrEmpty
(
message
))
{
{
CodeMsg
=
"未扫到二维码"
;
CodeMsg
=
"未扫到二维码"
;
...
@@ -719,7 +721,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -719,7 +721,7 @@ namespace OnlineStore.DeviceLibrary
//发送扫码内容到服务器进行入库操作
//发送扫码内容到服务器进行入库操作
Operation
operation
=
getLineBoxStatus
();
Operation
operation
=
getLineBoxStatus
();
operation
.
op
=
1
;
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
1.
ToString
()
},
{
ParamDefine
.
rfid
,
CurrShelfID
}
,
{
"cids"
,
Config
.
All_CIDs
.
Replace
(
'#'
,
','
)
}
};
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
1.
ToString
()
},
{
ParamDefine
.
rfid
,
CurrShelfID
}};
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
if
(
resultOperation
==
null
)
if
(
resultOperation
==
null
)
...
...
source/DeviceLibrary/ACPackingStore/StoreManager.cs
查看文件 @
6516657
...
@@ -562,7 +562,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -562,7 +562,7 @@ namespace OnlineStore.DeviceLibrary
private
static
string
Addr_getShelfLockInfo
=
"/rest/api/qisda/device/getShelfLockInfo"
;
//包装仓获取料架锁定状态地址
private
static
string
Addr_getShelfLockInfo
=
"/rest/api/qisda/device/getShelfLockInfo"
;
//包装仓获取料架锁定状态地址
public
static
bool
GetShelfLockInfo
(
string
deviceName
,
string
cid
,
string
rfid
,
out
List
<
ShelfLockData
>
shelfLockDatas
)
public
static
bool
GetShelfLockInfo
(
string
deviceName
,
string
cid
,
string
rfid
,
out
List
<
ShelfLockData
>
shelfLockDatas
)
{
{
string
msg
=
""
;
string
msg
=
""
;
shelfLockDatas
=
null
;
shelfLockDatas
=
null
;
...
@@ -576,7 +576,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -576,7 +576,7 @@ namespace OnlineStore.DeviceLibrary
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
deviceName
+
"料架锁定状态 "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
LogUtil
.
info
(
deviceName
+
"
料架锁定状态 "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
ShelfLockInfo
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ShelfLockInfo
>(
resultStr
);
ShelfLockInfo
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ShelfLockInfo
>(
resultStr
);
if
(
serverResult
==
null
)
if
(
serverResult
==
null
)
{
{
...
@@ -585,9 +585,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -585,9 +585,9 @@ namespace OnlineStore.DeviceLibrary
return
false
;
return
false
;
}
}
if
(
serverResult
.
data
.
Count
==
0
)
//该料架未锁定
if
(
serverResult
.
data
.
Count
==
0
)
//该料架未锁定
{
{
msg
=
deviceName
+
" 料架【"
+
rfid
+
"】 没有锁定库位的料
"
;
msg
=
deviceName
+
" 料架【"
+
rfid
+
"】 没有被锁定
"
;
LogUtil
.
info
(
msg
);
LogUtil
.
info
(
msg
);
return
false
;
return
false
;
}
}
...
@@ -597,14 +597,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -597,14 +597,14 @@ namespace OnlineStore.DeviceLibrary
string
plates
=
""
;
string
plates
=
""
;
foreach
(
ShelfLockData
item
in
serverResult
.
data
)
foreach
(
ShelfLockData
item
in
serverResult
.
data
)
{
{
LogUtil
.
info
(
"锁定的CID="
+
item
.
cid
+
";当前CID="
+
cid
);
LogUtil
.
info
(
"锁定的CID="
+
item
.
cid
+
"; 当前CID="
+
cid
);
if
(
item
.
cid
.
Equals
(
cid
))
//该料盘属于此料仓
if
(
item
.
cid
.
Equals
(
cid
))
//该料盘属于此料仓
{
{
shelfLockDatas
.
Add
(
item
);
shelfLockDatas
.
Add
(
item
);
plates
+=
"["
+
item
.
lockPos
+
"]
# "
;
plates
+=
item
.
lockPos
+
"
# "
;
}
}
}
}
msg
=
deviceName
+
" 料架【"
+
rfid
+
"】 在该料仓锁定库位的
料:【"
+
plates
+
"】"
;
msg
=
deviceName
+
" 料架【"
+
rfid
+
"】 在该料仓锁定库位的
有:【"
+
plates
+
"】"
;
LogUtil
.
info
(
msg
);
LogUtil
.
info
(
msg
);
return
true
;
return
true
;
}
}
...
@@ -618,7 +618,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -618,7 +618,7 @@ namespace OnlineStore.DeviceLibrary
private
static
string
Addr_PosForPutin
=
"/service/store/emptyPosForPutin"
;
//获取当前料盘属于的料仓编号
private
static
string
Addr_PosForPutin
=
"/service/store/emptyPosForPutin"
;
//获取当前料盘属于的料仓编号
public
static
bool
GetPosForPutIn
(
string
deviceName
,
AC_BOX_Config
boxConfig
,
string
barcode
,
string
rfid
,
int
rfidLoc
)
public
static
bool
GetPosForPutIn
(
string
deviceName
,
AC_BOX_Config
boxConfig
,
string
barcode
,
string
rfid
,
int
rfidLoc
)
{
{
string
msg
=
""
;
string
msg
=
""
;
try
try
...
@@ -628,7 +628,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -628,7 +628,7 @@ namespace OnlineStore.DeviceLibrary
// 参数:cids: 多个 cid
// 参数:cids: 多个 cid
//code: 条码内容
//code: 条码内容
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"cids"
,
boxConfig
.
All_CIDs
.
Replace
(
'#'
,
','
));
paramMap
.
Add
(
"cids"
,
boxConfig
.
All_CIDs
.
Replace
(
'#'
,
','
));
paramMap
.
Add
(
"code"
,
barcode
);
paramMap
.
Add
(
"code"
,
barcode
);
paramMap
.
Add
(
ParamDefine
.
rfid
,
rfid
);
paramMap
.
Add
(
ParamDefine
.
rfid
,
rfid
);
paramMap
.
Add
(
"rfidLoc"
,
rfidLoc
.
ToString
());
paramMap
.
Add
(
"rfidLoc"
,
rfidLoc
.
ToString
());
...
@@ -647,7 +647,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -647,7 +647,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
msg
);
LogUtil
.
info
(
msg
);
return
false
;
return
false
;
}
}
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
{
{
msg
=
deviceName
+
" 【"
+
barcode
+
"】结果:"
+
serverResult
.
msg
;
msg
=
deviceName
+
" 【"
+
barcode
+
"】结果:"
+
serverResult
.
msg
;
LogUtil
.
info
(
msg
);
LogUtil
.
info
(
msg
);
...
@@ -664,7 +664,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -664,7 +664,7 @@ namespace OnlineStore.DeviceLibrary
//第9和第10位表示隔板位置(04)
//第9和第10位表示隔板位置(04)
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
msg
=
deviceName
+
" 料盘【"
+
barcode
+
"】属于该料仓【"
+
boxConfig
.
CID
+
"】"
;
msg
=
deviceName
+
" 料盘【"
+
barcode
+
"】属于该料仓【"
+
boxConfig
.
CID
+
"】"
;
LogUtil
.
info
(
msg
);
LogUtil
.
info
(
msg
);
return
true
;
return
true
;
...
...
source/LoadCVSLibrary/position/CSVPositionReader.cs
查看文件 @
6516657
...
@@ -134,7 +134,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -134,7 +134,7 @@ namespace OnlineStore.LoadCSVLibrary
}
}
else
else
{
{
LogUtil
.
error
(
"读取
csv
,index="
+
index
+
",数据格式不匹配!,line="
+
line
);
LogUtil
.
error
(
"读取
"
+
filePath
+
"
,index="
+
index
+
",数据格式不匹配!,line="
+
line
);
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论