Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c7401629
由
LN
编写于
2021-07-01 10:50:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
盘点料逻辑修改。增加jison日志
1 个父辈
e835dfd3
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
863 行增加
和
178 行删除
source/AssemblyLineClient/App.config
source/AssemblyLineClient/Program.cs
source/Common/Common.csproj
source/Common/util/RunLogUtil.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1_SLStation.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblymanager/ALineManager.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/DeviceLibrary/model/KTK_Store.cs
source/DeviceLibrary/model/LineMoveInfo.cs
source/DeviceLibrary/model/StoreStep.cs
source/AssemblyLineClient/App.config
查看文件 @
c740162
...
...
@@ -96,6 +96,16 @@
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"RunLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/log/RunLog-line.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
" %m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
...
@@ -108,6 +118,10 @@
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"AIOBOX"
/>
</
logger
>
<
logger
name
=
"RunLog"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RunLog"
/>
</
logger
>
<!--<
root
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
...
source/AssemblyLineClient/Program.cs
查看文件 @
c740162
...
...
@@ -54,7 +54,7 @@ namespace OnlineStore.AssemblyLine
[
STAThread
]
static
void
Main
(
string
[]
Args
)
{
//string code = " (X: 380,Y: 148) L00000000000WG9D19055;E20191230 0180;B7H.10618.5B1008082019123004000;R0080820191230E9600";
//string r = CodeManager.ReplaceCode(code);
Application
.
SetUnhandledExceptionMode
(
UnhandledExceptionMode
.
CatchException
);
...
...
source/Common/Common.csproj
查看文件 @
c740162
...
...
@@ -65,6 +65,7 @@
<Compile Include="util\NetTCPServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="util\RunLogUtil.cs" />
<Compile Include="util\TcpClient.cs" />
<Compile Include="util\TcpServer.cs" />
<Compile Include="util\UdpServer.cs" />
...
...
source/Common/util/RunLogUtil.cs
0 → 100644
查看文件 @
c740162
using
log4net
;
using
Newtonsoft.Json
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Runtime.Serialization
;
using
System.Text
;
namespace
OnlineStore.Common
{
public
class
RunLogUtil
{
public
static
readonly
ILog
RunLog
=
LogManager
.
GetLogger
(
"RunLog"
);
public
static
void
ErrorLog
(
ErrorLog
log
)
{
string
jsonStr
=
JsonHelper
.
SerializeObject
(
log
);
RunLog
.
Error
(
jsonStr
);
}
public
static
void
MoveLog
(
MoveLog
log
)
{
//if (log == null || (!log.IsValid()))
//{
// return;
//}
//string jsonStr = JsonHelper.SerializeObject(log);
//RunLog.Info(jsonStr);
}
public
static
void
MoveEndLog
(
MoveEndLog
log
)
{
if
(
log
==
null
||
(!
log
.
IsValid
()))
{
return
;
}
string
jsonStr
=
JsonHelper
.
SerializeObject
(
log
);
RunLog
.
Info
(
jsonStr
);
}
public
static
void
AxisLog
(
AxisMoveLog
log
)
{
string
jsonStr
=
JsonHelper
.
SerializeObject
(
log
);
RunLog
.
Error
(
jsonStr
);
}
}
public
class
BaseLog
{
[
JsonProperty
(
Order
=
0
)]
public
string
Name
{
get
;
set
;
}
=
"三楼环形线"
;
[
JsonProperty
(
Order
=
1
)]
public
string
DeviceName
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
2
)]
public
string
LogType
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
3
)]
public
string
StartTime
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
4
)]
public
string
EndTime
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
5
)]
public
string
timeSpan
{
get
;
set
;
}
=
""
;
}
public
class
ErrorLog
:
BaseLog
{
public
ErrorLog
()
{
this
.
LogType
=
"Error"
;
}
public
ErrorLog
(
string
deviceName
,
string
errType
,
string
errMsg
,
DateTime
startTime
,
DateTime
endTime
,
string
operType
=
""
,
string
posid
=
""
,
string
barcode
=
""
)
{
if
(
operType
==
null
)
{
operType
=
""
;
}
if
(
posid
==
null
)
{
posid
=
""
;
}
if
(
barcode
==
null
)
{
barcode
=
""
;
}
if
(
errType
==
null
)
{
errType
=
""
;
}
if
(
errMsg
==
null
)
{
errMsg
=
""
;
}
this
.
LogType
=
"Error"
;
this
.
DeviceName
=
deviceName
.
Replace
(
"-Move"
,
""
).
Replace
(
"-SMove"
,
""
).
Trim
();
this
.
ErrorType
=
errType
.
Trim
();
this
.
ErrorMsg
=
errMsg
.
Trim
();
this
.
StartTime
=
startTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
this
.
EndTime
=
endTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
this
.
OperateType
=
operType
.
Trim
();
this
.
PosId
=
posid
.
Trim
();
this
.
Barcode
=
barcode
.
Trim
();
TimeSpan
span
=
endTime
-
startTime
;
this
.
timeSpan
=
(
Math
.
Round
(
span
.
TotalMinutes
,
2
)).
ToString
();
//两位小数的分钟
}
public
bool
IsValid
()
{
if
(
string
.
IsNullOrEmpty
(
DeviceName
)
||
String
.
IsNullOrEmpty
(
LogType
)
||
string
.
IsNullOrEmpty
(
ErrorType
)
||
string
.
IsNullOrEmpty
(
ErrorMsg
))
{
return
false
;
}
return
true
;
}
[
JsonProperty
(
Order
=
11
)]
public
string
ErrorType
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
12
)]
public
string
ErrorMsg
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
13
)]
public
string
OperateType
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
14
)]
public
string
PosId
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
15
)]
public
string
Barcode
{
get
;
set
;
}
=
""
;
}
public
class
MoveLog
:
BaseLog
{
public
MoveLog
()
{
this
.
LogType
=
"Running"
;
}
public
MoveLog
(
string
deviceName
,
string
moveType
,
string
moveMsg
,
DateTime
startTime
,
DateTime
endTime
,
string
posid
=
""
,
string
barcode
=
""
)
{
if
(
posid
==
null
)
{
posid
=
""
;
}
if
(
barcode
==
null
)
{
barcode
=
""
;
}
this
.
LogType
=
"Running"
;
this
.
DeviceName
=
deviceName
.
Replace
(
"-Move"
,
""
).
Replace
(
"-SMove"
,
""
).
Trim
();
this
.
MoveType
=
moveType
.
Trim
();
this
.
MoveMsg
=
moveMsg
.
Trim
();
this
.
StartTime
=
startTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
this
.
EndTime
=
endTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
this
.
PosId
=
posid
.
Trim
();
this
.
Barcode
=
barcode
.
Trim
();
TimeSpan
span
=
endTime
-
startTime
;
this
.
timeSpan
=
(
Math
.
Round
(
span
.
TotalMinutes
,
2
)).
ToString
();
//两位小数的分钟
}
public
bool
IsValid
()
{
if
(
string
.
IsNullOrEmpty
(
DeviceName
)
||
String
.
IsNullOrEmpty
(
LogType
)
||
string
.
IsNullOrEmpty
(
MoveType
)
||
string
.
IsNullOrEmpty
(
MoveMsg
))
{
return
false
;
}
return
true
;
}
[
JsonProperty
(
Order
=
11
)]
public
string
MoveType
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
12
)]
public
string
MoveMsg
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
13
)]
public
string
PosId
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
14
)]
public
string
Barcode
{
get
;
set
;
}
=
""
;
}
public
class
MoveEndLog
:
BaseLog
{
public
MoveEndLog
()
{
this
.
LogType
=
"InoutEnd"
;
}
public
MoveEndLog
(
string
deviceName
,
string
moveType
,
DateTime
startTime
,
DateTime
endTime
,
string
posid
=
""
,
string
barcode
=
""
)
{
if
(
posid
==
null
)
{
posid
=
""
;
}
if
(
barcode
==
null
)
{
barcode
=
""
;
}
this
.
LogType
=
"InoutEnd"
;
this
.
DeviceName
=
deviceName
.
Replace
(
"-Move"
,
""
).
Replace
(
"-SMove"
,
""
).
Trim
();
this
.
MoveType
=
moveType
.
Trim
();
this
.
StartTime
=
startTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
this
.
EndTime
=
endTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
this
.
PosId
=
posid
.
Trim
();
this
.
Barcode
=
barcode
.
Trim
();
TimeSpan
span
=
endTime
-
startTime
;
this
.
timeSpan
=
(
Math
.
Round
(
span
.
TotalMinutes
,
2
)).
ToString
();
//两位小数的分钟
}
public
bool
IsValid
()
{
if
(
string
.
IsNullOrEmpty
(
DeviceName
)
||
string
.
IsNullOrEmpty
(
MoveType
))
{
return
false
;
}
return
true
;
}
[
JsonProperty
(
Order
=
11
)]
public
string
MoveType
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
12
)]
public
string
PosId
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
13
)]
public
string
Barcode
{
get
;
set
;
}
=
""
;
}
public
class
AxisMoveLog
:
BaseLog
{
public
AxisMoveLog
()
{
this
.
LogType
=
"Axis"
;
}
public
AxisMoveLog
(
string
deviceName
,
string
axisName
,
string
moveType
,
int
targetP
,
int
speed
,
DateTime
startTime
,
DateTime
endTime
,
string
posid
=
""
,
string
barcode
=
""
)
{
if
(
posid
==
null
)
{
posid
=
""
;
}
if
(
barcode
==
null
)
{
barcode
=
""
;
}
this
.
LogType
=
"Axis"
;
this
.
DeviceName
=
deviceName
.
Replace
(
"-Move"
,
""
).
Replace
(
"-SMove"
,
""
).
Trim
();
this
.
MoveType
=
moveType
.
Trim
();
this
.
AxisName
=
axisName
;
this
.
TargetPos
=
targetP
;
this
.
StartTime
=
startTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
this
.
EndTime
=
endTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
this
.
PosId
=
posid
.
Trim
();
this
.
Barcode
=
barcode
.
Trim
();
TimeSpan
span
=
endTime
-
startTime
;
this
.
timeSpan
=
(
Math
.
Round
(
span
.
TotalMinutes
,
2
)).
ToString
();
//两位小数的分钟
this
.
Speed
=
speed
;
}
public
bool
IsValid
()
{
if
(
string
.
IsNullOrEmpty
(
DeviceName
)
||
string
.
IsNullOrEmpty
(
MoveType
))
{
return
false
;
}
return
true
;
}
[
JsonProperty
(
Order
=
11
)]
public
string
AxisName
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
12
)]
public
string
MoveType
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
13
)]
public
int
TargetPos
{
get
;
set
;
}
=
0
;
[
JsonProperty
(
Order
=
14
)]
public
int
Speed
{
get
;
set
;
}
[
JsonProperty
(
Order
=
15
)]
public
string
PosId
{
get
;
set
;
}
=
""
;
[
JsonProperty
(
Order
=
16
)]
public
string
Barcode
{
get
;
set
;
}
=
""
;
}
}
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
c740162
...
...
@@ -182,26 +182,26 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
" BusyMoveProcess 出错:"
+
ex
.
ToString
());
}
}
protected
void
MoveTimeOut
(
LineMoveInfo
move
,
string
msg
)
{
WarnMsg
=
move
.
Name
+
"["
+
move
.
MoveStep
+
"] "
+
msg
+
" ["
+
FormUtil
.
GetSpanStr
(
move
.
StepSpan
())
+
"]"
;
int
logId
=
DeviceID
*
10000
+
(
int
)
move
.
MoveStep
;
LogUtil
.
error
(
WarnMsg
,
logId
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
protected
void
ClearTimeoutAlarm
(
string
msg
)
{
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
;
}
if
(
WarnMsg
.
Contains
(
msg
)
&&
alarmType
.
Equals
(
LineAlarmType
.
IoSingleTimeOut
))
{
LogUtil
.
info
(
Name
+
"清理信号超时报警【"
+
WarnMsg
+
"】 "
);
alarmType
=
LineAlarmType
.
None
;
SetWarnMsg
(
""
);
}
}
//
protected void MoveTimeOut(LineMoveInfo move, string msg)
//
{
//
WarnMsg = move.Name + "[" + move.MoveStep + "] "+ msg + " [" +FormUtil.GetSpanStr( move.StepSpan()) + "]";
//
int logId = DeviceID * 10000 + (int)move.MoveStep;
//
LogUtil.error(WarnMsg, logId);
//
Alarm(LineAlarmType.IoSingleTimeOut);
//
}
//
protected void ClearTimeoutAlarm(string msg)
//
{
//
if (isInSuddenDown || isNoAirCheck)
//
{
//
return;
//
}
//
if (WarnMsg.Contains(msg) && alarmType.Equals(LineAlarmType.IoSingleTimeOut))
//
{
//
LogUtil.info(Name + "清理信号超时报警【" + WarnMsg + "】 ");
//
alarmType = LineAlarmType.None;
//
SetWarnMsg("");
//
}
//
}
protected
bool
CanStartRun
()
{
string
canResult
=
LineManager
.
Line
.
CanStart
();
...
...
@@ -384,7 +384,7 @@ namespace OnlineStore.DeviceLibrary
{
return
true
;
}
SetWarnMsg
(
Name
+
msg
);
SetWarnMsg
(
Name
+
msg
,
axis
.
Config
.
DisplayStr
+
"_轴报警"
);
Alarm
(
LineAlarmType
.
AxisAlarm
);
return
false
;
}
...
...
@@ -423,8 +423,9 @@ namespace OnlineStore.DeviceLibrary
if
(
alarmIo
==
1
)
{
WarnMsg
=
Name
+
" 运动轴"
+
axisInfo
.
Config
.
Explain
+
"报警"
;
LogUtil
.
error
(
WarnMsg
);
string
msg
=
Name
+
" 运动轴"
+
axisInfo
.
Config
.
Explain
+
"报警"
;
//LogUtil.error(WarnMsg);
SetWarnMsg
(
msg
,
axisInfo
.
Config
.
Explain
+
"轴报警"
);
Alarm
(
LineAlarmType
.
AxisAlarm
);
isInAlarm
=
true
;
}
...
...
@@ -476,16 +477,25 @@ namespace OnlineStore.DeviceLibrary
if
(
wait
.
IsHomeMove
)
{
wait
.
IsEnd
=
AxisBean
.
HomeMoveIsEnd
(
moveInfo
,
wait
.
AxisInfo
,
out
msg
);
if
(
wait
.
IsEnd
)
{
RunLogUtil
.
AxisLog
(
new
AxisMoveLog
(
Name
,
wait
.
AxisInfo
.
Explain
,
"回原点"
,
0
,
wait
.
AxisInfo
.
HomeHighSpeed
,
moveInfo
.
LastSetpTime
,
DateTime
.
Now
,
moveInfo
.
MoveParam
.
PosId
,
moveInfo
.
MoveParam
.
WareCode
));
}
}
else
{
wait
.
IsEnd
=
AxisBean
.
ACAxisMoveIsEnd
(
moveInfo
,
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
if
(
wait
.
IsEnd
)
{
RunLogUtil
.
AxisLog
(
new
AxisMoveLog
(
Name
,
wait
.
AxisInfo
.
Explain
,
"绝对运动"
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
moveInfo
.
LastSetpTime
,
DateTime
.
Now
,
moveInfo
.
MoveParam
.
PosId
,
moveInfo
.
MoveParam
.
WareCode
));
}
}
if
(!
msg
.
Equals
(
""
))
{
isOk
=
false
;
WarnMsg
=
Name
+
msg
;
string
type
=
moveInfo
.
GetStepDes
()
+
"_轴运动报警"
;
// WarnMsg = Name + msg;
SetWarnMsg
(
msg
,
type
,
moveInfo
);
Alarm
(
LineAlarmType
.
AxisMoveError
);
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
AxisMoveError
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
14
);
...
...
@@ -510,8 +520,8 @@ namespace OnlineStore.DeviceLibrary
if
(
span
.
TotalSeconds
>
LineManager
.
Config
.
IOSingle_TimerOut
&&
alarmType
<=
LineAlarmType
.
IoSingleTimeOut
)
{
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] 等待"
+
NotOkMsg
+
" 超时 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒"
;
string
warnmsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] 等待"
+
NotOkMsg
+
" 超时 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒"
;
SetWarnMsg
(
warnmsg
,
moveInfo
.
GetStepDes
()
+
"_超时报警"
,
moveInfo
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
13
);
if
(
NoAlarm
())
{
...
...
@@ -592,10 +602,11 @@ namespace OnlineStore.DeviceLibrary
if
(
isOk
)
{
moveInfo
.
EndStepWait
();
ClearStepAlarm
(
moveInfo
.
GetStepDes
());
}
else
if
(
span
.
TotalSeconds
>
moveInfo
.
TimeOutSeconds
)
{
WarnM
sg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
string
m
sg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
"超时["
+
FormUtil
.
GetSpanStr
(
span
)+
"]"
;
int
second
=
10
;
if
(
IsLowAlarm
(
moveInfo
))
...
...
@@ -610,7 +621,9 @@ namespace OnlineStore.DeviceLibrary
{
second
=
10
;
}
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
15
,
second
);
string
type
=
moveInfo
.
GetStepDes
()
+
"_"
+
"超时报警"
;
//LogUtil.error(WarnMsg, DeviceID * 1000 + 15, second);
SetWarnMsg
(
msg
,
type
,
moveInfo
,
second
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
IoSingleTimeOut
);
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
c740162
...
...
@@ -352,12 +352,12 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
MoveTime
Out
(
MoveInfo
,
"启用抓料超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"启用抓料超时"
);
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
MoveTime
Out
(
MoveInfo
,
"扫码结束超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"扫码结束超时"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
FI_21_CylinderTake
))
...
...
@@ -504,7 +504,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
120
))
{
MoveTime
Out
(
MoveInfo
,
"获取库位号超时 "
+
getPosIdMsg
);
MoveTime
outAlarm
(
MoveInfo
,
"获取库位号超时 "
+
getPosIdMsg
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
FI_32_WaitTray
))
//TODO
...
...
@@ -527,7 +527,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
{
MoveTime
Out
(
MoveInfo
,
"等待空托盘到达超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待空托盘到达超时"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
FI_33_CylinderDown
))
...
...
@@ -971,7 +971,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
MoveTime
Out
(
MoveInfo
,
"预扫码结束超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"预扫码结束超时"
);
}
}
else
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
c740162
...
...
@@ -802,7 +802,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
MoveTime
Out
(
MoveInfo
,
"等待给服务器发送afterPut完成超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待给服务器发送afterPut完成超时"
);
}
}
}
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
查看文件 @
c740162
...
...
@@ -544,7 +544,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTime
Out
(
MoveInfo
,
"等待"
+
hyout
.
Name
+
"可以横移超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待"
+
hyout
.
Name
+
"可以横移超时"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY13_WaitHY2Ready
))
...
...
@@ -562,7 +562,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTime
Out
(
MoveInfo
,
"等待"
+
hyout
.
Name
+
"顶升上升完成超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待"
+
hyout
.
Name
+
"顶升上升完成超时"
);
}
...
...
@@ -584,7 +584,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTime
Out
(
MoveInfo
,
"等待托盘到达"
+
hyout
.
Name
+
"超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待托盘到达"
+
hyout
.
Name
+
"超时"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY16_WatOutFixture2
))
...
...
@@ -603,7 +603,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTime
Out
(
MoveInfo
,
"等待托盘到达"
+
hyout
.
Name
+
""
);
MoveTime
outAlarm
(
MoveInfo
,
"等待托盘到达"
+
hyout
.
Name
+
""
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY17_TopDown
))
...
...
@@ -955,8 +955,23 @@ namespace OnlineStore.DeviceLibrary
if
(!
instoreId
.
Contains
(
storeId
))
{
return
true
;
}
}
}
else
if
(
tray
.
InOrOutStore
.
Equals
(
2
)
&&
tray
.
InoutPar
.
urgentReel
)
{
pandianliao
++;
if
(
pandianliao
>=
2
)
{
bool
needhy
=
SServerManager
.
canReelToBelt
(
Name
,
tray
.
InoutPar
.
WareCode
,
false
);
if
(
needhy
)
{
LogUtil
.
info
(
Name
+
"盘点料["
+
pandianliao
+
"]:需要横移 "
+
tray
.
InoutPar
.
ToShortStr
());
pandianliao
=
0
;
return
true
;
}
pandianliao
=
0
;
}
}
}
}
...
...
@@ -997,7 +1012,7 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
private
int
pandianliao
=
0
;
private
int
PreIsToOutCount
=
0
;
private
bool
TrayNeedToOutLine
(
int
trayNum
)
{
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1_SLStation.cs
查看文件 @
c740162
...
...
@@ -364,13 +364,13 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
30
))
{
MoveTime
Out
(
MoveInfo
,
"等待"
+
feed
.
Name
+
"开始出库超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待"
+
feed
.
Name
+
"开始出库超时"
);
//如果当前无料串,或者料串已离开,直接放行 托盘
TrayCanLeave
();
}
else
if
(
MoveInfo
.
IsTimeOut
(
20
))
{
MoveTime
Out
(
MoveInfo
,
"等待"
+
feed
.
Name
+
"开始出库超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待"
+
feed
.
Name
+
"开始出库超时"
);
}
}
else
...
...
@@ -414,7 +414,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTime
Out
(
MoveInfo
,
"等待"
+
hyOut
.
Name
+
"可以横移超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待"
+
hyOut
.
Name
+
"可以横移超时"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY13_WaitHY2Ready
))
...
...
@@ -431,7 +431,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTime
Out
(
MoveInfo
,
"等待"
+
hyOut
+
"顶升上升完成超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待"
+
hyOut
+
"顶升上升完成超时"
);
}
}
...
...
@@ -456,7 +456,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
())
{
MoveTime
Out
(
MoveInfo
,
"等待托盘到达"
+
hyOut
.
Name
+
""
);
MoveTime
outAlarm
(
MoveInfo
,
"等待托盘到达"
+
hyOut
.
Name
+
""
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY17_TopDown
))
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
c740162
...
...
@@ -611,7 +611,7 @@ namespace OnlineStore.DeviceLibrary
Thread
.
Sleep
(
300
);
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
SetWarnMsg
(
"收到急停信号,报警急停"
);
SetWarnMsg
(
"收到急停信号,报警急停"
,
"急停报警"
);
Alarm
(
LineAlarmType
.
SuddenStop
);
}
}
...
...
@@ -902,9 +902,10 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
span
.
TotalSeconds
>
120
)
{
WarnM
sg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"]["
+
msg
+
"]已等待["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
903
);
string
warnm
sg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"]["
+
msg
+
"]已等待["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]秒"
;
//
LogUtil.error(WarnMsg, 903);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
MoveTimeoutAlarm
(
MoveInfo
,
msg
);
}
}
}
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
c740162
...
...
@@ -104,9 +104,10 @@ namespace OnlineStore.DeviceLibrary
if
(
span
.
TotalSeconds
>
LineManager
.
Config
.
IOSingle_TimerOut
&&
NoAlarm
())
{
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
checkWaitInfo
.
Name
+
"["
+
checkWaitInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
" 超时"
;
string
warnMsg
=
checkWaitInfo
.
Name
+
"["
+
checkWaitInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
" 超时"
;
SetWarnMsg
(
warnMsg
,
checkWaitInfo
.
GetStepDes
()
+
"_超时报警"
,
checkWaitInfo
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
LogUtil
.
error
(
WarnMsg
,
901
);
//
LogUtil.error(WarnMsg, 901);
}
//超过报警时长
else
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
...
...
@@ -177,11 +178,13 @@ namespace OnlineStore.DeviceLibrary
if
(
isOk
)
{
checkWaitInfo
.
EndStepWait
();
ClearStepAlarm
(
checkWaitInfo
.
GetStepDes
());
}
else
if
(
span
.
TotalSeconds
>
checkWaitInfo
.
TimeOutSeconds
)
{
WarnMsg
=
checkWaitInfo
.
Name
+
"["
+
checkWaitInfo
.
MoveStep
+
"]["
+
NotOkMsg
+
"]已等待["
+
FormUtil
.
GetSpanStr
(
span
)
+
"] "
;
LogUtil
.
error
(
WarnMsg
,
900
);
string
warnMsg
=
checkWaitInfo
.
Name
+
"["
+
checkWaitInfo
.
MoveStep
+
"]["
+
NotOkMsg
+
"]已等待["
+
FormUtil
.
GetSpanStr
(
span
)
+
"] "
;
SetWarnMsg
(
warnMsg
,
checkWaitInfo
.
GetStepDes
()
+
"_超时报警"
,
checkWaitInfo
);
//LogUtil.error(WarnMsg, 900);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
c740162
...
...
@@ -255,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
{
MoveTime
Out
(
MoveInfo
,
"等待空托盘到达超时"
);
MoveTime
outAlarm
(
MoveInfo
,
"等待空托盘到达超时"
);
return
false
;
}
return
false
;
...
...
@@ -464,8 +464,9 @@ namespace OnlineStore.DeviceLibrary
if
(
sendCount
>=
3
)
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
" 等待BOX开始入库超时 已发送"
+
sendCount
+
"次"
;
LogUtil
.
error
(
WarnMsg
);
SetWarnMsg
(
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
" 等待BOX开始入库超时 已发送"
+
sendCount
+
"次"
,
"等待BOX开始入库超时"
);
//WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + " 等待BOX开始入库超时 已发送" + sendCount + "次";
//LogUtil.error(WarnMsg);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
...
...
@@ -1003,9 +1004,10 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
SecondMoveInfo
.
IsTimeOut
(
120
))
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
SLog
+
"]等待HY8空闲["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
12
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
MoveTimeoutAlarm
(
SecondMoveInfo
,
"等待HY8空闲超时"
);
//WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.SLog + "]等待HY8空闲[" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
//LogUtil.error(WarnMsg, DeviceID * 1000 + 12);
//Alarm(LineAlarmType.IoSingleTimeOut);
}
}
...
...
source/DeviceLibrary/assemblymanager/ALineManager.cs
查看文件 @
c740162
...
...
@@ -34,7 +34,8 @@ namespace OnlineStore.DeviceLibrary
public
LineManager
()
{
}
public
static
bool
CheckEnum
(
Type
type
)
public
static
Dictionary
<
string
,
string
>
StepDesMap
=
new
Dictionary
<
string
,
string
>();
public
static
bool
CheckEnum
(
Type
type
,
bool
isStep
=
false
)
{
if
(
type
.
IsEnum
)
{
...
...
@@ -49,6 +50,13 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
valueList
.
Add
(
item
);
if
(
isStep
)
{
LineMoveStep
en
=
(
LineMoveStep
)
item
;
string
des
=
EnumDesHelper
.
GetStepDes
(
en
);
StepDesMap
.
Add
(
en
.
ToString
(),
des
);
}
}
}
return
true
;
...
...
@@ -68,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
{
IsConnectServer
=
true
;
}
if
(!
CheckEnum
(
typeof
(
LineMoveStep
)))
if
(!
CheckEnum
(
typeof
(
LineMoveStep
)
,
true
))
{
return
false
;
}
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
c740162
...
...
@@ -637,13 +637,13 @@ namespace OnlineStore.DeviceLibrary
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
debug
(
$
"{deviceName }canReelToBelt {FormUtil.GetSpanStr(DateTime.Now - startTime) } 【{ server }】【{resultStr }】"
);
//{ "code":0,"msg":"ok","data":true}
ReturnData
data
=
JsonHelper
.
DeserializeJsonToObject
<
ReturnData
>(
resultStr
);
if
(
data
!=
null
)
{
bool
result
=
Convert
.
ToBoolean
(
data
.
data
);
if
(
data
.
code
.
Equals
(
0
)
&&
(!
result
)
)
if
(
data
.
code
.
Equals
(
0
))
{
return
result
;
}
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
c740162
...
...
@@ -11,18 +11,18 @@ using System.Threading;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
{
public
abstract
class
KTK_Store
{
public
LineRunStatus
runStatus
=
LineRunStatus
.
Wait
;
public
string
WarnMsg
=
""
;
public
DeviceConfig
baseConfig
=
null
;
public
string
Name
{
get
;
set
;
}
public
int
DeviceID
{
get
;
set
;
}
protected
System
.
Timers
.
Timer
mainTimer
;
private
bool
isInit
=
false
;
...
...
@@ -51,7 +51,7 @@ namespace OnlineStore.DeviceLibrary
/// 是否没有检测到气压
/// </summary>
public
bool
isNoAirCheck
=
false
;
public
LineAlarmType
alarmType
=
LineAlarmType
.
None
;
public
AlarmInfo
alarmInfo
=
new
AlarmInfo
();
...
...
@@ -63,7 +63,7 @@ namespace OnlineStore.DeviceLibrary
public
object
lastDiListLock
=
""
;
public
void
addLastDI
(
string
type
,
IO_VALUE
value
)
{
{
try
{
lock
(
lastDiListLock
)
...
...
@@ -80,14 +80,14 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
ex
.
ToString
());
}
}
/// <summary>
/// 运动处理
/// </summary>
protected
bool
isInPro
=
false
;
protected
virtual
void
BusyMoveProcess
()
{
{
isInPro
=
true
;
try
{
...
...
@@ -114,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"BusyMoveProcess出错:"
,
ex
);
LogUtil
.
error
(
"BusyMoveProcess出错:"
,
ex
);
}
isInPro
=
false
;
}
...
...
@@ -150,7 +150,7 @@ namespace OnlineStore.DeviceLibrary
case
LineAlarmType
.
IoSingleTimeOut
:
aType
=
3
;
break
;
default
:
break
;
}
alarmInfo
=
new
AlarmInfo
(
DeviceID
,
aType
,
alarmDetial
,
alarmMsg
,
inoutStatus
);
...
...
@@ -160,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
/// 没有严重的报警
/// </summary>
/// <returns></returns>
internal
bool
NoErrorAlarm
()
internal
bool
NoErrorAlarm
()
{
if
(
isInSuddenDown
||
isNoAirCheck
)
{
...
...
@@ -180,26 +180,26 @@ namespace OnlineStore.DeviceLibrary
}
if
(
alarmType
.
Equals
(
LineAlarmType
.
None
))
{
return
true
;
return
true
;
}
return
false
;
}
return
false
;
}
public
abstract
bool
StartRun
(
bool
isDebug
=
false
);
public
abstract
void
StopRun
();
public
abstract
void
Alarm
(
LineAlarmType
alarmType
);
public
abstract
void
Alarm
(
LineAlarmType
alarmType
);
public
abstract
bool
Reset
();
internal
abstract
void
StopMove
(
string
stopDes
=
""
);
internal
abstract
void
StopMove
(
string
stopDes
=
""
);
protected
abstract
void
ResetProcess
();
protected
virtual
void
Init
()
{
if
(!
isInit
)
{
{
mainTimer
=
new
System
.
Timers
.
Timer
();
mainTimer
.
Enabled
=
false
;
mainTimer
.
Interval
=
300
;
...
...
@@ -207,10 +207,10 @@ namespace OnlineStore.DeviceLibrary
mainTimer
.
AutoReset
=
true
;
isInit
=
true
;
}
}
}
public
LineMoveInfo
MoveInfo
=
null
;
protected
abstract
void
mainTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
);
#
region
出库
...
...
@@ -229,41 +229,41 @@ namespace OnlineStore.DeviceLibrary
protected
abstract
void
InStoreProcess
();
#
endregion
public
void
SetWarnMsg
(
string
msg
=
""
)
{
if
(
String
.
IsNullOrEmpty
(
msg
).
Equals
(
false
))
{
if
(!
msg
.
StartsWith
(
Name
))
{
msg
=
Name
+
msg
;
}
if
(
WarnMsg
.
Equals
(
msg
))
{
if
(
msg
.
StartsWith
(
Name
))
{
LogUtil
.
error
(
msg
,
801
);
}
else
{
LogUtil
.
error
(
Name
+
msg
,
801
);
}
}
else
{
if
(
msg
.
StartsWith
(
Name
))
{
LogUtil
.
error
(
msg
);
}
else
{
LogUtil
.
error
(
Name
+
msg
);
}
}
}
//
public void SetWarnMsg(string msg = "")
//
{
//
if (String.IsNullOrEmpty(msg).Equals(false))
//
{
//
if (!msg.StartsWith(Name))
//
{
//
msg = Name + msg;
//
}
//
if (WarnMsg.Equals(msg))
//
{
//
if (msg.StartsWith(Name))
//
{
//
LogUtil.error(msg, 801);
//
}
//
else
//
{
//
LogUtil.error(Name + msg, 801);
//
}
//
}
//
else
//
{
//
if (msg.StartsWith(Name))
//
{
//
LogUtil.error(msg);
//
}
//
else
//
{
//
LogUtil.error(Name + msg);
//
}
//
}
//
}
WarnMsg
=
msg
;
}
public
string
GetRunStr
(
)
//
WarnMsg = msg;
//
}
public
string
GetRunStr
(
)
{
string
sta
=
"运行中"
;
string
aa
=
""
;
...
...
@@ -286,16 +286,17 @@ namespace OnlineStore.DeviceLibrary
break
;
}
if
(
runStatus
>
LineRunStatus
.
Wait
)
{
{
if
(
isInSuddenDown
)
{
aa
=
"急停中"
;
}
else
if
(
isNoAirCheck
)
}
else
if
(
isNoAirCheck
)
{
aa
=
"无气压信号"
;
}
}
if
(!
aa
.
Equals
(
""
))
{
return
sta
+
"_"
+
aa
;
...
...
@@ -305,7 +306,7 @@ namespace OnlineStore.DeviceLibrary
return
sta
;
}
}
public
static
string
GetRunStr
(
LineRunStatus
runs
,
LineStatus
ls
=
LineStatus
.
None
)
public
static
string
GetRunStr
(
LineRunStatus
runs
,
LineStatus
ls
=
LineStatus
.
None
)
{
string
sta
=
"运行中"
;
string
aa
=
""
;
...
...
@@ -327,7 +328,7 @@ namespace OnlineStore.DeviceLibrary
sta
=
"等待启动"
;
break
;
}
if
(
runs
>
LineRunStatus
.
Wait
&&
ls
>
LineStatus
.
None
)
if
(
runs
>
LineRunStatus
.
Wait
&&
ls
>
LineStatus
.
None
)
{
//"0":"急停中", "1":"设备联机", "2":"故障中", "3":"入库执行中", "4":"出库执行中", 5":"料盘入仓位完成", "6":"料盘出仓位完成", 7":"设备调试中",
switch
(
ls
)
...
...
@@ -367,7 +368,7 @@ namespace OnlineStore.DeviceLibrary
// break;
}
}
if
(!
aa
.
Equals
(
""
))
{
return
sta
+
"_"
+
aa
;
...
...
@@ -385,13 +386,14 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
if
(
IOManager
.
DIValue
(
IoLowType
,
DeviceID
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
DIValue
(
IoHighType
,
DeviceID
).
Equals
(
IO_VALUE
.
HIGH
)){
if
(
IOManager
.
DIValue
(
IoLowType
,
DeviceID
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
DIValue
(
IoHighType
,
DeviceID
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
true
;
}
return
false
;
}
public
void
CylinderMove
(
LineMoveInfo
moveInfo
,
string
IoLowType
,
string
IoHighType
,
bool
isCheckMove
=
false
)
{
{
try
{
if
(
baseConfig
.
DType
.
Equals
(
DeviceType
.
HYEquip
))
...
...
@@ -473,11 +475,12 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IoLowType
,
IO_VALUE
.
LOW
);
IOMove
(
IoHighType
,
IO_VALUE
.
HIGH
);
}
}
catch
(
Exception
ex
)
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"CylinderMove ["
+
moveInfo
.
Name
+
"] ["
+
IoLowType
+
"] ["
+
IoHighType
+
"] ["
+
isCheckMove
+
"] 出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
Name
+
"CylinderMove ["
+
moveInfo
.
Name
+
"] ["
+
IoLowType
+
"] ["
+
IoHighType
+
"] ["
+
isCheckMove
+
"] 出错:"
+
ex
.
ToString
());
}
}
public
void
CheckAndMove
(
string
IoType
,
IO_VALUE
value
)
{
...
...
@@ -487,7 +490,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
void
IOMove
(
string
IoType
,
IO_VALUE
value
,
int
msTime
=
0
)
{
{
if
(
msTime
<=
0
)
{
IOManager
.
IOMove
(
IoType
,
value
,
baseConfig
.
Id
);
...
...
@@ -558,6 +561,159 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
private
WarnParam
warnParam
=
new
WarnParam
();
/// <summary>
/// 设置报警消息,报警类型,清除报警时记录日志
/// </summary>
/// <param name="msg"></param>
/// <param name="logtype"></param>
/// <param name="logseconds"></param>
public
void
SetWarnMsg
(
string
msg
=
""
,
string
alarmType
=
""
,
LineMoveInfo
moveInfo
=
null
,
int
logseconds
=
10
)
{
try
{
int
logtype
=
801
;
if
(
moveInfo
!=
null
)
{
logtype
=
DeviceID
*
10000
+
(
int
)
moveInfo
.
MoveStep
;
}
if
(
String
.
IsNullOrEmpty
(
msg
).
Equals
(
false
))
{
if
(
WarnMsg
.
Equals
(
msg
)
||
warnParam
.
AlarmType
.
Equals
(
alarmType
))
{
if
(
msg
.
StartsWith
(
Name
))
{
LogUtil
.
error
(
msg
,
logtype
,
logseconds
);
}
else
{
LogUtil
.
error
(
Name
+
msg
,
logtype
,
logseconds
);
}
}
else
{
if
(
msg
.
StartsWith
(
Name
))
{
LogUtil
.
error
(
msg
);
}
else
{
LogUtil
.
error
(
Name
+
msg
);
}
}
}
if
(!
warnParam
.
AlarmType
.
Equals
(
alarmType
))
{
//报警类型不一致,若之前不是空,记录日志
if
(!
String
.
IsNullOrEmpty
(
warnParam
.
AlarmType
))
{
RunLogUtil
.
ErrorLog
(
new
ErrorLog
(
Name
,
warnParam
.
AlarmType
,
WarnMsg
,
warnParam
.
StartTime
,
DateTime
.
Now
,
warnParam
.
OperteType
,
warnParam
.
PosId
,
warnParam
.
Barcode
));
}
//更新开始时间
warnParam
.
StartTime
=
DateTime
.
Now
;
if
(
moveInfo
!=
null
)
{
warnParam
.
PosId
=
moveInfo
.
MoveParam
?.
PosId
;
warnParam
.
Barcode
=
moveInfo
.
MoveParam
?.
WareCode
;
warnParam
.
OperteType
=
moveInfo
.
GetMoveType
();
}
else
{
warnParam
.
PosId
=
""
;
warnParam
.
Barcode
=
""
;
warnParam
.
OperteType
=
""
;
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"SetWarnMsg Error: "
+
ex
.
ToString
());
}
WarnMsg
=
msg
;
warnParam
.
AlarmType
=
alarmType
;
}
protected
void
MoveTimeoutAlarm
(
LineMoveInfo
move
,
string
alarmType
)
{
try
{
SetWarnMsg
(
move
.
Name
+
"["
+
move
.
GetMoveType
()
+
"]["
+
move
.
SLog
+
"] "
+
alarmType
+
" ["
+
FormUtil
.
GetSpanStr
(
move
.
StepSpan
())
+
"]"
,
alarmType
,
move
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
catch
(
Exception
ex
)
{
}
}
protected
void
ClearTimeoutAlarm
(
string
msg
)
{
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
;
}
if
(
WarnMsg
.
Contains
(
msg
)
&&
alarmType
.
Equals
(
LineAlarmType
.
IoSingleTimeOut
))
{
LogUtil
.
info
(
Name
+
"清理信号超时报警【"
+
WarnMsg
+
"】 "
);
alarmType
=
LineAlarmType
.
None
;
SetWarnMsg
(
""
);
}
}
protected
void
ClearStepAlarm
(
string
stepDes
)
{
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
;
}
if
(
String
.
IsNullOrEmpty
(
WarnMsg
).
Equals
(
false
)
&&
String
.
IsNullOrEmpty
(
warnParam
.
AlarmType
).
Equals
(
false
))
{
if
(
alarmType
.
Equals
(
LineAlarmType
.
IoSingleTimeOut
))
{
string
alarmTypeStr
=
stepDes
+
"_超时报警"
;
if
(
warnParam
.
AlarmType
.
Equals
(
alarmTypeStr
))
{
LogUtil
.
info
(
Name
+
$
"步骤{stepDes}结束,清理【{ WarnMsg }】 "
);
alarmType
=
LineAlarmType
.
None
;
SetWarnMsg
(
""
);
}
}
else
if
(
alarmType
.
Equals
(
LineAlarmType
.
AxisMoveError
))
{
string
alarmTypeStr
=
stepDes
+
"_轴运动报警"
;
if
(
warnParam
.
AlarmType
.
Equals
(
alarmTypeStr
))
{
LogUtil
.
info
(
Name
+
$
"步骤{stepDes}结束,清理【{ WarnMsg }】 "
);
alarmType
=
LineAlarmType
.
None
;
SetWarnMsg
(
""
);
}
}
}
}
}
public
class
WarnParam
{
public
WarnParam
()
{
}
public
WarnParam
(
string
alarmType
,
DateTime
startTime
,
string
operType
,
string
posId
,
string
barcode
)
{
this
.
AlarmType
=
alarmType
;
this
.
StartTime
=
startTime
;
this
.
OperteType
=
operType
;
this
.
PosId
=
posId
;
this
.
Barcode
=
barcode
;
}
public
string
AlarmType
=
""
;
public
DateTime
StartTime
=
DateTime
.
Now
;
public
string
OperteType
=
""
;
public
string
PosId
=
""
;
public
string
Barcode
=
""
;
}
}
source/DeviceLibrary/model/LineMoveInfo.cs
查看文件 @
c740162
...
...
@@ -34,6 +34,8 @@ namespace OnlineStore.DeviceLibrary
public
int
MoveNum
{
get
;
set
;
}
public
DateTime
MoveStartTime
{
get
;
set
;
}
public
DateTime
LastSetpTime
{
get
;
set
;
}
/// <summary>
...
...
@@ -106,6 +108,7 @@ namespace OnlineStore.DeviceLibrary
}
public
void
NextMoveStep
(
LineMoveStep
step
)
{
StepMoveLog
();
PreMoveStep
=
moveStep
;
moveStep
=
step
;
LastSetpTime
=
DateTime
.
Now
;
...
...
@@ -131,7 +134,8 @@ namespace OnlineStore.DeviceLibrary
LastSetpTime
=
DateTime
.
Now
;
WaitList
=
new
List
<
WaitResultInfo
>();
WriteIoList
=
new
List
<
WriteIOInfo
>();
MoveNum
++;
MoveNum
++;
MoveStartTime
=
DateTime
.
Now
;
}
public
void
NewMove
(
LineMoveType
type
,
InOutParam
param
)
{
...
...
@@ -141,9 +145,11 @@ namespace OnlineStore.DeviceLibrary
LastSetpTime
=
DateTime
.
Now
;
WaitList
=
new
List
<
WaitResultInfo
>();
WriteIoList
=
new
List
<
WriteIOInfo
>();
MoveStartTime
=
DateTime
.
Now
;
}
public
void
EndMove
()
{
StepMoveLog
();
this
.
moveType
=
LineMoveType
.
None
;
this
.
MoveParam
=
null
;
moveStep
=
LineMoveStep
.
Wait
;
...
...
@@ -174,6 +180,64 @@ namespace OnlineStore.DeviceLibrary
string
str
=
$
"[{MoveType}][{MoveStep}]{ MoveParam?.ToStr()}"
;
return
str
;
}
public
string
GetStepDes
()
{
string
currName
=
moveStep
.
ToString
();
try
{
if
(
LineManager
.
StepDesMap
.
ContainsKey
(
currName
))
{
string
v
=
LineManager
.
StepDesMap
[
currName
];
if
(
String
.
IsNullOrEmpty
(
v
))
{
return
currName
;
}
else
{
return
v
;
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"GetStepDes 出错:"
+
ex
.
ToString
());
}
return
currName
;
}
public
string
GetMoveType
()
{
switch
(
moveType
)
{
case
LineMoveType
.
Fixture
:
return
"托盘处理"
;
break
;
case
LineMoveType
.
InStore
:
return
"入料"
;
break
;
case
LineMoveType
.
OutStore
:
return
"出料"
;
break
;
case
LineMoveType
.
Reset
:
return
"复位"
;
break
;
case
LineMoveType
.
RHome
:
return
"回原"
;
break
;
}
return
""
;
}
private
void
StepMoveLog
()
{
try
{
RunLogUtil
.
MoveLog
(
new
MoveLog
(
Name
,
GetMoveType
(),
GetStepDes
(),
LastSetpTime
,
DateTime
.
Now
,
MoveParam
.
PosId
,
MoveParam
.
WareCode
));
}
catch
(
Exception
ex
)
{
}
}
}
public
class
WriteIOInfo
{
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
c740162
...
...
@@ -4,6 +4,7 @@ using OnlineStore.DeviceLibrary;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Drawing
;
using
System.IO
;
using
System.IO.Ports
;
...
...
@@ -14,7 +15,26 @@ using System.Windows.Forms;
namespace
OnlineStore.DeviceLibrary
{
public
static
class
EnumDesHelper
{
public
static
string
GetStepDes
(
this
Enum
val
)
{
var
type
=
val
.
GetType
();
var
memberInfo
=
type
.
GetMember
(
val
.
ToString
());
var
attributes
=
memberInfo
[
0
].
GetCustomAttributes
(
typeof
(
DescriptionAttribute
),
false
);
if
(
attributes
==
null
||
attributes
.
Length
!=
1
)
{
//如果没有定义描述,就把当前枚举值的对应名称返回
return
val
.
ToString
();
}
return
(
attributes
.
Single
()
as
DescriptionAttribute
).
Description
;
}
}
/// <summary>
///0= 等待启动/已经停止,1=初始化完成, 2=正常运行中,3=可以进行新的处理,4=忙碌,重置
/// </summary>
...
...
@@ -108,27 +128,32 @@ namespace OnlineStore.DeviceLibrary
}
public
enum
LineMoveStep
{
{
[
Description
(
"等待开始"
)]
Wait
=
0
,
#
region
移栽装置原点返回和重置步骤
1000
开始
/// <summary>
/// 上下气缸回原点
/// </summary>
[
Description
(
"复位_升降轴原点返回"
)]
MH_01_UpDownHome
=
1001
,
/// <summary>
/// 料仓移栽装置,上下气缸上升端
/// </summary>
[
Description
(
"复位_上下气缸到待机点"
)]
MH_02_CylinderUp
,
/// <summary>
/// 料仓移载装置,其他气缸运行到初始状态( 顶升气缸下降端,前后气缸后退端,夹料气缸放松端,阻挡气缸输入=0 )
/// </summary>
[
Description
(
"复位_其他气缸复位,顶升气缸下降,前后气缸后退,夹料气缸放松"
)]
MH_03_OtherBack
,
/// <summary>
/// 料仓移载装置,等待夹爪气缸料盘检测无料
/// </summary>
[
Description
(
"复位_等待夹爪无料"
)]
MH_04_ClampCheck
,
#
endregion
...
...
@@ -138,82 +163,97 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
///移载装置入库处理,顶升气缸先上升
/// </summary>
[
Description
(
"入库_取料前_升降气缸上升"
)]
MI_01_UpdownUp
=
1101
,
/// <summary>
///移载装置入库处理,横移气缸到流水线上方
/// </summary>
[
Description
(
"入库_横移气缸到流水线上方"
)]
MI_02_ToLineUp
,
/// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降
/// </summary>
[
Description
(
"入库_取料前_升降气缸下降,顶升气缸上升"
)]
MI_03_CylinderDown
,
/// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降后,等待0.3秒,防止没有 下降到位就夹紧
/// </summary>
[
Description
(
"入库_取料_等待200ms后夹紧"
)]
MI_04_DownWait
,
/// <summary>
///移载装置入库处理,夹料气缸1夹紧
/// </summary>
[
Description
(
"入库_取料_夹料气缸夹紧"
)]
MI_05_CylinderOpen
,
/// <summary>
///移载装置入库处理,上下气缸1上升
/// </summary>
[
Description
(
"入库_取料完成_升降气缸上升"
)]
MI_06_CylinderUp
,
/// <summary>
/// 移载装置入库处理,检测夹爪料盘检测信号
/// </summary>
[
Description
(
"入库_取料完成_等待夹爪有料"
)]
MI_07_ClampCheck
,
/// <summary>
///移载装置入库处理,,前后气缸1前进
/// </summary>
[
Description
(
"入库_取料完成_前后气缸前进"
)]
MI_08_CylinderBefore
,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
/// </summary>
[
Description
(
"入库_取料完成_等待box可入库"
)]
MI_10_WaitBox
,
/// <summary>
///移载装置入库处理,上下气缸1下降
/// </summary>
[
Description
(
"入库_取料完成_升降气缸下降"
)]
MI_11_CylinderDown
=
1111
,
/// <summary>
///移载装置入库处理,,夹料气缸1放松
/// </summary>
[
Description
(
"入库_放料_夹料气缸放松"
)]
MI_12_CylinderRelax
,
/// <summary>
///移载装置入库处理,上下气缸1上升
/// </summary>
[
Description
(
"入库_放料完成_升降气缸上升"
)]
MI_13_UpdownCylinderUp
,
/// <summary>
///移载装置入库处理,,前后气缸1后退
/// </summary>
[
Description
(
"入库_放料完成_前后气缸后退"
)]
MI_14_CylinderAfter
,
/// <summary>
///移载装置入库处理,,前后气缸已后退,通知料仓入库
/// </summary>
[
Description
(
"入库_放料完成_通知料仓入库"
)]
MI_15_SendPosToStore
,
/// <summary>
///移载装置入库处理,检测到X102-1=1送料流程完成
/// </summary>
[
Description
(
"入库_放料完成"
)]
MI_16_SendEnd
,
/// <summary>
///移载装置入库处理,编码不一致,顶升气缸1下降
/// </summary>
MI_20_TopDown
,
/// <summary>
///移载装置入库处理,阻挡气缸1-2下降
/// </summary>
MI_21_StopDown
,
/// <summary>
///移载装置入库处理,检测Check4=0,
/// </summary>
MI_22_FixtureCheck_Low
,
/// <summary>
///移载装置入库处理,,,阻挡气缸1-2 上升,等待200毫秒
/// </summary>
MI_23_StopCylinderReset
,
///
//
<summary>
///
//
移载装置入库处理,编码不一致,顶升气缸1下降
///
//
</summary>
//
MI_20_TopDown,
///
//
<summary>
///
//
移载装置入库处理,阻挡气缸1-2下降
///
//
</summary>
//
MI_21_StopDown,
///
//
<summary>
///
//
移载装置入库处理,检测Check4=0,
///
//
</summary>
//
MI_22_FixtureCheck_Low,
///
//
<summary>
///
//
移载装置入库处理,,,阻挡气缸1-2 上升,等待200毫秒
///
//
</summary>
//
MI_23_StopCylinderReset,
#
endregion
...
...
@@ -221,31 +261,38 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
///移载(流水线)装置出入库处理,阻挡气缸1-1下降
/// </summary>
[
Description
(
"托盘处理_前阻挡检测到托盘,前阻挡下降"
)]
MIO_00_Stop1Down
=
1180
,
/// <summary>
///移载(流水线)装置出入库处理,夹具检测1-4=1
/// </summary>
[
Description
(
"托盘处理_等待托盘检测信号亮"
)]
MIO_01_TrayCheck
,
/// <summary>
/// 移载(流水线)装置出入库处理,等待夹具持续500毫秒
/// </summary>
[
Description
(
"托盘处理_再次等待托盘检测信号亮"
)]
MIO_02_TrayCheck2
,
/// <summary>
///移载(流水线)装置出入库处理,阻挡气缸1-1上升
/// </summary>
[
Description
(
"托盘处理_托盘检测信号亮,前阻挡上升,后阻挡下降"
)]
MIO_03_StopUp
,
/// <summary>
/// 检测夹具检测IO1=1
/// </summary>
[
Description
(
"托盘处理_等待托盘检测信号稳定"
)]
MIO_04_Wait
,
/// <summary>
/// 等待一秒钟
/// </summary>
[
Description
(
"托盘处理_托盘需要出入库,等待顶升气缸上升"
)]
MIO_05_WaitTime
,
/// <summary>
///移载(流水线)装置出入库处理,顶 升气缸上升
/// </summary>
[
Description
(
"托盘处理_顶升气缸上升"
)]
MIO_06_TopUp
,
///// <summary>
///// 移载(流水线)装置出入库处理,定位气缸上升
...
...
@@ -254,10 +301,12 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 等待StoreMove完成当前操作开始入库
/// </summary>
[
Description
(
"托盘处理_等待开始入库"
)]
MIO_08_WaitInStore
,
/// <summary>
/// 等待StoreMove移走料盘开始放托盘通过
/// </summary>
[
Description
(
"托盘处理_开始出入库,等待移栽拿走料盘"
)]
MIO_09_WaitTrayCanGo
,
#
endregion
...
...
@@ -266,143 +315,171 @@ namespace OnlineStore.DeviceLibrary
/// 移载(流水线)装置出库处理, 检测夹具编码并记忆,托盘 是空盘,并且BOX在出库等待中,开始移栽料盘
/// 上料模块横移,空托盘已准备好,可以放料
/// </summary>
[
Description
(
"托盘出库_等待移栽拿走料盘"
)]
MO_11_CodeRember
=
1201
,
/// <summary>
/// 移栽处理已完成,开始扫码或继续托盘处理流程
/// </summary>
[
Description
(
"托盘处理_取放料完成,托盘可离开"
)]
MO_12_MoveOk
,
/// <summary>
/// 移载(流水线)定位气缸下降
/// </summary>
[
Description
(
"托盘离开_定位气缸下降"
)]
MO_13_LoactionDown
,
/// <summary>
/// 移载(流水线)装置出库处理 ,顶升气缸1下降
/// </summary>
[
Description
(
"托盘离开_顶升气缸下降"
)]
MO_14_TopDown
,
/// <summary>
/// 如果是移栽2需要等待托盘是否可以走
/// </summary>
[
Description
(
"托盘离开_托盘可离开,等待阻挡下降放托盘离开"
)]
MO_15_WaitCanGo
,
/// <summary>
/// 移载(流水线)装置出库处理, 阻挡气缸1-2下降
/// </summary>
[
Description
(
"托盘离开_阻挡2下降"
)]
MO_16_Stop2Down
,
/// <summary>
/// 移载(流水线)装置出库处理, 阻挡2托盘检测=0,
/// </summary>
[
Description
(
"托盘离开_等待托盘检测信号消失"
)]
MO_17_Stop2Check
,
/// <summary>
/// 移载(流水线)装置出库处理, 延迟500ms后上升阻挡2
/// </summary>
[
Description
(
"托盘离开_等待300ms后阻挡2上升"
)]
MO_18_WaitTime
,
/// <summary>
/// 移载(流水线)装置出库处理, 阻挡气缸1-1下降 阻挡气缸1-2上升
/// </summary>
[
Description
(
"托盘离开_阻挡2上升"
)]
MO_19_StopUp
,
/// <summary>
/// 移栽装置出库处理,开始出库
/// </summary>
[
Description
(
"开始出库_升降气缸上升"
)]
MO_50_StartOutProcess
=
1250
,
/// <summary>
/// 移栽装置出库处理。。前后气缸1前进
/// </summary>
[
Description
(
"出库_取料前_前后气缸前进"
)]
MO_51_CylinderBefore
,
/// <summary>
/// 移栽装置出库处理。上下气缸1下降
/// </summary>
[
Description
(
"出库_取料前_升降气缸下降"
)]
MO_52_CylinderDown
,
/// <summary>
/// 移栽装置出库处理。上下气缸1下降后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作
/// </summary>
[
Description
(
"出库_取料前_等待200ms后夹紧"
)]
MO_53_DownWait
,
/// <summary>
/// 移栽装置出库处理。 夹料气缸1夹紧
/// </summary>
[
Description
(
"出库_取料_夹爪夹紧"
)]
MO_54_CylinderOpen
,
/// <summary>
/// 移栽装置出库处理。 上下气缸1上升
/// </summary>
[
Description
(
"出库_取料完成_升降气缸上升"
)]
MO_55_CylinderUp
,
/// <summary>
/// 移栽出库:开始重抓一次
/// </summary>
[
Description
(
"出库_第一次未检测到物料,准备重新抓料一次"
)]
MO_56_ResetClamp
,
/// <summary>
/// 移栽出库。 夹料气缸检测
/// </summary>
[
Description
(
"出库_取料完成_检测夹爪有料"
)]
MO_57_ClampCheck
,
/// <summary>
/// 移栽出库:开始等待托盘
/// </summary>
[
Description
(
"出库_取料完成_等待托盘到达"
)]
MO_58_WaitTray
,
/// <summary>
/// 移栽装置出库处理。 前后气缸1后退
/// </summary>
[
Description
(
"出库_取料完成_前后气缸后退"
)]
MO_59_CylinderAfter
,
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1下降
/// </summary>
[
Description
(
"出库_取料完成_升降气缸下降"
)]
MO_60_CylinderDown
,
/// <summary>
/// 移载(流水线)装置出库处理,夹料气缸1放松
/// </summary>
[
Description
(
"出库_放料_夹爪放松"
)]
MO_61_CylinderRelax
,
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1上升
/// </summary>
[
Description
(
"出库_放料完成_上下气缸上升,同时顶升气缸先下降"
)]
MO_62_CylinderUp
,
#
region
入料模块,紧急出料移栽处理
/// <summary>
/// 等待当前的出入库结束
/// </summary>
MO_200_WaitInoutParam
=
3200
,
/// <summary>
/// 等待紧急出料结束
/// </summary>
MO_201_WaitOutEnd
=
3201
,
//
#region 入料模块,紧急出料移栽处理
///
//
<summary>
///
//
等待当前的出入库结束
///
//
</summary>
//
MO_200_WaitInoutParam = 3200,
///
//
<summary>
///
//
等待紧急出料结束
///
//
</summary>
//
MO_201_WaitOutEnd = 3201,
#
endregion
//
#endregion
#
endregion
#
region
入料装置原点返回,
2001
开始
/// <summary>
/// 上料模块复位,所有阻挡先上升到位
/// </summary>
[
Description
(
"复位_所有阻挡上升"
)]
FR_01_StopUp
=
2001
,
/// <summary>
/// 复位之前,所有的链条先转动3秒钟
/// </summary>
[
Description
(
"复位_放料顶升下降, 所有阻挡上升,链条先转动3秒钟"
)]
FR_02_LineRun
,
/// <summary>
/// 上料模块复位:横移装置上升,
/// </summary>
[
Description
(
"复位_链条停止转动,上料横移机构上升,出口顶升下降,所有阻挡气缸上升"
)]
FR_03_CylinderUp
,
/// <summary>
/// 上料模块复位:升降伺服回原点
/// </summary>
[
Description
(
"复位_升降伺服回原点"
)]
FR_04_UpdownAxisHome
,
/// <summary>
///上料模块复位:上料气缸放松SOL,升降机构到待机点
/// </summary>
[
Description
(
"复位_上料气缸放松,升降机构到待机点"
)]
FR_05_UpdownAxis_P1
,
/// <summary>
///上料模块复位:上料横移气缸取料端SOL
/// </summary>
[
Description
(
"复位_上料横移气缸取料端"
)]
FR_06_CylinderGive
,
...
...
@@ -410,37 +487,45 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
///上料模块复位: 提升伺服回原点,夹紧装置放松
/// </summary>
[
Description
(
"复位_提升伺服回原点,夹紧装置放松"
)]
FR_11_BatchAxisHome
=
2011
,
/// <summary>
/// 上料模块复位:然后提升伺服下降到P2点
/// </summary>
[
Description
(
"复位_提升伺服下降到P2点"
)]
FR_12_BatchAxisToP2
,
/// <summary>
/// 上料模块复位:放开定位气缸
/// </summary>
[
Description
(
"复位_放开定位气缸"
)]
FR_13_LocationDown
,
/// <summary>
/// 上料模块复位:放开固定气缸,固定气缸上升
/// </summary>
[
Description
(
"复位_放开固定气缸"
)]
FR_14_FixedUp
,
/// <summary>
///上料模块复位: 顶升气缸下降
/// </summary>
FR_15_TopDown
,
[
Description
(
"复位_顶升气缸下降"
)]
FR_15_TopDown
,
/// <summary>
/// 上料模块复位:RFID读取到料架,检测定位工位信号
/// </summary>
[
Description
(
"复位_RFID读取到料架,检测定位工位信号"
)]
FR_16_WaitLocationCheck
,
/// <summary>
/// 上料模块复位:提升伺服
在
上升到P1点
/// 上料模块复位:提升伺服上升到P1点
/// </summary>
[
Description
(
"复位_提升伺服上升到P1点"
)]
FR_17_BatchAxisToP1
,
/// <summary>
/// 上料模块复位:检测夹爪料盘检测信号无料
/// </summary>
[
Description
(
"复位_检测夹爪料盘检测信号无料"
)]
FR_18_ClampCheck
,
#
endregion
...
...
@@ -478,376 +563,459 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 提升轴先返回P2
/// </summary>
[
Description
(
"入料_提升轴返回P2"
)]
FI_01_BatchAxisToP2
=
2101
,
/// <summary>
/// 入料流程:升降盘定位气缸后退
/// </summary>
[
Description
(
"入料_升降盘定位气缸后退"
)]
FI_02_TrayLocation_After
,
/// <summary>
/// 入料流程:固定气缸上升
/// </summary>
[
Description
(
"入料_固定气缸上升"
)]
FI_03_FixedUp
,
/// <summary>
/// 入料流程:定位气缸下降
/// </summary>
[
Description
(
"入料_定位气缸下降"
)]
FI_04_LocationDown
,
/// <summary>
/// 入口流水线转动,等待入料检测信号消失
/// </summary>
[
Description
(
"入料_阻挡工位或进料口有新料架,相关阻挡上升,流水线转动1000"
)]
FI_05_LineStart
,
/// <summary>
/// 入口流水线转动,等待定位工位信号稳定1秒
/// </summary>
[
Description
(
"入料_定位工位有料架,进料阻挡上升,缓冲阻挡上升, 等待3秒再次检测"
)]
FI_06_WaitTime
,
/// <summary>
///入料检测: 工位检测信号,定位气缸上升
/// </summary>
[
Description
(
"入料_工位检测信号,缓冲阻挡上升, 定位气缸上升,读取并缓存料架RFID"
)]
FI_07_LocationUp
,
/// <summary>
///入料检测: 固定气缸下降
/// </summary>
[
Description
(
"入料_固定气缸下降"
)]
FI_08_FixedDown
,
/// <summary>
/// 入料检测:提升轴下降到位P2
/// </summary>
[
Description
(
"入料_提升轴下降到位P2,定位气缸上升"
)]
FI_11_BatchAxisToP2
,
/// <summary>
/// 入料检测:升降盘定位气缸第一次前进
/// </summary>
[
Description
(
"入料_升降盘定位气缸第一次前进 2秒,清空条码信息"
)]
FI_12_TrayLocation_Before
,
/// <summary>
/// 入料检测:升降盘定位气缸第一次后退
/// </summary>
[
Description
(
"入料_升降盘定位气缸后退,等待再次前进"
)]
FI_13_TrayLocation_Back
,
/// <summary>
/// 入料检测:升降盘定位气缸前进
/// </summary>
[
Description
(
"入料_升降盘定位气缸前进,清空条码信息"
)]
FI_14_TrayLocation_Before
,
/// <summary>
/// 入料检测:上料轴开始慢速上升到P3点,等待检测到料盘
/// </summary>
[
Description
(
"入料_上料轴开始慢速上升到P3点,等待检测到料盘"
)]
FI_15_AxisUpMove
,
/// <summary>
/// 入料取料:横移机构先上升
/// </summary>
[
Description
(
"入料_上料机构检测到料盘,横移机构上升"
)]
FI_16_CylinderUp
,
/// <summary>
/// 入料取料:上料机构到放料端
/// </summary>
[
Description
(
"入料_上料机构检测到料盘,横移机构到放料端"
)]
FI_17_CylinderGive
,
/// <summary>
/// 入料检测到料盘:扫码
/// </summary>
[
Description
(
"入料_开始扫码"
)]
FI_18_ScanCode
,
/// <summary>
/// 料盘移栽:有料盘:上料横移机构取料
/// </summary>
[
Description
(
"入料_取料_上料横移取料端"
)]
FI_21_CylinderTake
,
/// <summary>
/// 料盘移栽:升降轴到P3
/// </summary>
[
Description
(
"入料_取料_升降轴到P3"
)]
FI_22_UpdownToP3
,
/// <summary>
/// 料盘移栽:上料横移机构夹紧
/// </summary>
[
Description
(
"入料_取料_上料横移机构夹紧"
)]
FI_23_CylinderTighten
,
/// <summary>
/// 料盘移栽:升降伺服到P1点
/// </summary>
[
Description
(
"入料_取料完成_升降伺服到P1点"
)]
FI_24_UpdownToP1
,
/// <summary>
/// 料盘移栽:等待没有伺服料盘检测信号,等待检测到料盘
/// </summary>
[
Description
(
"入料_取料完成_等待伺服检测信号消失"
)]
FI_25_CheckTray
,
/// <summary>
/// 料盘移栽:批量轴到P3点
/// </summary>
[
Description
(
"入料_取料完成_提升伺服运动到P3,横移气缸上升"
)]
FI_26_BatchAxisToP3
,
/// <summary>
/// 料盘移栽: 上料横移气缸放料SOL
/// </summary>
[
Description
(
"入料_上料横移气缸到放料端"
)]
FI_27_CylinderGive
,
/// <summary>
/// 料盘移栽:记录高度尺寸
/// </summary>
[
Description
(
"入料_取料完成_记录高度尺寸"
)]
FI_28_SaveSize
,
/// <summary>
/// 提升轴下降到料盘不溢出的位置
/// </summary>
[
Description
(
"入料_取料完成_提升轴下降到料盘不溢出的位置,移栽伺服下降到P2"
)]
FI_29_BatchAxisDown
,
/// <summary>
/// 料盘移栽:从服务器获取入库库位号
/// </summary>
[
Description
(
"入料_取料完成_从服务器获取入库库位号"
)]
FI_31_GetPosID
,
/// <summary>
/// 料盘移栽:此料盘是出库料盘,获取出库信息
/// </summary>
[
Description
(
"入料_取料完成_此料盘是出库料盘,获取出库信息"
)]
FI_32_GetReelInfo
,
/// <summary>
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
/// </summary>
[
Description
(
"入料_取料完成_开始拦截空托盘"
)]
FI_32_WaitTray
,
/// <summary>
/// 料盘移栽: 上料机构下降
/// </summary>
[
Description
(
"入料_放料_上料机构下降"
)]
FI_33_CylinderDown
,
/// <summary>
/// 料盘移栽: 上料气缸放松
/// </summary>
[
Description
(
"入料_放料_上料气缸放松"
)]
FI_34_CylinderRelax
,
/// <summary>
/// 料盘移栽: 升降伺服到P1点
/// </summary>
[
Description
(
"入料_放料完成_升降轴到P1点"
)]
FI_35_AxisToP1
,
/// <summary>
/// 料盘移栽:检测夹爪无料
/// </summary>
[
Description
(
"入料_放料完成_检测夹爪无料"
)]
FI_36_ClampCheck
,
/// <summary>
/// 料盘移栽: 放托盘离开
/// </summary>
[
Description
(
"入料_放料完成_放托盘离开"
)]
FI_37_TrayMoveOk
,
/// <summary>
/// 上料完成,未检测到料盘,提升伺服到P2点
/// </summary>
[
Description
(
"入料_送料串离开_未检测到料盘,提升伺服到P2点"
)]
FI_51_BatchAxisToP2
=
2151
,
/// <summary>
/// 上料完成,升降盘定位气缸后退
/// </summary>
[
Description
(
"入料_料串离开_升降盘定位气缸后退"
)]
FI_52_TrayLocation_After
,
/// <summary>
/// 上料完成,提升伺服到P1点,定位气缸下降
/// </summary>
[
Description
(
"入料_料串离开_提升伺服到P1点,定位气缸下降"
)]
FI_53_BatchAxisToP1
,
/// <summary>
/// 上料完成,放开固定气缸,固定气缸上升
/// </summary>
[
Description
(
"入料_料串离开_固定气缸上升"
)]
FI_54_FixedUp
,
/// <summary>
/// 上料完成,等待出料线体无料架
/// </summary>
[
Description
(
"入料_料串离开_等待出料线体无料架"
)]
FI_55_OutCheck
,
/// <summary>
/// 上料完成,顶升气缸上升
/// </summary>
[
Description
(
"入料_料串离开_顶升气缸上升"
)]
FI_56_TopUp
,
/// <summary>
///上料完成, 线体横移电机运转,等待料架到达出口
/// </summary>
[
Description
(
"入料_料串离开_线体横移电机运转,等待料架到达出口"
)]
FI_57_SideWayLineRun
,
/// <summary>
///上料完成,等待料架到达出口
/// </summary>
[
Description
(
"入料_料串离开_等待料架到达出口"
)]
FI_58_WaitShelfGo
,
/// <summary>
/// 到达出口后再转动3秒
/// </summary>
[
Description
(
"入料_料串离开_到达出口后再转动3秒"
)]
FI_59_WaitTime
,
/// <summary>
///上料完成, 料架到达出口,线体横移电机停止
/// </summary>
[
Description
(
"入料_料串离开_料架到达出口,线体横移电机停止"
)]
FI_60_LineStop
,
/// <summary>
///上料完成, 料架到达出口,顶升气缸下降,定位气缸下降,
/// </summary>
[
Description
(
"入料_料串离开_料架到达出口,顶升气缸下降,定位气缸下降"
)]
FI_61_TopDown
,
/// <summary>
///上料完成, 出口线体运转,料架到达出口处, 通知AGV取空料架
/// </summary>
[
Description
(
"入料_料串离开_出口线体运转,料架到达出口处, 通知AGV取空料架"
)]
FI_62_OutLineRun
,
#
endregion
#
region
入料装置出料处理,
2201
开始
/// <summary>
/// 出库流程:提升伺服到P2
/// </summary>
[
Description
(
"出料_料串准备_提升伺服到P2"
)]
FO_01_BatchAxisToP2
=
2201
,
/// <summary>
/// 出料流程:升降盘定位气缸后退
/// </summary>
[
Description
(
"出料_料串准备_升降盘定位气缸后退"
)]
FO_02_TrayLocation_After
,
/// 出料流程:放开固定气缸,固定气缸上升
/// </summary>
[
Description
(
"出料_料串准备_固定气缸上升"
)]
FO_03_FixedUp
,
/// <summary>
/// 出料流程:定位气缸下降
/// </summary>
[
Description
(
"出料_料串准备_定位气缸下降"
)]
FO_04_LocationDown
,
/// <summary>
/// 入口流水线转动,等待出料检测信号消失
/// </summary>
[
Description
(
"出料_料串准备_阻挡工位或进料口有料串,相关阻挡上升,流水线转动"
)]
FO_05_LineStart
,
/// <summary>
/// 定位工位检测到料架,等待1秒钟后重新检测
/// </summary>
[
Description
(
"出料_料串准备_定位工位检测到料架:进料阻挡上升, 等待3秒再次检测"
)]
FO_06_WaitTime
,
/// <summary>
///出料检测: 工位检测信号,定位气缸上升
/// </summary>
[
Description
(
"出料_料串准备_缓冲阻挡下降, 定位气缸上升,读取并缓存料架RFID"
)]
FO_07_LocationUp
,
/// <summary>
///出料检测: 固定气缸下降
/// </summary>
[
Description
(
"出料_料串准备_固定气缸下降"
)]
FO_08_FixedDown
,
/// <summary>
/// 出料检测:提升轴下降到位P2
/// </summary>
[
Description
(
"出料_料串准备_提升轴下降到位P2,定位气缸上升"
)]
FO_11_BatchAxisToP2
,
/// <summary>
/// 出料检测:升降盘定位气缸第一次前进
/// </summary>
[
Description
(
"出料_料串准备_升降盘定位气缸第一次前进 2秒"
)]
FO_12_TrayLocation_Before
,
/// <summary>
/// 出料检测:升降盘定位气缸第一次后退
/// </summary>
[
Description
(
"出料_料串准备_升降盘定位气缸后退,等待再次前进"
)]
FO_13_TrayLocation_Back
,
/// <summary>
/// 出料检测:升降盘定位气缸前进
/// </summary>
[
Description
(
"出料_料串准备_升降盘定位气缸前进"
)]
FO_14_TrayLocation_Before
,
/// <summary>
/// 出料检测:上料轴开始慢速上升到P3点
/// </summary>
[
Description
(
"出料_料串准备_上料轴开始慢速上升到P3点,等待检测到料盘"
)]
FO_15_AxisUpMove
,
/// <summary>
/// 紧急出料移栽:上料轴下降指定的高度,同时升降轴回待机点
/// </summary>
[
Description
(
"出料_上料轴下降指定的高度"
)]
FO_21_AxisDownMove
=
2221
,
/// <summary>
/// 紧急出料移栽:上料横移机构取料端
/// /// </summary>
[
Description
(
"出料_取料_上料横移机构到取料端"
)]
FO_22_CylinderTake
,
/// <summary>
/// 紧急出料移栽:升降伺服下降到P2
/// /// </summary>
[
Description
(
"出料_取料_升降伺服下降到P2"
)]
FO_23_UpdownAxisToP2
,
/// <summary>
/// 紧急出料移栽:上料横移机构下降
/// /// </summary>
[
Description
(
"出料_取料_上料横移机构下降"
)]
FO_24_CylinderDown
,
/// <summary>
/// 紧急出料移栽:上料气缸夹紧
/// /// </summary>
[
Description
(
"出料_取料_上料气缸夹紧"
)]
FO_25_CylinderTighten
,
/// <summary>
/// 紧急出料移栽:升降伺服到P1
/// /// </summary>
[
Description
(
"出料_取料完成_升降伺服到P1"
)]
FO_26_UpdownAxisToP1
,
/// <summary>
/// 紧急出料移栽:检测夹爪料盘检测是否有料
/// /// </summary>
[
Description
(
"出料_取料完成_等待夹爪有料"
)]
FO_27_ClampCheck
,
/// <summary>
/// 紧急出料移栽:上料横移机构到放料端
/// /// </summary>
[
Description
(
"出料_放料_上料横移机构到放料端"
)]
FO_28_CylinderGive
,
/// <summary>
/// 紧急出料移栽:升降伺服到P3
/// </summary>
[
Description
(
"出料_放料_升降伺服到P3"
)]
FO_29_UpdownAxisToP3
,
/// <summary>
/// 紧急出料移栽:出料横移机构放松
/// </summary>
[
Description
(
"出料_放料_出料横移机构放松"
)]
FO_30_CylinderSlack
,
/// <summary>
/// 紧急出料移栽:升降伺服回P1
/// </summary>
[
Description
(
"出料_放料完成_升降伺服回P1"
)]
FO_31_UpdownAxisToP1
,
/// <summary>
/// 紧急出料移栽:检测夹爪料盘检测信号无料
/// </summary>
[
Description
(
"出料_放料完成_检测夹爪料盘检测信号无料"
)]
FO_32_ClampCheck
,
/// <summary>
/// 紧急出料移栽:上料横移机构到取料端
/// </summary>
[
Description
(
"出料_放料完成_上料横移机构到取料端"
)]
FO_33_CylinderTake
,
/// <summary>
/// 出料完成,料盘已放入料架,提升伺服到P2点
/// </summary>
[
Description
(
"出料_料串离开_料盘已放入料架,提升伺服到P2点"
)]
FO_51_BatchAxisToP2
=
2251
,
/// <summary>
/// 出料完成,升降盘定位气缸后退
/// </summary>
[
Description
(
"出料_料串离开_升降盘定位气缸后退"
)]
FO_52_TrayLocation_After
,
/// <summary>
/// 出料完成,提升伺服到P1点,定位气缸下降
/// </summary>
[
Description
(
"出料_料串离开_提升伺服到P1点,定位气缸下降"
)]
FO_53_BatchAxisToP1
,
/// <summary>
/// 出料完成,放开固定气缸,固定气缸上升
/// </summary>
[
Description
(
"出料_料串离开_固定气缸上升"
)]
FO_54_FixedUp
,
/// <summary>
/// 出料完成,等待出料线体无料架
/// </summary>
[
Description
(
"出料_料串离开_等待出料线体无料架"
)]
FO_55_OutCheck
,
/// <summary>
/// 出料完成,顶升气缸上升
/// </summary>
[
Description
(
"出料_料串离开_顶升气缸上升"
)]
FO_56_TopUp
,
/// <summary>
///出料完成, 线体横移电机运转,等待料架到达出口
/// </summary>
[
Description
(
"出料_料串离开_线体横移电机运转,等待料架离开定位工位"
)]
FO_57_SideWayLineRun
,
/// <summary>
///出料完成, 等待料架离开定位工位
/// </summary>
[
Description
(
"出料_料串离开_线体横移电机运转,等待料架到达出口"
)]
FO_58_WaitShelfGo
,
/// <summary>
///出料完成, 再转动3秒后停止
///出料完成,
线体
再转动3秒后停止
/// </summary>
[
Description
(
"出料_料串离开_线体再转动3秒后停止"
)]
FO_59_WaitTime
,
/// <summary>
///出料完成, 料架到达出口,线体横移电机停止
/// </summary>
[
Description
(
"出料_料串离开_料架到达出口,线体横移电机停止"
)]
FO_60_LineStop
,
/// <summary>
///出料完成, 料架到达出口,顶升气缸下降,定位气缸下降,
/// </summary>
[
Description
(
"出料_料串离开_料架到达出口,出口顶升下降,清理缓存料架RFID"
)]
FO_61_TopDown
,
/// <summary>
///出料完成, 出口线体运转,料架到达出口处, 通知AGV取空料架
/// </summary>
[
Description
(
"出料_料串离开_出口线体运转,料架到达出口处, 通知AGV取空料架"
)]
FO_62_OutLineRun
,
#
endregion
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论