Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b7962bf7
由
LN
编写于
2020-11-12 11:17:54 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加出料线hy
1 个父辈
d91c1952
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
419 行增加
和
204 行删除
source/AssemblyLineClient/FrmFeedingEquip.cs
source/AssemblyLineClient/FrmHYEquip.cs
source/AssemblyLineClient/FrmMoveEquip.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.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/HY/HY_Coveryor.cs
source/DeviceLibrary/assemblyLine/HY/HY_OutLine.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/MoveEquip.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/model/KTK_Store.cs
source/DeviceLibrary/model/StoreStep.cs
source/DeviceLibrary/server/BoxInfo.cs
source/AssemblyLineClient/FrmFeedingEquip.cs
查看文件 @
b7962bf
...
...
@@ -113,8 +113,7 @@ namespace OnlineStore.AssemblyLine
}
if
(
chbAutoRead
.
Checked
&&
this
.
Visible
)
{
ReadIOList
();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
ReadIOList
();
}
lblName
.
BackColor
=
equipBean
.
GetShowColor
();
if
(
equipBean
.
runStatus
>
LineRunStatus
.
Wait
)
...
...
@@ -125,8 +124,7 @@ namespace OnlineStore.AssemblyLine
}
}
else
{
//lblName.BackColor= System.Drawing.Color.DodgerBlue;
{
if
(!
btnStart
.
Enabled
)
{
FormStatus
(
false
);
...
...
@@ -139,7 +137,7 @@ namespace OnlineStore.AssemblyLine
lblAgvInfo
.
Text
=
"AGV-"
+
equipBean
.
Config
.
AgvInName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvInName
).
ToString
()
+
"\t AGV-"
+
equipBean
.
Config
.
AgvOutName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvOutName
).
ToString
()
+
""
;
string
canOut
=
equipBean
.
Config
.
IsCanOut
.
Equals
(
1
)
?
"紧急出料模块"
:
"入料模块"
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
lineStatus
,
equipBean
.
runStatus
)
+
"("
+
canOut
+
")"
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
runStatus
)
+
"("
+
canOut
+
")"
;
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
string
text
=
""
;
List
<
InOutParam
>
ps
=
new
List
<
InOutParam
>(
equipBean
.
waitInStoreList
);
...
...
@@ -246,17 +244,13 @@ namespace OnlineStore.AssemblyLine
axisMoveControl1
.
LoadData
(
equipBean
,
new
AxisBean
[]
{
equipBean
.
UpdownAxis
,
equipBean
.
BatchAxis
});
cmbSizeList
.
Items
.
Clear
();
cmbSizeList
.
Items
.
Add
(
"0=默认位置"
);
//for (int i = 8; i <= 48; i = i + 4)
//{
// cmbSizeList.Items.Add(i.ToString());
//}
cmbSizeList
.
Items
.
Add
(
"0=默认位置"
);
foreach
(
int
heigth
in
LineManager
.
GetTrayList
())
{
cmbSizeList
.
Items
.
Add
(
heigth
);
}
cmbSizeList
.
SelectedIndex
=
0
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
lineStatus
,
equipBean
.
runStatus
);
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
runStatus
);
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
txtP1
.
Text
=
equipBean
.
Config
.
UpDownAxisP1
.
ToString
();
txtUpdownP3
.
Text
=
equipBean
.
Config
.
UpDownAxisP3
.
ToString
();
...
...
source/AssemblyLineClient/FrmHYEquip.cs
查看文件 @
b7962bf
...
...
@@ -52,7 +52,7 @@ namespace OnlineStore.AssemblyLine
LoadDP2
();
chbDebug
.
Checked
=
equipBean
.
IsDebug
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
lineStatus
,
equipBean
.
runStatus
);
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
runStatus
);
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
lblName
.
Text
=
equipBean
.
Name
;
this
.
Text
=
equipBean
.
Name
;
...
...
@@ -137,7 +137,7 @@ namespace OnlineStore.AssemblyLine
}
lblMoveInfo
.
Text
=
equipBean
.
GetMoveStr
();
// string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库":"不可出库" ;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
lineStatus
,
equipBean
.
runStatus
);
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
runStatus
);
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
}
...
...
source/AssemblyLineClient/FrmMoveEquip.cs
查看文件 @
b7962bf
...
...
@@ -53,7 +53,7 @@ namespace OnlineStore.AssemblyLine
cmbSizeList
.
Items
.
Add
(
heigth
);
}
cmbSizeList
.
SelectedIndex
=
0
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
lineStatus
,
equipBean
.
runStatus
);
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
runStatus
);
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
txtP1
.
Text
=
equipBean
.
Config
.
UpDownAxisP1
.
ToString
();
lblName
.
Text
=
equipBean
.
Name
;
...
...
@@ -117,21 +117,18 @@ namespace OnlineStore.AssemblyLine
}
if
(
this
.
Visible
)
{
ReadIOList
();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
ReadIOList
();
}
lblName
.
BackColor
=
equipBean
.
GetShowColor
();
if
(
equipBean
.
runStatus
>
LineRunStatus
.
Wait
)
{
//lblName.BackColor = Color.Green;
{
if
(
btnStart
.
Enabled
)
{
FormStatus
(
true
);
}
}
else
{
//lblName.BackColor = System.Drawing.Color.DodgerBlue;
{
if
(!
btnStart
.
Enabled
)
{
FormStatus
(
false
);
...
...
@@ -147,7 +144,7 @@ namespace OnlineStore.AssemblyLine
}
lblMoveInfo
.
Text
=
equipBean
.
GetMoveStr
()+
"\r\n料仓类型:"
+(
equipBean
.
Config
.
IsBigTray
.
Equals
(
1
)?
"大料盘"
:
"小料盘"
);
string
canOut
=
LineManager
.
Line
.
CanOutStore
(
equipBean
.
DeviceID
)
?
"可出库"
:
"不可出库"
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
lineStatus
,
equipBean
.
runStatus
)
+
"("
+
canOut
+
")"
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
runStatus
)
+
"("
+
canOut
+
")"
;
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
string
text
=
""
;
List
<
InOutParam
>
ps
=
new
List
<
InOutParam
>(
equipBean
.
waitInStoreList
);
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
b7962bf
...
...
@@ -18,11 +18,8 @@ namespace OnlineStore.DeviceLibrary
public
bool
UseAxis
=
false
;
public
ConcurrentQueue
<
InOutParam
>
waitOutStoreList
=
new
ConcurrentQueue
<
InOutParam
>();
public
List
<
InOutParam
>
waitInStoreList
=
new
List
<
InOutParam
>();
internal
object
waitInListLock
=
""
;
/// <summary>
///移栽装置后面分为两条移动线
/// </summary>
public
LineMoveInfo
SecondMoveInfo
=
null
;
internal
object
waitInListLock
=
""
;
public
LineMoveInfo
SecondMoveInfo
=
null
;
protected
int
trayCount
=
0
;
/// <summary>
/// 上一个盘号
...
...
@@ -77,10 +74,7 @@ namespace OnlineStore.DeviceLibrary
{
}
public
bool
MoveStop
=
false
;
/// <summary>
/// 运动处理
/// </summary>
public
bool
MoveStop
=
false
;
protected
override
void
BusyMoveProcess
()
{
if
(
MoveStop
)
...
...
@@ -215,38 +209,20 @@ namespace OnlineStore.DeviceLibrary
{
if
(
isDebug
)
{
IsDebug
=
true
;
//两个阻挡气缸下降
lineStatus
=
LineStatus
.
Debugging
;
IsDebug
=
true
;
IOMove
(
IO_Type
.
StopDown1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopDown2
,
IO_VALUE
.
HIGH
);
LogInfo
(
"从正常状态切换到调试状态!"
);
}
else
if
(
lineStatus
.
Equals
(
LineStatus
.
Debugging
))
else
{
IsDebug
=
false
;
lineStatus
=
LineStatus
.
StoreOnline
;
IsDebug
=
false
;
IOMove
(
IO_Type
.
StopDown1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopDown2
,
IO_VALUE
.
LOW
);
LogInfo
(
"从调试状态切换到正常状态!"
);
}
}
else
{
if
(
isDebug
)
{
IsDebug
=
true
;
//两个阻挡气缸下降
lineStatus
=
LineStatus
.
Debugging
;
LogInfo
(
"从正常状态切换到调试状态!"
);
}
else
if
(
lineStatus
.
Equals
(
LineStatus
.
Debugging
))
{
IsDebug
=
false
;
lineStatus
=
LineStatus
.
StoreOnline
;
LogInfo
(
"从调试状态切换到正常状态!"
);
}
}
}
...
...
@@ -657,8 +633,7 @@ namespace OnlineStore.DeviceLibrary
msg
+=
"上个托盘:"
+
preTrayNum
+
"\n"
;
msg
+=
"当前托盘:"
+
currTrayNum
+
"\n"
;
msg
+=
"runS: "
+
runStatus
+
"\n"
;
msg
+=
"lineS: "
+
lineStatus
+
"\n"
;
msg
+=
"runS: "
+
runStatus
+
"\n"
;
msg
+=
"alarm: "
+
alarmType
+
" "
+
LastAlarmTime
.
ToLongTimeString
()+
"\n"
;
msg
+=
"MoveT:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS :"
+
MoveInfo
.
SLog
+
"\n"
;
...
...
@@ -667,8 +642,7 @@ namespace OnlineStore.DeviceLibrary
return
msg
;
}
internal
void
MoveEndS
()
{
lineStatus
=
LineStatus
.
StoreOnline
;
{
runStatus
=
LineRunStatus
.
Runing
;
MoveInfo
.
EndMove
();
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
b7962bf
...
...
@@ -64,8 +64,7 @@ namespace OnlineStore.DeviceLibrary
{
mainTimer
.
Enabled
=
false
;
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
lineStatus
=
LineStatus
.
StoreOnline
;
SecondMoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
HomeMoving
;
LogInfo
(
"开始原点返回: "
);
...
...
@@ -115,8 +114,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreHeight
=
-
1
;
//OutStoreCount = 0;
BatchAxisStopCheck
();
ResetClearData
();
lineStatus
=
LineStatus
.
ResetMove
;
ResetClearData
();
IOMove
(
IO_Type
.
SL_HddLed
,
IO_VALUE
.
HIGH
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_01_StopUp
);
...
...
@@ -325,8 +323,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
override
void
StopRun
()
{
runStatus
=
LineRunStatus
.
Wait
;
lineStatus
=
LineStatus
.
StoreOnline
;
runStatus
=
LineRunStatus
.
Wait
;
if
(
mainTimer
!=
null
)
{
mainTimer
.
Enabled
=
false
;
...
...
@@ -963,8 +960,7 @@ namespace OnlineStore.DeviceLibrary
msg
+=
"上个托盘:"
+
preTrayNum
+
"\n"
;
msg
+=
"当前托盘:"
+
currTrayNum
+
"\n"
;
msg
+=
"runS: "
+
runStatus
+
"\n"
;
msg
+=
"lineS: "
+
lineStatus
+
"\n"
;
msg
+=
"runS: "
+
runStatus
+
"\n"
;
msg
+=
"alarm: "
+
alarmType
+
"\n"
;
msg
+=
"MoveT:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS :"
+
MoveInfo
.
SLog
+
"\n"
;
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
b7962bf
...
...
@@ -103,8 +103,7 @@ namespace OnlineStore.DeviceLibrary
}
public
override
bool
StartInStoreMove
(
InOutParam
param
)
{
runStatus
=
LineRunStatus
.
Busy
;
lineStatus
=
LineStatus
.
InStoreExecute
;
runStatus
=
LineRunStatus
.
Busy
;
MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
MoveInfo
.
MoveParam
=
new
InOutParam
();
//判断是哪个工位有料架
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
b7962bf
...
...
@@ -48,8 +48,7 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
runStatus
=
LineRunStatus
.
Busy
;
lineStatus
=
LineStatus
.
OutStoreExecute
;
runStatus
=
LineRunStatus
.
Busy
;
string
lastXuniRfid
=
LastOutParam
.
rfid
;
if
(
lastXuniRfid
.
Equals
(
""
)
||
lastXuniRfid
.
Equals
(
outParam
.
rfid
))
{
...
...
@@ -158,8 +157,7 @@ namespace OnlineStore.DeviceLibrary
public
override
bool
StartOutStoreMove
(
InOutParam
param
)
{
runStatus
=
LineRunStatus
.
Busy
;
lineStatus
=
LineStatus
.
OutStoreExecute
;
runStatus
=
LineRunStatus
.
Busy
;
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
);
MoveInfo
.
MoveParam
=
new
InOutParam
();
taskData
=
null
;
...
...
@@ -370,8 +368,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreCount
=
0
;
//如果再出库中直接出库
MoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
Runing
;
lineStatus
=
LineStatus
.
StoreOnline
;
runStatus
=
LineRunStatus
.
Runing
;
// MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun);
OutLog
(
"准备出库料架完成"
);
// FO_11_AxisDownMove();
...
...
@@ -717,7 +714,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
WarnMsg
=
SecondMoveInfo
.
Name
+
"["
+
Second
MoveInfo
.
MoveStep
+
"] 等待给服务器发送afterPut完成超时 ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] 等待给服务器发送afterPut完成超时 ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
21
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
查看文件 @
b7962bf
...
...
@@ -53,8 +53,7 @@ namespace OnlineStore.DeviceLibrary
private
void
StartReset
()
{
ResetClearData
();
lineStatus
=
LineStatus
.
ResetMove
;
ResetClearData
();
SecondMoveInfo
.
EndMove
();
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY_R_01StopMove
);
LogInfo
(
"开始"
+
MoveInfo
.
MoveType
+
": 横移线体停止,阻挡上升,侧挡气缸上升 "
);
...
...
@@ -102,14 +101,7 @@ namespace OnlineStore.DeviceLibrary
runStatus
=
LineRunStatus
.
Runing
;
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
if
(
IsDebug
)
{
lineStatus
=
LineStatus
.
Debugging
;
}
else
{
lineStatus
=
LineStatus
.
StoreOnline
;
}
}
}
}
...
...
@@ -157,7 +149,7 @@ namespace OnlineStore.DeviceLibrary
}
IOTimeOutProcess
();
//判断流水线打开了才可以运行
if
(
Second
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
if
(
LineManager
.
Line
.
CanProcessLine
())
{
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1_SLStation.cs
查看文件 @
b7962bf
...
...
@@ -55,8 +55,7 @@ namespace OnlineStore.DeviceLibrary
private
void
StartReset
()
{
ResetClearData
();
lineStatus
=
LineStatus
.
ResetMove
;
ResetClearData
();
SecondMoveInfo
.
EndMove
();
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY_R_01StopMove
);
LogInfo
(
"开始"
+
MoveInfo
.
MoveType
+
": 横移线体停止,阻挡气缸上升 "
);
...
...
@@ -101,14 +100,7 @@ namespace OnlineStore.DeviceLibrary
runStatus
=
LineRunStatus
.
Runing
;
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
if
(
IsDebug
)
{
lineStatus
=
LineStatus
.
Debugging
;
}
else
{
lineStatus
=
LineStatus
.
StoreOnline
;
}
}
}
}
...
...
@@ -155,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
}
IOTimeOutProcess
();
//判断流水线打开了才可以运行
if
(
Second
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
if
(
LineManager
.
Line
.
CanProcessLine
())
{
...
...
source/DeviceLibrary/assemblyLine/HY/HY_Coveryor.cs
查看文件 @
b7962bf
...
...
@@ -56,8 +56,7 @@ namespace OnlineStore.DeviceLibrary
private
void
StartReset
()
{
ResetClearData
();
lineStatus
=
LineStatus
.
ResetMove
;
ResetClearData
();
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY_R_01StopMove
);
if
(
IsDebug
)
...
...
@@ -83,12 +82,8 @@ namespace OnlineStore.DeviceLibrary
if
(
MoveInfo
.
IsInWait
)
{
CheckWait
(
MoveInfo
);
}
else
if
(
SecondMoveInfo
.
IsInWait
)
{
CheckWait
(
SecondMoveInfo
);
}
if
(!
MoveInfo
.
IsInWait
&&
!
SecondMoveInfo
.
IsInWait
)
}
if
(!
MoveInfo
.
IsInWait
)
{
//流水线各装置复原位,夹料气缸状态不变
//阻挡气缸全部=0
...
...
@@ -97,21 +92,12 @@ namespace OnlineStore.DeviceLibrary
//复位时夹紧气缸需要发送,不然后面出入库会有问题
switch
(
MoveInfo
.
MoveStep
)
{
case
LineMoveStep
.
HY_R_01StopMove
:
case
LineMoveStep
.
HY_R_01StopMove
:
LogInfo
(
MoveInfo
.
MoveType
+
" 完成!"
);
runStatus
=
LineRunStatus
.
Runing
;
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
if
(
IsDebug
)
{
lineStatus
=
LineStatus
.
Debugging
;
}
else
{
lineStatus
=
LineStatus
.
StoreOnline
;
}
break
;
default
:
break
;
}
...
...
@@ -142,9 +128,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Up
,
IO_Type
.
TopCylinder_Down
);
IOMove
(
IO_Type
.
StopDown1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopDown2
,
IO_VALUE
.
LOW
);
}
}
public
override
void
StopRun
()
{
if
(
mainTimer
!=
null
)
...
...
@@ -175,19 +159,15 @@ namespace OnlineStore.DeviceLibrary
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
;
}
BusyMoveProcess
();
IOTimeOutProcess
();
//判断流水线打开了才可以运行
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
}
IOTimeOutProcess
();
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
if
(
LineManager
.
Line
.
CanProcessLine
())
{
// LogUtil.info("StartCheckFixture");
{
StartCheckFixture
();
}
}
//OutStoreListPro();
}
}
private
void
StartCheckFixture
()
...
...
source/DeviceLibrary/assemblyLine/HY/HY_OutLine.cs
查看文件 @
b7962bf
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
...
...
@@ -14,32 +17,316 @@ namespace OnlineStore.DeviceLibrary
Name
=
(
"_"
+
config
.
LineName
+
"线HY"
+
(
DeviceID
%
100
).
ToString
().
PadLeft
(
2
,
'0'
)
+
"_"
).
ToUpper
();
}
public
override
bool
StartRun
(
bool
isDebug
=
false
)
{
return
false
;
if
(
CanStartRun
().
Equals
(
false
))
{
return
false
;
}
mainTimer
.
Enabled
=
false
;
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
HomeMoving
;
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
StartReset
();
if
(
isDebug
)
{
mainTimer
.
Enabled
=
true
;
}
return
true
;
}
public
override
bool
Reset
()
{
return
false
;
StopMove
();
runStatus
=
LineRunStatus
.
Reset
;
SecondMoveInfo
.
EndMove
();
MoveInfo
.
NewMove
(
LineMoveType
.
Reset
);
StartReset
();
return
true
;
}
private
void
StartReset
()
{
ResetClearData
();
SecondMoveInfo
.
EndMove
();
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
HY_R_01StopMove
);
LogInfo
(
"开始"
+
MoveInfo
.
MoveType
+
": 线体停止,顶升下降,阻挡上升 "
);
LineStop
(
MoveInfo
);
IOMove
(
IO_Type
.
HY_ShortL_StopDown
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
HY_LongL_StopDown
,
IO_VALUE
.
LOW
);
CylinderMove
(
null
,
IO_Type
.
HY_TopCylinder_Up
,
IO_Type
.
HY_TopCylinder_Down
);
isInPro
=
false
;
}
protected
override
void
ResetProcess
()
{
if
(
MoveInfo
.
IsInWait
)
{
CheckWait
(
MoveInfo
);
}
if
(!
MoveInfo
.
IsInWait
)
{
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
HY_R_01StopMove
))
{
LogInfo
(
MoveInfo
.
MoveType
+
" 完成!"
);
runStatus
=
LineRunStatus
.
Runing
;
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
}
}
}
internal
override
void
StopMove
()
{
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
LogInfo
(
"停止运动:横移线体停止,阻挡上升,顶升气缸下降,定位气缸下降 "
);
LineStop
();
IOMove
(
IO_Type
.
HY_ShortL_StopDown
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
HY_LongL_StopDown
,
IO_VALUE
.
LOW
);
CylinderMove
(
null
,
IO_Type
.
HY_TopCylinder_Up
,
IO_Type
.
HY_TopCylinder_Down
);
}
public
override
void
StopRun
()
{
if
(
mainTimer
!=
null
)
{
mainTimer
.
Enabled
=
false
;
}
StopMove
();
runStatus
=
LineRunStatus
.
Wait
;
}
protected
override
void
BaseTimerProcess
()
{
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
;
}
IOTimeOutProcess
();
//判断流水线打开了才可以运行
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
if
(
LineManager
.
Line
.
CanProcessLine
())
{
StartCheckFixture
();
}
}
else
{
if
(
IOValue
(
IO_Type
.
HY_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
trayCheck2LowWait
.
Stop
();
}
else
{
TrayManager
.
checkWatch
(
trayCheck2LowWait
,
30000
,
false
);
}
CheckFixtureProcess
();
}
}
private
Stopwatch
trayCheckWait
=
new
Stopwatch
();
//检测到托盘的时间
private
Stopwatch
trayCheck2LowWait
=
new
Stopwatch
();
//上一个托盘离开的时间
private
object
lockObj
=
""
;
private
void
StartCheckFixture
()
{
if
(
Monitor
.
TryEnter
(
lockObj
,
100
))
{
try
{
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
{
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
" 不在空闲中,直接返回 "
);
return
;
}
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
if
(
IOValue
(
IO_Type
.
HY_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(!
CylinderIsOk
(
IO_Type
.
HY_TopCylinder_Up
,
IO_Type
.
HY_TopCylinder_Down
))
{
CylinderMove
(
null
,
IO_Type
.
HY_TopCylinder_Up
,
IO_Type
.
HY_TopCylinder_Down
);
}
}
else
{
if
(
Config
.
DIList
.
ContainsKey
(
IO_Type
.
HY_LongL_StopCheck
)
&&
IOValue
(
IO_Type
.
HY_LongL_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
bool
check2IsOk
=
TrayManager
.
checkWatch
(
trayCheck2LowWait
,
TrayManager
.
SwTrayWaitTime
,
false
);
if
(
TrayManager
.
checkWatch
(
trayCheckWait
,
TrayManager
.
SwTrayWaitTime
,
false
)
&&
check2IsOk
)
{
//托盘在前阻挡处
trayCheckWait
.
Stop
();
trayCheck2LowWait
.
Stop
();
MoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY01_LongLCheck
);
LogInfo
(
" 出料线横移(长线):"
+
MoveInfo
.
SLog
+
",长线阻挡检测到托盘"
);
ClearTrayRFID
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_LongL_StopCheck
,
IO_VALUE
.
HIGH
));
}
}
else
if
(
Config
.
DIList
.
ContainsKey
(
IO_Type
.
HY_ShortL_StopCheck
)
&&
IOValue
(
IO_Type
.
HY_ShortL_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
bool
check2IsOk
=
TrayManager
.
checkWatch
(
trayCheck2LowWait
,
TrayManager
.
SwTrayWaitTime
,
false
);
if
(
TrayManager
.
checkWatch
(
trayCheckWait
,
TrayManager
.
SwTrayWaitTime
,
false
)
&&
check2IsOk
)
{
//托盘在前阻挡处
trayCheckWait
.
Stop
();
trayCheck2LowWait
.
Stop
();
MoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY01_LongLCheck
);
LogInfo
(
" 出料线横移(长线):"
+
MoveInfo
.
SLog
+
",短线阻挡检测到托盘"
);
ClearTrayRFID
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_ShortL_StopCheck
,
IO_VALUE
.
HIGH
));
}
}
else
{
bool
check2IsOk
=
TrayManager
.
checkWatch
(
trayCheck2LowWait
,
TrayManager
.
SwTrayWaitTime
,
false
);
trayCheckWait
.
Stop
();
}
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
" 出错:"
+
ex
.
ToString
());
}
finally
{
Monitor
.
Exit
(
lockObj
);
}
}
else
{
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
"失败,未得到锁"
);
}
}
protected
override
void
CheckFixtureProcess
()
{
}
if
(
MoveInfo
.
IsInWait
)
{
CheckWait
(
MoveInfo
);
}
if
(
MoveInfo
.
IsInWait
)
{
return
;
}
#
region
托盘检测处理
#
region
长线阻挡放行
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY01_LongLCheck
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY02_TopDown
);
IOMove
(
IO_Type
.
HY_ShortL_StopDown
,
IO_VALUE
.
LOW
);
CheckLog
(
"出料线横移(长线)"
+
MoveInfo
.
SLog
+
" 顶升气缸下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
HY_TopCylinder_Up
,
IO_Type
.
HY_TopCylinder_Down
);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY02_TopDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY03_LongLStopDown
);
CheckLog
(
"出料线横移(长线)"
+
MoveInfo
.
SLog
+
" 长线体阻挡下降"
);
IOMove
(
IO_Type
.
HY_LongL_StopDown
,
IO_VALUE
.
HIGH
,
1200
);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY03_LongLStopDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY04_WaitTray
);
CheckLog
(
"出料线横移(长线)"
+
MoveInfo
.
SLog
+
" 等待托盘检测信号"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_LongL_StopCheck
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
HIGH
));
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY04_WaitTray
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY05_TrayCheck
);
CheckLog
(
"出料线横移(长线)"
+
MoveInfo
.
SLog
+
" 再次等待托盘检测信号500ms"
);
IOMove
(
IO_Type
.
HY_LongL_StopDown
,
IO_VALUE
.
LOW
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
HIGH
));
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY05_TrayCheck
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY21_WaitTrayLeave
);
CheckLog
(
"出料线横移(长线)"
+
MoveInfo
.
SLog
+
" 等待托盘离开"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
LOW
));
}
#
endregion
#
region
短线阻挡放行
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY11_ShortLCheck
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY12_TopUp
);
IOMove
(
IO_Type
.
HY_LongL_StopDown
,
IO_VALUE
.
LOW
);
CheckLog
(
"出料线横移(短线)"
+
MoveInfo
.
SLog
+
" 顶升气缸上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Down
,
IO_Type
.
TopCylinder_Up
);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY12_TopUp
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY13_ShortLStopDown
);
CheckLog
(
"出料线横移(短线)"
+
MoveInfo
.
SLog
+
" 短线阻挡下降1200,线体转动"
);
IOMove
(
IO_Type
.
HY_ShortL_StopDown
,
IO_VALUE
.
HIGH
,
1200
);
LineRun
(
MoveInfo
);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY13_ShortLStopDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY14_WaitTray
);
CheckLog
(
"出料线横移(短线)"
+
MoveInfo
.
SLog
+
" 等待托盘检测信号"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_ShortL_StopCheck
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
HIGH
));
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY14_WaitTray
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY15_TrayCheck
);
CheckLog
(
"出料线横移(短线)"
+
MoveInfo
.
SLog
+
" 再次等待托盘检测信号500ms"
);
IOMove
(
IO_Type
.
HY_ShortL_StopDown
,
IO_VALUE
.
LOW
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
HIGH
));
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY15_TrayCheck
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY16_TopDown
);
CheckLog
(
"出料线横移(短线)"
+
MoveInfo
.
SLog
+
" 顶升气缸下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Up
,
IO_Type
.
TopCylinder_Down
);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY16_TopDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY21_WaitTrayLeave
);
CheckLog
(
"出料线横移(短线)"
+
MoveInfo
.
SLog
+
" 等待托盘离开"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
LOW
));
}
#
endregion
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY21_WaitTrayLeave
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
OHY22_TrayLeave
);
CheckLog
(
"出料线横移"
+
MoveInfo
.
SLog
+
" 再次等待托盘检测信号500ms"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
LOW
));
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
OHY22_TrayLeave
))
{
CheckLog
(
"出料线横移"
+
MoveInfo
.
SLog
+
" 横移结束"
);
MoveInfo
.
EndMove
();
}
#
endregion
}
}
}
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
b7962bf
...
...
@@ -215,7 +215,7 @@ namespace OnlineStore.DeviceLibrary
IoCheckTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
ledProcessTimer
.
Enabled
=
true
;
lineStatus
=
LineStatus
.
ResetMove
;
runStatus
=
LineRunStatus
.
HomeMoving
;
StartTime
=
DateTime
.
Now
;
LogUtil
.
info
(
Name
+
"开始启动,启动时间:"
+
StartTime
.
ToString
()
+
"先转动链条"
);
...
...
@@ -341,8 +341,7 @@ namespace OnlineStore.DeviceLibrary
//停止运动
MoveInfo
.
EndMove
();
lineStatus
=
LineStatus
.
ResetMove
;
runStatus
=
LineRunStatus
.
Reset
;
LogUtil
.
info
(
Name
+
"开始复位,先转动链条5秒 "
);
DateTime
rstartTime
=
DateTime
.
Now
;
...
...
@@ -951,8 +950,7 @@ namespace OnlineStore.DeviceLibrary
//打开流水线
WriteDrivetMotorRun
(
IO_VALUE
.
HIGH
);
//所有原点重置完成
runStatus
=
LineRunStatus
.
Runing
;
lineStatus
=
LineStatus
.
StoreOnline
;
runStatus
=
LineRunStatus
.
Runing
;
MoveInfo
.
EndMove
();
mainTimer
.
Interval
=
300
;
maxSeconds
=
3
;
...
...
@@ -974,8 +972,7 @@ namespace OnlineStore.DeviceLibrary
// int tLength = 20;
//msg += "横移41托盘:" + Sw41TrayNum + "\n";
msg
+=
"T3C1托盘:"
+
T3C1_TrayNum
+
"\n"
;
msg
+=
"状态: "
+
runStatus
+
"\t "
;
msg
+=
" "
+
lineStatus
+
"\n"
;
msg
+=
"状态: "
+
runStatus
+
"\t "
;
msg
+=
"alarm: "
+
alarmType
+
"\n"
;
msg
+=
"Move:"
+
MoveInfo
.
MoveType
+
" "
+
MoveInfo
.
SLog
+
"\n"
;
msg
+=
"T3C1:"
+
T3C1_MoveInfo
.
MoveType
+
" "
+
T3C1_MoveInfo
.
MoveStep
+
"\n"
;
...
...
source/DeviceLibrary/assemblyLine/MoveEquip.cs
查看文件 @
b7962bf
...
...
@@ -102,8 +102,7 @@ namespace OnlineStore.DeviceLibrary
private
void
StartReset
()
{
ResetClearData
();
lineStatus
=
LineStatus
.
ResetMove
;
ResetClearData
();
//移载装置原点状态:顶升气缸下降端,前后气缸后退端,上下气缸上升端,夹料气缸放松端,阻挡气缸输入=0
UpdownHomeMove
();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
...
...
@@ -165,14 +164,7 @@ namespace OnlineStore.DeviceLibrary
runStatus
=
LineRunStatus
.
Runing
;
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
if
(
IsDebug
)
{
lineStatus
=
LineStatus
.
Debugging
;
}
else
{
lineStatus
=
LineStatus
.
StoreOnline
;
}
break
;
default
:
break
;
}
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
b7962bf
...
...
@@ -27,8 +27,7 @@ namespace OnlineStore.DeviceLibrary
if
(
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
{
LogInfo
(
"启动出库【"
+
posId
+
"】升降气缸上升 "
);
runStatus
=
LineRunStatus
.
Busy
;
lineStatus
=
LineStatus
.
OutStoreExecute
;
runStatus
=
LineRunStatus
.
Busy
;
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
);
MoveInfo
.
MoveParam
=
param
;
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_50_StartOutProcess
);
...
...
@@ -186,8 +185,7 @@ namespace OnlineStore.DeviceLibrary
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 夹料气缸放松,更新托盘【"
+
MoveInfo
.
MoveParam
.
TrayNumber
+
"】,有料盘,OutStore,【"
+
MoveInfo
.
MoveParam
.
ToStr
()
+
"】"
);
TrayManager
.
UpdateTrayInfo
(
MoveInfo
.
MoveParam
.
TrayNumber
,
true
,
ReelType
.
OutStore
,
MoveInfo
.
MoveParam
);
//出库全部完成
lineStatus
=
LineStatus
.
StoreOnline
;
//出库全部完成
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_59_CylinderRelax
);
CylinderMove
(
MoveInfo
,
IO_Type
.
ClampCylinder_Work
,
IO_Type
.
ClampCylinder_Relax
);
}
...
...
@@ -243,8 +241,7 @@ namespace OnlineStore.DeviceLibrary
string
posId
=
param
!=
null
?
param
.
PosId
:
""
;
if
(
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
{
runStatus
=
LineRunStatus
.
Busy
;
lineStatus
=
LineStatus
.
InStoreExecute
;
runStatus
=
LineRunStatus
.
Busy
;
MoveInfo
.
MoveParam
=
param
;
MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
b7962bf
...
...
@@ -20,13 +20,7 @@ namespace OnlineStore.DeviceLibrary
/// 料仓状态
/// </summary>
public
LineRunStatus
runStatus
=
LineRunStatus
.
Wait
;
/// <summary>
///1=设备联机(正常就绪)(入库后,BOX恢复原始状态)(出库后,移载装置恢复原始状态),
///2=急停,3=故障,4=警告,5=调试
/// 6=入库执行中,7=入仓完成,8=入仓失败
/// 9=出库执行,10=出仓完成,11=出库失败
/// </summary>
public
LineStatus
lineStatus
=
LineStatus
.
ResetMove
;
/// <summary>
/// 提示消息,一般发给服务器后清空(LineBean表示报警提示消息,BoxBean表示出入库失败的原因记录)
/// </summary>
...
...
@@ -325,45 +319,7 @@ namespace OnlineStore.DeviceLibrary
break
;
}
if
(
runStatus
>
LineRunStatus
.
Wait
)
{
//"0":"急停中", "1":"设备联机", "2":"故障中", "3":"入库执行中", "4":"出库执行中", 5":"料盘入仓位完成", "6":"料盘出仓位完成", 7":"设备调试中",
switch
(
lineStatus
)
{
case
LineStatus
.
Debugging
:
aa
=
"设备调试中"
;
break
;
//case LineStatus.InStoreEnd:
// aa = "料盘入仓位完成";
// break;
case
LineStatus
.
InStoreExecute
:
aa
=
"入库执行中"
;
break
;
case
LineStatus
.
InTrouble
:
aa
=
"故障中"
;
break
;
//case LineStatus.OutStoreBoxEnd:
// aa = "料盘出仓位完成";
// break;
case
LineStatus
.
OutStoreExecute
:
aa
=
"出库执行中"
;
break
;
case
LineStatus
.
StoreOnline
:
aa
=
"设备联机"
;
break
;
case
LineStatus
.
SuddenStop
:
aa
=
"急停中"
;
break
;
//case LineStatus.OutMoveExecute:
// aa = "出库完成";
// break;
//case LineStatus.InStoreFaild:
// aa = "入库失败(" + WarnMsg + ")";
// break;
//case LineStatus.OutStoreFaild:
// aa = "出库失败(" + WarnMsg + ")";
// break;
}
{
if
(
isInSuddenDown
)
{
aa
=
"急停中"
;
...
...
@@ -382,7 +338,7 @@ namespace OnlineStore.DeviceLibrary
return
sta
;
}
}
public
static
string
GetRunStr
(
LineStatus
ls
,
LineRunStatus
runs
)
public
static
string
GetRunStr
(
LineRunStatus
runs
,
LineStatus
ls
=
LineStatus
.
None
)
{
string
sta
=
"运行中"
;
string
aa
=
""
;
...
...
@@ -404,7 +360,7 @@ namespace OnlineStore.DeviceLibrary
sta
=
"等待启动"
;
break
;
}
if
(
runs
>
LineRunStatus
.
Wait
)
if
(
runs
>
LineRunStatus
.
Wait
&&
ls
>
LineStatus
.
None
)
{
//"0":"急停中", "1":"设备联机", "2":"故障中", "3":"入库执行中", "4":"出库执行中", 5":"料盘入仓位完成", "6":"料盘出仓位完成", 7":"设备调试中",
switch
(
ls
)
...
...
@@ -444,7 +400,7 @@ namespace OnlineStore.DeviceLibrary
// break;
}
}
if
(!
aa
.
Equals
(
""
))
{
return
sta
+
"_"
+
aa
;
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
b7962bf
...
...
@@ -1522,6 +1522,71 @@ namespace OnlineStore.DeviceLibrary
HY95_StopDownUp
,
#
endregion
#
region
出料线横移,
52001
/// <summary>
/// 出料线横移(长线):短线阻挡检测到托盘
/// </summary>
OHY01_LongLCheck
=
52001
,
/// <summary>
/// 出料线横移(短线):顶升气缸下降
/// </summary>
OHY02_TopDown
,
/// <summary>
/// 出料线横移(短线):长线体阻挡下降
/// </summary>
OHY03_LongLStopDown
,
/// <summary>
/// 出料线横移(短线):等待托盘检测信号
/// </summary>
OHY04_WaitTray
,
/// <summary>
/// 出料线横移(短线):长线体阻挡下降,再次等待托盘检测信号500ms
/// </summary>
OHY05_TrayCheck
,
/// <summary>
/// 出料线横移(短线):短线阻挡检测到托盘
/// </summary>
OHY11_ShortLCheck
=
52011
,
/// <summary>
/// 出料线横移(短线):顶升气缸上升
/// </summary>
OHY12_TopUp
,
/// <summary>
/// 出料线横移(短线):短线阻挡下降1200,线体转动
/// </summary>
OHY13_ShortLStopDown
,
/// <summary>
/// 出料线横移(短线):等待托盘检测信号
/// </summary>
OHY14_WaitTray
,
/// <summary>
/// 出料线横移(短线):再次等待托盘检测信号500ms
/// </summary>
OHY15_TrayCheck
,
/// <summary>
/// 出料线横移(短线): 阻挡上升,顶升气缸下降
/// </summary>
OHY16_TopDown
,
/// <summary>
/// 出料线横移: 等待托盘检测无信号
/// </summary>
OHY21_WaitTrayLeave
=
52021
,
/// <summary>
/// 出料线横移: 延迟500ms后再次等待托盘无信号
/// </summary>
OHY22_TrayLeave
,
#
endregion
#
endregion
}
...
...
source/DeviceLibrary/server/BoxInfo.cs
查看文件 @
b7962bf
...
...
@@ -32,7 +32,7 @@ namespace OnlineStore.DeviceLibrary
public
string
ToShowStr
()
{
return
KTK_Store
.
GetRunStr
(
(
LineStatus
)
SStatus
,(
LineRunStatus
)
SRunStatus
);
return
KTK_Store
.
GetRunStr
(
(
LineRunStatus
)
SRunStatus
,
(
LineStatus
)
SStatus
);
}
/// <summary>
/// 编号,1-4
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论