Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fa5015d9
由
LN
编写于
2020-09-10 16:26:01 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
节拍优化
1 个父辈
f17ebf35
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
205 行增加
和
140 行删除
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.Designer.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/EquipBase.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.Designer.cs
查看文件 @
fa5015d
...
...
@@ -30,9 +30,17 @@
{
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmAnalyze
));
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnExport
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
panel2
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
dataGridView1
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
Column_Num
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Code
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Data
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Count
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Width
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Height
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_ImageName
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
txtCode
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnBack
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -42,13 +50,6 @@
this
.
dtpStartTime
=
new
System
.
Windows
.
Forms
.
DateTimePicker
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
saveFileDialog1
=
new
System
.
Windows
.
Forms
.
SaveFileDialog
();
this
.
Column_Num
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Code
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Data
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Count
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Width
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Height
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_ImageName
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
groupBox1
.
SuspendLayout
();
this
.
panel2
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
...
...
@@ -59,6 +60,7 @@
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox1
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnExport
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
panel2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtCode
);
...
...
@@ -70,18 +72,29 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
dtpStartTime
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
6
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
12
66
,
586
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
12
71
,
591
);
this
.
groupBox1
.
TabIndex
=
1
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"查看点料记录"
;
//
// label4
//
this
.
label4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label4
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
67
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
1249
,
17
);
this
.
label4
.
TabIndex
=
20
;
this
.
label4
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// btnExport
//
this
.
btnExport
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnExport
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnExport
.
Location
=
new
System
.
Drawing
.
Point
(
97
0
,
29
);
this
.
btnExport
.
Location
=
new
System
.
Drawing
.
Point
(
97
5
,
24
);
this
.
btnExport
.
Name
=
"btnExport"
;
this
.
btnExport
.
Size
=
new
System
.
Drawing
.
Size
(
114
,
35
);
this
.
btnExport
.
TabIndex
=
19
;
...
...
@@ -98,7 +111,7 @@
this
.
panel2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
panel2
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
87
);
this
.
panel2
.
Name
=
"panel2"
;
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
12
48
,
492
);
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
12
53
,
497
);
this
.
panel2
.
TabIndex
=
18
;
//
// dataGridView1
...
...
@@ -120,12 +133,61 @@
this
.
dataGridView1
.
ReadOnly
=
true
;
this
.
dataGridView1
.
RowTemplate
.
Height
=
23
;
this
.
dataGridView1
.
SelectionMode
=
System
.
Windows
.
Forms
.
DataGridViewSelectionMode
.
FullRowSelect
;
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
12
48
,
492
);
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
12
53
,
497
);
this
.
dataGridView1
.
TabIndex
=
0
;
//
// Column_Num
//
this
.
Column_Num
.
HeaderText
=
"编号"
;
this
.
Column_Num
.
Name
=
"Column_Num"
;
this
.
Column_Num
.
ReadOnly
=
true
;
this
.
Column_Num
.
Width
=
60
;
//
// Column_Code
//
this
.
Column_Code
.
HeaderText
=
"条码"
;
this
.
Column_Code
.
Name
=
"Column_Code"
;
this
.
Column_Code
.
ReadOnly
=
true
;
this
.
Column_Code
.
Width
=
260
;
//
// Column_Data
//
this
.
Column_Data
.
HeaderText
=
"时间"
;
this
.
Column_Data
.
Name
=
"Column_Data"
;
this
.
Column_Data
.
ReadOnly
=
true
;
this
.
Column_Data
.
Width
=
130
;
//
// Column_Count
//
this
.
Column_Count
.
HeaderText
=
"数量"
;
this
.
Column_Count
.
Name
=
"Column_Count"
;
this
.
Column_Count
.
ReadOnly
=
true
;
this
.
Column_Count
.
Width
=
80
;
//
// Column_Width
//
this
.
Column_Width
.
HeaderText
=
"宽度"
;
this
.
Column_Width
.
Name
=
"Column_Width"
;
this
.
Column_Width
.
ReadOnly
=
true
;
this
.
Column_Width
.
Width
=
60
;
//
// Column_Height
//
this
.
Column_Height
.
HeaderText
=
"高度"
;
this
.
Column_Height
.
Name
=
"Column_Height"
;
this
.
Column_Height
.
ReadOnly
=
true
;
this
.
Column_Height
.
Width
=
60
;
//
// Column_ImageName
//
this
.
Column_ImageName
.
HeaderText
=
"点料结果"
;
this
.
Column_ImageName
.
Name
=
"Column_ImageName"
;
this
.
Column_ImageName
.
ReadOnly
=
true
;
this
.
Column_ImageName
.
Width
=
550
;
//
// txtCode
//
this
.
txtCode
.
Location
=
new
System
.
Drawing
.
Point
(
623
,
33
);
this
.
txtCode
.
Location
=
new
System
.
Drawing
.
Point
(
623
,
28
);
this
.
txtCode
.
Name
=
"txtCode"
;
this
.
txtCode
.
Size
=
new
System
.
Drawing
.
Size
(
172
,
26
);
this
.
txtCode
.
TabIndex
=
17
;
...
...
@@ -133,7 +195,7 @@
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
573
,
3
6
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
573
,
3
1
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
20
);
this
.
label1
.
TabIndex
=
16
;
...
...
@@ -143,7 +205,7 @@
//
this
.
btnBack
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnBack
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnBack
.
Location
=
new
System
.
Drawing
.
Point
(
10
89
,
29
);
this
.
btnBack
.
Location
=
new
System
.
Drawing
.
Point
(
10
94
,
24
);
this
.
btnBack
.
Name
=
"btnBack"
;
this
.
btnBack
.
Size
=
new
System
.
Drawing
.
Size
(
114
,
35
);
this
.
btnBack
.
TabIndex
=
15
;
...
...
@@ -155,7 +217,7 @@
//
this
.
btnSearch
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnSearch
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSearch
.
Location
=
new
System
.
Drawing
.
Point
(
85
0
,
29
);
this
.
btnSearch
.
Location
=
new
System
.
Drawing
.
Point
(
85
5
,
24
);
this
.
btnSearch
.
Name
=
"btnSearch"
;
this
.
btnSearch
.
Size
=
new
System
.
Drawing
.
Size
(
114
,
35
);
this
.
btnSearch
.
TabIndex
=
7
;
...
...
@@ -167,7 +229,7 @@
//
this
.
dtpEndTime
.
CustomFormat
=
"yyyy-MM-dd HH:mm:ss"
;
this
.
dtpEndTime
.
Format
=
System
.
Windows
.
Forms
.
DateTimePickerFormat
.
Custom
;
this
.
dtpEndTime
.
Location
=
new
System
.
Drawing
.
Point
(
376
,
33
);
this
.
dtpEndTime
.
Location
=
new
System
.
Drawing
.
Point
(
376
,
28
);
this
.
dtpEndTime
.
Name
=
"dtpEndTime"
;
this
.
dtpEndTime
.
Size
=
new
System
.
Drawing
.
Size
(
172
,
26
);
this
.
dtpEndTime
.
TabIndex
=
5
;
...
...
@@ -175,7 +237,7 @@
// label3
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
298
,
3
6
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
298
,
3
1
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
20
);
this
.
label3
.
TabIndex
=
4
;
...
...
@@ -185,7 +247,7 @@
//
this
.
dtpStartTime
.
CustomFormat
=
"yyyy-MM-dd HH:mm:ss"
;
this
.
dtpStartTime
.
Format
=
System
.
Windows
.
Forms
.
DateTimePickerFormat
.
Custom
;
this
.
dtpStartTime
.
Location
=
new
System
.
Drawing
.
Point
(
92
,
33
);
this
.
dtpStartTime
.
Location
=
new
System
.
Drawing
.
Point
(
92
,
28
);
this
.
dtpStartTime
.
Name
=
"dtpStartTime"
;
this
.
dtpStartTime
.
Size
=
new
System
.
Drawing
.
Size
(
172
,
26
);
this
.
dtpStartTime
.
TabIndex
=
3
;
...
...
@@ -193,61 +255,12 @@
// label2
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
3
6
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
3
1
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
20
);
this
.
label2
.
TabIndex
=
1
;
this
.
label2
.
Text
=
"开始时间:"
;
//
// Column_Num
//
this
.
Column_Num
.
HeaderText
=
"编号"
;
this
.
Column_Num
.
Name
=
"Column_Num"
;
this
.
Column_Num
.
ReadOnly
=
true
;
this
.
Column_Num
.
Width
=
60
;
//
// Column_Code
//
this
.
Column_Code
.
HeaderText
=
"条码"
;
this
.
Column_Code
.
Name
=
"Column_Code"
;
this
.
Column_Code
.
ReadOnly
=
true
;
this
.
Column_Code
.
Width
=
260
;
//
// Column_Data
//
this
.
Column_Data
.
HeaderText
=
"时间"
;
this
.
Column_Data
.
Name
=
"Column_Data"
;
this
.
Column_Data
.
ReadOnly
=
true
;
this
.
Column_Data
.
Width
=
130
;
//
// Column_Count
//
this
.
Column_Count
.
HeaderText
=
"数量"
;
this
.
Column_Count
.
Name
=
"Column_Count"
;
this
.
Column_Count
.
ReadOnly
=
true
;
this
.
Column_Count
.
Width
=
80
;
//
// Column_Width
//
this
.
Column_Width
.
HeaderText
=
"宽度"
;
this
.
Column_Width
.
Name
=
"Column_Width"
;
this
.
Column_Width
.
ReadOnly
=
true
;
this
.
Column_Width
.
Width
=
60
;
//
// Column_Height
//
this
.
Column_Height
.
HeaderText
=
"高度"
;
this
.
Column_Height
.
Name
=
"Column_Height"
;
this
.
Column_Height
.
ReadOnly
=
true
;
this
.
Column_Height
.
Width
=
60
;
//
// Column_ImageName
//
this
.
Column_ImageName
.
HeaderText
=
"点料结果"
;
this
.
Column_ImageName
.
Name
=
"Column_ImageName"
;
this
.
Column_ImageName
.
ReadOnly
=
true
;
this
.
Column_ImageName
.
Width
=
550
;
//
// FrmAnalyze
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
...
@@ -288,5 +301,6 @@
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Width
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Height
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_ImageName
;
private
System
.
Windows
.
Forms
.
Label
label4
;
}
}
\ No newline at end of file
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.cs
查看文件 @
fa5015d
...
...
@@ -77,10 +77,11 @@ namespace OnlineStore.AutoCountClient
string
endStr
=
endTime
.
ToString
(
str
);
bool
result
=
RobotManager
.
robot
.
sQLite
.
Select
(
code
,
startStr
,
endStr
,
out
array
);
LogUtil
.
error
(
"查数据【"
+
code
+
"】【"
+
startStr
+
"】【"
+
endStr
+
"】结果:"
+
result
+
","
+
RobotManager
.
robot
.
sQLite
.
ErrInfo
);
if
(
array
!=
null
&&
array
.
Length
>
0
)
{
LogUtil
.
info
(
"共查询到【"
+
array
.
Length
+
"】行数据"
);
label4
.
Text
=
"开始时间["
+
startStr
+
"] 结束时间["
+
endStr
+
"] 条码["
+
code
+
"] 共查询到"
+
array
.
Length
+
"条记录"
;
this
.
dataGridView1
.
Rows
.
Clear
();
int
index
=
1
;
foreach
(
string
[]
a
in
array
)
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean.cs
查看文件 @
fa5015d
...
...
@@ -371,7 +371,7 @@ namespace OnlineStore.DeviceLibrary
isOk
=
false
;
WarnMsg
=
Name
+
msg
;
Alarm
(
AlarmType
.
AxisMoveError
);
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
);
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
,
moveInfo
.
logSeconds
()
);
break
;
}
}
...
...
@@ -390,7 +390,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO
io
=
Robot
.
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] 等待"
+
NotOkMsg
+
" 超时 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒"
;
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
);
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
,
moveInfo
.
logSeconds
()
);
if
(
alarmType
.
Equals
(
AlarmType
.
None
))
{
Alarm
(
AlarmType
.
IoSingleTimeOut
);
...
...
@@ -481,18 +481,18 @@ namespace OnlineStore.DeviceLibrary
else
if
(
span
.
TotalSeconds
>
moveInfo
.
TimeOutSeconds
)
{
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
int
second
=
10
;
second
=
(
int
)(
span
.
TotalSeconds
/
moveInfo
.
TimeOutSeconds
)
*
10
;
if
(
second
>
120
)
{
second
=
120
;
}
else
if
(
second
<
10
)
{
second
=
10
;
}
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
,
second
);
//
int second = 10;
//
second = (int)(span.TotalSeconds/ moveInfo.TimeOutSeconds) * 10;
//
if (second > 120)
//
{
//
second = 120;
//
}
//
else if (second < 10)
//
{
//
second = 10;
//
}
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
,
moveInfo
.
logSeconds
()
);
Alarm
(
AlarmType
.
IoSingleTimeOut
);
}
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/EquipBase.cs
查看文件 @
fa5015d
...
...
@@ -329,7 +329,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
Name
+
msg
;
Alarm
(
AlarmType
.
AxisMoveError
);
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
);
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
,
moveInfo
.
logSeconds
()
);
break
;
}
}
...
...
@@ -348,7 +348,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] 等待"
+
NotOkMsg
+
" 超时 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒"
;
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
);
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
,
moveInfo
.
logSeconds
()
);
if
(
NoAlarm
())
{
Alarm
(
AlarmType
.
IoSingleTimeOut
);
...
...
@@ -413,18 +413,18 @@ namespace OnlineStore.DeviceLibrary
{
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
int
second
=
10
;
second
=
(
int
)(
span
.
TotalSeconds
/
moveInfo
.
TimeOutSeconds
)
*
10
;
if
(
second
>
120
)
{
second
=
120
;
}
else
if
(
second
<
10
)
{
second
=
10
;
}
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
,
second
);
//
int second = 10;
//
second = (int)(span.TotalSeconds/moveInfo.TimeOutSeconds ) * 10;
//
if (second > 120)
//
{
//
second = 120;
//
}
//
else if (second < 10)
//
{
//
second = 10;
//
}
LogUtil
.
error
(
WarnMsg
,
moveInfo
.
ErrorLogType
,
moveInfo
.
logSeconds
()
);
Alarm
(
AlarmType
.
IoSingleTimeOut
);
}
}
...
...
@@ -450,6 +450,7 @@ namespace OnlineStore.DeviceLibrary
{
level
=
WorkLogLevel
;
}
level
=
WorkLogLevel
;
string
code
=
""
;
if
(
MoveInfo
.
MoveParam
!=
null
&&
MoveInfo
.
MoveParam
.
WareCode
!=
null
)
{
...
...
@@ -474,6 +475,7 @@ namespace OnlineStore.DeviceLibrary
{
level
=
SecWorkLogLevel
;
}
level
=
SecWorkLogLevel
;
string
code
=
SecMoveInfo
.
MoveParam
!=
null
?
SecMoveInfo
.
MoveParam
.
WareCode
:
""
;
if
(
level
.
Equals
(
1
))
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
查看文件 @
fa5015d
...
...
@@ -139,34 +139,36 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
protected
override
void
WorkingProcess
()
private
void
OT02_MoveZToP1
()
{
if
(
MoveInfo
.
IsInWait
)
{
CheckWait
(
MoveInfo
);
}
if
(
MoveInfo
.
IsInWait
)
if
(
MoveZAxis
.
IsInPosition
(
Config
.
MoveZ_P1
))
{
return
;
OT03_MoveXToP2
()
;
}
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT01_WaitCheck
))
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT02_MoveZToP1
);
WorkLog
(
"取料:取料Z轴到P1 "
,
0
);
MoveZAxis
.
AbsMove
(
MoveInfo
,
Config
.
MoveZ_P1
,
Config
.
MoveZ_P1Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT02_MoveZToP1
))
}
private
void
OT03_MoveXToP2
()
{
int
position
=
Config
.
GetMoveXP2
(
MoveInfo
.
MoveParam
.
PlateW
);
if
(
MoveXAxis
.
IsInPosition
(
position
))
{
OT05_GetImage
();
}
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT03_MoveXToP2
);
WorkLog
(
"取料:取料X轴到P2 "
,
0
);
MoveXAxis
.
AbsMove
(
MoveInfo
,
Config
.
GetMoveXP2
(
MoveInfo
.
MoveParam
.
PlateW
)
,
Config
.
MoveX_P2Speed
);
MoveXAxis
.
AbsMove
(
MoveInfo
,
position
,
Config
.
MoveX_P2Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT03_MoveXToP2
))
}
private
void
OT05_GetImage
()
{
//MoveInfo.NextMoveStep(StepEnum.OT04_CheckNeedImage);
//WorkLog("取料:判断是否需要拍照 ");
if
(
MoveInfo
.
MoveParam
.
IsNgReel
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT07_MoveZToP2
);
...
...
@@ -180,16 +182,38 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
}
}
//else if (MoveInfo.IsStep(StepEnum.OT04_CheckNeedImage))
//{
protected
override
void
WorkingProcess
()
{
if
(
MoveInfo
.
IsInWait
)
{
CheckWait
(
MoveInfo
);
}
if
(
MoveInfo
.
IsInWait
)
{
return
;
}
//}
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT01_WaitCheck
))
{
OT02_MoveZToP1
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT02_MoveZToP1
))
{
OT03_MoveXToP2
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT03_MoveXToP2
))
{
OT05_GetImage
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT05_GetImage
))
{
//MoveInfo.NextMoveStep(StepEnum.OT06_MoveXToP2);
//WorkLog("取料:取料X轴运动到P2 ");
//MoveXAxis.AbsMove(MoveInfo, Config.GetMoveXP2(MoveInfo.MoveParam.PlateW), Config.MoveX_P2Speed);
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT0
6_MoveX
ToP2
);
WorkLog
(
"取料:取料
X轴运动到P2 "
);
Move
XAxis
.
AbsMove
(
MoveInfo
,
Config
.
GetMoveXP2
(
MoveInfo
.
MoveParam
.
PlateW
),
Config
.
MoveX
_P2Speed
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT0
7_MoveZ
ToP2
);
WorkLog
(
"取料:取料
Z轴到P2 "
,
0
);
Move
ZAxis
.
AbsMove
(
MoveInfo
,
Config
.
GetMoveZP2
(
MoveInfo
.
MoveParam
.
PlateH
),
Config
.
MoveZ
_P2Speed
);
CheckStartLabel
();
////TODO 记录信息,判断贴标模块当前空闲,此时可以打印标签(取码气缸前进,打印标签,取码气缸后退)
...
...
@@ -279,30 +303,42 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT12_MoveXToP3
))
{
//bool shelfOk = ShelfMoveInfo.MoveType.Equals(RobotMoveType.ShelfPro) && ShelfMoveInfo.IsStep(StepEnum.OS_22_WaitTray);
//bool debugOk = ShelfMoveInfo.MoveType.Equals(RobotMoveType.None) && MoveInfo.MoveParam.IsTest;
//if (shelfOk || debugOk)
//{
// ClearTimeoutAlarm("等待出料料串可放料");
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT13_MoveZToP3
);
WorkLog
(
"放料:取料Z轴下降到P3 "
);
MoveZAxis
.
AbsMove
(
MoveInfo
,
Config
.
GetMoveZP3
(
MoveInfo
.
MoveParam
.
PlateH
),
Config
.
MoveZ_P3Speed
);
//}
//else if (MoveInfo.IsTimeOut(60))
//{
// WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "]" + "等待出料料串可放料(OS_22_WaitTray)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
// LogUtil.error(WarnMsg, MoveInfo.ErrorLogType, MoveInfo.logSeconds());
// Alarm(AlarmType.IoSingleTimeOut);
//}
//CheckStartLabel();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT13_MoveZToP3
))
{
bool
shelfOk
=
ShelfMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
ShelfPro
)
&&
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_22_WaitTray
);
bool
debugOk
=
ShelfMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
)
&&
MoveInfo
.
MoveParam
.
IsTest
;
if
(
shelfOk
||
debugOk
)
{
ClearTimeoutAlarm
(
"等待出料料串可放料"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT1
3_MoveZToP3
);
WorkLog
(
"放料:取料
Z轴下降到P3 "
);
MoveZAxis
.
AbsMove
(
MoveInfo
,
Config
.
GetMoveZP3
(
MoveInfo
.
MoveParam
.
PlateH
),
Config
.
MoveZ_P3Speed
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT1
4_Clamping_Relax
);
WorkLog
(
"放料:取料
气缸放松 "
,
0
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TakeT_Clamping_Work
,
IO_Type
.
TakeT_Clamping_Relax
);
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"]"
+
"等待出料料串可放料(OS_22_WaitTray)超时["
+
FormUtil
.
GetSpanStr
(
MoveInfo
.
StepSpan
())
+
"]"
;
LogUtil
.
error
(
WarnMsg
,
MoveInfo
.
ErrorLogType
,
MoveInfo
.
logSeconds
());
LogUtil
.
error
(
WarnMsg
,
MoveInfo
.
ErrorLogType
,
MoveInfo
.
logSeconds
());
Alarm
(
AlarmType
.
IoSingleTimeOut
);
}
CheckStartLabel
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT13_MoveZToP3
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT14_Clamping_Relax
);
WorkLog
(
"放料:取料气缸放松 "
,
0
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TakeT_Clamping_Work
,
IO_Type
.
TakeT_Clamping_Relax
);
CheckStartLabel
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT14_Clamping_Relax
))
{
bool
shelfOk
=
ShelfMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
ShelfPro
)
&&
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_22_WaitTray
);
...
...
@@ -488,10 +524,18 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
SecMoveInfo
.
IsStep
(
StepEnum
.
OL08_ZToP1
))
{
if
(
LabelYAxis
.
IsInPosition
(
Config
.
LabelY_P1
))
{
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL10_WaitCanLabel
);
SecWorkLog
(
"贴标: 等待取料机构返回待机点并且空闲"
);
}
else
{
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL09_YToP1
);
SecWorkLog
(
"贴标: Y轴到P1点"
,
0
);
SecWorkLog
(
"贴标: Y轴到P1点"
,
0
);
LabelYAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelY_P1
,
Config
.
LabelY_P1Speed
);
}
}
else
if
(
SecMoveInfo
.
IsStep
(
StepEnum
.
OL09_YToP1
))
{
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL10_WaitCanLabel
);
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
fa5015d
...
...
@@ -103,14 +103,14 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
XW02_InDoorOpen
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW04_InLineRun
);
WorkLog
(
"料盘处理:入口和中间皮带线转动
,"
,
0
);
WorkLog
(
"料盘处理:入口和中间皮带线转动
"
,
0
);
IOMove
(
IO_Type
.
X_InLine_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
X_MLine_Run
,
IO_VALUE
.
HIGH
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
XW04_InLineRun
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW05_WaitMCheck
);
WorkLog
(
"料盘处理:等待扫描区域信号检测"
,
0
);
WorkLog
(
"料盘处理:等待扫描区域信号检测"
,
0
);
IOMove
(
IO_Type
.
X_InLine_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
X_MLine_Run
,
IO_VALUE
.
HIGH
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
X_ReelCheck
,
IO_VALUE
.
HIGH
));
...
...
@@ -121,11 +121,11 @@ namespace OnlineStore.DeviceLibrary
Work_ReelInfo
=
In_ReelInfo
.
GetReelInfo
();
MoveInfo
.
MoveParam
.
SetReelInfo
(
Work_ReelInfo
);
In_ReelInfo
=
new
ReelInfo
();
WorkLog
(
"料盘处理:更新Work_ReelInfo【"
+
Work_ReelInfo
.
ToStr
()
+
"】,清空 In_ReelInfo,
再转动5
秒钟"
);
WorkLog
(
"料盘处理:更新Work_ReelInfo【"
+
Work_ReelInfo
.
ToStr
()
+
"】,清空 In_ReelInfo,
左侧皮带线先停止,右侧皮带线再转动2
秒钟"
);
IOMove
(
IO_Type
.
X_InLine_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
X_InLine_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
X_MLine_Run
,
IO_VALUE
.
HIGH
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5
000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2
000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
X_ReelCheck
,
IO_VALUE
.
HIGH
));
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
XW06_WaitTime
))
...
...
@@ -279,12 +279,14 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW25_WaitTime
);
Out_ReelInfo
=
Work_ReelInfo
.
GetReelInfo
();
Work_ReelInfo
=
new
ReelInfo
();
WorkLog
(
"料盘处理:清空 Work_ReelInfo,更新Out_ReelInfo【"
+
Out_ReelInfo
.
ToStr
()
+
"】
再转动8秒
"
);
WorkLog
(
"料盘处理:清空 Work_ReelInfo,更新Out_ReelInfo【"
+
Out_ReelInfo
.
ToStr
()
+
"】
,中间皮带线先停止,出口皮带线 再转动2秒,出口门先关闭,档停先下降
"
);
IOMove
(
IO_Type
.
X_MLine_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
X_MLine_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
X_OLine_Run
,
IO_VALUE
.
HIGH
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
8
000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2
000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Out_TrayCheck
,
IO_VALUE
.
HIGH
));
CylinderMove
(
null
,
IO_Type
.
X_OutDoor_Down
,
IO_Type
.
X_OutDoor_Up
);
CylinderMove
(
null
,
IO_Type
.
X_StopCylinder_Up
,
IO_Type
.
X_StopCylinder_Down
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
XW25_WaitTime
))
...
...
@@ -297,7 +299,9 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
XW26_OutLineStop
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW27_OutDoorClose
);
WorkLog
(
"料盘处理:出口门关闭,挡停下降"
);
WorkLog
(
"料盘处理:中间皮带线,出口皮带线停止,出口门关闭,挡停下降"
);
IOMove
(
IO_Type
.
X_MLine_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
X_OLine_Run
,
IO_VALUE
.
LOW
);
CylinderMove
(
MoveInfo
,
IO_Type
.
X_OutDoor_Down
,
IO_Type
.
X_OutDoor_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
X_StopCylinder_Up
,
IO_Type
.
X_StopCylinder_Down
);
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论