Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1421e04c
由
LN
编写于
2020-06-03 09:01:12 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
界面调整
1 个父辈
0ee1a078
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
69 行增加
和
47 行删除
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.Designer.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmXRay.Designer.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmXRay.cs
RC1266-AutoCountMachine/source/AutoCountClient/记录.txt
RC1266-AutoCountMachine/source/DeviceLibrary/bean/EquipBase.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.Designer.cs
查看文件 @
1421e04
...
...
@@ -33,6 +33,7 @@
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
pictureBox1
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
listView1
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
chbBuzzer
=
new
System
.
Windows
.
Forms
.
CheckBox
();
...
...
@@ -74,6 +75,8 @@
this
.
lblXrayWork
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
BeginInit
();
this
.
groupBox2
.
SuspendLayout
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
...
...
@@ -111,13 +114,26 @@
// groupBox1
//
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
999
,
139
);
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
groupBox1
.
Controls
.
Add
(
this
.
pictureBox1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
117
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
321
,
467
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
588
,
489
);
this
.
groupBox1
.
TabIndex
=
197
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"设备配置"
;
this
.
groupBox1
.
Text
=
"点料效果图"
;
//
// pictureBox1
//
this
.
pictureBox1
.
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
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
25
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
576
,
458
);
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
StretchImage
;
this
.
pictureBox1
.
TabIndex
=
284
;
this
.
pictureBox1
.
TabStop
=
false
;
//
// listView1
//
...
...
@@ -131,7 +147,7 @@
this
.
listView1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
7
);
this
.
listView1
.
MultiSelect
=
false
;
this
.
listView1
.
Name
=
"listView1"
;
this
.
listView1
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
1
32
);
this
.
listView1
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
1
04
);
this
.
listView1
.
TabIndex
=
191
;
this
.
listView1
.
UseCompatibleStateImageBehavior
=
false
;
this
.
listView1
.
View
=
System
.
Windows
.
Forms
.
View
.
Details
;
...
...
@@ -147,7 +163,7 @@
this
.
groupBox2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
999
,
4
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
321
,
1
32
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
321
,
1
07
);
this
.
groupBox2
.
TabIndex
=
196
;
this
.
groupBox2
.
TabStop
=
false
;
//
...
...
@@ -191,7 +207,7 @@
//
this
.
chkDebug
.
AutoSize
=
true
;
this
.
chkDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chkDebug
.
Location
=
new
System
.
Drawing
.
Point
(
20
,
101
);
this
.
chkDebug
.
Location
=
new
System
.
Drawing
.
Point
(
189
,
17
);
this
.
chkDebug
.
Name
=
"chkDebug"
;
this
.
chkDebug
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
24
);
this
.
chkDebug
.
TabIndex
=
194
;
...
...
@@ -202,7 +218,7 @@
//
this
.
btnClearLog
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnClearLog
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnClearLog
.
Location
=
new
System
.
Drawing
.
Point
(
189
,
8
2
);
this
.
btnClearLog
.
Location
=
new
System
.
Drawing
.
Point
(
189
,
6
2
);
this
.
btnClearLog
.
Name
=
"btnClearLog"
;
this
.
btnClearLog
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
btnClearLog
.
TabIndex
=
190
;
...
...
@@ -216,9 +232,9 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
logBox
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
logBox
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
145
);
this
.
logBox
.
Location
=
new
System
.
Drawing
.
Point
(
603
,
117
);
this
.
logBox
.
Name
=
"logBox"
;
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
461
);
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
720
,
489
);
this
.
logBox
.
TabIndex
=
106
;
this
.
logBox
.
Text
=
""
;
this
.
logBox
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
logBox_VisibleChanged
);
...
...
@@ -487,6 +503,8 @@
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmMain_Load
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
tabPage1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
EndInit
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
contextMenuStrip1
.
ResumeLayout
(
false
);
...
...
@@ -541,6 +559,7 @@
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
标签编辑
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
Label
lblXrayWork
;
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
}
}
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.cs
查看文件 @
1421e04
...
...
@@ -53,7 +53,7 @@ namespace OnlineStore.AutoCountClient
FrmOutputEquip
frm2
=
new
FrmOutputEquip
(
robot
.
outputEquip
);
AddForm
(
" "
+
robot
.
outputEquip
.
Name
+
" "
,
frm2
);
robot
.
XrayBean
.
GetImageEvent
+=
EquipBean_GetImageEvent
;
}
private
void
AddForm
(
string
text
,
Form
form
)
{
...
...
@@ -95,11 +95,23 @@ namespace OnlineStore.AutoCountClient
LoadListView
();
LogUtil
.
logBox
=
this
.
logBox
;
LoadOk
=
true
;
// HideForm();
timer1
.
Start
();
}
private
void
EquipBean_GetImageEvent
(
Bitmap
bitmap
)
{
try
{
this
.
pictureBox1
.
Image
=
bitmap
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" EquipBean_GetImageEvent 出错:"
+
ex
.
ToString
());
}
}
private
void
LoadListView
()
{
...
...
@@ -130,6 +142,7 @@ namespace OnlineStore.AutoCountClient
lvi
.
SubItems
.
Add
(
isDebug
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
equip
.
GetRunStr
());
lvi
.
SubItems
.
Add
(
""
);
this
.
listView1
.
Items
.
Add
(
lvi
);
}
...
...
RC1266-AutoCountMachine/source/AutoCountClient/FrmXRay.Designer.cs
查看文件 @
1421e04
...
...
@@ -28,7 +28,6 @@
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage3
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
pictureBox1
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblLastS
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblData
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -70,7 +69,6 @@
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage3
.
SuspendLayout
();
this
.
groupBox6
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
BeginInit
();
this
.
groupBox2
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
...
@@ -203,7 +201,6 @@
this
.
groupBox6
.
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
.
groupBox6
.
Controls
.
Add
(
this
.
pictureBox1
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblInoutInfo
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblMoveInfo
);
...
...
@@ -215,18 +212,6 @@
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"消息"
;
//
// pictureBox1
//
this
.
pictureBox1
.
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
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
327
,
115
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
975
,
359
);
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
StretchImage
;
this
.
pictureBox1
.
TabIndex
=
283
;
this
.
pictureBox1
.
TabStop
=
false
;
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblLastS
);
...
...
@@ -718,7 +703,6 @@
this
.
tabPage3
.
ResumeLayout
(
false
);
this
.
groupBox6
.
ResumeLayout
(
false
);
this
.
groupBox6
.
PerformLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
EndInit
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
tabPage1
.
ResumeLayout
(
false
);
...
...
@@ -781,7 +765,6 @@
private
System
.
Windows
.
Forms
.
Label
lblDiany
;
private
System
.
Windows
.
Forms
.
Label
lblDianl
;
private
System
.
Windows
.
Forms
.
Label
lblLastS
;
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
}
}
RC1266-AutoCountMachine/source/AutoCountClient/FrmXRay.cs
查看文件 @
1421e04
...
...
@@ -43,21 +43,9 @@ namespace OnlineStore.AutoCountClient
lblData
.
Text
=
"最后使用时间:"
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
XRay_Data
);
lblLastS
.
Text
=
equipBean
.
LastXRayState
;
lblName
.
Text
=
equipBean
.
Name
;
equipBean
.
GetImageEvent
+=
EquipBean_GetImageEvent
;
IsLoad
=
true
;
}
private
void
EquipBean_GetImageEvent
(
Bitmap
bitmap
)
{
try
{
this
.
pictureBox1
.
Image
=
bitmap
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" EquipBean_GetImageEvent 出错:"
+
ex
.
ToString
());
}
}
private
void
LoadIOList
()
{
...
...
RC1266-AutoCountMachine/source/AutoCountClient/记录.txt
查看文件 @
1421e04
...
...
@@ -58,3 +58,6 @@ Stop
20200601
设备启动时提示急停未开:改为未初始化完成
添加点料模块代码。。
贴标时,Z轴需要下降到指定的位置之后才能旋转。
\ No newline at end of file
RC1266-AutoCountMachine/source/DeviceLibrary/bean/EquipBase.cs
查看文件 @
1421e04
...
...
@@ -442,6 +442,8 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
日志打印
private
int
WorkLogLevel
=
1
;
private
int
SecWorkLogLevel
=
1
;
protected
void
WorkLog
(
string
msg
)
{
string
code
=
""
;
...
...
@@ -452,14 +454,27 @@ namespace OnlineStore.DeviceLibrary
code
=
"["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
;
}
}
if
(
WorkLogLevel
.
Equals
(
1
))
{
LogUtil
.
info
(
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
msg
);
}
else
{
LogUtil
.
debug
(
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
msg
);
}
}
protected
void
SecWorkLog
(
string
msg
)
{
if
(
SecWorkLogLevel
.
Equals
(
1
))
{
LogUtil
.
info
(
SecMoveInfo
.
Name
+
"["
+
SecMoveInfo
.
MoveStep
+
"] "
+
msg
);
}
else
{
LogUtil
.
debug
(
SecMoveInfo
.
Name
+
"["
+
SecMoveInfo
.
MoveStep
+
"] "
+
msg
);
}
}
public
virtual
string
GetMoveStr
()
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
查看文件 @
1421e04
...
...
@@ -272,6 +272,11 @@ namespace OnlineStore.DeviceLibrary
if
(!
LockOnCanMove
())
{
IOMove
(
IO_Type
.
X_Lock_On
,
IO_VALUE
.
LOW
);
if
(
xRay
.
IsRayOpen
)
{
LogUtil
.
error
(
"LockOnProcess 需要关闭 X_Lock_On,发现 xRay.IsRayOpen,调用 xRay.Close"
);
xRay
.
Close
();
}
}
}
else
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
1421e04
...
...
@@ -46,13 +46,12 @@ namespace OnlineStore.DeviceLibrary
//出口有料
if
(
IOValue
(
IO_Type
.
X_ReelCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
runStatus
=
RobotRunStatus
.
Busy
;
MoveInfo
.
NewMove
(
RobotMoveType
.
Working
);
MoveInfo
.
MoveParam
.
SetReelInfo
(
Work_ReelInfo
);
if
(
Work_ReelInfo
.
WareCount
<=
0
)
{
runStatus
=
RobotRunStatus
.
Busy
;
MoveInfo
.
NewMove
(
RobotMoveType
.
Working
);
MoveInfo
.
MoveParam
.
SetReelInfo
(
Work_ReelInfo
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW06_WaitTime
);
WorkLog
(
"扫描区有料["
+
Work_ReelInfo
.
ToStr
()+
"],还未进行点料,开始处理"
);
//IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH);
...
...
@@ -62,9 +61,6 @@ namespace OnlineStore.DeviceLibrary
}
else
{
runStatus
=
RobotRunStatus
.
Busy
;
MoveInfo
.
NewMove
(
RobotMoveType
.
Working
);
MoveInfo
.
MoveParam
.
SetReelInfo
(
Work_ReelInfo
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW21_WaitOutNoReel
);
WorkLog
(
"扫描区有料["
+
Work_ReelInfo
.
ToStr
()
+
"],点料已完成,准备放出料盘"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Out_TrayCheck
,
IO_VALUE
.
LOW
));
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论