Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a9301e4f
由
LN
编写于
2019-10-10 15:15:40 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
ce40dc4c
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
47 行增加
和
26 行删除
source/ACSingleStore/App.config
source/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/lineConnect/LineConnect.cs
source/ACSingleStore/App.config
查看文件 @
a9301e4
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<
add
key
=
"Store_Position_Config"
value
=
"\StoreConfig\AC\linePositions.csv"
/>
<
add
key
=
"Store_Position_Config"
value
=
"\StoreConfig\AC\linePositions.csv"
/>
<
add
key
=
"Store_ConfigPath"
value
=
"\StoreConfig\AC\StoreConfig.csv"
/>
<
add
key
=
"Store_ConfigPath"
value
=
"\StoreConfig\AC\StoreConfig.csv"
/>
<
add
key
=
"Store_Type"
value
=
"RC_AC_SA"
/>
<
add
key
=
"Store_Type"
value
=
"RC_AC_SA"
/>
<
add
key
=
"Store_CID"
value
=
"rc12
46
ac-4"
/>
<
add
key
=
"Store_CID"
value
=
"rc12
50
ac-4"
/>
<
add
key
=
"Store_ID"
value
=
"4"
/>
<
add
key
=
"Store_ID"
value
=
"4"
/>
<!--
end
one
store
config
-->
<!--
end
one
store
config
-->
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</
appSettings
>
</
appSettings
>
<
log4net
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/ACStore-RC12
46
-1.log"
/>
<
file
value
=
"logs/ACStore-RC12
50
-1.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
...
...
source/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
a9301e4
...
@@ -465,10 +465,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -465,10 +465,10 @@ namespace OnlineStore.DeviceLibrary
return
value
;
return
value
;
}
}
private
Box_Addr
GetAddr
(
ushort
StartAddress
)
//
private Box_Addr GetAddr(ushort StartAddress)
{
//
{
return
(
Box_Addr
)(
StartAddress
);
//
return (Box_Addr)(StartAddress);
}
//
}
private
Box_Sta
GetBox_Sta
(
IO_VALUE
onOff
)
private
Box_Sta
GetBox_Sta
(
IO_VALUE
onOff
)
{
{
if
(
onOff
.
Equals
(
IO_VALUE
.
HIGH
))
if
(
onOff
.
Equals
(
IO_VALUE
.
HIGH
))
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
a9301e4
...
@@ -1002,7 +1002,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1002,7 +1002,8 @@ namespace OnlineStore.DeviceLibrary
{
{
try
try
{
{
if
(
CurrInOutACount
>=
this
.
Config
.
Box_ResetACount
)
bool
noInStore
=
LineConnect
.
WaitInStoreList
.
Count
<=
0
;
if
(
CurrInOutACount
>=
this
.
Config
.
Box_ResetACount
&&
noInStore
)
{
{
if
(
storeRunStatus
<
StoreRunStatus
.
Runing
||
StoreMove
.
MoveType
==
StoreMoveType
.
InStore
||
StoreMove
.
MoveType
==
StoreMoveType
.
OutStore
)
if
(
storeRunStatus
<
StoreRunStatus
.
Runing
||
StoreMove
.
MoveType
==
StoreMoveType
.
InStore
||
StoreMove
.
MoveType
==
StoreMoveType
.
OutStore
)
{
{
...
@@ -1014,7 +1015,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1014,7 +1015,7 @@ namespace OnlineStore.DeviceLibrary
Reset
();
Reset
();
}
}
}
}
else
if
(
CurrInOutCount
>=
this
.
Config
.
Box_ResetMCount
)
else
if
(
CurrInOutCount
>=
this
.
Config
.
Box_ResetMCount
&&
noInStore
)
{
{
if
(
storeRunStatus
<
StoreRunStatus
.
Runing
||
StoreMove
.
MoveType
==
StoreMoveType
.
InStore
||
StoreMove
.
MoveType
==
StoreMoveType
.
OutStore
)
if
(
storeRunStatus
<
StoreRunStatus
.
Runing
||
StoreMove
.
MoveType
==
StoreMoveType
.
InStore
||
StoreMove
.
MoveType
==
StoreMoveType
.
OutStore
)
{
{
...
@@ -1522,11 +1523,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1522,11 +1523,6 @@ namespace OnlineStore.DeviceLibrary
lineOperation
.
msg
=
"叉子料盘检测有料,请检查"
;
lineOperation
.
msg
=
"叉子料盘检测有料,请检查"
;
}
}
}
}
if
(
boxStatus
.
msg
.
Equals
(
""
)
&&
IOManager
.
IOValue
(
IO_Type
.
DoorLimit
).
Equals
(
IO_VALUE
.
LOW
))
{
boxStatus
.
msg
=
"未检测到门禁信号,请检查"
;
lineOperation
.
msg
=
"未检测到门禁信号,请检查"
;
}
CodeMsg
=
""
;
CodeMsg
=
""
;
//WarnMsg = "";
//WarnMsg = "";
//状态
//状态
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
a9301e4
...
@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
{
{
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_14_WaitTake
)
)
{
{
timeOutMs
=
650000
;
timeOutMs
=
650000
;
}
}
...
@@ -164,6 +164,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -164,6 +164,11 @@ namespace OnlineStore.DeviceLibrary
isOk
=
false
;
isOk
=
false
;
break
;
break
;
}
}
else
if
((!
wait
.
IsEnd
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_14_WaitTake
)
&&
LineConnect
.
CanReSend
())
{
//判断是否需要重发入库结束命令
SendOutStoreEnd
(
StoreMove
);
}
}
}
else
if
(
wait
.
WaitType
==
3
)
else
if
(
wait
.
WaitType
==
3
)
{
{
...
@@ -651,17 +656,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -651,17 +656,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoor
();
CloseDoor
();
//发送消息给流水线
//发送消息给流水线
int
hasTray
=(
int
)
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
);
SendOutStoreEnd
(
StoreMove
);
int
ss
=
(
int
)
storeStatus
;
if
(
IsDebug
)
{
ss
=
(
int
)
StoreStatus
.
Debugging
;
}
StoreSendBean
store
=
new
StoreSendBean
(
Config
.
Id
,
Config
.
CID
,
(
int
)
storeStatus
,
(
int
)
storeRunStatus
,
hasTray
,
(
int
)
alarmType
);
store
.
PosId
=
StoreMove
.
MoveParam
.
PositionNum
;
store
.
PlateH
=
StoreMove
.
MoveParam
.
PlateH
;
store
.
PlateW
=
StoreMove
.
MoveParam
.
PlateW
;
LineConnect
.
OutStoreEnd
(
store
);
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_13_GoBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_13_GoBack
)
{
{
...
@@ -695,6 +690,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -695,6 +690,22 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
private
void
SendOutStoreEnd
(
StoreMoveInfo
storeMove
)
{
int
hasTray
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
);
int
ss
=
(
int
)
storeStatus
;
if
(
IsDebug
)
{
ss
=
(
int
)
StoreStatus
.
Debugging
;
}
StoreSendBean
store
=
new
StoreSendBean
(
Config
.
Id
,
Config
.
CID
,
(
int
)
storeStatus
,
(
int
)
storeRunStatus
,
hasTray
,
(
int
)
alarmType
);
store
.
PosId
=
StoreMove
.
MoveParam
.
PositionNum
;
store
.
PlateH
=
StoreMove
.
MoveParam
.
PlateH
;
store
.
PlateW
=
StoreMove
.
MoveParam
.
PlateW
;
LineConnect
.
OutStoreEnd
(
store
);
}
private
void
SO_10_DeviceToDoorPro
()
private
void
SO_10_DeviceToDoorPro
()
{
{
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
...
...
source/DeviceLibrary/lineConnect/LineConnect.cs
查看文件 @
a9301e4
...
@@ -64,7 +64,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -64,7 +64,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"SendHeart 出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"SendHeart 出错:"
+
ex
.
ToString
());
}
}
}
}
private
static
DateTime
LastOutStoreEndTime
=
DateTime
.
Now
;
public
static
void
OutStoreEnd
(
StoreSendBean
store
)
public
static
void
OutStoreEnd
(
StoreSendBean
store
)
{
{
if
(
client
==
null
)
if
(
client
==
null
)
...
@@ -73,6 +73,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -73,6 +73,7 @@ namespace OnlineStore.DeviceLibrary
}
}
try
try
{
{
LastOutStoreEndTime
=
DateTime
.
Now
;
store
.
Cmd
=
cmd_outend
;
store
.
Cmd
=
cmd_outend
;
string
msg
=
ToParamStr
(
store
);
string
msg
=
ToParamStr
(
store
);
LogUtil
.
info
(
"OutStoreEnd:"
+
msg
);
LogUtil
.
info
(
"OutStoreEnd:"
+
msg
);
...
@@ -180,6 +181,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -180,6 +181,19 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
/// <summary>
/// 是否可以重发消息
/// </summary>
/// <returns></returns>
public
static
bool
CanReSend
()
{
TimeSpan
span
=
DateTime
.
Now
-
LastOutStoreEndTime
;
if
(
span
.
TotalSeconds
>
8
)
{
return
true
;
}
return
false
;
}
}
}
public
class
StoreReviceBean
public
class
StoreReviceBean
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论