Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSquareStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 758f33da
由
LN
编写于
2024-07-18 09:09:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加参数
1 个父辈
e9591eda
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
69 行增加
和
59 行删除
source/DeviceLibrary/acSquareStore/Square_BoxBean.cs
source/DeviceLibrary/acSquareStore/Square_BoxBean_Partial.cs
source/DeviceLibrary/manager/HttpServer.cs
source/DeviceLibrary/acSquareStore/Square_BoxBean.cs
查看文件 @
758f33d
...
...
@@ -1623,15 +1623,17 @@ namespace OnlineStore.DeviceLibrary
{
lineOperation
.
alarmList
.
Add
(
alarmInfo
);
}
//1 定时通信data里面添加 boxCanPutIn 字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
string
canput
=
BoxCanPutIn
()
?
"TRUE"
:
"FALSE"
;
lineOperation
.
data
.
Add
(
"boxCanPutIn"
,
canput
);
//1 定时通信data里面添加 boxCanPutIn1,boxCanPutIn2 字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
string
canput1
=
BoxCanPutIn
(
1
)
?
"TRUE"
:
"FALSE"
;
string
canput2
=
BoxCanPutIn
(
2
)
?
"TRUE"
:
"FALSE"
;
lineOperation
.
data
.
Add
(
"boxCanPutIn1"
,
canput1
);
lineOperation
.
data
.
Add
(
"boxCanPutIn2"
,
canput2
);
return
lineOperation
;
}
private
bool
BoxCanPutIn
()
private
bool
BoxCanPutIn
(
int
door
)
{
if
(
storeRunStatus
<
StoreRunStatus
.
Runing
)
if
(
storeRunStatus
<
StoreRunStatus
.
Runing
)
{
return
false
;
}
...
...
@@ -1639,11 +1641,11 @@ namespace OnlineStore.DeviceLibrary
{
return
false
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftShelf_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
door
==
1
&&
IOManager
.
IOValue
(
IO_Type
.
LeftShelf_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
false
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
RightShelf_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
door
==
2
&&
IOManager
.
IOValue
(
IO_Type
.
RightShelf_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
false
;
}
...
...
source/DeviceLibrary/acSquareStore/Square_BoxBean_Partial.cs
查看文件 @
758f33d
...
...
@@ -437,7 +437,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
MiddleAxis_Safe_Position
,
Config
.
MiddleAxis_P1_Speed
);
InStoreLog
(
"堆垛机取货完成, 通知极创"
);
HttpServer
.
ddjPickUpGoodsNotice
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
HttpServer
.
ddjPickUpGoodsNotice
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
,
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_09_MiddleToP3
)
...
...
@@ -502,7 +502,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog
(
"料箱放入库位完成, 通知极创"
);
HttpServer
.
inStorageFeedback
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
HttpServer
.
inStorageFeedback
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
,
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_15_UpdownBack
)
...
...
@@ -764,7 +764,7 @@ namespace OnlineStore.DeviceLibrary
//StoreMove.NextMoveStep(StoreMoveStep.SO_12_InoutToP2);
//OutStoreLog("出库: 叉子进出料口,进出轴至P2(进料口取料点) [" + moveP.InOut_P2 + "] ");
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
string
msg
=
HttpServer
.
outIsReady
(
CID
,
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
string
msg
=
HttpServer
.
outIsReady
(
CID
,
StoreMove
.
MoveParam
.
PosInfo
.
PosId
,
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
if
(
msg
==
""
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_12_InoutToP2
);
...
...
@@ -781,7 +781,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_12_WaitCanPut
)
{
string
msg
=
HttpServer
.
outIsReady
(
CID
,
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
string
msg
=
HttpServer
.
outIsReady
(
CID
,
StoreMove
.
MoveParam
.
PosInfo
.
PosId
,
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
if
(
msg
==
""
)
{
if
(
WarnMsg
.
Contains
(
"查询接驳线体放料结果"
))
...
...
@@ -838,7 +838,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog
(
"堆垛机放货完成反馈, 通知极创"
);
HttpServer
.
ddjReleaseTheGoodsNotice
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
);
HttpServer
.
ddjReleaseTheGoodsNotice
(
StoreMove
.
MoveParam
.
PosInfo
.
PosId
,
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_16_GoBack
)
{
...
...
source/DeviceLibrary/manager/HttpServer.cs
查看文件 @
758f33d
...
...
@@ -22,46 +22,50 @@ namespace DeviceLibrary
private
static
string
Addr_outIsReady
=
"/rest/api/v2/803/service/store/xl/outIsReady"
;
//出库时查询接驳线体是否可以放料箱
private
static
string
Addr_ddjReleaseTheGoodsNotice
=
"/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice"
;
//堆垛机放货完成反馈
// ## 入库:
//1 定时通信data里面添加boxCanPutIn字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
//2 堆垛机取货完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//3 料箱放入库位完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/inStorageFeedback
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//4 出库时查询接驳线体是否可以放料箱
// http://localhost/rest/api/v2/803/service/store/xl/outIsReady
//请求参数:
//{
//"cid": "001",
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//5 堆垛机放货完成反馈
//http://localhost/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice
//请求参数:
//{
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
// ## 入库:
// 1 定时通信data里面添加 boxCanPutIn1, boxCanPutIn2 字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
// 2 堆垛机取货完成, 通知极创
// http://localhost/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice
// 请求参数:
// {
// "posName": "库位号"
// "door": "1或2"
// }
// 返回结果
// {"code":0,"msg":"ok","data":""}
// 3 料箱放入库位完成, 通知极创
// http://localhost/rest/api/v2/803/service/store/xl/inStorageFeedback
// 请求参数:
// {
// "posName": "库位号"
// "door": "1或2"
// }
//返回结果
// {"code":0,"msg":"ok","data":""}
// 4 出库时查询接驳线体是否可以放料箱
// http://localhost/rest/api/v2/803/service/store/xl/outIsReady
// 请求参数:
// {
// "cid": "001",
// "posName": "库位号"
// "door": "1或2"
// }
// 返回结果
// {"code":0,"msg":"ok","data":""}
// 5 堆垛机放货完成反馈
// http://localhost/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice
// 请求参数:
// {
// "posName": "库位号"
// "door": "1或2"
// }
// 返回结果
// {"code":0,"msg":"ok","data":""}
private
static
string
GetAddr
(
string
addr
,
Dictionary
<
string
,
string
>
paramsMap
=
null
)
...
...
@@ -148,7 +152,7 @@ namespace DeviceLibrary
/// </summary>
/// <param name="posName"></param>
/// <returns></returns>
public
static
string
ddjPickUpGoodsNotice
(
string
posName
)
public
static
string
ddjPickUpGoodsNotice
(
string
posName
,
int
door
)
{
//2 堆垛机取货完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice
...
...
@@ -160,6 +164,7 @@ namespace DeviceLibrary
//{"code":0,"msg":"ok","data":""}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"posName"
,
posName
);
paramMap
.
Add
(
"door"
,
door
.
ToString
());
return
PostJson
(
paramMap
,
Addr_ddjPickUpGoodsNotice
,
"ddjPickUpGoodsNotice"
,
true
);
}
...
...
@@ -169,7 +174,7 @@ namespace DeviceLibrary
/// </summary>
/// <param name="posName"></param>
/// <returns></returns>
public
static
string
inStorageFeedback
(
string
posName
)
public
static
string
inStorageFeedback
(
string
posName
,
int
door
)
{
//3 料箱放入库位完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/inStorageFeedback
...
...
@@ -183,6 +188,7 @@ namespace DeviceLibrary
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"posName"
,
posName
);
paramMap
.
Add
(
"door"
,
door
.
ToString
());
return
PostJson
(
paramMap
,
Addr_inStorageFeedback
,
"inStorageFeedback"
,
true
);
}
...
...
@@ -193,7 +199,7 @@ namespace DeviceLibrary
/// <param name="cid"></param>
/// <param name="boxCode"></param>
/// <returns></returns>
public
static
string
outIsReady
(
string
cid
,
string
boxCode
)
public
static
string
outIsReady
(
string
cid
,
string
posName
,
int
door
)
{
//4 出库时查询接驳线体是否可以放料箱
...
...
@@ -208,7 +214,8 @@ namespace DeviceLibrary
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"cid"
,
cid
);
paramMap
.
Add
(
"boxCode"
,
boxCode
);
paramMap
.
Add
(
"posName"
,
posName
);
paramMap
.
Add
(
"door"
,
door
.
ToString
());
return
PostJson
(
paramMap
,
Addr_outIsReady
,
"outIsReady"
,
true
);
}
...
...
@@ -216,9 +223,9 @@ namespace DeviceLibrary
/// <summary>
/// 堆垛机放货完成反馈
/// </summary>
/// <param name="
boxCod
e"></param>
/// <param name="
posNam
e"></param>
/// <returns></returns>
public
static
string
ddjReleaseTheGoodsNotice
(
string
boxCode
)
public
static
string
ddjReleaseTheGoodsNotice
(
string
posName
,
int
door
)
{
//5 堆垛机放货完成反馈
...
...
@@ -233,7 +240,8 @@ namespace DeviceLibrary
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"boxCode"
,
boxCode
);
paramMap
.
Add
(
"posName"
,
posName
);
paramMap
.
Add
(
"door"
,
door
.
ToString
());
return
PostJson
(
paramMap
,
Addr_ddjReleaseTheGoodsNotice
,
"ddjReleaseTheGoodsNotice"
,
true
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论