Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d5e6eb43
由
LN
编写于
2019-12-03 16:13:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
料架入库:无托盘后需要返回
1 个父辈
a866d659
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
126 行增加
和
73 行删除
source/AssemblyLineClient/useControl/AxisMoveControl.Designer.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
source/DeviceLibrary/deviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/model/LineMoveInfo.cs
source/DeviceLibrary/model/StoreStep.cs
source/AssemblyLineClient/useControl/AxisMoveControl.Designer.cs
查看文件 @
d5e6eb4
...
...
@@ -137,7 +137,7 @@
// txtBusyStatus
//
this
.
txtBusyStatus
.
Enabled
=
false
;
this
.
txtBusyStatus
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
75
);
this
.
txtBusyStatus
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
82
);
this
.
txtBusyStatus
.
Name
=
"txtBusyStatus"
;
this
.
txtBusyStatus
.
Size
=
new
System
.
Drawing
.
Size
(
25
,
23
);
this
.
txtBusyStatus
.
TabIndex
=
288
;
...
...
@@ -145,7 +145,7 @@
// label11
//
this
.
label11
.
AutoSize
=
true
;
this
.
label11
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
11
0
);
this
.
label11
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
11
7
);
this
.
label11
.
Name
=
"label11"
;
this
.
label11
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
17
);
this
.
label11
.
TabIndex
=
292
;
...
...
@@ -154,7 +154,7 @@
// txtHomeStatus
//
this
.
txtHomeStatus
.
Enabled
=
false
;
this
.
txtHomeStatus
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
1
07
);
this
.
txtHomeStatus
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
1
14
);
this
.
txtHomeStatus
.
Name
=
"txtHomeStatus"
;
this
.
txtHomeStatus
.
Size
=
new
System
.
Drawing
.
Size
(
25
,
23
);
this
.
txtHomeStatus
.
TabIndex
=
291
;
...
...
@@ -162,7 +162,7 @@
// label10
//
this
.
label10
.
AutoSize
=
true
;
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
58
,
78
);
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
58
,
85
);
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
66
,
17
);
this
.
label10
.
TabIndex
=
289
;
...
...
@@ -171,7 +171,7 @@
// label3
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
65
,
46
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
65
,
53
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
59
,
17
);
this
.
label3
.
TabIndex
=
286
;
...
...
@@ -180,7 +180,7 @@
// label24
//
this
.
label24
.
AutoSize
=
true
;
this
.
label24
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
2
06
);
this
.
label24
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
2
13
);
this
.
label24
.
Name
=
"label24"
;
this
.
label24
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
17
);
this
.
label24
.
TabIndex
=
316
;
...
...
@@ -210,7 +210,7 @@
// txtAlarmStatus
//
this
.
txtAlarmStatus
.
Enabled
=
false
;
this
.
txtAlarmStatus
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
43
);
this
.
txtAlarmStatus
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
50
);
this
.
txtAlarmStatus
.
Name
=
"txtAlarmStatus"
;
this
.
txtAlarmStatus
.
Size
=
new
System
.
Drawing
.
Size
(
25
,
23
);
this
.
txtAlarmStatus
.
TabIndex
=
285
;
...
...
@@ -218,7 +218,7 @@
// txtLimit2
//
this
.
txtLimit2
.
Enabled
=
false
;
this
.
txtLimit2
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
2
03
);
this
.
txtLimit2
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
2
10
);
this
.
txtLimit2
.
Name
=
"txtLimit2"
;
this
.
txtLimit2
.
Size
=
new
System
.
Drawing
.
Size
(
25
,
23
);
this
.
txtLimit2
.
TabIndex
=
313
;
...
...
@@ -234,7 +234,7 @@
// label22
//
this
.
label22
.
AutoSize
=
true
;
this
.
label22
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
1
74
);
this
.
label22
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
1
81
);
this
.
label22
.
Name
=
"label22"
;
this
.
label22
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
17
);
this
.
label22
.
TabIndex
=
312
;
...
...
@@ -244,7 +244,7 @@
// txtLimit1
//
this
.
txtLimit1
.
Enabled
=
false
;
this
.
txtLimit1
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
17
1
);
this
.
txtLimit1
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
17
8
);
this
.
txtLimit1
.
Name
=
"txtLimit1"
;
this
.
txtLimit1
.
Size
=
new
System
.
Drawing
.
Size
(
25
,
23
);
this
.
txtLimit1
.
TabIndex
=
309
;
...
...
@@ -252,7 +252,7 @@
// label6
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
65
,
14
2
);
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
65
,
14
9
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
59
,
17
);
this
.
label6
.
TabIndex
=
300
;
...
...
@@ -261,7 +261,7 @@
// txtHomeSingle
//
this
.
txtHomeSingle
.
Enabled
=
false
;
this
.
txtHomeSingle
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
1
39
);
this
.
txtHomeSingle
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
1
46
);
this
.
txtHomeSingle
.
Name
=
"txtHomeSingle"
;
this
.
txtHomeSingle
.
Size
=
new
System
.
Drawing
.
Size
(
25
,
23
);
this
.
txtHomeSingle
.
TabIndex
=
297
;
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
d5e6eb4
...
...
@@ -371,7 +371,7 @@ namespace OnlineStore.DeviceLibrary
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
LogUtil
.
error
(
MoveInfo
.
Name
+
WarnMsg
,
DeviceID
+
13
);
}
else
if
(
rwSpan
.
TotalSeconds
>
3
&&
span
.
TotalSeconds
>
3
)
else
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
)
{
preRWTime
=
DateTime
.
Now
;
string
msg
=
moveInfo
.
Name
+
" "
+
NotOkMsg
+
"已等待 "
+
Math
.
Abs
(
span
.
TotalSeconds
)
+
"秒,重写DO:"
;
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
d5e6eb4
...
...
@@ -97,7 +97,7 @@ namespace OnlineStore.DeviceLibrary
private
void
StartReset
()
{
BatchAxisStopCheck
();
ResetClearData
();
lineStatus
=
LineStatus
.
ResetMove
;
IOMove
(
IO_Type
.
SL_HddLed
,
IO_VALUE
.
HIGH
);
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
查看文件 @
d5e6eb4
...
...
@@ -16,6 +16,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
{
BatchAxisStopCheck
();
return
true
;
}
else
...
...
@@ -23,6 +24,7 @@ namespace OnlineStore.DeviceLibrary
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
0
);
if
(
isOk
)
{
BatchAxisStopCheck
();
return
true
;
}
}
...
...
@@ -47,7 +49,8 @@ namespace OnlineStore.DeviceLibrary
if
(
Config
.
SidesWayNum
>
0
)
{
int
num
=
TrayManager
.
GetTrayNum
(
DeviceID
);
bool
isTestNeed
=
LineManager
.
Line
.
runStatus
<=
LineRunStatus
.
Wait
&&
IOValue
(
IO_Type
.
SW_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW_ReelCheck
).
Equals
(
IO_VALUE
.
LOW
);
bool
isTestNeed
=(
LineManager
.
Line
.
runStatus
<=
LineRunStatus
.
Wait
)
&&
IOValue
(
IO_Type
.
SW_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW_ReelCheck
).
Equals
(
IO_VALUE
.
LOW
);
bool
isNeedTray
=
IOValue
(
IO_Type
.
SW_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
num
>
0
&&
preTrayNum
.
Equals
(
num
).
Equals
(
false
)
&&
LineManager
.
Line
.
SwNoProcess
(
Config
.
SidesWayNum
);
if
(
isTestNeed
||
isNeedTray
)
{
...
...
@@ -378,7 +381,7 @@ namespace OnlineStore.DeviceLibrary
private
bool
StartInStoreP
()
{
//若定位工位,阻挡工位,有 料架,需要进行处理
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
)
)
{
StartInStoreMove
(
null
);
}
...
...
@@ -434,7 +437,7 @@ namespace OnlineStore.DeviceLibrary
}
private
void
LineInStoreProcess
()
{
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_
Line_Run
,
IO_VALUE
.
LOW
);
//判断是哪个工位有料架
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
@@ -445,12 +448,23 @@ namespace OnlineStore.DeviceLibrary
else
if
(
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_03_LineStart
);
InStoreLog
(
" 入料检测: "
+
MoveInfo
.
SLog
+
" 阻挡工位检测有料架,进料阻挡上升,缓冲阻挡下降,流水线转动 1000"
);
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
HIGH
);
//进料阻挡上升
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
//缓冲阻挡下降
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
//等待指定时间
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_Location_Check
,
IO_VALUE
.
HIGH
));
}
else
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_03_LineStart
);
InStoreLog
(
" 入料检测: "
+
MoveInfo
.
SLog
+
" 进料口检测有料架,进料阻挡下降,缓冲阻挡上升,流水线转动 1000"
);
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
LOW
);
//进料阻挡上升
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
);
//缓冲阻挡下降
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_
Line_Run
,
IO_VALUE
.
HIGH
);
//等待指定时间
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2
000
));
InStoreLog
(
" 入料检测: "
+
MoveInfo
.
SLog
+
" 阻挡检测有料架,进料阻挡上升,缓冲阻挡下降,流水线转动2000"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1
000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_Stop_Check
,
IO_VALUE
.
HIGH
)
);
}
else
{
...
...
@@ -496,7 +510,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_08_BatchAxisToP2
);
InStoreLog
(
" 料架入库"
+
MoveInfo
.
SLog
+
":提升轴下降到位P2,定位气缸上升"
);
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_
Line_Run
,
IO_VALUE
.
LOW
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SL_LocationCylinder_Up
);
}
...
...
@@ -584,7 +598,19 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_18_SaveSize
);
LastHeight
=
GetHeight
();
LastWidth
=
GetWidth
();
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":记录高度尺寸 高度【"
+
LastHeight
+
"】宽度【"
+
LastWidth
+
"】"
);
//判断是否还有料盘
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":记录高度尺寸 高度【"
+
LastHeight
+
"】宽度【"
+
LastWidth
+
"】,已经没有料盘,提升轴开始回下降待机点P2"
);
MoveInfo
.
ShelfNoTray
=
true
;
BatchAxis
.
AbsMove
(
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
}
else
{
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":记录高度尺寸 高度【"
+
LastHeight
+
"】宽度【"
+
LastWidth
+
"】"
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_18_SaveSize
))
{
...
...
@@ -604,14 +630,29 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_19_MoveCylinder_Emptying
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_20_WaitTray
);
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":等待空托盘到达
,并顶升上升,定位上升
"
);
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":等待空托盘到达"
);
//TODO 此处需要等待空托盘
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_WaitTray
)
&&
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_11_CodeRember
)
)
//TODO
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_WaitTray
))
//TODO
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_MoveCylinder_Down
);
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_11_CodeRember
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_MoveCylinder_Down
);
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
}
else
{
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
if
(
span
.
TotalSeconds
>
180
)
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待空托盘到达超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
19
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_21_MoveCylinder_Down
))
{
...
...
@@ -641,7 +682,7 @@ namespace OnlineStore.DeviceLibrary
{
//更新托盘条码信息
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
TrayManager
.
UpdateTrayInfo
(
currTrayNum
,
true
,
1
,
code
,
""
,
LastHeight
,
LastWidth
);
TrayManager
.
UpdateTrayInfo
(
currTrayNum
,
true
,
1
,
code
,
""
,
LastHeight
,
LastWidth
);
if
(
code
.
Equals
(
""
))
{
TrayManager
.
UpdateInStoreNG
(
currTrayNum
,
true
);
...
...
@@ -730,28 +771,30 @@ namespace OnlineStore.DeviceLibrary
if
(
MoveCylineCanTakeOrGive
())
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_12_MoveCylinder_Give
);
InStoreLog
(
" 料盘移栽
"
+
MoveInfo
.
SLog
+
":
横移机构到放料端"
);
InStoreLog
(
" 料盘移栽
"
+
MoveInfo
.
SLog
+
":上料机构检测到料盘,
横移机构到放料端"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
);
}
else
{
//有料盘
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_11_MoveCylinder_Up
);
InStoreLog
(
" 料盘移栽
"
+
MoveInfo
.
SLog
+
":
检测到料盘,横移机构上升"
);
InStoreLog
(
" 料盘移栽
"
+
MoveInfo
.
SLog
+
":上料机构
检测到料盘,横移机构上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
private
void
CheckHasTray
()
{
if
(
IOValue
(
IO_Type
.
SL_
Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SL_
AxisLocationCheck
).
Equals
(
IO_VALUE
.
HIGH
)&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
{
FI_12_MoveCylinder_Give
();
}
else
{
//无料盘
MoveInfo
.
ShelfNoTray
=
true
;
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_31_BatchAxisToP2
);
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":未检测到料盘,提升伺服到P2点"
);
BatchAxis
.
SuddenStop
();
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
}
}
...
...
@@ -858,7 +901,7 @@ namespace OnlineStore.DeviceLibrary
else
{
bool
trayCanUse
=
LineManager
.
Line
.
runStatus
<=
LineRunStatus
.
Wait
||
(!
isFull
);
if
(
trayCanUse
&&
runStatus
.
Equals
(
LineRunStatus
.
Runing
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
if
(
trayCanUse
&&
runStatus
.
Equals
(
LineRunStatus
.
Busy
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
{
//入料执行中, 且需要空托盘
if
(
MoveInfo
.
MoveStep
>=
LineMoveStep
.
FI_11_MoveCylinder_Up
&&
MoveInfo
.
MoveStep
<=
LineMoveStep
.
FI_20_WaitTray
)
...
...
@@ -891,7 +934,7 @@ namespace OnlineStore.DeviceLibrary
}
private
void
LineOutStoreProcess
()
{
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_
Line_Run
,
IO_VALUE
.
LOW
);
//判断是哪个工位有料架
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
@@ -908,7 +951,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_03_LineStart
);
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
LOW
);
//进料阻挡上升
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
HIGH
);
//缓冲阻挡下降
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_
Line_Run
,
IO_VALUE
.
HIGH
);
//等待指定时间
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
OutStoreLog
(
" 出料检测"
+
MoveInfo
.
SLog
+
":阻挡工位有料架,进料阻挡上升,缓冲阻挡下降,流水线转动2000"
);
...
...
@@ -918,7 +961,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_03_LineStart
);
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
HIGH
);
//进料阻挡下降
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
//缓冲阻挡上升
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_
Line_Run
,
IO_VALUE
.
HIGH
);
//等待指定时间
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
OutStoreLog
(
" 出料检测"
+
MoveInfo
.
SLog
+
":入料工位有料架,进料阻挡下降,缓冲阻挡上升,流水线转动2000"
);
...
...
@@ -949,7 +992,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_01_TrayLocation_After
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_02_LocationCylinder_Down
);
OutStoreLog
(
"出库: "
+
MoveInfo
.
SLog
+
" 开始:定位气缸下降,提升轴移动到P1"
);
OutStoreLog
(
"出库: "
+
MoveInfo
.
SLog
+
" 开始:定位气缸下降,提升轴移动到P1"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Up
,
IO_Type
.
SL_LocationCylinder_Down
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP1
,
Config
.
BatchAxis_P1Speed
);
}
...
...
@@ -965,26 +1008,26 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_07_LocationCylinder_Up
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_08_BatchAxisToP2
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
" :提升轴下降到位P2"
);
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
" :提升轴下降到位P2"
);
IOMove
(
IO_Type
.
SL_
Line_Run
,
IO_VALUE
.
LOW
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_08_BatchAxisToP2
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_09_TrayLocation_Before
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
" :升降盘定位气缸前进"
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
" :升降盘定位气缸前进"
);
TrayLCylinderBefore
(
MoveInfo
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_09_TrayLocation_Before
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_10_AxisUpMove
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
" :上料轴开始慢速上升到P3点"
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
" :上料轴开始慢速上升到P3点"
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP3
,
Config
.
BatchAxis_TargetSpeed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_10_AxisUpMove
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_11_AxisDownMove
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
" :提升伺服下降指定的高度"
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
" :提升伺服下降指定的高度"
);
int
targetPosition
=
Config
.
BatchAxisP3
+
lastOutParam
.
PlateH
*
Config
.
Height_ChangeValue
;
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_TargetSpeed
);
...
...
@@ -992,75 +1035,80 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_11_AxisDownMove
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_12_MoveCylinder_Down
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
":出料横移机构下降"
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
":出料横移机构下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_12_MoveCylinder_Down
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_13_MoveCylinder_Slack
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
":出料横移机构放松"
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
":出料横移机构放松"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Tighten
,
IO_Type
.
SL_MoveCylinder_Slack
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_13_MoveCylinder_Slack
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_14_MoveCylinder_Up
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
":上料横移机构上升"
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
":上料横移机构上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_14_MoveCylinder_Up
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_31_BatchAxisToP2
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
":未检测到料盘,提升伺服到P2点"
);
OutStoreLog
(
"出库料盘移栽 "
+
MoveInfo
.
SLog
+
":未检测到料盘,提升伺服到P2点"
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_31_BatchAxisToP2
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_32_TrayLocationCylinder_After
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
": 升降盘定位气缸后退"
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
": 升降盘定位气缸后退"
);
TrayLCylinderAfter
(
MoveInfo
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_32_TrayLocationCylinder_After
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_33_BatchAxisToP1
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
":提升伺服到P1点
"
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
":提升伺服到P1点,定位气缸下降
"
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP1
,
Config
.
BatchAxis_P1Speed
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Up
,
IO_Type
.
SL_LocationCylinder_Down
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_33_BatchAxisToP1
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_3
5
_OutTopCylinder_Up
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
",出口顶升气缸上升,出料缓冲阻挡上升"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_3
4
_OutTopCylinder_Up
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
",出口顶升气缸上升,出料缓冲阻挡上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Down
,
IO_Type
.
SL_OutTopCylinder_Up
);
IOMove
(
IO_Type
.
SL_Out_StopDown
,
IO_VALUE
.
LOW
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_34_Out
Check
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_34_Out
TopCylinder_Up
))
{
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_35_OutTopCylinder_Up
))
//TODO
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_36_SideWayLineRun
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 线体横移电机运转,等待料架离开定位工位"
);
IOMove
(
IO_Type
.
SL_LocationSideWay_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_OutSideWay_Run
,
IO_VALUE
.
HIGH
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_Location_Check
,
IO_VALUE
.
LOW
));
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_35_WaitLocationNoShelf
))
{
//TODO
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_36_SideWayLineRun
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 线体横移电机运转,等待料架到达出口"
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 线体横移电机运转,等待料架到达出口"
);
IOMove
(
IO_Type
.
SL_LocationSideWay_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_OutSideWay_Run
,
IO_VALUE
.
HIGH
);
MoveInfo
.
OneWaitCanEndStep
=
true
;
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
0
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_Out_Check
,
IO_VALUE
.
HIGH
));
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_36_SideWayLineRun
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_37_LineStop
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 料架到达出口,线体横移电机停止 "
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 料架到达出口,线体横移电机停止 "
);
IOMove
(
IO_Type
.
SL_LocationSideWay_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_OutSideWay_Run
,
IO_VALUE
.
LOW
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_37_LineStop
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_38_TopCylinderDown
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 料架到达出口,出口顶升下降,定位气缸下降, "
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 料架到达出口,出口顶升下降,定位气缸下降, "
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Up
,
IO_Type
.
SL_LocationCylinder_Down
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
...
...
@@ -1068,17 +1116,17 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_38_TopCylinderDown
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_39_OutLineRun
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 出口线体运转,料架到达出口处, 通知AGV取空料架, "
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 出口线体运转,料架到达出口处, 通知AGV取空料架, "
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_40_OutLineRun
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_40_OutLineRun
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", AGV到达,继续转动出口线体,送走出料料架, "
);
OutStoreLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", AGV到达,继续转动出口线体,送走出料料架, "
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_40_OutLineRun
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_41_OutLineRun
);
OutStoreLog
(
"上料完成 "
+
MoveInfo
.
SLog
+
", 料架送出, "
);
OutStoreLog
(
"上料完成 "
+
MoveInfo
.
SLog
+
", 料架送出, "
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_41_OutLineRun
))
{
...
...
source/DeviceLibrary/deviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
d5e6eb4
...
...
@@ -156,7 +156,8 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
IsHomeMoveEnd
(
string
portName
,
int
slvAddr
)
{
int
status
=
GetHomeEndStatus
(
portName
,
slvAddr
);
if
(
status
>=
1
)
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
portName
,
slvAddr
).
Equals
(
0
);
if
(
status
>=
1
&&
isOk
)
{
return
true
;
}
return
false
;
...
...
source/DeviceLibrary/model/LineMoveInfo.cs
查看文件 @
d5e6eb4
...
...
@@ -19,7 +19,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
int
TimeOutSeconds
=
60
;
public
string
Name
=
""
;
public
bool
ShelfNoTray
=
false
;
public
LineMoveInfo
(
int
storeId
,
string
name
)
{
this
.
Name
=
name
;
...
...
@@ -84,7 +84,7 @@ namespace OnlineStore.DeviceLibrary
}
public
string
SLog
{
get
{
return
MoveStep
+
"
"
;
}
get
{
return
" "
+
MoveStep
+
"
"
;
}
}
public
void
NextMoveStep
(
LineMoveStep
step
)
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
d5e6eb4
...
...
@@ -806,39 +806,43 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 出料完成,判断出料线体是否有料架
/// </summary>
FO_34_OutCheck
=
12034
,
//
FO_34_OutCheck = 12034,
/// <summary>
/// 出料完成,出口顶升气缸上升
/// </summary>
FO_35_OutTopCylinder_Up
=
12035
,
FO_34_OutTopCylinder_Up
=
12034
,
/// <summary>
///出料完成, 等待料架离开定位工位
/// </summary>
FO_35_WaitLocationNoShelf
,
/// <summary>
///出料完成, 线体横移电机运转,等待料架到达出口
/// </summary>
FO_36_SideWayLineRun
=
12036
,
FO_36_SideWayLineRun
,
/// <summary>
///出料完成, 料架到达出口,线体横移电机停止
/// </summary>
FO_37_LineStop
=
12037
,
FO_37_LineStop
,
/// <summary>
///出料完成, 料架到达出口,出口顶升下降,定位气缸下降,
/// </summary>
FO_38_TopCylinderDown
=
12038
,
FO_38_TopCylinderDown
,
/// <summary>
///出料完成, 出口线体运转,料架到达出口处, 通知AGV取空料架
/// </summary>
FO_39_OutLineRun
=
12039
,
FO_39_OutLineRun
,
/// <summary>
///出料完成, AGV到达,继续转动出口线体,送走出料料架,
/// </summary>
FO_40_OutLineRun
=
12040
,
FO_40_OutLineRun
,
/// <summary>
///出料完成, 料架送出,
/// </summary>
FO_41_OutLineRun
=
12041
,
FO_41_OutLineRun
,
#
endregion
#
region
出料装置移栽出料,
20000
开始
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论