Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3b1de64d
由
张东亮
编写于
2021-12-28 14:26:16 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge branch 'master' of
http://106.15.194.121:8083/lina/SO908-XLRStore
2 个父辈
63f8fdee
0786a918
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
128 行增加
和
66 行删除
dll/HuichuanDLL/HuichuanLibrary.dll
dll/HuichuanDLL/HuichuanLibrary.xml
source/DeviceLibrary/Config/Config_InputEquip.csv
source/DeviceLibrary/manager/SServerManager.cs
source/DeviceLibrary/manager/model/DeviceStep.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
source/LoadCVSLibrary/storeConfig/config/InputEquip_Config.cs
source/XLRStoreClient/App.config
source/XLRStoreClient/记录.txt
dll/HuichuanDLL/HuichuanLibrary.dll
查看文件 @
3b1de64
此文件类型无法预览
dll/HuichuanDLL/HuichuanLibrary.xml
查看文件 @
3b1de64
...
...
@@ -333,6 +333,17 @@
<param
name=
"value"
>
最大力矩限制
</param>
<returns></returns>
</member>
<member
name=
"M:HuichuanLibrary.HCBoardManager.SetAxBacklash(System.Int16,System.Int32,System.Int32,System.Int16)"
>
<summary>
设置反向间隙
HuichuanLibrary.HCBoardManager.SetAxBacklash(MiddleAxis.Config.GetAxisValue(),Config.MiddleAxis_Reverse_Offset, MiddleAxis.Config.HomeLowSpeed,-1);
</summary>
<param
name=
"axisNo"
></param>
<param
name=
"wholdCmpVal"
></param>
<param
name=
"cmpVel"
></param>
<param
name=
"cmpDir"
></param>
<returns></returns>
</member>
<member
name=
"M:HuichuanLibrary.HCBoardManager.GetAxisLoadRate(System.Int16)"
>
<summary>
获取轴的负载率
...
...
source/DeviceLibrary/Config/Config_InputEquip.csv
查看文件 @
3b1de64
...
...
@@ -71,3 +71,6 @@ PRO,4,取料旋转轴_P5速度,Middle_P5_Speed,100000,,,,,,,,,,,,
PRO,5,取料旋转轴_P6速度,Middle_P6_Speed,100000,,,,,,,,,,,,
PRO,6,取料旋转轴_P7速度,Middle_P7_Speed,100000,,,,,,,,,,,,
PRO,7,取料旋转轴_P8速度,Middle_P8_Speed,100000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
source/DeviceLibrary/manager/SServerManager.cs
查看文件 @
3b1de64
...
...
@@ -508,8 +508,14 @@ namespace OnlineStore.DeviceLibrary
int
pW
=
FormUtil
.
GetIntValue
(
serverResult
.
plateW
);
result
.
Param
=
new
InOutPosInfo
(
serverResult
.
barcode
,
serverResult
.
posId
,
pW
,
pH
,
urgentReel
,
cutReel
,
smallReel
,
serverResult
.
rfid
,
rfidloc
);
LogUtil
.
info
(
deviceName
+
"收到出库命令: "
+
result
.
Param
.
ToStr
()
+
" "
);
return
result
;
LogUtil
.
error
(
deviceName
+
" 【"
+
codeStr
+
"】结果入库NG:收到出库信息: "
+
result
.
Param
.
ToStr
()
+
" "
);
result
.
Msg
=
"收到出库信息["
+
serverResult
.
barcode
+
"]["
+
serverResult
.
posId
+
"] "
;
cancelPutInTask
(
deviceName
,
codeStr
);
result
.
Param
=
InOutPosInfo
.
NewNgPos
(
codeStr
,
""
,
height
,
width
,
"收到出库信息["
+
serverResult
.
barcode
+
"]["
+
serverResult
.
posId
+
"]"
);
result
.
Param
.
rfid
=
rfid
;
result
.
Param
.
IsNG
=
true
;
return
result
;
}
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
{
...
...
@@ -542,7 +548,8 @@ namespace OnlineStore.DeviceLibrary
{
result
.
Param
.
IsNG
=
true
;
result
.
Param
.
NgMsg
=
"未找到库位["
+
position
+
"]"
;
result
.
Msg
=
deviceName
+
(
"收到服务器入库命令 "
+
",未找到库位: "
+
result
.
Param
.
ToStr
()
+
" ,入库失败!"
);
result
.
Msg
=
"未找到库位: "
+
result
.
Param
.
ToStr
()
+
" ,入库失败"
;
LogUtil
.
error
(
deviceName
+
(
"收到服务器入库命令 "
+
",未找到库位: "
+
result
.
Param
.
ToStr
()
+
" ,入库失败!"
));
return
result
;
}
else
...
...
@@ -648,66 +655,68 @@ namespace OnlineStore.DeviceLibrary
public
static
ShelfTaskInfo
ShelfFinish
(
string
rfid
,
string
barcode
=
""
,
string
rfidLoc
=
"0"
,
string
robotIndex
=
"1"
)
{
LogUtil
.
info
(
$
"ShelfFinish rifd【{rfid}】barcode【{barcode}】rfidLoc【{rfidLoc}】robotIndex【{robotIndex}】"
);
ShelfTaskInfo
task
=
new
ShelfTaskInfo
();
task
.
rfid
=
rfid
;
return
task
;
// DateTime startTime = DateTime.Now;
// try
// {
// string api = Addr_ShelfFinish;
// Dictionary<string, string> paramMap = new Dictionary<string, string>();
// paramMap.Add("barcode", barcode);
// paramMap.Add("rfid", rfid);
// paramMap.Add("rfidLoc", rfidLoc);
// paramMap.Add("robotIndex", robotIndex);
// //string url = httpAddr + api + "?barcode=" + barcode + "&rfid=" + rfid + "&rfidLoc=" + rfidLoc + "&robotIndex=" + robotIndex;
// string url = GetAddr(api, paramMap);
// LogUtil.debug("http :URL:" + url);
// string json = HttpHelper.Post(url, "", 10000);
// if (barcode != "")
// {
// LogUtil.info("http :URL:" + url + " :Response:" + json + " 耗时[" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "]");
// }
// else
// {
// LogUtil.debug("http :URL:" + url + " :Response:" + json);
// }
// if (string.IsNullOrWhiteSpace(json)) return task;
// //行 2234: [2021 - 04 - 07 15:09:31,412][9]INFO - http :URL:
// //http://192.168.100.14/myproject/rest/api/qisda/device/putShelfFinished?barcode=640253A*34005600000309*QG00006*5000*23C4&rfid=F103&rfidLoc=8&robotIndex=1 :
// //Response:{"code":0,"msg":"ok","data":{"smallTask":"0","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"5","packageEmpty":"0","rfid":"F103","usedRfidList":"F106,F105,F103","barcode":"640253A*34005600000309*QG00006*5000*23C4","cutTask":"0"}} 耗时[00:00:00.1]
// JavaScriptSerializer serializer = new JavaScriptSerializer();
// Dictionary<string, object> obj = (Dictionary<string, object>)serializer.DeserializeObject(json);
// if (!obj.TryGetValue("code", out object value)) return task;
// if (value.ToString() != "0")
// {
// if (obj.TryGetValue("msg", out value))
// LogUtil.error("http" + api + ": " + value.ToString());
// return task;
// }
// if (!obj.TryGetValue("data", out value)) return task;
// Dictionary<string, object> dict = (Dictionary<string, object>)value;
// if (dict == null)
// {
// LogUtil.info("http" + api + ": data=null");
// return task;
// }
DateTime
startTime
=
DateTime
.
Now
;
try
{
string
api
=
Addr_ShelfFinish
;
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"barcode"
,
barcode
);
paramMap
.
Add
(
"rfid"
,
rfid
);
paramMap
.
Add
(
"rfidLoc"
,
rfidLoc
);
paramMap
.
Add
(
"robotIndex"
,
robotIndex
);
//string url = httpAddr + api + "?barcode=" + barcode + "&rfid=" + rfid + "&rfidLoc=" + rfidLoc + "&robotIndex=" + robotIndex;
string
url
=
GetAddr
(
api
,
paramMap
);
LogUtil
.
debug
(
"http :URL:"
+
url
);
string
json
=
HttpHelper
.
Post
(
url
,
""
,
10000
);
if
(
barcode
!=
""
)
{
LogUtil
.
info
(
"http :URL:"
+
url
+
" :Response:"
+
json
+
" 耗时["
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"]"
);
}
else
{
LogUtil
.
debug
(
"http :URL:"
+
url
+
" :Response:"
+
json
);
}
if
(
string
.
IsNullOrWhiteSpace
(
json
))
return
task
;
//行 2234: [2021 - 04 - 07 15:09:31,412][9]INFO - http :URL:
//http://192.168.100.14/myproject/rest/api/qisda/device/putShelfFinished?barcode=640253A*34005600000309*QG00006*5000*23C4&rfid=F103&rfidLoc=8&robotIndex=1 :
//Response:{"code":0,"msg":"ok","data":{"smallTask":"0","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"5","packageEmpty":"0","rfid":"F103","usedRfidList":"F106,F105,F103","barcode":"640253A*34005600000309*QG00006*5000*23C4","cutTask":"0"}} 耗时[00:00:00.1]
JavaScriptSerializer
serializer
=
new
JavaScriptSerializer
();
Dictionary
<
string
,
object
>
obj
=
(
Dictionary
<
string
,
object
>)
serializer
.
DeserializeObject
(
json
);
if
(!
obj
.
TryGetValue
(
"code"
,
out
object
value
))
return
task
;
if
(
value
.
ToString
()
!=
"0"
)
{
if
(
obj
.
TryGetValue
(
"msg"
,
out
value
))
LogUtil
.
error
(
"http"
+
api
+
": "
+
value
.
ToString
());
return
task
;
}
if
(!
obj
.
TryGetValue
(
"data"
,
out
value
))
return
task
;
Dictionary
<
string
,
object
>
dict
=
(
Dictionary
<
string
,
object
>)
value
;
if
(
dict
==
null
)
{
LogUtil
.
info
(
"http"
+
api
+
": data=null"
);
return
task
;
}
if
(
dict
.
TryGetValue
(
"bigEmpty"
,
out
value
))
int
.
TryParse
(
value
.
ToString
(),
out
task
.
bigEmpty
);
if
(
dict
.
TryGetValue
(
"smallEmpty"
,
out
value
))
int
.
TryParse
(
value
.
ToString
(),
out
task
.
smallEmpty
);
// if (dict.TryGetValue("bigEmpty", out value))
// int.TryParse(value.ToString(), out task.bigEmpty);
// if (dict.TryGetValue("smallEmpty", out value))
// int.TryParse(value.ToString(), out task.smallEmpty);
if
(
dict
.
TryGetValue
(
"usedRfidList"
,
out
value
))
task
.
usedRfidList
=
value
.
ToString
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"http error : "
+
ex
.
ToString
());
}
return
task
;
//
if (dict.TryGetValue("usedRfidList", out value))
//
task.usedRfidList = value.ToString();
//
}
//
catch (Exception ex)
//
{
//
LogUtil.error("http error : " + ex.ToString());
//
}
//
return task;
}
}
public
class
ShelfTaskInfo
...
...
source/DeviceLibrary/manager/model/DeviceStep.cs
查看文件 @
3b1de64
...
...
@@ -1184,10 +1184,14 @@ namespace OnlineStore.DeviceLibrary
/// 否则直接到IS11_ShelfReady
/// </summary>
IS14_ReelOK
,
/// <summary>
/// 料串出库:如果当前位置<=P1,缓慢上升判断料串是否满,若已经满了,直接离开.
/// </summary>
IS15_AxisUpMove
,
/// <summary>
/// 如果放料结束检测到料盘信号亮,需要等1500再次判断,防止误判断
/// </summary>
IS15_CheckShelfNeedLeave
,
///// <summary>
///// 料串出库:如果当前位置<=P1,缓慢上升判断料串是否满,若已经满了,直接离开.
///// </summary>
//IS15_AxisUpMove,
/// <summary>
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
查看文件 @
3b1de64
...
...
@@ -566,6 +566,10 @@ namespace OnlineStore.DeviceLibrary
{
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IS15_CheckShelfNeedLeave
))
{
CheckShelfIsFull
();
}
#
region
送料串离开
...
...
@@ -651,7 +655,18 @@ namespace OnlineStore.DeviceLibrary
{
if
(
Robot
.
IOValue
(
Config
.
IO_ReelCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
SendOutShelfLeave
(
"料串出满需离开(信号到位)"
);
//IS14_ReelOK
//如果是刚刚放料结束的判断,需要等1500再次判断
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IS14_ReelOK
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IS15_CheckShelfNeedLeave
);
WorkLog
(
$
"出库{MoveInfo.SLog} 放料完成,检测到料串出满需离开(信号到位),等待1500后再次判断"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1500
));
}
else
{
SendOutShelfLeave
(
"料串出满需离开(信号到位)"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB07_AxisUpMove
))
{
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
查看文件 @
3b1de64
using
Asa
;
using
Asa
;
using
HuichuanLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -260,6 +261,11 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IR04_MiddleToP1
))
{
//旋转轴到达P1结束,设置反向补偿间隙
HCBoardManager
.
SetAxBacklash
(
MiddleAxis
.
Config
.
GetAxisValue
(),
Config
.
MiddleAxis_Reverse_Offset
,
MiddleAxis
.
Config
.
HomeLowSpeed
,
-
1
);
LogInfo
(
$
"复位{MoveInfo.SLog}:旋转轴回待机点P1完成,设置反向补偿:axisNo【{MiddleAxis.Config.GetAxisValue() }】补偿值【{Config.MiddleAxis_Reverse_Offset}】速度【{MiddleAxis.Config.HomeLowSpeed}】"
);
if
(
UpdownAxis
.
IsNeedHome
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IR05_UpdownHome
);
...
...
source/LoadCVSLibrary/storeConfig/config/InputEquip_Config.cs
查看文件 @
3b1de64
...
...
@@ -339,6 +339,14 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[
ConfigProAttribute
(
"Middle_P8_Speed"
)]
public
int
Middle_P8_Speed
{
get
;
set
;
}
/// <summary>
/// PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"MiddleAxis_Reverse_Offset"
)]
public
int
MiddleAxis_Reverse_Offset
{
get
;
set
;
}
private
List
<
string
>
CameraList
=
null
;
...
...
source/XLRStoreClient/App.config
查看文件 @
3b1de64
...
...
@@ -8,7 +8,7 @@
<
add
key
=
"App_AutoRun"
value
=
"0"
/>
<
add
key
=
"App_Title"
value
=
"智能存储仓客户端"
/>
<!--
Server
address
-->
<
add
key
=
"http.server"
value
=
"http://192.168.1
00.14/myproject
/"
/>
<
add
key
=
"http.server"
value
=
"http://192.168.1
.123:8800
/"
/>
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<
add
key
=
"StartBlowValue"
value
=
"4"
/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
...
...
source/XLRStoreClient/记录.txt
查看文件 @
3b1de64
...
...
@@ -18,3 +18,9 @@ AA:第3和第4位存储机构A面或B面,AA或者BB
点击复位按钮自动启动。
20211208
旋转轴增加反向间隙补偿功能,
Config_InputEquip.csv 配置文件需要增加一行配置:
PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,,
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论