Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 17d8ddf4
由
几米阳光
编写于
2019-05-05 15:25:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
温湿度报警功能修改:报警时在界面显示提示
1 个父辈
683fb853
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
60 行增加
和
19 行删除
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
17d8ddf
...
@@ -330,6 +330,10 @@ namespace OnlineStore.AutoInOutStore
...
@@ -330,6 +330,10 @@ namespace OnlineStore.AutoInOutStore
{
{
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
HasWare
;
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
HasWare
;
}
}
if
(
store
.
TempOrHumidityIsAlarm
)
{
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 温湿度报警["
+
store
.
TempAlarmTime
.
ToLongTimeString
()
+
"]"
;
}
if
(
store
.
autoNext
)
if
(
store
.
autoNext
)
{
{
...
...
source/ACSingleStore/记录.txt
查看文件 @
17d8ddf
...
@@ -153,6 +153,8 @@ PRO,最后一盘料需要补充的高度,LastTrayAddHeight,10,,,,,,,,,
...
@@ -153,6 +153,8 @@ PRO,最后一盘料需要补充的高度,LastTrayAddHeight,10,,,,,,,,,
增加自动出入库功能。
增加自动出入库功能。
20190505
温湿度报警功能修改:报警时在界面显示提示。
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
17d8ddf
...
@@ -54,8 +54,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -54,8 +54,8 @@ namespace OnlineStore.DeviceLibrary
IsHasCompress_Axis
=
config
.
IsHasCompress_Axis
.
Equals
(
1
);
IsHasCompress_Axis
=
config
.
IsHasCompress_Axis
.
Equals
(
1
);
Max_Humidity
=
config
.
Max_Humidity
;
//
Max_Humidity = config.Max_Humidity;
Max_Temperature
=
config
.
Max_Temperature
;
//
Max_Temperature = config.Max_Temperature;
moveAxisList
=
new
List
<
ConfigMoveAxis
>();
moveAxisList
=
new
List
<
ConfigMoveAxis
>();
MoveAxisConfig
();
MoveAxisConfig
();
List
<
AutoStorePosition
>
positionList
=
CSVPositionReader
<
AutoStorePosition
>.
getPositionList
();
List
<
AutoStorePosition
>
positionList
=
CSVPositionReader
<
AutoStorePosition
>.
getPositionList
();
...
@@ -1338,8 +1338,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1338,8 +1338,8 @@ namespace OnlineStore.DeviceLibrary
private
DateTime
LastEndBlowTime
=
new
DateTime
(
1997
,
1
,
1
);
private
DateTime
LastEndBlowTime
=
new
DateTime
(
1997
,
1
,
1
);
private
DateTime
preLogTime
=
DateTime
.
Now
;
private
DateTime
preLogTime
=
DateTime
.
Now
;
p
rivate
bool
TempOrHumidityIsAlarm
=
false
;
p
ublic
bool
TempOrHumidityIsAlarm
=
false
;
p
rivate
DateTime
TempAlarmTime
=
DateTime
.
Now
;
p
ublic
DateTime
TempAlarmTime
=
DateTime
.
Now
;
private
float
StartBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StartBlowValue
);
private
float
StartBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StartBlowValue
);
private
float
StopBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StopBlowValue
);
private
float
StopBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StopBlowValue
);
...
@@ -1363,7 +1363,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1363,7 +1363,6 @@ namespace OnlineStore.DeviceLibrary
temp
=
param
.
Temperate
;
temp
=
param
.
Temperate
;
currTempStr
=
(
"当前湿度:"
+
humidity
.
ToString
()
+
",当前温度:"
+
temp
);
currTempStr
=
(
"当前湿度:"
+
humidity
.
ToString
()
+
",当前温度:"
+
temp
);
}
}
//LogUtil.info(currTempStr);
//double currMaxHumidity = HumitureServer.GetMaxHumidity(Config.GetTempAddrList());
//double currMaxHumidity = HumitureServer.GetMaxHumidity(Config.GetTempAddrList());
double
currMaxHumidity
=
param
.
Humidity
;
double
currMaxHumidity
=
param
.
Humidity
;
float
startBlowHumidity
=
Max_Humidity
-
StartBlowValue
;
float
startBlowHumidity
=
Max_Humidity
-
StartBlowValue
;
...
@@ -1390,7 +1389,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1390,7 +1389,6 @@ namespace OnlineStore.DeviceLibrary
{
{
LOGGER
.
Info
(
"当前最大湿度:"
+
currMaxHumidity
.
ToString
()
+
",停止吹气湿度:"
+
stopBlowHumidity
+
",停止吹气!"
);
LOGGER
.
Info
(
"当前最大湿度:"
+
currMaxHumidity
.
ToString
()
+
",停止吹气湿度:"
+
stopBlowHumidity
+
",停止吹气!"
);
IsInBlowing
=
false
;
IsInBlowing
=
false
;
//Thread.Sleep(100);
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
LastEndBlowTime
=
DateTime
.
Now
;
LastEndBlowTime
=
DateTime
.
Now
;
}
}
...
@@ -1407,24 +1405,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1407,24 +1405,16 @@ namespace OnlineStore.DeviceLibrary
LastEndBlowTime
=
DateTime
.
Now
;
LastEndBlowTime
=
DateTime
.
Now
;
}
}
}
}
bool
needAlarm
=
false
;
//如果开始吹气并且当前达到报警值
//如果开始吹气并且当前达到报警值
if
(
IsInBlowing
.
Equals
(
true
)
&&
humidity
>
Max_Humidity
)
if
(
IsInBlowing
&&
humidity
>
Max_Humidity
)
{
{
TempAlarmTime
=
DateTime
.
Now
;
needAlarm
=
true
;
TempOrHumidityIsAlarm
=
true
;
}
}
else
else
if
(
temp
>
Max_Temperature
&&
Max_Temperature
>
0
)
{
TempOrHumidityIsAlarm
=
false
;
}
//如果湿度没有报警,温度达到范围也需要报警
if
(
temp
>
Max_Temperature
&&
Max_Temperature
>
0
)
{
{
LOGGER
.
Info
(
"当前温度【"
+
param
.
Temperate
+
"】超过最高温度【"
+
Max_Temperature
+
"】,开始报警!"
);
LOGGER
.
Info
(
"当前温度【"
+
param
.
Temperate
+
"】超过最高温度【"
+
Max_Temperature
+
"】,开始报警!"
);
TempAlarmTime
=
DateTime
.
Now
;
needAlarm
=
true
;
TempOrHumidityIsAlarm
=
true
;
//Thread.Sleep(100);
//Thread.Sleep(100);
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
}
}
...
@@ -1438,6 +1428,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1438,6 +1428,14 @@ namespace OnlineStore.DeviceLibrary
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
}
}
}
}
else
{
TempOrHumidityIsAlarm
=
false
;
}
if
(
needAlarm
)
{
HTAlarm
();
}
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -1445,6 +1443,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1445,6 +1443,15 @@ namespace OnlineStore.DeviceLibrary
LOGGER
.
Error
(
StoreName
+
"HumidityProcess出错:"
+
ex
.
ToString
());
LOGGER
.
Error
(
StoreName
+
"HumidityProcess出错:"
+
ex
.
ToString
());
}
}
}
}
private
void
HTAlarm
()
{
if
(
TempOrHumidityIsAlarm
)
{
return
;
}
TempAlarmTime
=
DateTime
.
Now
;
TempOrHumidityIsAlarm
=
true
;
}
#
endregion
#
endregion
...
@@ -1671,6 +1678,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1671,6 +1678,14 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"处理服务器出库消息出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"处理服务器出库消息出错:"
+
ex
.
ToString
());
}
}
}
}
else
if
(
resultOperation
.
op
.
Equals
(
1
))
{
//ReviceInStoreProcess("", resultOperation);
}
else
if
(
resultOperation
.
op
.
Equals
(
5
))
{
ProcessHumidityCMD
(
resultOperation
);
}
else
if
(
resultOperation
.
data
!=
null
)
else
if
(
resultOperation
.
data
!=
null
)
{
{
string
result
=
""
;
string
result
=
""
;
...
@@ -1708,7 +1723,27 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1708,7 +1723,27 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
}
}
private
void
ProcessHumidityCMD
(
Operation
resultOperation
)
{
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
maxHumidity
)
&&
data
.
ContainsKey
(
ParamDefine
.
maxTemperature
))
{
string
maxHumidity
=
data
[
ParamDefine
.
maxHumidity
];
string
maxTemp
=
data
[
ParamDefine
.
maxTemperature
];
LogUtil
.
info
(
LOGGER
,
"收到服务器温湿度预警值:maxHumidity="
+
maxHumidity
+
",maxTemperature="
+
maxTemp
);
try
{
this
.
Max_Humidity
=
(
float
)
Convert
.
ToDouble
(
maxHumidity
);
this
.
Max_Temperature
=
(
float
)
Convert
.
ToDouble
(
maxTemp
);
LogUtil
.
info
(
LOGGER
,
"保存温湿度预警值:Max_Humidity="
+
Max_Humidity
+
",Max_Temperature="
+
Max_Temperature
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"转换温湿度失败:"
+
ex
.
ToString
());
}
}
}
private
void
doOutStore
(
Operation
resultOperation
)
private
void
doOutStore
(
Operation
resultOperation
)
{
{
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论