Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a274958c
由
LN
编写于
2020-03-24 17:42:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
移栽模块出库过程中或还有出库任务,不能入库,完全出库完成再入库
1 个父辈
afb5dcce
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
158 行增加
和
125 行删除
source/AssemblyLineClient/FrmDischargeLine.Designer.cs
source/AssemblyLineClient/记录.txt
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/model/StoreStep.cs
source/AssemblyLineClient/FrmDischargeLine.Designer.cs
查看文件 @
a274958
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
this
.
panel1
.
Controls
.
Add
(
this
.
btnReset
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnReset
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
2
,
1
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
2
,
1
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
13
03
,
56
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
13
12
,
56
);
this
.
panel1
.
TabIndex
=
258
;
this
.
panel1
.
TabIndex
=
258
;
//
//
// btnScan
// btnScan
...
@@ -206,10 +206,10 @@
...
@@ -206,10 +206,10 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage1
);
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage1
);
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
60
);
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
60
);
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
13
07
,
519
);
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
13
10
,
519
);
this
.
tabControl1
.
TabIndex
=
257
;
this
.
tabControl1
.
TabIndex
=
257
;
//
//
// tabPage1
// tabPage1
...
@@ -223,7 +223,7 @@
...
@@ -223,7 +223,7 @@
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
1
299
,
489
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
1
302
,
489
);
this
.
tabPage1
.
TabIndex
=
0
;
this
.
tabPage1
.
TabIndex
=
0
;
this
.
tabPage1
.
Text
=
" IO列表 "
;
this
.
tabPage1
.
Text
=
" IO列表 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
...
@@ -236,9 +236,9 @@
...
@@ -236,9 +236,9 @@
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnlineStop
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnlineStop
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
cmbLineType
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
cmbLineType
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnLine1Test
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnLine1Test
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
49
5
,
157
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
49
1
,
157
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
797
,
66
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
805
,
66
);
this
.
groupBox2
.
TabIndex
=
279
;
this
.
groupBox2
.
TabIndex
=
279
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"皮带转动测试"
;
this
.
groupBox2
.
Text
=
"皮带转动测试"
;
...
@@ -325,9 +325,9 @@
...
@@ -325,9 +325,9 @@
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblTrayNum
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblTrayNum
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblInstoreList
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblInstoreList
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblMoveInfo
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblMoveInfo
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
49
5
,
227
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
49
1
,
227
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
797
,
256
);
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
808
,
256
);
this
.
groupBox6
.
TabIndex
=
278
;
this
.
groupBox6
.
TabIndex
=
278
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"消息"
;
this
.
groupBox6
.
Text
=
"消息"
;
...
@@ -342,7 +342,7 @@
...
@@ -342,7 +342,7 @@
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
271
,
14
);
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
271
,
14
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
5
20
,
137
);
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
5
31
,
137
);
this
.
lblThisSta
.
TabIndex
=
246
;
this
.
lblThisSta
.
TabIndex
=
246
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
...
@@ -367,7 +367,7 @@
...
@@ -367,7 +367,7 @@
this
.
lblInstoreList
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblInstoreList
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblInstoreList
.
Location
=
new
System
.
Drawing
.
Point
(
267
,
228
);
this
.
lblInstoreList
.
Location
=
new
System
.
Drawing
.
Point
(
267
,
228
);
this
.
lblInstoreList
.
Name
=
"lblInstoreList"
;
this
.
lblInstoreList
.
Name
=
"lblInstoreList"
;
this
.
lblInstoreList
.
Size
=
new
System
.
Drawing
.
Size
(
5
24
,
53
);
this
.
lblInstoreList
.
Size
=
new
System
.
Drawing
.
Size
(
5
35
,
53
);
this
.
lblInstoreList
.
TabIndex
=
277
;
this
.
lblInstoreList
.
TabIndex
=
277
;
//
//
// lblMoveInfo
// lblMoveInfo
...
@@ -413,7 +413,7 @@
...
@@ -413,7 +413,7 @@
this
.
groupBox4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
this
.
groupBox4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
groupBox4
.
Controls
.
Add
(
this
.
tableLayoutPanel2
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
tableLayoutPanel2
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
2
51
,
6
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
2
48
,
6
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
477
);
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
477
);
this
.
groupBox4
.
TabIndex
=
104
;
this
.
groupBox4
.
TabIndex
=
104
;
...
@@ -450,7 +450,7 @@
...
@@ -450,7 +450,7 @@
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnStop1Up
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnStop1Up
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
876
,
6
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
876
,
6
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
4
16
,
147
);
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
4
24
,
147
);
this
.
groupBox5
.
TabIndex
=
255
;
this
.
groupBox5
.
TabIndex
=
255
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"IO操作测试"
;
this
.
groupBox5
.
Text
=
"IO操作测试"
;
...
@@ -573,9 +573,9 @@
...
@@ -573,9 +573,9 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtSlaveId
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtSlaveId
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cmbWriteIO
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cmbWriteIO
);
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
49
5
,
6
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
49
1
,
6
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
3
74
,
147
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
3
82
,
147
);
this
.
groupBox1
.
TabIndex
=
105
;
this
.
groupBox1
.
TabIndex
=
105
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"DO写入"
;
this
.
groupBox1
.
Text
=
"DO写入"
;
...
...
source/AssemblyLineClient/记录.txt
查看文件 @
a274958
20200324
20200324
1.入库逻辑修改:提升轴先上升后需要下降到料盘不溢出的位置,横移气缸才能动作。
1.入库逻辑修改:提升轴先上升后需要下降到料盘不溢出的位置,横移气缸才能动作。
2.出料模块取料条件修改:随意放时需要等皮带线空闲。
2.出料模块取料条件修改:随意放时需要等皮带线空闲。
3.移栽模块出库过程中或还有出库任务,不能入库,完全出库完成再入库
20200323
20200323
...
...
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
a274958
...
@@ -620,20 +620,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -620,20 +620,9 @@ namespace OnlineStore.DeviceLibrary
msg
+=
"LastTP:"
+
TrayLine1
.
LastTrayPosition
+
" "
+
TrayLine2
.
LastTrayPosition
+
" "
+
Line3LastTrayP
+
" "
+
"\n"
;
msg
+=
"LastTP:"
+
TrayLine1
.
LastTrayPosition
+
" "
+
TrayLine2
.
LastTrayPosition
+
" "
+
Line3LastTrayP
+
" "
+
"\n"
;
msg
+=
"LIsRun:"
+
TrayLine1
.
IsInTurn
()
+
" "
+
TrayLine2
.
IsInTurn
()
+
" "
+
Line3Turn
.
InTurn
+
" "
+
"\n"
;
msg
+=
"LIsRun:"
+
TrayLine1
.
IsInTurn
()
+
" "
+
TrayLine2
.
IsInTurn
()
+
" "
+
Line3Turn
.
InTurn
+
" "
+
"\n"
;
msg
+=
"L3CanRun:"
+
TrayLine1
.
Line3CanRun
+
" "
+
TrayLine2
.
Line3CanRun
+
" "
+
"\n"
;
msg
+=
"L3CanRun:"
+
TrayLine1
.
Line3CanRun
+
" "
+
TrayLine2
.
Line3CanRun
+
" "
+
"\n"
;
//msg += "LastWidth:" + LastWidth+"\n";
//if (IsNewType)
//{
msg
+=
"Move:"
+
MoveInfo
.
MoveType
+
" "
+
MoveInfo
.
MoveStep
+
" "
+
LastWidth
+
"="
+
StationInfo_Move
.
CodeStr
+
"\n"
;
msg
+=
"Move:"
+
MoveInfo
.
MoveType
+
" "
+
MoveInfo
.
MoveStep
+
" "
+
LastWidth
+
"="
+
StationInfo_Move
.
CodeStr
+
"\n"
;
//}
msg
+=
"NG 位:"
+
StationInfo_NG
.
ToStr
+
"\n"
;
//else
msg
+=
"扫码位:"
+
StationInfo_Scan
.
ToStr
+
"\n"
;
//{
// msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + " " + LastWidth + "=" + StationInfo_Move.CodeStr + "\n";
//}
msg
+=
"NG 工位:"
+
StationInfo_NG
.
ToStr
+
"\n"
;
msg
+=
"扫码工位:"
+
StationInfo_Scan
.
ToStr
+
"\n"
;
//msg += "IsInScanCode:" + IsInScanCode;
// msg += "LastWidth:" + LastWidth + "\n";
return
msg
;
return
msg
;
}
}
public
override
bool
StartInStoreMove
(
InOutParam
param
)
public
override
bool
StartInStoreMove
(
InOutParam
param
)
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
a274958
...
@@ -20,7 +20,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -20,7 +20,7 @@ namespace OnlineStore.DeviceLibrary
//等待信号亮或者走到绝对位置才停止
//等待信号亮或者走到绝对位置才停止
if
(
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
if
(
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
{
{
LogUtil
.
debug
(
Name
+
"CheckWaitResult 检测到"
+
TargetIoType
+
"="
+
TargetIoValue
+
",停止运行"
);
LogUtil
.
debug
(
Name
+
"CheckWaitResult 检测到"
+
TargetIoType
+
"="
+
TargetIoValue
+
",停止运行"
);
BatchAxisStopCheck
();
BatchAxisStopCheck
();
if
(
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
1
))
if
(
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
1
))
{
{
...
@@ -50,10 +50,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -50,10 +50,10 @@ namespace OnlineStore.DeviceLibrary
}
}
public
override
void
CheckAlarmProcess
(
LineMoveInfo
moveInfo
,
LineAlarmType
alarmType
)
public
override
void
CheckAlarmProcess
(
LineMoveInfo
moveInfo
,
LineAlarmType
alarmType
)
{
{
if
(
moveInfo
.
MoveType
.
Equals
(
LineMoveStep
.
FI_18_WaitNoLocationCheck
)
&&
alarmType
.
Equals
(
LineAlarmType
.
IoSingleTimeOut
))
if
(
moveInfo
.
MoveType
.
Equals
(
LineMoveStep
.
FI_18_WaitNoLocationCheck
)
&&
alarmType
.
Equals
(
LineAlarmType
.
IoSingleTimeOut
))
{
{
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
LogUtil
.
error
(
moveInfo
.
Name
+
" ["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待SL_AxisLocationCheck=LOW超时,清空当前料盘条码:"
+
code
);
LogUtil
.
error
(
moveInfo
.
Name
+
" ["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待SL_AxisLocationCheck=LOW超时,清空当前料盘条码:"
+
code
);
LastCodeList
=
new
List
<
string
>();
LastCodeList
=
new
List
<
string
>();
}
}
}
}
...
@@ -61,8 +61,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -61,8 +61,8 @@ namespace OnlineStore.DeviceLibrary
#
region
托盘检测
#
region
托盘检测
private
InOutParam
CheckParam
=
new
InOutParam
();
private
InOutParam
CheckParam
=
new
InOutParam
();
internal
DateTime
lastStopDown
=
DateTime
.
Now
;
internal
DateTime
lastStopDown
=
DateTime
.
Now
;
private
Stopwatch
swWaitWatch
=
new
Stopwatch
();
private
Stopwatch
swWaitWatch
=
new
Stopwatch
();
private
object
lockObj
=
""
;
private
object
lockObj
=
""
;
...
@@ -74,12 +74,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -74,12 +74,12 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
{
{
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
" 不在空闲中,直接返回 "
);
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
" 不在空闲中,直接返回 "
);
return
;
return
;
}
}
if
(!
LineManager
.
Line
.
CanProcessLine
())
if
(!
LineManager
.
Line
.
CanProcessLine
())
{
{
swWaitWatch
.
Stop
();
swWaitWatch
.
Stop
();
return
;
return
;
}
}
...
@@ -88,7 +88,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -88,7 +88,7 @@ namespace OnlineStore.DeviceLibrary
bool
canProcess
=
(
LineManager
.
Line
.
SwNoProcess
(
Config
.
SidesWayNum
));
bool
canProcess
=
(
LineManager
.
Line
.
SwNoProcess
(
Config
.
SidesWayNum
));
if
(
IOValue
(
IO_Type
.
SW_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SW_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(
TrayManager
.
checkWatch
(
swWaitWatch
,
TrayManager
.
SwTrayWaitTime
,
false
)
&&
canProcess
)
if
(
TrayManager
.
checkWatch
(
swWaitWatch
,
TrayManager
.
SwTrayWaitTime
,
false
)
&&
canProcess
)
{
{
swWaitWatch
.
Stop
();
swWaitWatch
.
Stop
();
UpdateTrayNum
();
UpdateTrayNum
();
...
@@ -110,16 +110,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -110,16 +110,16 @@ namespace OnlineStore.DeviceLibrary
else
if
(
Config
.
SidesWayNum
.
Equals
(
2
)
&&
IOValue
(
IO_Type
.
SW_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
)
else
if
(
Config
.
SidesWayNum
.
Equals
(
2
)
&&
IOValue
(
IO_Type
.
SW_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
(
DateTime
.
Now
-
lastStopDown
).
TotalSeconds
>
3
)
&&
(
DateTime
.
Now
-
lastStopDown
).
TotalSeconds
>
3
)
{
{
if
(
TrayManager
.
checkWatch
(
swWaitWatch
,
TrayManager
.
SwTrayWaitTime
,
false
)
&&
canProcess
)
if
(
TrayManager
.
checkWatch
(
swWaitWatch
,
TrayManager
.
SwTrayWaitTime
,
false
)
&&
canProcess
)
{
{
swWaitWatch
.
Stop
();
swWaitWatch
.
Stop
();
lastStopDown
=
DateTime
.
Now
;
lastStopDown
=
DateTime
.
Now
;
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
,
CheckParam
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
,
CheckParam
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LogUtil
.
debug
(
Name
+
" ["
+
trayCount
+
"] 检测到SW_StopCheck:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸下降 ,等待 SW_StopCheck=0"
);
LogUtil
.
debug
(
Name
+
" ["
+
trayCount
+
"] 检测到SW_StopCheck:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸下降 ,等待 SW_StopCheck=0"
);
//CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" );
//CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" );
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
HIGH
,
1200
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
HIGH
,
1200
);
SecondMoveInfo
.
OneWaitCanEndStep
=
true
;
SecondMoveInfo
.
OneWaitCanEndStep
=
true
;
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
//SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.HIGH));
//SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.HIGH));
...
@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
"失败,未得到锁"
);
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
"失败,未得到锁"
);
}
}
}
}
protected
override
void
CheckFixtureProcess
()
protected
override
void
CheckFixtureProcess
()
{
{
if
(!
LineManager
.
Line
.
LineCanRun
())
if
(!
LineManager
.
Line
.
LineCanRun
())
...
@@ -437,7 +437,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -437,7 +437,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
11
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
11
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
}
}
}
private
void
TrayMoveOk
()
private
void
TrayMoveOk
()
{
{
...
@@ -467,7 +467,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -467,7 +467,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_LocationCylinder_Up
,
IO_Type
.
SW_LocationCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_LocationCylinder_Up
,
IO_Type
.
SW_LocationCylinder_Down
);
if
(!
Config
.
SidesWayNum
.
Equals
(
2
))
if
(!
Config
.
SidesWayNum
.
Equals
(
2
))
{
{
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
}
}
}
}
...
@@ -475,7 +475,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -475,7 +475,7 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
if
(
CylinderIsOk
(
IO_Type
.
FL_TopCylinder_Up
,
IO_Type
.
FL_TopCylinder_Down
))
if
(
CylinderIsOk
(
IO_Type
.
FL_TopCylinder_Up
,
IO_Type
.
FL_TopCylinder_Down
))
{
{
MO_15_WaitCanGo
();
MO_15_WaitCanGo
();
}
}
else
else
...
@@ -503,7 +503,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -503,7 +503,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
SMoveEnd
()
private
void
SMoveEnd
()
{
{
lastStopDown
=
DateTime
.
Now
.
AddSeconds
(-
2
);
lastStopDown
=
DateTime
.
Now
.
AddSeconds
(-
2
);
SecondMoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
this
.
TrayPEndEvent
?.
Invoke
(
Config
.
SidesWayNum
,
currTrayNum
);
this
.
TrayPEndEvent
?.
Invoke
(
Config
.
SidesWayNum
,
currTrayNum
);
}
}
...
@@ -530,10 +530,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -530,10 +530,10 @@ namespace OnlineStore.DeviceLibrary
ShelfEnterProcess
();
ShelfEnterProcess
();
}
}
}
}
return
false
;
return
false
;
}
}
public
override
bool
StartInStoreMove
(
InOutParam
param
)
public
override
bool
StartInStoreMove
(
InOutParam
param
)
{
{
runStatus
=
LineRunStatus
.
Busy
;
runStatus
=
LineRunStatus
.
Busy
;
lineStatus
=
LineStatus
.
InStoreExecute
;
lineStatus
=
LineStatus
.
InStoreExecute
;
...
@@ -550,7 +550,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -550,7 +550,7 @@ namespace OnlineStore.DeviceLibrary
InLog
(
"检测到料架, "
+
MoveInfo
.
MoveStep
+
" :升降盘定位气缸下降"
);
InLog
(
"检测到料架, "
+
MoveInfo
.
MoveStep
+
" :升降盘定位气缸下降"
);
TrayLCylinderAfter
(
MoveInfo
);
TrayLCylinderAfter
(
MoveInfo
);
}
}
return
true
;
return
true
;
}
}
private
void
FI_04_WaitTime
()
private
void
FI_04_WaitTime
()
...
@@ -562,7 +562,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -562,7 +562,7 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
}
}
private
void
LineInStoreProcess
()
private
void
LineInStoreProcess
()
{
{
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
LOW
);
...
@@ -577,7 +577,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -577,7 +577,7 @@ namespace OnlineStore.DeviceLibrary
{
{
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
.
HIGH
,
1000
);
//进料阻挡下降
IOMove
(
IO_Type
.
SL_Entry_StopDown
,
IO_VALUE
.
HIGH
,
1000
);
//进料阻挡下降
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
//缓冲阻挡下降
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
//缓冲阻挡下降
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
HIGH
);
//等待指定时间
//等待指定时间
...
@@ -733,6 +733,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -733,6 +733,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_18_WaitNoLocationCheck
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_18_WaitNoLocationCheck
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_19_BatchAxisToP3
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_19_BatchAxisToP3
);
LastWidth
=
GetWidth
();
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":提升伺服运动到P3,盘宽【"
+
LastWidth
+
"】,横移气缸上升 "
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":提升伺服运动到P3,盘宽【"
+
LastWidth
+
"】,横移气缸上升 "
);
if
(!
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
))
if
(!
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
))
{
{
...
@@ -743,20 +744,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -743,20 +744,19 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_19_BatchAxisToP3
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_19_BatchAxisToP3
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_20_SaveSize
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_20_SaveSize
);
//if (MoveCylineCanTakeOrGive
())
if
(
MoveCylineIsUp
())
//
{
{
//
MoveInfo.NextMoveStep(LineMoveStep.FI_22_CylinderGive);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_22_CylinderGive
);
//
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL"
);
//
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
);
//
}
}
//
else
else
//
{
{
//
MoveInfo.NextMoveStep(LineMoveStep.FI_20_SaveSize);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_20_SaveSize
);
//
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL前先上升横移气缸");
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL前先上升横移气缸"
);
//
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
//
}
}
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
LastWidth
=
GetWidth
();
LastHeight
=
GetHeight
();
LastHeight
=
GetHeight
();
if
(
LastWidth
.
Equals
(
7
)
&&
LastHeight
>
16
)
if
(
LastWidth
.
Equals
(
7
)
&&
LastHeight
>
16
)
{
{
...
@@ -770,8 +770,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -770,8 +770,8 @@ namespace OnlineStore.DeviceLibrary
int
chaz
=
Math
.
Abs
(
currP
-
Config
.
BatchAxisP3
);
int
chaz
=
Math
.
Abs
(
currP
-
Config
.
BatchAxisP3
);
if
(
chaz
<
BatchAxis
.
Config
.
CanErrorCountMax
)
if
(
chaz
<
BatchAxis
.
Config
.
CanErrorCountMax
)
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_BatchAxisDown
);
//
MoveInfo.NextMoveStep(LineMoveStep.FI_21_BatchAxisDown);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":记录 高度【"
+
LastHeight
+
"】宽度【"
+
LastWidth
+
"】,已经没有料盘,且已达到P3:"
+
Config
.
BatchAxisP3
+
",提升轴开始回下降待机点P2"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":记录 高度【"
+
LastHeight
+
"】宽度【"
+
LastWidth
+
"】,已经没有料盘,且已达到P3:"
+
Config
.
BatchAxisP3
+
",提升轴开始回下降待机点P2"
);
MoveInfo
.
ShelfNoTray
=
true
;
MoveInfo
.
ShelfNoTray
=
true
;
BatchAxis
.
AbsMove
(
null
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
BatchAxis
.
AbsMove
(
null
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
...
@@ -789,25 +789,25 @@ namespace OnlineStore.DeviceLibrary
...
@@ -789,25 +789,25 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_SaveSize
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_SaveSize
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_BatchAxisDown
);
//
MoveInfo.NextMoveStep(LineMoveStep.FI_21_BatchAxisDown);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
int
maxtPosition
=
Config
.
BatchAxisP3
-
Config
.
Height_ChangeValue
*
30
;
//在上料位置基础上下降30mm
//
int maxtPosition = Config.BatchAxisP3 - Config.Height_ChangeValue * 30; //在上料位置基础上下降30mm
int
currPositon
=
BatchAxis
.
GetAclPosition
();
//
int currPositon = BatchAxis.GetAclPosition();
int
targetPosition
=
currPositon
-
Config
.
Height_ChangeValue
*
30
;
//
int targetPosition = currPositon - Config.Height_ChangeValue * 30;
if
(
targetPosition
<=
Config
.
BatchAxisP2
)
//
if (targetPosition <= Config.BatchAxisP2)
{
//
{
targetPosition
=
Config
.
BatchAxisP2
;
//
targetPosition = Config.BatchAxisP2;
}
//
}
else
if
(
targetPosition
>
maxtPosition
)
//
else if (targetPosition > maxtPosition)
{
//
{
targetPosition
=
maxtPosition
;
//
targetPosition = maxtPosition;
}
//
}
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":提升轴下降到料盘不溢出("
+
(
currPositon
-
Config
.
Height_ChangeValue
*
4
0
)
+
"):"
+
targetPosition
);
// InLog("料盘移栽" + MoveInfo.SLog + ":提升轴下降到料盘不溢出(" + (currPositon - Config.Height_ChangeValue * 3
0) + "):" + targetPosition);
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_P2Speed
);
//
BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_P2Speed);
}
//
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_21_BatchAxisDown
))
//
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_BatchAxisDown))
{
//
{
if
(
MoveCylineIsUp
())
if
(
MoveCylineIsUp
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_22_CylinderGive
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_22_CylinderGive
);
...
@@ -816,7 +816,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -816,7 +816,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
1_BatchAxisDown
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
0_SaveSize
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL前先上升横移气缸"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL前先上升横移气缸"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
...
@@ -826,37 +826,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -826,37 +826,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_23_WaitTray
);
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
+
""
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetPositon
,
Config
.
UpdownAxis_P2Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetPositon
,
Config
.
UpdownAxis_P2Speed
);
bool
isScan
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedScanCode
).
Equals
(
1
);
YuScanCode
();
//TODO 此处需要等待空托盘
if
(
MoveInfo
.
ShelfNoTray
.
Equals
(
false
)
&&
isScan
)
{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":等待空托盘到达 "
+
log
+
",预扫码"
);
//还有料盘,直接扫码
NextCodeList
=
new
List
<
string
>();
try
{
Task
<
List
<
string
>>
scanTask
=
Task
.
Factory
.
StartNew
(
delegate
{
NextCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
if
(
NextCodeList
.
Count
<=
0
)
{
NextCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
}
return
NextCodeList
;
});
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" 为下一盘料扫码出错:"
,
ex
);
}
}
else
{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":等待空托盘到达 "
+
log
+
""
);
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_23_WaitTray
))
//TODO
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_23_WaitTray
))
//TODO
...
@@ -869,9 +844,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -869,9 +844,9 @@ namespace OnlineStore.DeviceLibrary
//UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
//UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_24_CylinderDown
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_24_CylinderDown
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构下降, 托盘号【"
+
currTrayNum
+
"】,获取库位号,更新托盘信息"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构下降, 托盘号【"
+
currTrayNum
+
"】,获取库位号,更新托盘信息
, 提升轴下降指定位置
"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Up
,
IO_Type
.
SL_MoveCylinder_Down
);
FI_21_BatchAxisDown
();
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
//更新托盘条码信息
//更新托盘条码信息
...
@@ -919,9 +894,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -919,9 +894,17 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_25_CylinderRelax
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_25_CylinderRelax
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_26_CylinderUp
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_26_CylinderUp
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移机构上升 "
);
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
))
{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移机构上升,上料轴开始慢速上升到P3点,等待检测到料盘"
);
BatchAxisToP3
();
}
else
{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移机构上升 "
);
}
if
(
Config
.
SidesWayNum
>
0
)
if
(
Config
.
SidesWayNum
>
0
)
{
{
InLog
(
MoveInfo
.
SLog
+
" 提前下降顶升气缸 ,环形线定位气缸先下降"
);
InLog
(
MoveInfo
.
SLog
+
" 提前下降顶升气缸 ,环形线定位气缸先下降"
);
...
@@ -1033,8 +1016,55 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1033,8 +1016,55 @@ namespace OnlineStore.DeviceLibrary
}
}
#
endregion
#
endregion
}
}
private
void
FI_21_BatchAxisDown
()
{
// MoveInfo.NextMoveStep(LineMoveStep.FI_21_BatchAxisDown);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
int
maxtPosition
=
Config
.
BatchAxisP3
-
Config
.
Height_ChangeValue
*
30
;
//在上料位置基础上下降30mm
int
currPositon
=
BatchAxis
.
GetAclPosition
();
int
targetPosition
=
currPositon
-
Config
.
Height_ChangeValue
*
30
;
if
(
targetPosition
<=
Config
.
BatchAxisP2
)
{
targetPosition
=
Config
.
BatchAxisP2
;
}
else
if
(
targetPosition
>
maxtPosition
)
{
targetPosition
=
maxtPosition
;
}
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":提升轴下降到料盘不溢出("
+
(
currPositon
-
Config
.
Height_ChangeValue
*
30
)
+
"):"
+
targetPosition
);
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_P2Speed
);
}
private
void
YuScanCode
()
{
bool
isScan
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedScanCode
).
Equals
(
1
);
//TODO 此处需要等待空托盘
if
(
MoveInfo
.
ShelfNoTray
.
Equals
(
false
)
&&
isScan
)
{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
": ,预扫码"
);
//还有料盘,直接扫码
NextCodeList
=
new
List
<
string
>();
try
{
Task
<
List
<
string
>>
scanTask
=
Task
.
Factory
.
StartNew
(
delegate
{
NextCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
if
(
NextCodeList
.
Count
<=
0
)
{
NextCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
}
return
NextCodeList
;
});
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" 为下一盘料扫码出错:"
,
ex
);
}
}
}
private
void
FI_12_MoveCylinder_Give
()
private
void
FI_12_MoveCylinder_Give
()
{
{
if
(
MoveCylineIsUp
())
if
(
MoveCylineIsUp
())
...
@@ -1053,7 +1083,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1053,7 +1083,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
FI_13_ScanCode
()
private
void
FI_13_ScanCode
()
{
{
if
(
IOValue
(
IO_Type
.
SL_MoveCylinder_Give
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SL_MoveCylinder_Take
).
Equals
(
IO_VALUE
.
LOW
))
if
(
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_13_ScanCode
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_13_ScanCode
);
bool
isScan
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedScanCode
).
Equals
(
1
);
bool
isScan
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedScanCode
).
Equals
(
1
);
...
@@ -1066,6 +1096,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1066,6 +1096,9 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
300
));
LastCodeList
=
new
List
<
string
>(
NextCodeList
);
LastCodeList
=
new
List
<
string
>(
NextCodeList
);
NextCodeList
=
new
List
<
string
>();
NextCodeList
=
new
List
<
string
>();
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_14_CylinderTake
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移取料端"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
}
}
else
if
(
isScan
)
else
if
(
isScan
)
{
{
...
@@ -1274,9 +1307,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1274,9 +1307,9 @@ 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_23_WaitTray
)&&
MoveInfo
.
IsInWait
.
Equals
(
false
))
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_23_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
)
{
{
CheckParam
=
param
;
CheckParam
=
param
;
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
a274958
...
@@ -460,6 +460,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -460,6 +460,17 @@ namespace OnlineStore.DeviceLibrary
{
{
return
false
;
return
false
;
}
}
//如果正在出库执行中,不能拦截入库托盘
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
))
{
return
false
;
}
else
if
(
waitOutStoreList
.
Count
>
0
)
{
return
false
;
}
bool
isfull
=
TrayManager
.
TrayIsFull
(
currTrayNum
);
bool
isfull
=
TrayManager
.
TrayIsFull
(
currTrayNum
);
//LogInfo("***************入库*****验证入库编号,托盘号【" + currTrayNum + "】,isfull【" + isfull + "】");
//LogInfo("***************入库*****验证入库编号,托盘号【" + currTrayNum + "】,isfull【" + isfull + "】");
//FixtureCodeInfo code = GetBox().currInOutFixture;
//FixtureCodeInfo code = GetBox().currInOutFixture;
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
a274958
...
@@ -660,10 +660,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -660,10 +660,10 @@ namespace OnlineStore.DeviceLibrary
/// 料盘移栽:记录高度尺寸
/// 料盘移栽:记录高度尺寸
/// </summary>
/// </summary>
FI_20_SaveSize
,
FI_20_SaveSize
,
/// <summary>
///
//
<summary>
/// 提升轴下降到料盘不溢出的位置
///
//
提升轴下降到料盘不溢出的位置
/// </summary>
///
//
</summary>
FI_21_BatchAxisDown
,
//
FI_21_BatchAxisDown,
/// <summary>
/// <summary>
/// 料盘移栽: 上料横移气缸放料SOL
/// 料盘移栽: 上料横移气缸放料SOL
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论