Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSquareStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit cc9dce93
由
LN
编写于
2020-09-21 14:45:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.开关门锁不判断门是否在关闭状态。
2.湿度增加参数配置
1 个父辈
e6be5cee
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
56 行增加
和
36 行删除
source/ACSquareStore/App.config
source/ACSquareStore/记录.txt
source/Common/Setting_Init.cs
source/Common/util/HumitureController.cs
source/DeviceLibrary/acSquareStore/Square_BoxBean.cs
source/DeviceLibrary/acSquareStore/Square_BoxBean_Partial.cs
source/ACSquareStore/App.config
查看文件 @
cc9dce9
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
<!--是否调试状态-->
<!--是否调试状态-->
<
add
key
=
"IsInDebug"
value
=
"1"
/>
<
add
key
=
"IsInDebug"
value
=
"1"
/>
<
add
key
=
"Server_Log_Open"
value
=
"1"
/>
<
add
key
=
"Server_Log_Open"
value
=
"1"
/>
<
add
key
=
"HumidityParam"
value
=
"35"
/>
</
appSettings
>
</
appSettings
>
<
log4net
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
source/ACSquareStore/记录.txt
查看文件 @
cc9dce9
...
@@ -68,4 +68,10 @@
...
@@ -68,4 +68,10 @@
1 入库时的字段: door: 1为1号仓门入库 2为2号仓门入库
1 入库时的字段: door: 1为1号仓门入库 2为2号仓门入库
2 出库放到仓门口算出库完成,完成时发送 door=1为1号仓门 door=2为2号仓门
2 出库放到仓门口算出库完成,完成时发送 door=1为1号仓门 door=2为2号仓门
3 仓门状态上传: 字段为door1和doo2, 状态:opened为已打开, closed为已关闭, opening为打开中, closing为关闭中
3 仓门状态上传: 字段为door1和doo2, 状态:opened为已打开, closed为已关闭, opening为打开中, closing为关闭中
4 开关门操作: 开门openDoor=1为1号仓门打开, =2为2号仓门打开, closeDoor=1为1号仓门关闭,=2为2号仓门关闭
\ No newline at end of file
\ No newline at end of file
4 开关门操作: 开门openDoor=1为1号仓门打开, =2为2号仓门打开, closeDoor=1为1号仓门关闭,=2为2号仓门关闭
20200918
1.开关门锁不判断门是否在关闭状态。
2.湿度虚拟用配置值
3.出库完成未发door
\ No newline at end of file
\ No newline at end of file
source/Common/Setting_Init.cs
查看文件 @
cc9dce9
...
@@ -93,6 +93,7 @@ namespace OnlineStore.Common
...
@@ -93,6 +93,7 @@ namespace OnlineStore.Common
public
static
string
UseTrayCheck
=
"UseTrayCheck"
;
public
static
string
UseTrayCheck
=
"UseTrayCheck"
;
public
static
string
HumidityParam
=
"HumidityParam"
;
}
}
}
}
source/Common/util/HumitureController.cs
查看文件 @
cc9dce9
...
@@ -122,19 +122,31 @@ namespace OnlineStore.Common
...
@@ -122,19 +122,31 @@ namespace OnlineStore.Common
double
wendu
=
0
;
double
wendu
=
0
;
double
shidu
=
0
;
double
shidu
=
0
;
int
delParam
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
HumidityParam
);
int
count
=
0
;
int
count
=
0
;
foreach
(
string
port
in
portList
)
foreach
(
string
port
in
portList
)
{
{
count
++;
count
++;
double
currShidu
=
GetRandomSD
();
//double currShidu = GetRandomSD();
double
currShidu
=
0
;
double
currWendu
=
0
;
double
currWendu
=
0
;
ASTemperateParam
param
=
new
ASTemperateParam
(
0
,
0
);
ASTemperateParam
param
=
new
ASTemperateParam
(
0
,
0
);
List
<
double
>
data
=
queryData
(
port
);
List
<
double
>
data
=
queryData
(
port
);
if
(
data
.
Count
.
Equals
(
2
))
if
(
data
.
Count
.
Equals
(
2
))
{
{
currWendu
=
data
[
1
];
currWendu
=
data
[
1
];
//
currShidu = data[0];
currShidu
=
data
[
0
];
}
}
if
(
delParam
>
0
)
{
currShidu
-=
delParam
;
while
(
currShidu
<
5
)
{
currShidu
+=
1
;
}
}
wendu
+=
currWendu
;
wendu
+=
currWendu
;
shidu
+=
currShidu
;
shidu
+=
currShidu
;
param
=
new
ASTemperateParam
(
currWendu
,
shidu
);
param
=
new
ASTemperateParam
(
currWendu
,
shidu
);
...
...
source/DeviceLibrary/acSquareStore/Square_BoxBean.cs
查看文件 @
cc9dce9
...
@@ -333,8 +333,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -333,8 +333,8 @@ namespace OnlineStore.DeviceLibrary
//进出轴原点返回完成,将进出轴的位置设置=0
//进出轴原点返回完成,将进出轴的位置设置=0
AxisCountClear
(
Config
.
InOut_Axis
);
AxisCountClear
(
Config
.
InOut_Axis
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
InOutAxis_P1_Speed
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
InOutAxis_P1_Speed
);
CloseDoor
(
1
,
StoreMove
);
CloseDoor
(
1
);
CloseDoor
(
2
,
StoreMove
);
CloseDoor
(
2
);
break
;
break
;
case
StoreMoveStep
.
SH_13_InOutToP1
:
case
StoreMoveStep
.
SH_13_InOutToP1
:
//如果此时轴三还在报警,需要提示错误并等待
//如果此时轴三还在报警,需要提示错误并等待
...
@@ -385,8 +385,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -385,8 +385,8 @@ namespace OnlineStore.DeviceLibrary
case
StoreMoveStep
.
SP1_01_InOutToP1
:
case
StoreMoveStep
.
SP1_01_InOutToP1
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SP1_02_CloseDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SP1_02_CloseDoor
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"到待机状态,关闭左右两侧门,托架前进"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"到待机状态,关闭左右两侧门,托架前进"
);
CloseDoor
(
1
,
StoreMove
);
CloseDoor
(
1
);
CloseDoor
(
2
,
StoreMove
);
CloseDoor
(
2
);
break
;
break
;
case
StoreMoveStep
.
SP1_02_CloseDoor
:
case
StoreMoveStep
.
SP1_02_CloseDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SP1_03_UpdownToP1
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SP1_03_UpdownToP1
);
...
@@ -446,14 +446,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -446,14 +446,14 @@ namespace OnlineStore.DeviceLibrary
}
}
public
string
DoorIsClose
(
)
public
string
DoorIsClose
(
)
{
{
if
(!
IOManager
.
IOValue
(
IO_Type
.
LeftDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
//
if (!IOManager.IOValue(IO_Type.LeftDoor_Close).Equals(IO_VALUE.HIGH))
{
//
{
return
"左侧门未关"
;
//
return "左侧门未关";
}
//
}
if
(!
IOManager
.
IOValue
(
IO_Type
.
RightDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
//
if (!IOManager.IOValue(IO_Type.RightDoor_Close).Equals(IO_VALUE.HIGH))
{
//
{
return
"右侧门未关"
;
//
return "右侧门未关";
}
//
}
if
(!
IOManager
.
IOValue
(
IO_Type
.
DoorLimit_L
).
Equals
(
IO_VALUE
.
HIGH
))
if
(!
IOManager
.
IOValue
(
IO_Type
.
DoorLimit_L
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
return
"前门未关"
;
return
"前门未关"
;
...
...
source/DeviceLibrary/acSquareStore/Square_BoxBean_Partial.cs
查看文件 @
cc9dce9
...
@@ -556,21 +556,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -556,21 +556,21 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftShelf_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftShelf_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
OutStoreLog
(
" 出库: 当前未设置ShelfType,默认ShelfType="
+
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
StoreMove
.
MoveParam
.
UpdateShelfType
(
1
,
Config
);
StoreMove
.
MoveParam
.
UpdateShelfType
(
1
,
Config
);
OutStoreLog
(
" 出库: 当前未设置ShelfType,默认ShelfType="
+
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
}
}
else
else
{
{
OutStoreLog
(
"出库: 当前未设置ShelfType,默认ShelfType="
+
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
StoreMove
.
MoveParam
.
UpdateShelfType
(
2
,
Config
);
StoreMove
.
MoveParam
.
UpdateShelfType
(
2
,
Config
);
OutStoreLog
(
"出库: 当前未设置ShelfType,默认ShelfType="
+
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
}
}
}
}
//把库位的物品放到取到叉子上之后是出仓完成
//把库位的物品放到取到叉子上之后是出仓完成
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PosInfo
.
PosId
:
""
;
lastPosId
=
posId
;
lastPosId
=
posId
;
lastDoor
=
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
;
lastPosIdStatus
=
StoreStatus
.
OutStoreBoxEnd
;
lastPosIdStatus
=
StoreStatus
.
OutStoreBoxEnd
;
storeStatus
=
StoreStatus
.
OutStoreBoxEnd
;
storeStatus
=
StoreStatus
.
OutStoreBoxEnd
;
lastDoor
=
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_06_InoutToP1
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_06_InoutToP1
);
OutStoreLog
(
"出库: 叉子从库位返回,进出轴至P1(待机点)["
+
moveP
.
InOut_P1
+
"],更新状态=OutStoreBoxEnd, "
+
lastDoor
);
OutStoreLog
(
"出库: 叉子从库位返回,进出轴至P1(待机点)["
+
moveP
.
InOut_P1
+
"],更新状态=OutStoreBoxEnd, "
+
lastDoor
);
...
@@ -637,14 +637,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -637,14 +637,14 @@ namespace OnlineStore.DeviceLibrary
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftShelf_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftShelf_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
//StoreMove.MoveParam.PosInfo.ShelfType = 1;
//StoreMove.MoveParam.PosInfo.ShelfType = 1;
OutStoreLog
(
" 出库: 当前未设置ShelfType,默认ShelfType="
+
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
StoreMove
.
MoveParam
.
UpdateShelfType
(
1
,
Config
);
StoreMove
.
MoveParam
.
UpdateShelfType
(
1
,
Config
);
OutStoreLog
(
" 出库: 当前未设置ShelfType,默认ShelfType="
+
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
}
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
RightShelf_Check
).
Equals
(
IO_VALUE
.
LOW
))
else
if
(
IOManager
.
IOValue
(
IO_Type
.
RightShelf_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
//StoreMove.MoveParam.PosInfo.ShelfType = 2;
//StoreMove.MoveParam.PosInfo.ShelfType = 2;
OutStoreLog
(
"出库: 当前未设置ShelfType,默认ShelfType="
+
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
StoreMove
.
MoveParam
.
UpdateShelfType
(
2
,
Config
);
StoreMove
.
MoveParam
.
UpdateShelfType
(
2
,
Config
);
OutStoreLog
(
"出库: 当前未设置ShelfType,默认ShelfType="
+
StoreMove
.
MoveParam
.
PosInfo
.
ShelfType
);
}
}
else
else
{
{
...
@@ -870,29 +870,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -870,29 +870,29 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
doorType
.
Equals
(
1
))
if
(
doorType
.
Equals
(
1
))
{
{
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
//
if (IOManager.IOValue(IO_Type.LeftDoor_Close).Equals(IO_VALUE.HIGH))
{
//
{
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Close
,
value
);
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Close
,
value
);
return
true
;
return
true
;
}
//
}
else
//
else
{
//
{
LogUtil
.
info
(
"OpenCloseDoor ["
+
doorType
+
"] ["
+
value
+
"] 失败"
);
//
LogUtil.info("OpenCloseDoor [" + doorType + "] [" + value + "] 失败");
return
false
;
//
return false;
}
//
}
}
}
else
else
{
{
if
(
IOManager
.
IOValue
(
IO_Type
.
RightDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
//
if (IOManager.IOValue(IO_Type.RightDoor_Close).Equals(IO_VALUE.HIGH))
{
//
{
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Close
,
value
);
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Close
,
value
);
return
true
;
return
true
;
}
//
}
else
//
else
{
//
{
LogUtil
.
info
(
"OpenCloseDoor ["
+
doorType
+
"] ["
+
value
+
"] 失败"
);
//
LogUtil.info("OpenCloseDoor [" + doorType + "] [" + value + "] 失败");
return
false
;
//
return false;
}
//
}
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论