Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1057-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 823a4b52
由
刘韬
编写于
2022-10-11 10:18:11 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
启用温湿度控制
1 个父辈
45597119
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
30 行增加
和
19 行删除
source/Common/util/MyWebClient.cs
source/DeviceLibrary/Config/Config_BoxEquip.csv
source/DeviceLibrary/manager/agvClient/DoorInfo.cs
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureBean.cs
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureController.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
source/Common/util/MyWebClient.cs
查看文件 @
823a4b5
...
...
@@ -212,7 +212,7 @@ namespace OnlineStore.Common
using
(
var
wc
=
new
MyWebClient
(
timeOut
))
{
if
(
string
.
IsNullOrEmpty
(
wc
.
Headers
[
"Content-Type"
]))
wc
.
Headers
.
Add
(
"Content-Type"
,
"application/
x-www-form-urlencoded
;charset=UTF-8"
);
wc
.
Headers
.
Add
(
"Content-Type"
,
"application/
json
;charset=UTF-8"
);
wc
.
Encoding
=
encoding
;
result
=
wc
.
UploadString
(
url
,
"POST"
,
paramData
);
...
...
source/DeviceLibrary/Config/Config_BoxEquip.csv
查看文件 @
823a4b5
...
...
@@ -12,6 +12,8 @@ AXIS,0,B面移栽压紧轴,ComAxis_B,9,HC,,20000,150000,150000,2000,10000,20000,
,,,,,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,温湿度端口号,Humiture_Port,0,,,,,,,,,,,,
PRO,0,两次吹气间隔(分钟),BlowAir_Interval,0,,,,,,,,,,,,
PRO,0,每次吹气的时间(分钟),BlowAir_Time,0,,,,,,,,,,,,
PRO,0,设备出入库次数多少次时,会自动重置操作,Box_ResetCount,200,,,,,,,,,,,,
PRO,0,抽屉层数,Drawer_Rows,15,,,,,,,,,,,,
PRO,0,抽屉列数,Drawer_Columns,6,,,,,,,,,,,,
...
...
source/DeviceLibrary/manager/agvClient/DoorInfo.cs
查看文件 @
823a4b5
public
class
DoorInfo
{
public
DoorInfo
()
public
DoorInfo
(
doorIndexE
_doorIndex
)
{
doorIndex
=
doorIndexE
.
LeftIn
;
doorType
=
DoorTypeE
.
BOTH
;
doorIndex
=
_doorIndex
;
status
=
doorStatusE
.
free
;
hasContainer
=
false
;
hSerial
=
""
;
}
public
string
doorType
;
public
doorIndexE
doorIndex
;
public
doorStatusE
status
;
public
bool
hasContainer
;
...
...
@@ -16,11 +18,11 @@ public class DoorInfo
}
public
enum
doorIndexE
{
LeftIn
=
2
,
LeftOut
=
1
,
//
LeftIn = 2,
//
LeftOut = 1,
RightIn
=
4
,
RightOut
=
3
,
XLR_1
=
4
,
XLR_2
=
3
,
}
public
enum
doorStatusE
...
...
@@ -45,4 +47,10 @@ public enum doorStatusE
/// 满料串需要取走
/// </summary>
fullBoxNeedLeave
=
5
}
public
class
DoorTypeE
{
public
const
string
IN
=
"IN"
;
public
const
string
OUT
=
"OUT"
;
public
const
string
BOTH
=
"BOTH"
;
}
\ No newline at end of file
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureBean.cs
查看文件 @
823a4b5
...
...
@@ -17,6 +17,7 @@ namespace OnlineStore.DeviceLibrary
{
this
.
Name
=
deviceName
;
this
.
PortName
=
port
;
HumitureController
.
Init
(
this
.
PortName
);
}
public
HumitureParam
QueryData
()
...
...
@@ -103,7 +104,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
"当前最大湿度:"
+
currMaxHumidity
.
ToString
()
+
",开始吹气湿度:"
+
startBlowHumidity
+
",当前不在吹气中,且间隔超过"
+
box
.
Config
.
BlowAir_Interval
+
"分钟,开始吹气!"
);
IsInBlowing
=
true
;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow
, IO_VALUE.HIGH);
StoreManager
.
XLRStore
.
IOMove
(
IO_Type
.
Nitrogen_OpenValve
,
IO_VALUE
.
HIGH
);
LastBeginBlowTime
=
DateTime
.
Now
;
LastEndBlowTime
=
DateTime
.
Now
;
}
...
...
@@ -113,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
info
(
Name
+
"当前最大湿度:"
+
currMaxHumidity
.
ToString
()
+
",停止吹气湿度:"
+
stopBlowHumidity
+
",停止吹气!"
);
IsInBlowing
=
false
;
// box.IOMove(IO_Type.StartOrStopBlow
, IO_VALUE.LOW);
StoreManager
.
XLRStore
.
IOMove
(
IO_Type
.
Nitrogen_OpenValve
,
IO_VALUE
.
LOW
);
LastEndBlowTime
=
DateTime
.
Now
;
}
if
(
IsInBlowing
)
...
...
@@ -125,7 +126,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
"已经吹气"
+
span
.
TotalMinutes
+
"分钟,超过配置的吹气时间"
+
box
.
Config
.
BlowAir_Time
+
"分钟,停止吹气!"
);
IsInBlowing
=
false
;
//Thread.Sleep(100);
// box.IOMove(IO_Type.StartOrStopBlow
, IO_VALUE.LOW);
StoreManager
.
XLRStore
.
IOMove
(
IO_Type
.
Nitrogen_OpenValve
,
IO_VALUE
.
LOW
);
LastEndBlowTime
=
DateTime
.
Now
;
}
}
...
...
@@ -140,7 +141,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
"当前温度【"
+
param
.
Temperate
+
"】超过最高温度【"
+
Max_Temperature
+
"】,开始报警!"
);
needAlarm
=
true
;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
StoreManager
.
XLRStore
.
IOMove
(
IO_Type
.
Nitrogen_OpenValve
,
IO_VALUE
.
LOW
);
}
else
if
(
temp
<
Max_Temperature
)
{
...
...
@@ -149,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
"不在吹气中,且当前温度【"
+
param
.
Temperate
+
"】低于【"
+
Max_Temperature
+
"】,关闭报警!"
);
TempOrHumidityIsAlarm
=
false
;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow
, IO_VALUE.LOW);
StoreManager
.
XLRStore
.
IOMove
(
IO_Type
.
Nitrogen_OpenValve
,
IO_VALUE
.
LOW
);
}
}
else
...
...
source/DeviceLibrary/storeBean/boxBean/Humiture/HumitureController.cs
查看文件 @
823a4b5
...
...
@@ -44,6 +44,8 @@ namespace OnlineStore.DeviceLibrary
if
(
sb
.
openPort
())
{
serialBeanMap
.
Add
(
port
,
sb
);
var
ht
=
HumitureController
.
QueryData
(
port
);
LogUtil
.
info
(
LogName
+
"串口"
+
port
+
"打开成功!温度:"
+
ht
.
Temperate
+
",湿度:"
+
ht
.
Humidity
);
return
true
;
}
else
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean.cs
查看文件 @
823a4b5
...
...
@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary
public
DeviceMoveInfo
MoveInfo
;
public
string
WarnMsg
=
""
;
public
BatchMoveConfig
Config
=
null
;
public
DoorInfo
doorInfo
=
new
DoorInfo
()
;
public
DoorInfo
doorInfo
;
private
InputEquip
Robot
{
get
{
return
StoreManager
.
XLRStore
.
inputEquip
;
}
...
...
@@ -34,6 +34,7 @@ namespace OnlineStore.DeviceLibrary
string
ioAdd
=
"_A"
;
if
(
ShelfType
.
Equals
(
1
))
{
doorInfo
=
new
DoorInfo
(
doorIndexE
.
XLR_1
);
ioAdd
=
"_A"
;
Name
=
"A料口 "
;
Config
.
BatchAxisP1
=
config
.
BatchAxisP1_A
;
...
...
@@ -46,6 +47,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
doorInfo
=
new
DoorInfo
(
doorIndexE
.
XLR_2
);
ioAdd
=
"_B"
;
Name
=
"B料口 "
;
Config
.
BatchAxisP1
=
config
.
BatchAxisP1_B
;
...
...
@@ -116,8 +118,7 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreManager
.
checkWatch
(
shelfWatch
,
10000
,
true
))
{
doorInfo
.
doorIndex
=
ShelfType
==
1
?
doorIndexE
.
LeftIn
:
doorIndexE
.
RightIn
;
//doorInfo.hSerial = MoveInfo.MoveParam.hSerial;
//doorInfo.hSerial = MoveInfo.MoveParam.hSerial;
doorInfo
.
status
=
doorStatusE
.
needBox
;
doorInfo
.
hasContainer
=
false
;
WorkLog
(
$
"无料串,:通知agv来送料串 ShelfType:{ShelfType},{doorInfo.doorIndex},hasContainer:{doorInfo.hasContainer}"
);
...
...
@@ -134,7 +135,6 @@ namespace OnlineStore.DeviceLibrary
{
shelfWatch
.
Stop
();
doorInfo
.
doorIndex
=
ShelfType
==
1
?
doorIndexE
.
LeftIn
:
doorIndexE
.
RightIn
;
doorInfo
.
status
=
doorStatusE
.
free
;
doorInfo
.
hasContainer
=
false
;
//AgvClient.SetToNone(Config.AgvName);
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
查看文件 @
823a4b5
...
...
@@ -52,7 +52,6 @@ namespace OnlineStore.DeviceLibrary
//bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
//LogUtil.info(Name + "StartInstore 失败,料串" + CurrShelf.ToStr() + "需要离开,NeedLeave:" + Config.AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
doorInfo
.
doorIndex
=
ShelfType
==
1
?
doorIndexE
.
LeftOut
:
doorIndexE
.
RightOut
;
//doorInfo.hSerial = MoveInfo.MoveParam.hSerial;
doorInfo
.
status
=
doorStatusE
.
fullBoxNeedLeave
;
doorInfo
.
hasContainer
=
false
;
...
...
@@ -322,7 +321,6 @@ namespace OnlineStore.DeviceLibrary
//bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
//WorkLog("送出出库料串 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
doorInfo
.
doorIndex
=
ShelfType
==
1
?
doorIndexE
.
LeftOut
:
doorIndexE
.
RightOut
;
//doorInfo.hSerial = MoveInfo.MoveParam.hSerial;
doorInfo
.
status
=
doorStatusE
.
fullBoxNeedLeave
;
doorInfo
.
hasContainer
=
false
;
...
...
@@ -675,7 +673,6 @@ namespace OnlineStore.DeviceLibrary
//bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
//WorkLog("送出出库料串 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
doorInfo
.
doorIndex
=
ShelfType
==
1
?
doorIndexE
.
LeftOut
:
doorIndexE
.
RightOut
;
doorInfo
.
hSerial
=
MoveInfo
.
MoveParam
.
PosInfo
.
hSerial
;
doorInfo
.
status
=
doorStatusE
.
fullBoxNeedLeave
;
doorInfo
.
hasContainer
=
true
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论