Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5bd88572
由
LN
编写于
2020-06-01 15:56:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入料模块料架rfid增加缓存功能。
1 个父辈
3e1330f3
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
107 行增加
和
90 行删除
source/AssemblyLineClient/记录.txt
source/Common/Setting_Init.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/DeviceLibrary/model/StoreStep.cs
source/AssemblyLineClient/记录.txt
查看文件 @
5bd8857
20200528
20200529
1.上料模块料架号增加缓存
20200528
RFID更改为最新方式。
RFID更改为最新方式。
接驳台等待料盘到位去掉超时时间。
接驳台等待料盘到位去掉超时时间。
...
...
source/Common/Setting_Init.cs
查看文件 @
5bd8857
...
@@ -91,5 +91,7 @@ namespace OnlineStore.Common
...
@@ -91,5 +91,7 @@ namespace OnlineStore.Common
public
static
string
NeedCheckTray
=
"NeedCheckTray"
;
public
static
string
NeedCheckTray
=
"NeedCheckTray"
;
public
static
string
RfidServer_Port
=
"RfidServer_Port"
;
public
static
string
RfidServer_Port
=
"RfidServer_Port"
;
public
static
string
Feed_LastShelfID_
=
"Feed_LastShelfID_"
;
}
}
}
}
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
5bd8857
...
@@ -865,7 +865,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -865,7 +865,7 @@ namespace OnlineStore.DeviceLibrary
});
});
}
}
private
bool
Update
ShelfId
()
private
bool
Read
ShelfId
()
{
{
try
try
{
{
...
@@ -876,6 +876,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -876,6 +876,15 @@ namespace OnlineStore.DeviceLibrary
//发送料架信息给调度系统
//发送料架信息给调度系统
// AgvClient.SendRFID(Config.AgvInName, CurrShelfId);
// AgvClient.SendRFID(Config.AgvInName, CurrShelfId);
LogUtil
.
info
(
Name
+
"读取到料架编号:"
+
CurrShelfId
);
LogUtil
.
info
(
Name
+
"读取到料架编号:"
+
CurrShelfId
);
if
(
CurrShelfId
.
EndsWith
(
"00"
))
{
string
saveShelf
=
GetShelfID
();
if
((!
String
.
IsNullOrEmpty
(
saveShelf
))
&&
(!
saveShelf
.
EndsWith
(
"00"
)))
{
LogUtil
.
info
(
Name
+
"读取到的料架号【"
+
CurrShelfId
+
"】无效,使用 缓存料架RFID:"
+
saveShelf
);
CurrShelfId
=
saveShelf
;
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -883,6 +892,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -883,6 +892,22 @@ namespace OnlineStore.DeviceLibrary
}
}
return
true
;
return
true
;
}
}
#
region
料架号保存
private
void
UpdateLastShelfID
(
string
currRfid
=
""
)
{
string
configStr
=
Setting_Init
.
Feed_LastShelfID_
+
DeviceID
;
ConfigAppSettings
.
SaveValue
(
configStr
,
currRfid
);
LogUtil
.
info
(
Name
+
" UpdateLastShelfID 缓存料架RFID更改:【"
+
configStr
+
"】=【"
+
currRfid
+
"】"
);
}
private
string
GetShelfID
()
{
string
configStr
=
Setting_Init
.
Feed_LastShelfID_
+
DeviceID
;
return
ConfigAppSettings
.
GetValue
(
configStr
);
}
#
endregion
#
endregion
#
endregion
private
string
lastcode
=
""
;
private
string
lastcode
=
""
;
public
override
string
GetMoveStr
()
public
override
string
GetMoveStr
()
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
5bd8857
...
@@ -603,7 +603,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -603,7 +603,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
))
else
if
(
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_03_LineStart
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_03_LineStart
);
InLog
(
"入料检测: "
+
MoveInfo
.
SLog
+
" 阻挡工位检测有料架,进料阻挡下降500,缓冲阻挡前进1000,流水线转动 1000"
);
InLog
(
"入料检测: "
+
MoveInfo
.
SLog
+
" 阻挡工位有新料架,清理缓存料架RFID ,进料阻挡下降500,缓冲阻挡前进1000,流水线转动 1000"
);
UpdateLastShelfID
();
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
HIGH
,
500
);
//进料阻挡下降
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
HIGH
,
500
);
//进料阻挡下降
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//缓冲阻挡前进1000
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//缓冲阻挡前进1000
// IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
// IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
...
@@ -615,7 +616,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -615,7 +616,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
))
}
else
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_03_LineStart
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_03_LineStart
);
InLog
(
"入料检测: "
+
MoveInfo
.
SLog
+
" 进料口
检测有
料架,进料阻挡上升,缓冲阻挡前进1000,流水线转动 1000"
);
InLog
(
"入料检测: "
+
MoveInfo
.
SLog
+
" 进料口
有新
料架,进料阻挡上升,缓冲阻挡前进1000,流水线转动 1000"
);
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
LOW
);
//进料阻挡上升
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
LOW
);
//进料阻挡上升
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//缓冲阻挡前进1000
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//缓冲阻挡前进1000
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
...
@@ -671,7 +672,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -671,7 +672,8 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
UpdateShelfId
();
ReadShelfId
();
if
(
CurrShelfId
.
EndsWith
(
"00"
))
if
(
CurrShelfId
.
EndsWith
(
"00"
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_33_BatchAxisToP1
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_33_BatchAxisToP1
);
...
@@ -684,8 +686,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -684,8 +686,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
ShelfNoTray
=
false
;
MoveInfo
.
ShelfNoTray
=
false
;
//定位工位有料架,直接开始入料
//定位工位有料架,直接开始入料
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_05_LocationCylinder_Up
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_05_LocationCylinder_Up
);
InLog
(
"定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 缓冲阻挡上升, 定位气缸上升,读取
料架号"
);
InLog
(
"定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 缓冲阻挡上升, 定位气缸上升,读取
并缓存料架RFID"
+
CurrShelfId
);
// IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
UpdateLastShelfID
(
CurrShelfId
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SL_LocationCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SL_LocationCylinder_Up
);
}
}
}
}
...
@@ -695,14 +697,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -695,14 +697,7 @@ namespace OnlineStore.DeviceLibrary
InLog
(
" 未检测到料架,入料结束"
);
InLog
(
" 未检测到料架,入料结束"
);
}
}
}
}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_05_WaitS))
//{
// //定位工位有料架,直接开始入料
// MoveInfo.NextMoveStep(LineMoveStep.FI_07_LocationCylinder_Up);
// InLog("定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡上升, 定位气缸上升");
// IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
// CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
//}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_05_LocationCylinder_Up
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_05_LocationCylinder_Up
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_06_BatchAxisToP2
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_06_BatchAxisToP2
);
...
@@ -866,7 +861,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -866,7 +861,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_SaveSize
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_SaveSize
))
{
{
if
(
MoveCylineIsUp
())
if
(
MoveCylineIsUp
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_CylinderGive
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_CylinderGive
);
...
@@ -886,35 +881,30 @@ namespace OnlineStore.DeviceLibrary
...
@@ -886,35 +881,30 @@ namespace OnlineStore.DeviceLibrary
if
(!
MoveInfo
.
ShelfNoTray
)
if
(!
MoveInfo
.
ShelfNoTray
)
{
{
FI_BatchAxisDown
();
FI_BatchAxisDown
();
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_22_BatchAxisDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_23_WaitTray
);
int
targetPositon
=
Config
.
GetUpdownP2Detial
(
LastHeight
,
LastWidth
);
int
targetPositon
=
Config
.
GetUpdownP2Detial
(
LastHeight
,
LastWidth
);
string
log
=
":移栽伺服下降到P2:"
+
targetPositon
;
string
log
=
":移栽伺服下降到P2:"
+
targetPositon
;
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":等待空托盘到达 "
+
log
+
""
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":等待空托盘到达 "
+
log
+
""
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetPositon
,
Config
.
UpdownAxis_P2Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetPositon
,
Config
.
UpdownAxis_P2Speed
);
//if (!MoveInfo.ShelfNoTray)
//{
// YuScanCode();
//}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_23_WaitTray
))
//TODO
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_22_BatchAxisDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_24_WaitTray
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
//int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth);
//string log = ":移栽伺服下降到P2:" + targetPositon;
//InLog("料盘移栽" + MoveInfo.SLog + ":等待空托盘到达 " + log + "");
//UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_24_WaitTray
))
//TODO
{
{
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_11_CodeRember
))
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_11_CodeRember
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
4
_CylinderDown
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
5
_CylinderDown
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
//if (!MoveInfo.ShelfNoTray)
//{
// InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降, 托盘号【" + currTrayNum + "】,更新托盘为有料,获取库位号 , 提升轴下降指定位置");
// FI_21_BatchAxisDown();
//}
//else
//{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构下降, 托盘号【"
+
currTrayNum
+
"】,更新托盘为有料,获取库位号 ,"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构下降, 托盘号【"
+
currTrayNum
+
"】,更新托盘为有料,获取库位号 ,"
);
//}
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
lastcode
=
code
;
lastcode
=
code
;
TrayManager
.
UpdateTrayInfo
(
currTrayNum
,
true
,
ReelType
.
InStore
,
new
InOutParam
(
currTrayNum
,
code
,
""
,
LastHeight
,
LastWidth
,
false
),
""
);
TrayManager
.
UpdateTrayInfo
(
currTrayNum
,
true
,
ReelType
.
InStore
,
new
InOutParam
(
currTrayNum
,
code
,
""
,
LastHeight
,
LastWidth
,
false
),
""
);
...
@@ -951,50 +941,42 @@ namespace OnlineStore.DeviceLibrary
...
@@ -951,50 +941,42 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
SLog
+
"]等待空托盘到达超时["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
SLog
+
"]等待空托盘到达超时["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
22
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
22
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
//送出料架处理
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_25_CylinderDown
))
}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_UpdownAxisToP2))
//{
// MoveInfo.NextMoveStep(LineMoveStep.FI_22_CylinderDown);
// InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降,");
// CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
//}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_24_CylinderDown
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
5
_CylinderRelax
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
6
_CylinderRelax
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料气缸放松"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料气缸放松"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Tighten
,
IO_Type
.
SL_MoveCylinder_Slack
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Tighten
,
IO_Type
.
SL_MoveCylinder_Slack
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
5
_CylinderRelax
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
6
_CylinderRelax
))
{
{
if
(
Config
.
SidesWayNum
.
Equals
(
1
))
if
(
Config
.
SidesWayNum
.
Equals
(
1
))
{
{
FI_2
7
_CylinderUp
();
FI_2
8
_CylinderUp
();
}
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
6
_WaitCylinderUp
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
7
_WaitCylinderUp
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_VALUE
.
LOW
));
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
TrayPreMove
();
TrayPreMove
();
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
6
_WaitCylinderUp
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
7
_WaitCylinderUp
))
{
{
FI_2
7
_CylinderUp
();
FI_2
8
_CylinderUp
();
TrayMoveOk
();
TrayMoveOk
();
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
7
_CylinderUp
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
8
_CylinderUp
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
8
_UpDownAxisToP1
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
9
_UpDownAxisToP1
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降伺服到P1点"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降伺服到P1点"
);
TrayMoveOk
(
true
);
TrayMoveOk
(
true
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
8
_UpDownAxisToP1
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
9
_UpDownAxisToP1
))
{
{
if
(
getPosTask
==
null
||
getPosTask
.
IsCompleted
)
if
(
getPosTask
==
null
||
getPosTask
.
IsCompleted
)
{
{
...
@@ -1072,7 +1054,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1072,7 +1054,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_38_LineStop
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_38_LineStop
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_39_TopDown
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_39_TopDown
);
InLog
(
"上料完成"
+
MoveInfo
.
SLog
+
", 料架到达出口,出口顶升下降 , "
);
InLog
(
"上料完成"
+
MoveInfo
.
SLog
+
", 料架到达出口,出口顶升下降 ,清理缓存料架RFID "
);
UpdateLastShelfID
();
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
}
}
...
@@ -1088,9 +1071,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1088,9 +1071,9 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
endregion
}
}
private
Task
getPosTask
=
null
;
private
Task
getPosTask
=
null
;
private
void
FI_2
7
_CylinderUp
()
private
void
FI_2
8
_CylinderUp
()
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
7
_CylinderUp
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
8
_CylinderUp
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
...
@@ -1383,8 +1366,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1383,8 +1366,9 @@ namespace OnlineStore.DeviceLibrary
}
}
#
endregion
#
endregion
#
region
判断托盘是否需要
internal
bool
CurrTrayIsNeed
(
int
trayNum
,
bool
NeedSaveParam
)
internal
bool
CurrTrayIsNeed
(
int
trayNum
,
bool
NeedSaveParam
)
{
{
try
try
{
{
...
@@ -1424,7 +1408,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1424,7 +1408,7 @@ namespace OnlineStore.DeviceLibrary
}
}
//如果已经开始送出料架,暂不处理
//如果已经开始送出料架,暂不处理
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
FO_30_BatchAxisToP2
)
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
FO_30_BatchAxisToP2
)
{
{
LogUtil
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,正在送出料架,暂不处理"
,
DeviceID
*
1000
+
18
);
LogUtil
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,正在送出料架,暂不处理"
,
DeviceID
*
1000
+
18
);
return
false
;
return
false
;
...
@@ -1445,7 +1429,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1445,7 +1429,7 @@ namespace OnlineStore.DeviceLibrary
if
(
trayCanUse
&&
runStatus
.
Equals
(
LineRunStatus
.
Busy
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
if
(
trayCanUse
&&
runStatus
.
Equals
(
LineRunStatus
.
Busy
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
{
{
//入料执行中, 且需要空托盘
//入料执行中, 且需要空托盘
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
3
_WaitTray
)
&&
MoveInfo
.
IsInWait
.
Equals
(
false
))
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
4
_WaitTray
)
&&
MoveInfo
.
IsInWait
.
Equals
(
false
))
//if (MoveInfo.MoveStep >= LineMoveStep.FI_11_CylinderUp && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray)
//if (MoveInfo.MoveStep >= LineMoveStep.FI_11_CylinderUp && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray)
{
{
if
(
NeedSaveParam
)
if
(
NeedSaveParam
)
...
@@ -1457,19 +1441,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1457,19 +1441,20 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
}
}
if
(
NeedSaveParam
&&
LineManager
.
Line
.
runStatus
>=
LineRunStatus
.
HomeMoving
&&
LineManager
.
Line
.
CanProcessLine
())
if
(
NeedSaveParam
&&
LineManager
.
Line
.
runStatus
>=
LineRunStatus
.
HomeMoving
&&
LineManager
.
Line
.
CanProcessLine
())
{
{
LogUtil
.
debug
(
" 【"
+
info
.
ToStr
()
+
"】不需要出入库"
);
LogUtil
.
debug
(
" 【"
+
info
.
ToStr
()
+
"】不需要出入库"
);
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
Name
+
"CurrTrayIsNeed出错:"
,
ex
);
LogUtil
.
error
(
Name
+
"CurrTrayIsNeed出错:"
,
ex
);
}
}
return
false
;
return
false
;
}
}
#
endregion
}
}
}
}
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
5bd8857
...
@@ -222,7 +222,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -222,7 +222,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
))
else
if
(
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_03_LineStart
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_03_LineStart
);
OutLog
(
"准备出库料架: "
+
MoveInfo
.
SLog
+
" 阻挡工位检测有料架,进料阻挡下降500ms,缓冲阻挡前进1000,流水线转动 5000"
);
OutLog
(
"准备出库料架: "
+
MoveInfo
.
SLog
+
" 阻挡工位有新料架,清理缓存料架RFID,进料阻挡下降500ms,缓冲阻挡前进1000,流水线转动 5000"
);
UpdateLastShelfID
();
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
HIGH
,
500
);
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
HIGH
,
500
);
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//缓冲阻挡前进1000
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//缓冲阻挡前进1000
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
...
@@ -234,7 +235,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -234,7 +235,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
))
else
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_03_LineStart
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_03_LineStart
);
OutLog
(
"准备出库料架: "
+
MoveInfo
.
SLog
+
" 进料口
检测有
料架,进料阻挡上升,缓冲阻挡前进1000,流水线转动 1000"
);
OutLog
(
"准备出库料架: "
+
MoveInfo
.
SLog
+
" 进料口
有新
料架,进料阻挡上升,缓冲阻挡前进1000,流水线转动 1000"
);
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
LOW
);
//进料阻挡上升
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
LOW
);
//进料阻挡上升
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//缓冲阻挡前进1000
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//缓冲阻挡前进1000
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
...
@@ -290,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -290,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
Update
ShelfId
();
Read
ShelfId
();
if
(
CurrShelfId
.
EndsWith
(
"00"
))
if
(
CurrShelfId
.
EndsWith
(
"00"
))
{
{
SendOutShelfOut
(
"料架号【"
+
CurrShelfId
+
"】无效"
);
SendOutShelfOut
(
"料架号【"
+
CurrShelfId
+
"】无效"
);
...
@@ -319,8 +320,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -319,8 +320,8 @@ namespace OnlineStore.DeviceLibrary
//定位工位有料架,直接开始入料
//定位工位有料架,直接开始入料
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_05_LocationUp
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_05_LocationUp
);
OutLog
(
"定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 缓冲阻挡下降, 定位气缸上升,读取
料架号
"
);
OutLog
(
"定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 缓冲阻挡下降, 定位气缸上升,读取
并缓存料架RFID
"
);
//IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
UpdateLastShelfID
(
CurrShelfId
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SW4_LocationCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SW4_LocationCylinder_Up
);
}
}
...
@@ -469,7 +470,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -469,7 +470,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_37_LineStop
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_37_LineStop
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_38_TopDown
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_38_TopDown
);
OutLog
(
"送出料串: "
+
MoveInfo
.
SLog
+
", 料架到达出口,出口顶升下降 ,清空LastOutParam "
);
OutLog
(
"送出料串: "
+
MoveInfo
.
SLog
+
", 料架到达出口,出口顶升下降 ,清空LastOutParam,清理缓存料架RFID "
);
UpdateLastShelfID
();
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
LastOutParam
=
new
InOutParam
();
LastOutParam
=
new
InOutParam
();
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
5bd8857
...
@@ -61,15 +61,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -61,15 +61,10 @@ namespace OnlineStore.DeviceLibrary
{
{
continue
;
continue
;
}
}
list
.
Add
(
str
.
Trim
());
list
.
Add
(
str
.
Trim
());
//string code = "=1+0x0-" + width + "x" + height + "=" + str.Trim();
string
code
=
"="
+
width
+
"x"
+
height
+
"="
+
str
.
Trim
();
string
code
=
"="
+
width
+
"x"
+
height
+
"="
+
str
.
Trim
();
codeStr
=
codeStr
+
code
+
spiltStr
;
codeStr
=
codeStr
+
code
+
spiltStr
;
}
}
//if (String.IsNullOrEmpty(codeStr))
//{
// return msg = deviceName + "未扫到条码";
//}
codeStr
=
CodeManager
.
ReplaceCode
(
codeStr
);
codeStr
=
CodeManager
.
ReplaceCode
(
codeStr
);
//http://localhost/myproject/service/store/emptyPosForPutin
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
// 参数:cids: 多个 cid
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
5bd8857
...
@@ -666,34 +666,36 @@ namespace OnlineStore.DeviceLibrary
...
@@ -666,34 +666,36 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
FI_22_BatchAxisDown
,
FI_22_BatchAxisDown
,
/// <summary>
/// <summary>
/// 料盘移栽:从服务器获取入库库位号
/// </summary>
FI_23_GetPosID
,
/// <summary>
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
/// </summary>
/// </summary>
FI_23_WaitTray
,
FI_24_WaitTray
,
///// <summary>
///// 料盘移栽:移栽伺服下降到P2
///// </summary>
//FI_21_UpdownAxisToP2,
/// <summary>
/// <summary>
/// 料盘移栽: 上料机构下降
/// 料盘移栽: 上料机构下降
/// </summary>
/// </summary>
FI_2
4
_CylinderDown
,
FI_2
5
_CylinderDown
,
/// <summary>
/// <summary>
/// 料盘移栽: 上料气缸放松
/// 料盘移栽: 上料气缸放松
/// </summary>
/// </summary>
FI_2
5
_CylinderRelax
,
FI_2
6
_CylinderRelax
,
/// <summary>
/// <summary>
/// 料盘移栽: 上料横移机构上升
/// 料盘移栽: 上料横移机构上升
/// </summary>
/// </summary>
FI_2
6
_WaitCylinderUp
,
FI_2
7
_WaitCylinderUp
,
/// <summary>
/// <summary>
/// 料盘移栽:上料横移机构上升,定位或者顶升可以先下降
/// 料盘移栽:上料横移机构上升,定位或者顶升可以先下降
/// </summary>
/// </summary>
FI_2
7
_CylinderUp
,
FI_2
8
_CylinderUp
,
/// <summary>
/// <summary>
/// 料盘移栽:升降伺服到P1点
/// 料盘移栽:升降伺服到P1点
/// </summary>
/// </summary>
FI_2
8
_UpDownAxisToP1
,
FI_2
9
_UpDownAxisToP1
,
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论