Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8851ef0f
由
几米阳光
编写于
2018-12-27 20:10:04 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
服务器通信修改
1 个父辈
c0ea1ea8
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
101 行增加
和
303 行删除
source/ACSingleStore/FrmStoreBox.cs
source/Common/bean/Bean.cs
source/Common/util/HttpHelper.cs
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/AC_DeviceBase.cs
source/DeviceLibrary/store/IOUtil.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
8851ef0
...
@@ -303,14 +303,15 @@ namespace OnlineStore.AutoInOutStore
...
@@ -303,14 +303,15 @@ namespace OnlineStore.AutoInOutStore
btnGetOutTray
.
Enabled
=
map
[
ParamDefine
.
takeOutReel
].
Equals
(
ParamDefine
.
enable
);
btnGetOutTray
.
Enabled
=
map
[
ParamDefine
.
takeOutReel
].
Equals
(
ParamDefine
.
enable
);
btnCloseDoor
.
Enabled
=
map
[
ParamDefine
.
closeLock
].
Equals
(
ParamDefine
.
enable
);
btnCloseDoor
.
Enabled
=
map
[
ParamDefine
.
closeLock
].
Equals
(
ParamDefine
.
enable
);
if
(
AutomaticBaiting
.
DoorStatus
.
Equals
(
2
))
//if (AutomaticBaiting.DoorStatus.Equals(2))
{
//{
lblDoorStatus
.
Text
=
"仓门状态:关闭"
;
// lblDoorStatus.Text = "仓门状态:关闭";
}
//}
else
//else
{
//{
lblDoorStatus
.
Text
=
"仓门状态:打开"
;
// lblDoorStatus.Text = "仓门状态:打开";
}
//}
lblDoorStatus
.
Text
=
map
[
ParamDefine
.
doorStatus
];
lblOutInfo
.
Visible
=
!
lblWaitTragGo
.
Visible
;
lblOutInfo
.
Visible
=
!
lblWaitTragGo
.
Visible
;
lblOutInfo
.
Text
=
"批量出入库信息: 入库:"
+
AutomaticBaiting
.
BatchInStoreCount
+
"盘共"
+
AutomaticBaiting
.
BatchInStoreHeight
+
"mm,"
+
lblOutInfo
.
Text
=
"批量出入库信息: 入库:"
+
AutomaticBaiting
.
BatchInStoreCount
+
"盘共"
+
AutomaticBaiting
.
BatchInStoreHeight
+
"mm,"
+
"出库: "
+
AutomaticBaiting
.
BatchOutStoreCount
+
"盘共"
+
AutomaticBaiting
.
BatchOutStoreHeight
+
"mm"
;
"出库: "
+
AutomaticBaiting
.
BatchOutStoreCount
+
"盘共"
+
AutomaticBaiting
.
BatchOutStoreHeight
+
"mm"
;
...
...
source/Common/bean/Bean.cs
查看文件 @
8851ef0
...
@@ -226,6 +226,8 @@ namespace OnlineStore.Common
...
@@ -226,6 +226,8 @@ namespace OnlineStore.Common
/// </summary>
/// </summary>
public
static
string
confirmReelOut
=
"confirmReelOut"
;
public
static
string
confirmReelOut
=
"confirmReelOut"
;
public
static
string
doorStatus
=
"doorStatus"
;
public
static
string
doit
=
"doit"
;
public
static
string
doit
=
"doit"
;
public
static
string
enable
=
"enable"
;
public
static
string
enable
=
"enable"
;
...
...
source/Common/util/HttpHelper.cs
查看文件 @
8851ef0
...
@@ -80,7 +80,7 @@ namespace OnlineStore.Common
...
@@ -80,7 +80,7 @@ namespace OnlineStore.Common
}
}
return
null
;
return
null
;
}
}
p
rivate
static
int
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Server_Log_Open
);
p
ublic
static
int
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Server_Log_Open
);
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
)
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
)
{
{
if
(
isLog
==
1
)
if
(
isLog
==
1
)
...
...
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
8851ef0
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
8851ef0
...
@@ -127,6 +127,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -127,6 +127,10 @@ namespace OnlineStore.DeviceLibrary
{
{
return
;
return
;
}
}
if
(
isNoAirCheck
)
{
return
;
}
if
(
currAirValue
.
Equals
(
IO_VALUE
.
LOW
))
if
(
currAirValue
.
Equals
(
IO_VALUE
.
LOW
))
{
{
//判断是否持续了3秒
//判断是否持续了3秒
...
@@ -236,8 +240,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -236,8 +240,7 @@ namespace OnlineStore.DeviceLibrary
return
false
;
return
false
;
}
}
}
}
#
region
原点返回和复位处理
#
region
原点返回和复位处理
private
void
ReturnHome
()
private
void
ReturnHome
()
{
{
...
@@ -324,24 +327,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -324,24 +327,12 @@ namespace OnlineStore.DeviceLibrary
{
{
string
portName
=
Config
.
InOut_Axis
.
DeviceName
;
string
portName
=
Config
.
InOut_Axis
.
DeviceName
;
int
slvAddr
=
Config
.
InOut_Axis
.
GetAxisValue
();
int
slvAddr
=
Config
.
InOut_Axis
.
GetAxisValue
();
//if (ACServerManager.GetHomeEndStatus(portName, slvAddr).Equals(1)
// && ACServerManager.GetHomeSingle(portName, slvAddr).Equals(1))
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutBack
);
//{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中,进出轴开始原点返回"
);
// StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutMove);
ACAxisHomeMove
(
Config
.
InOut_Axis
);
// LogUtil.info(LOGGER, StoreName + "复位中,进出轴原点亮且已经原点返回过,先相对走-5000");
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
// int currPos = ACServerManager.GetActualtPosition(portName, slvAddr);
ResetCloseDoor
();
// int targetPos = currPos - 5000;
// ACAxisMove(Config.InOut_Axis, targetPos, Config.InoutAxis_HomeLowSpeed);
// ResetCloseDoor();
//}
//else
//{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutBack
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中,进出轴开始原点返回"
);
ACAxisHomeMove
(
Config
.
InOut_Axis
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
ResetCloseDoor
();
//}
}
}
/// <summary>
/// <summary>
/// 复位处理
/// 复位处理
...
@@ -1044,32 +1035,37 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1044,32 +1035,37 @@ namespace OnlineStore.DeviceLibrary
preIoTimerOutTime
=
DateTime
.
Now
;
preIoTimerOutTime
=
DateTime
.
Now
;
if
(
alarmType
.
Equals
(
StoreAlarmType
.
IoSingleTimeOut
)
||
alarmType
.
Equals
(
StoreAlarmType
.
BatchAlarm
)
||
alarmType
.
Equals
(
StoreAlarmType
.
BatchIoTimeOut
))
if
(
alarmType
.
Equals
(
StoreAlarmType
.
IoSingleTimeOut
)
||
alarmType
.
Equals
(
StoreAlarmType
.
BatchAlarm
)
||
alarmType
.
Equals
(
StoreAlarmType
.
BatchIoTimeOut
))
{
{
//若BOX和移栽都没有在等待Io的过程中则此Io超时异常可能已经处理过
//若BOX和移栽都没有在等待Io的过程中则此Io超时异常可能已经处理过
if
(
alarmType
.
Equals
(
StoreAlarmType
.
IoSingleTimeOut
)
&&
StoreMove
.
IsInWait
==
false
)
if
(
alarmType
.
Equals
(
StoreAlarmType
.
IoSingleTimeOut
)
&&
StoreMove
.
IsInWait
==
false
)
{
{
LogUtil
.
info
(
StoreName
+
"当前空闲中,清理信号超时异常【"
+
StoreManager
.
Store
.
alarmType
+
"】"
+
WarnMsg
);
LogUtil
.
info
(
StoreName
+
"当前空闲中,清理信号超时异常【"
+
StoreManager
.
Store
.
alarmType
+
"】"
+
WarnMsg
);
alarmType
=
StoreAlarmType
.
None
;
alarmType
=
StoreAlarmType
.
None
;
if
(
AutomaticBaiting
.
WarnMsg
.
Contains
(
"超时"
))
{
AutomaticBaiting
.
WarnMsg
=
""
;
}
WarnMsg
=
""
;
WarnMsg
=
""
;
}
}
else
if
(
alarmType
.
Equals
(
StoreAlarmType
.
BatchAlarm
)
||
alarmType
.
Equals
(
StoreAlarmType
.
BatchIoTimeOut
))
else
if
(
alarmType
.
Equals
(
StoreAlarmType
.
BatchAlarm
)
||
alarmType
.
Equals
(
StoreAlarmType
.
BatchIoTimeOut
))
{
{
if
(
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutomaticBaiting
.
StoreMove
.
IsInWait
.
Equals
(
false
))
if
(
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutomaticBaiting
.
StoreMove
.
IsInWait
.
Equals
(
false
))
{
{
LogUtil
.
info
(
"批量上下料模块空闲中,清理报警【"
+
StoreManager
.
Store
.
alarmType
+
"】"
+
AutomaticBaiting
.
WarnMsg
);
LogUtil
.
info
(
"批量上下料模块空闲中,清理报警【"
+
StoreManager
.
Store
.
alarmType
+
"】"
+
AutomaticBaiting
.
WarnMsg
);
alarmType
=
StoreAlarmType
.
None
;
alarmType
=
StoreAlarmType
.
None
;
AutomaticBaiting
.
WarnMsg
=
""
;
AutomaticBaiting
.
WarnMsg
=
""
;
if
(
WarnMsg
.
Contains
(
"超时"
))
{
WarnMsg
=
""
;
}
}
}
}
}
}
}
if
(
alarmType
.
Equals
(
StoreAlarmType
.
None
))
{
if
(
WarnMsg
.
Contains
(
AutomaticBaiting
.
TimeOut
))
{
LogUtil
.
info
(
"清理超时异常信息:"
+
WarnMsg
);
WarnMsg
=
""
;
}
if
(
AutomaticBaiting
.
WarnMsg
.
Contains
(
AutomaticBaiting
.
TimeOut
))
{
LogUtil
.
info
(
"清理超时异常信息:"
+
AutomaticBaiting
.
WarnMsg
);
AutomaticBaiting
.
WarnMsg
=
""
;
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -1539,6 +1535,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1539,6 +1535,17 @@ namespace OnlineStore.DeviceLibrary
//判断服务端是否返回出库操作
//判断服务端是否返回出库操作
return
;
return
;
}
}
OperationProcess
(
resultOperation
);
TimeSpan
span
=
DateTime
.
Now
-
time
;
if
(
span
.
TotalMilliseconds
>
100
)
{
LogUtil
.
info
(
StoreName
+
"SendLineStatus 共处理了【"
+
span
.
TotalMilliseconds
+
"】毫秒"
);
}
}
public
void
OperationProcess
(
Operation
resultOperation
)
{
if
(
resultOperation
.
op
.
Equals
(
2
))
if
(
resultOperation
.
op
.
Equals
(
2
))
{
{
doOutStore
(
resultOperation
);
doOutStore
(
resultOperation
);
...
@@ -1547,15 +1554,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1547,15 +1554,7 @@ namespace OnlineStore.DeviceLibrary
{
{
string
result
=
""
;
string
result
=
""
;
Dictionary
<
string
,
string
>
dataMap
=
resultOperation
.
data
;
Dictionary
<
string
,
string
>
dataMap
=
resultOperation
.
data
;
//string reviceData = "";
//foreach(string key in dataMap.Keys)
//{
// reviceData += "["+key+"="+dataMap[key]+"]";
//}
//if (ConfigAppSettings.GetIntValue(Setting_Init.Server_Log_Open).Equals(1))
//{
// LogUtil.info(StoreName + "收到服务器Data:"+ reviceData);
//}
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
openLock
)
&&
dataMap
[
ParamDefine
.
openLock
].
Equals
(
ParamDefine
.
doit
))
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
openLock
)
&&
dataMap
[
ParamDefine
.
openLock
].
Equals
(
ParamDefine
.
doit
))
{
{
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openLock=doit"
);
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openLock=doit"
);
...
@@ -1583,15 +1582,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1583,15 +1582,10 @@ namespace OnlineStore.DeviceLibrary
}
}
if
(!
result
.
Equals
(
""
))
if
(!
result
.
Equals
(
""
))
{
{
LogUtil
.
info
(
StoreName
+
"收到服务器命令:doit执行失败:"
+
result
);
LogUtil
.
info
(
StoreName
+
"收到服务器命令:doit执行失败:"
+
result
);
CodeOrInoutMsg
=
result
;
CodeOrInoutMsg
=
result
;
}
}
}
}
TimeSpan
span
=
DateTime
.
Now
-
time
;
if
(
span
.
TotalMilliseconds
>
100
)
{
LogUtil
.
info
(
StoreName
+
"SendLineStatus 共处理了【"
+
span
.
TotalMilliseconds
+
"】毫秒"
);
}
}
}
private
void
doOutStore
(
Operation
resultOperation
)
private
void
doOutStore
(
Operation
resultOperation
)
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
8851ef0
...
@@ -140,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -140,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
ACAxisMoveIsEnd
(
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
wait
.
IsEnd
=
ACAxisMoveIsEnd
(
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
}
}
if
(!
wait
.
IsEnd
&&
(
wait
.
AxisInfo
.
DeviceName
.
Equals
(
Config
.
Batch_Axis
.
DeviceName
))
&&
wait
.
TargetPosition
.
Equals
(
Config
.
BatchAxis_P1
))
if
(!
wait
.
IsEnd
&&
(
wait
.
AxisInfo
.
DeviceName
.
Equals
(
Config
.
Batch_Axis
.
DeviceName
))
&&
wait
.
TargetPosition
.
Equals
(
Config
.
BatchAxis_P1
))
{
{
wait
.
IsEnd
=
AutomaticBaiting
.
BatchAxisIsEnd
(
wait
);
wait
.
IsEnd
=
AutomaticBaiting
.
BatchAxisIsEnd
(
wait
);
}
}
...
@@ -164,9 +164,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -164,9 +164,9 @@ namespace OnlineStore.DeviceLibrary
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
{
{
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
StoreName
+
" 等待
信号"
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
"超时!
"
;
WarnMsg
=
StoreName
+
" 等待
"
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
"超时
"
;
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
LogUtil
.
error
(
StoreName
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
LogUtil
.
error
(
StoreName
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
isOk
=
false
;
isOk
=
false
;
break
;
break
;
}
}
...
@@ -187,7 +187,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -187,7 +187,7 @@ namespace OnlineStore.DeviceLibrary
{
{
string
msg
=
""
;
string
msg
=
""
;
wait
.
IsEnd
=
ShuoKeIsEnd
(
wait
,
out
msg
);
wait
.
IsEnd
=
ShuoKeIsEnd
(
wait
,
out
msg
);
NotOkMsg
=
NotOkMsg
+
" "
+
msg
;
NotOkMsg
=
NotOkMsg
+
" "
+
msg
;
}
}
if
(
wait
.
IsEnd
)
if
(
wait
.
IsEnd
)
{
{
...
@@ -211,22 +211,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -211,22 +211,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
EndStepWait
();
StoreMove
.
EndStepWait
();
}
}
else
if
(
span
.
TotalSeconds
>
StoreMove
.
TimeOutSeconds
)
else
if
(
span
.
TotalSeconds
>
StoreMove
.
TimeOutSeconds
)
{
{
if
(
NotOkMsg
.
Equals
(
""
))
WarnMsg
=
"["
+
StoreMove
.
MoveStep
+
"]等待["
+
NotOkMsg
+
"]超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
{
LogUtil
.
error
(
WarnMsg
,
15
);
WarnMsg
=
StoreName
+
"等待超时【"
+
StoreMove
.
MoveType
+
"】【"
+
StoreMove
.
MoveStep
+
"】已等待【"
+
Math
.
Round
(
span
.
TotalSeconds
)
+
"】秒"
;
foreach
(
WaitResultInfo
wait
in
list
)
{
WarnMsg
=
WarnMsg
+
"\r\n"
+
wait
.
ToStr
();
}
LogUtil
.
error
(
WarnMsg
,
12
);
}
else
{
WarnMsg
=
StoreName
+
"【"
+
StoreMove
.
MoveType
+
"】【"
+
StoreMove
.
MoveStep
+
"】等待超时 ["
+
NotOkMsg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
LOGGER
,
WarnMsg
);
}
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
}
}
}
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
8851ef0
...
@@ -9,6 +9,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -9,6 +9,7 @@ namespace OnlineStore.DeviceLibrary
{
{
public
partial
class
AutomaticBaiting
public
partial
class
AutomaticBaiting
{
{
public
static
string
TimeOut
=
"超时"
;
/// <summary>
/// <summary>
/// 操作人员是否拿走料盘
/// 操作人员是否拿走料盘
/// </summary>
/// </summary>
...
@@ -391,10 +392,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -391,10 +392,10 @@ namespace OnlineStore.DeviceLibrary
private
static
int
GetHeight
()
private
static
int
GetHeight
()
{
{
//计算高度
//计算高度
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
()
);
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
);
if
(
EndMovePosition
.
Equals
(-
1
))
if
(
EndMovePosition
.
Equals
(-
1
))
{
{
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
()
);
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
);
}
}
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
);
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
);
int
addHeight
=
0
;
int
addHeight
=
0
;
...
@@ -422,9 +423,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -422,9 +423,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
LastHeight
/
4
)
*
4
;
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
LastHeight
/
4
)
*
4
;
}
}
}
}
return
LastHeight
;
return
LastHeight
;
}
}
private
static
List
<
AutoStorePosition
>
AllPosList
=
null
;
private
static
List
<
AutoStorePosition
>
AllPosList
=
null
;
...
@@ -458,6 +457,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -458,6 +457,15 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Air
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Air
,
IO_VALUE
.
HIGH
));
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
OneWaitCanEndStep
=
true
;
}
}
private
static
void
ClearTimeOut
()
{
if
(
WarnMsg
.
Contains
(
TimeOut
))
{
WarnMsg
=
""
;
}
}
private
static
void
IsNeedScanCode
()
private
static
void
IsNeedScanCode
()
{
{
LastCode
=
""
;
LastCode
=
""
;
...
@@ -466,10 +474,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -466,10 +474,11 @@ namespace OnlineStore.DeviceLibrary
LastPosId
=
""
;
LastPosId
=
""
;
SuckingDisc_WorkCount
=
0
;
SuckingDisc_WorkCount
=
0
;
//如果有超时异常,需要清理
//如果有超时异常,需要清理
if
(
StoreManager
.
Store
.
alarmType
.
Equals
(
StoreAlarmType
.
BatchIoTimeOut
))
if
(
StoreManager
.
Store
.
alarmType
.
Equals
(
StoreAlarmType
.
BatchIoTimeOut
))
{
{
LogUtil
.
info
(
Name
+
"
复位前,清理
报警【"
+
StoreManager
.
Store
.
alarmType
+
"】"
);
LogUtil
.
info
(
Name
+
"
扫码前清理超时
报警【"
+
StoreManager
.
Store
.
alarmType
+
"】"
);
StoreManager
.
Store
.
alarmType
=
StoreAlarmType
.
None
;
StoreManager
.
Store
.
alarmType
=
StoreAlarmType
.
None
;
ClearTimeOut
();
}
}
// if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(0))
// if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(0))
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
8851ef0
...
@@ -360,7 +360,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -360,7 +360,8 @@ namespace OnlineStore.DeviceLibrary
return
;
return
;
}
}
}
}
//开启服务器日志
HttpHelper
.
isLog
=
1
;
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
LogUtil
.
info
(
Name
+
"收到二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
LogUtil
.
info
(
Name
+
"收到二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
//发送扫码内容到服务器进行入库操作
//发送扫码内容到服务器进行入库操作
...
@@ -376,6 +377,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -376,6 +377,9 @@ namespace OnlineStore.DeviceLibrary
//{ { "code", message }, { "boxId", StoreManager.Store.StoreID.ToString() } };
//{ { "code", message }, { "boxId", StoreManager.Store.StoreID.ToString() } };
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
HttpHelper
.
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Server_Log_Open
);
if
(
resultOperation
==
null
)
if
(
resultOperation
==
null
)
{
{
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
...
@@ -454,6 +458,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -454,6 +458,15 @@ namespace OnlineStore.DeviceLibrary
map
.
Add
(
ParamDefine
.
closeLock
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
closeLock
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
takeOutReel
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
takeOutReel
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
confirmReelOut
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
confirmReelOut
,
ParamDefine
.
disable
);
if
(
AutomaticBaiting
.
DoorStatus
.
Equals
(
2
))
{
map
.
Add
(
ParamDefine
.
doorStatus
,
"门锁关闭"
);
}
else
{
map
.
Add
(
ParamDefine
.
doorStatus
,
"门锁打开"
);
}
if
(
AutomaticBaiting
.
IsWaitTragGo
&&
(
AutomaticBaiting
.
IsGetTrayGo
.
Equals
(
false
)))
if
(
AutomaticBaiting
.
IsWaitTragGo
&&
(
AutomaticBaiting
.
IsGetTrayGo
.
Equals
(
false
)))
{
{
...
...
source/DeviceLibrary/store/AC_DeviceBase.cs
deleted
100644 → 0
查看文件 @
c0ea1ea
using
log4net
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
namespace
OnlineStore.DeviceLibrary
{
public
abstract
class
AC_DeviceBase
{
/// <summary>
/// 料仓单个调试状态(默认不是调试状态)
/// </summary>
public
bool
IsDebug
=
false
;
public
Dictionary
<
string
,
ConfigIO
>
DIList
{
get
;
set
;
}
public
Dictionary
<
string
,
ConfigIO
>
DOList
{
get
;
set
;
}
/// <summary>
///1=设备联机(正常就绪)(入库后,BOX恢复原始状态)(出库后,移载装置恢复原始状态),
///2=急停,3=故障,4=警告,5=调试
/// 6=入库执行中,7=入仓完成,8=入仓失败
/// 9=出库执行,10=出仓完成,11=出库失败
/// </summary>
public
StoreStatus
storeStatus
=
StoreStatus
.
StoreOnline
;
/// <summary>
/// 提示消息,一般发给服务器后清空(LineBean表示报警提示消息,BoxBean表示出入库失败的原因记录)
/// </summary>
public
string
WarnMsg
=
""
;
/// <summary>
/// 日志颜色
/// </summary>
protected
static
Color
storeMoveColor
=
Color
.
Blue
;
protected
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
System
.
Reflection
.
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
string
StoreName
{
get
;
set
;
}
public
int
StoreID
{
get
;
set
;
}
/// <summary>
/// 料仓状态
/// </summary>
private
StoreRunStatus
storerunstatus
=
StoreRunStatus
.
Wait
;
/// <summary>
/// 定时器
/// </summary>
protected
System
.
Timers
.
Timer
mainTimer
;
private
bool
isInit
=
false
;
/// <summary>
/// 初始化
/// </summary>
protected
virtual
void
Init
()
{
if
(!
isInit
)
{
StoreMove
=
new
StoreMoveInfo
(
StoreName
);
mainTimer
=
new
System
.
Timers
.
Timer
();
mainTimer
.
Enabled
=
false
;
mainTimer
.
Interval
=
300
;
mainTimer
.
Elapsed
+=
timersTimer_Elapsed
;
mainTimer
.
AutoReset
=
true
;
isInit
=
true
;
}
}
public
StoreRunStatus
storeRunStatus
{
get
{
return
storerunstatus
;
}
set
{
StoreRunStatus
oldStatus
=
storerunstatus
;
storerunstatus
=
value
;
}
}
/// <summary>
/// 移动信息
/// </summary>
public
StoreMoveInfo
StoreMove
=
null
;
/// <summary>
/// 定时处理,监听信号,监听IO
/// </summary>
protected
abstract
void
timersTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
);
#
region
出库
/// <summary>
/// 开始出库运动
/// </summary>
//public abstract bool StartOutStoreMove(InOutStoreParam param);
protected
abstract
void
OutStoreProcess
();
#
endregion
#
region
入库
/// <summary>
/// 开始入库移动移动
/// </summary>
//public abstract bool StartInStoreMove(InOutStoreParam param);
protected
abstract
void
InStoreProcess
();
#
endregion
public
string
GetRunStr
(
StoreRunStatus
runStatus
,
bool
IsStore
)
{
string
sta
=
"运行中"
;
string
aa
=
""
;
switch
(
runStatus
)
{
case
StoreRunStatus
.
Busy
:
sta
=
"忙碌"
;
break
;
case
StoreRunStatus
.
HomeMoving
:
sta
=
"原点返回"
;
break
;
case
StoreRunStatus
.
Reset
:
sta
=
"重置"
;
break
;
case
StoreRunStatus
.
Runing
:
sta
=
"运行中"
;
break
;
case
StoreRunStatus
.
Wait
:
sta
=
"等待启动"
;
break
;
}
if
(
runStatus
>
StoreRunStatus
.
Wait
)
{
//"0":"急停中", "1":"设备联机", "2":"故障中", "3":"入库执行中", "4":"出库执行中", 5":"料盘入仓位完成", "6":"料盘出仓位完成", 7":"设备调试中",
switch
(
storeStatus
)
{
case
StoreStatus
.
Debugging
:
aa
=
"设备调试中"
;
break
;
case
StoreStatus
.
InStoreEnd
:
aa
=
"料盘入仓位完成"
;
break
;
case
StoreStatus
.
InStoreExecute
:
aa
=
"入库执行中"
;
break
;
case
StoreStatus
.
InTrouble
:
aa
=
"故障中"
;
break
;
case
StoreStatus
.
OutStoreBoxEnd
:
aa
=
"料盘出仓位完成"
;
break
;
case
StoreStatus
.
OutStoreExecute
:
aa
=
"出库执行中"
;
break
;
case
StoreStatus
.
StoreOnline
:
aa
=
"设备联机"
;
break
;
case
StoreStatus
.
SuddenStop
:
aa
=
"急停中"
;
break
;
case
StoreStatus
.
OutMoveExecute
:
aa
=
"出库完成"
;
break
;
case
StoreStatus
.
InStoreFaild
:
aa
=
"入库失败("
+
WarnMsg
+
")"
;
break
;
case
StoreStatus
.
OutStoreFaild
:
aa
=
"出库失败("
+
WarnMsg
+
")"
;
break
;
}
if
(!
aa
.
Equals
(
""
))
{
return
sta
+
"_"
+
aa
;
}
else
{
return
sta
;
}
}
else
{
return
sta
;
}
}
}
}
source/DeviceLibrary/store/IOUtil.cs
deleted
100644 → 0
查看文件 @
c0ea1ea
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
OnlineStore.DeviceLibrary
{
public
enum
IO_VALUE
{
/// <summary>
/// 低位
/// </summary>
LOW
=
0
,
/// <summary>
/// 高位
/// </summary>
HIGH
=
1
,
}
}
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
8851ef0
...
@@ -323,28 +323,28 @@ namespace OnlineStore.DeviceLibrary
...
@@ -323,28 +323,28 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】绝对
运动,目标
位置【"
+
TargetPosition
+
"】"
;
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】绝对位置【"
+
TargetPosition
+
"】"
;
}
}
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
IOMove_2
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
IOMove_2
)
{
{
return
"IO信号等待
,IO类型【"
+
IoType
+
"】,等待值
【"
+
IoValue
+
"】"
;
return
"IO信号等待
【"
+
IoType
+
"】
【"
+
IoValue
+
"】"
;
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
Time_3
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
Time_3
)
{
{
return
"时间
等待:
【"
+
TimeMSeconds
+
"】毫秒"
;
return
"时间【"
+
TimeMSeconds
+
"】毫秒"
;
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
StellMove_4
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
StellMove_4
)
{
{
return
"电钢目标位置
:
【"
+
TargetPosition
+
"】 "
;
return
"电钢目标位置【"
+
TargetPosition
+
"】 "
;
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
ShuoKe_5
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
ShuoKe_5
)
{
{
return
"
硕科电机目标位置:
【"
+
TargetPosition
+
"】 "
;
return
"
步进电机位置
【"
+
TargetPosition
+
"】 "
;
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisHomeSingle_6
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisHomeSingle_6
)
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】
ORG信号:
【"
+
IoValue
+
"】 "
;
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】
原点
【"
+
IoValue
+
"】 "
;
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
WaitHeight_7
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
WaitHeight_7
)
{
{
...
@@ -352,21 +352,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -352,21 +352,21 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisLimitNegativeSingle_8
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisLimitNegativeSingle_8
)
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】负限位
:
【"
+
IoValue
+
"】 "
;
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】负限位【"
+
IoValue
+
"】 "
;
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisLimitPositiveSingle_9
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisLimitPositiveSingle_9
)
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】正限位
:
【"
+
IoValue
+
"】 "
;
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】正限位【"
+
IoValue
+
"】 "
;
}
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_10
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_10
)
{
{
return
"上料轴运动停止 "
;
return
"上料轴运动停止 "
;
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
ScanCode_11
)
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
ScanCode_11
)
{
{
return
"
等待
扫码结束"
;
return
"扫码结束"
;
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
TakeTrayGo_12
)
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
TakeTrayGo_12
)
{
{
return
"
等待
操作人员拿走料盘"
;
return
"操作人员拿走料盘"
;
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
StoreRuning_13
)
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
StoreRuning_13
)
{
{
return
"等待送料结束"
;
return
"等待送料结束"
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论