Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 615e6b79
由
几米阳光
编写于
2018-12-10 19:37:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调试修改
1 个父辈
16cc676d
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
723 行增加
和
479 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/Common/util/LogUtil.cs
source/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/AC_Store.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
source/ACSingleStore/App.config
查看文件 @
615e6b7
...
...
@@ -6,7 +6,6 @@
<
appSettings
>
<!--是否开机自动启动料仓-->
<
add
key
=
"App_AutoRun"
value
=
"1"
/>
<
add
key
=
"CodeRun"
value
=
"0"
/>
<
add
key
=
"App_Title"
value
=
"料仓_批量上下料"
/>
<
add
key
=
"scanner_start_command"
value
=
"S"
/>
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
...
...
@@ -25,19 +24,20 @@
<!--
end
one
store
config
-->
<!--摄像机名称列表配置,用
#分割-->
<
add
key
=
"CameraName"
value
=
"
codeCamera
"
/>
<
add
key
=
"CameraName"
value
=
"
GigE:MV-CE100-30GC (00C69898477)
"
/>
<!--二维码类型列表配置,用
#分割-->
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"InOutDefaultPosition"
value
=
"3000"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"AxisChangeValue"
value
=
"100"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<!--
5000
脉冲对应
1
mm
-->
<
add
key
=
"AxisChangeValue"
value
=
"5000"
/>
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/AutoStore.log"
/>
<
file
value
=
"logs/AutoStore
1
.log"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
615e6b7
...
...
@@ -82,14 +82,10 @@
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblAxisStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
axis_5_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
txtBatchTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblCountPulse5
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblOutPulse5
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label20
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
label38
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtMiddleTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtInoutTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -146,12 +142,6 @@
this
.
btnUpDownP6
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtUpDownP7
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpDownP8
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpDownP2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnUpDownP7
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP8
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
menuStrip1
=
new
System
.
Windows
.
Forms
.
MenuStrip
();
this
.
料仓操作
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
启动
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
...
@@ -192,6 +182,7 @@
this
.
清理日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
chbIsUseBatch
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbAuto
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
contextMenuStrip1
=
new
System
.
Windows
.
Forms
.
ContextMenuStrip
(
this
.
components
);
this
.
显示
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
...
@@ -222,6 +213,7 @@
this
.
tabPage2
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage3
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnOpenDoor
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblWaitTragGo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnWaitTrgGo
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblBatchStatus
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -231,6 +223,21 @@
this
.
btnGetOutTray
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblDoorStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnBatchInStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
axis_5_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
btnTempClose
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnTempInit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox7
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
txtTempPort
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label27
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtTemp
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label28
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtHum
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label29
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnSelTemp
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -242,6 +249,8 @@
this
.
tabPage2
.
SuspendLayout
();
this
.
tabPage3
.
SuspendLayout
();
this
.
groupBox6
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox7
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// timer1
...
...
@@ -255,7 +264,7 @@
this
.
lblWarnMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblWarnMsg
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
44
);
this
.
lblWarnMsg
.
Name
=
"lblWarnMsg"
;
this
.
lblWarnMsg
.
Size
=
new
System
.
Drawing
.
Size
(
4
62
,
40
);
this
.
lblWarnMsg
.
Size
=
new
System
.
Drawing
.
Size
(
4
78
,
40
);
this
.
lblWarnMsg
.
TabIndex
=
224
;
this
.
lblWarnMsg
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
...
...
@@ -317,7 +326,7 @@
this
.
groupBox5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
2
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
497
,
403
);
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
553
,
403
);
this
.
groupBox5
.
TabIndex
=
216
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"伺服运动"
;
...
...
@@ -889,7 +898,7 @@
this
.
richTextBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
richTextBox1
.
Location
=
new
System
.
Drawing
.
Point
(
510
,
473
);
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
5
15
,
266
);
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
5
71
,
266
);
this
.
richTextBox1
.
TabIndex
=
256
;
this
.
richTextBox1
.
Text
=
""
;
//
...
...
@@ -926,7 +935,7 @@
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
(
8
,
187
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
493
,
212
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
549
,
212
);
this
.
groupBox1
.
TabIndex
=
217
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"伺服状态"
;
...
...
@@ -957,16 +966,6 @@
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
Click
+=
new
System
.
EventHandler
(
this
.
button3_Click
);
//
// axis_5_Alarm
//
this
.
axis_5_Alarm
.
IOName
=
""
;
this
.
axis_5_Alarm
.
IOValue
=
0
;
this
.
axis_5_Alarm
.
isCanClick
=
false
;
this
.
axis_5_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
418
,
37
);
this
.
axis_5_Alarm
.
Name
=
"axis_5_Alarm"
;
this
.
axis_5_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_5_Alarm
.
TabIndex
=
271
;
//
// txtBatchTarget
//
this
.
txtBatchTarget
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
139
);
...
...
@@ -1001,36 +1000,6 @@
this
.
label20
.
TabIndex
=
267
;
this
.
label20
.
Text
=
"批量出入料轴"
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
116
,
37
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
318
,
37
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
213
,
37
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// label38
//
this
.
label38
.
AutoSize
=
true
;
...
...
@@ -1228,7 +1197,7 @@
this
.
txtUpDownDoor
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
IBeam
;
this
.
txtUpDownDoor
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtUpDownDoor
.
ForeColor
=
System
.
Drawing
.
SystemColors
.
WindowText
;
this
.
txtUpDownDoor
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
1
32
);
this
.
txtUpDownDoor
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
1
94
);
this
.
txtUpDownDoor
.
MaxLength
=
0
;
this
.
txtUpDownDoor
.
Name
=
"txtUpDownDoor"
;
this
.
txtUpDownDoor
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
...
...
@@ -1244,7 +1213,7 @@
this
.
btnUpDownDoor
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUpDownDoor
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
this
.
btnUpDownDoor
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownDoor
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
1
30
);
this
.
btnUpDownDoor
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
1
92
);
this
.
btnUpDownDoor
.
Name
=
"btnUpDownDoor"
;
this
.
btnUpDownDoor
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownDoor
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
27
);
...
...
@@ -1259,7 +1228,7 @@
this
.
lblTemp
.
AutoSize
=
true
;
this
.
lblTemp
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblTemp
.
ForeColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
lblTemp
.
Location
=
new
System
.
Drawing
.
Point
(
1
1
,
35
6
);
this
.
lblTemp
.
Location
=
new
System
.
Drawing
.
Point
(
1
8
,
10
6
);
this
.
lblTemp
.
Name
=
"lblTemp"
;
this
.
lblTemp
.
Size
=
new
System
.
Drawing
.
Size
(
159
,
20
);
this
.
lblTemp
.
TabIndex
=
270
;
...
...
@@ -1394,7 +1363,7 @@
this
.
txtUpDownP1
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
IBeam
;
this
.
txtUpDownP1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtUpDownP1
.
ForeColor
=
System
.
Drawing
.
SystemColors
.
WindowText
;
this
.
txtUpDownP1
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
1
01
);
this
.
txtUpDownP1
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
1
63
);
this
.
txtUpDownP1
.
MaxLength
=
0
;
this
.
txtUpDownP1
.
Name
=
"txtUpDownP1"
;
this
.
txtUpDownP1
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
...
...
@@ -1652,7 +1621,7 @@
this
.
btnUpDownP1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUpDownP1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
this
.
btnUpDownP1
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
99
);
this
.
btnUpDownP1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
161
);
this
.
btnUpDownP1
.
Name
=
"btnUpDownP1"
;
this
.
btnUpDownP1
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP1
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
27
);
...
...
@@ -1798,111 +1767,6 @@
this
.
btnUpDownP4
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP4
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP4_Click
);
//
// txtUpDownP7
//
this
.
txtUpDownP7
.
AcceptsReturn
=
true
;
this
.
txtUpDownP7
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Window
;
this
.
txtUpDownP7
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
IBeam
;
this
.
txtUpDownP7
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtUpDownP7
.
ForeColor
=
System
.
Drawing
.
SystemColors
.
WindowText
;
this
.
txtUpDownP7
.
Location
=
new
System
.
Drawing
.
Point
(
287
,
50
);
this
.
txtUpDownP7
.
MaxLength
=
0
;
this
.
txtUpDownP7
.
Name
=
"txtUpDownP7"
;
this
.
txtUpDownP7
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
txtUpDownP7
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
23
);
this
.
txtUpDownP7
.
TabIndex
=
204
;
this
.
txtUpDownP7
.
Text
=
"-836025"
;
this
.
txtUpDownP7
.
Visible
=
false
;
//
// txtUpDownP8
//
this
.
txtUpDownP8
.
AcceptsReturn
=
true
;
this
.
txtUpDownP8
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Window
;
this
.
txtUpDownP8
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
IBeam
;
this
.
txtUpDownP8
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtUpDownP8
.
ForeColor
=
System
.
Drawing
.
SystemColors
.
WindowText
;
this
.
txtUpDownP8
.
Location
=
new
System
.
Drawing
.
Point
(
287
,
81
);
this
.
txtUpDownP8
.
MaxLength
=
0
;
this
.
txtUpDownP8
.
Name
=
"txtUpDownP8"
;
this
.
txtUpDownP8
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
txtUpDownP8
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
23
);
this
.
txtUpDownP8
.
TabIndex
=
206
;
this
.
txtUpDownP8
.
Text
=
"-816491"
;
this
.
txtUpDownP8
.
Visible
=
false
;
//
// txtUpDownP2
//
this
.
txtUpDownP2
.
AcceptsReturn
=
true
;
this
.
txtUpDownP2
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Window
;
this
.
txtUpDownP2
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
IBeam
;
this
.
txtUpDownP2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtUpDownP2
.
ForeColor
=
System
.
Drawing
.
SystemColors
.
WindowText
;
this
.
txtUpDownP2
.
Location
=
new
System
.
Drawing
.
Point
(
287
,
19
);
this
.
txtUpDownP2
.
MaxLength
=
0
;
this
.
txtUpDownP2
.
Name
=
"txtUpDownP2"
;
this
.
txtUpDownP2
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
txtUpDownP2
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
23
);
this
.
txtUpDownP2
.
TabIndex
=
202
;
this
.
txtUpDownP2
.
Text
=
"-836025"
;
this
.
txtUpDownP2
.
Visible
=
false
;
//
// btnUpDownP7
//
this
.
btnUpDownP7
.
AutoSize
=
true
;
this
.
btnUpDownP7
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnUpDownP7
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Default
;
this
.
btnUpDownP7
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUpDownP7
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnUpDownP7
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP7
.
Location
=
new
System
.
Drawing
.
Point
(
144
,
48
);
this
.
btnUpDownP7
.
Name
=
"btnUpDownP7"
;
this
.
btnUpDownP7
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP7
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
27
);
this
.
btnUpDownP7
.
TabIndex
=
203
;
this
.
btnUpDownP7
.
Text
=
"升降轴入料缓冲点P7:"
;
this
.
btnUpDownP7
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP7
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP7
.
Visible
=
false
;
this
.
btnUpDownP7
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP7_Click
);
//
// btnUpDownP8
//
this
.
btnUpDownP8
.
AutoSize
=
true
;
this
.
btnUpDownP8
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnUpDownP8
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Default
;
this
.
btnUpDownP8
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUpDownP8
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnUpDownP8
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP8
.
Location
=
new
System
.
Drawing
.
Point
(
144
,
79
);
this
.
btnUpDownP8
.
Name
=
"btnUpDownP8"
;
this
.
btnUpDownP8
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP8
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
27
);
this
.
btnUpDownP8
.
TabIndex
=
205
;
this
.
btnUpDownP8
.
Text
=
"升降轴出料缓冲点P8:"
;
this
.
btnUpDownP8
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP8
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP8
.
Visible
=
false
;
this
.
btnUpDownP8
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP8_Click
);
//
// btnUpDownP2
//
this
.
btnUpDownP2
.
AutoSize
=
true
;
this
.
btnUpDownP2
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnUpDownP2
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Default
;
this
.
btnUpDownP2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUpDownP2
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnUpDownP2
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP2
.
Location
=
new
System
.
Drawing
.
Point
(
144
,
17
);
this
.
btnUpDownP2
.
Name
=
"btnUpDownP2"
;
this
.
btnUpDownP2
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP2
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
27
);
this
.
btnUpDownP2
.
TabIndex
=
201
;
this
.
btnUpDownP2
.
Text
=
"升降轴出料前点P2:"
;
this
.
btnUpDownP2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP2
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP2
.
Visible
=
false
;
this
.
btnUpDownP2
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP2_Click
);
//
// menuStrip1
//
this
.
menuStrip1
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
...
...
@@ -1914,7 +1778,7 @@
this
.
日志
ToolStripMenuItem
});
this
.
menuStrip1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
menuStrip1
.
Name
=
"menuStrip1"
;
this
.
menuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
10
31
,
29
);
this
.
menuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
10
87
,
29
);
this
.
menuStrip1
.
TabIndex
=
257
;
this
.
menuStrip1
.
Text
=
"menuStrip1"
;
//
...
...
@@ -2195,14 +2059,9 @@
//
// groupBox3
//
this
.
groupBox3
.
Controls
.
Add
(
this
.
chbIsUseBatch
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
lblThisSta
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
chbAuto
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
txtUpDownP2
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
btnUpDownP2
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
btnUpDownP8
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
btnUpDownP7
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
txtUpDownP8
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
txtUpDownP7
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
lblWarnMsg
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
32
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
...
...
@@ -2211,10 +2070,23 @@
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"设备状态"
;
//
// chbIsUseBatch
//
this
.
chbIsUseBatch
.
AutoSize
=
true
;
this
.
chbIsUseBatch
.
Checked
=
true
;
this
.
chbIsUseBatch
.
CheckState
=
System
.
Windows
.
Forms
.
CheckState
.
Checked
;
this
.
chbIsUseBatch
.
Location
=
new
System
.
Drawing
.
Point
(
377
,
14
);
this
.
chbIsUseBatch
.
Name
=
"chbIsUseBatch"
;
this
.
chbIsUseBatch
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
chbIsUseBatch
.
TabIndex
=
271
;
this
.
chbIsUseBatch
.
Text
=
"启动批量上料"
;
this
.
chbIsUseBatch
.
UseVisualStyleBackColor
=
true
;
this
.
chbIsUseBatch
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbIsUseBatch_CheckedChanged
);
//
// chbAuto
//
this
.
chbAuto
.
AutoSize
=
true
;
this
.
chbAuto
.
Location
=
new
System
.
Drawing
.
Point
(
379
,
13
);
this
.
chbAuto
.
Location
=
new
System
.
Drawing
.
Point
(
265
,
14
);
this
.
chbAuto
.
Name
=
"chbAuto"
;
this
.
chbAuto
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
chbAuto
.
TabIndex
=
270
;
...
...
@@ -2278,7 +2150,7 @@
this
.
groupBox4
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
7
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
493
,
175
);
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
549
,
175
);
this
.
groupBox4
.
TabIndex
=
271
;
this
.
groupBox4
.
TabStop
=
false
;
this
.
groupBox4
.
Text
=
"压紧轴"
;
...
...
@@ -2482,11 +2354,12 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage2
);
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage3
);
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage1
);
this
.
tabControl1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
510
,
36
);
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
5
19
,
435
);
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
5
75
,
435
);
this
.
tabControl1
.
TabIndex
=
301
;
//
// tabPage2
...
...
@@ -2495,7 +2368,7 @@
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
5
11
,
405
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
5
67
,
405
);
this
.
tabPage2
.
TabIndex
=
1
;
this
.
tabPage2
.
Text
=
"伺服调试"
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -2506,13 +2379,14 @@
this
.
tabPage3
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
5
11
,
405
);
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
5
67
,
405
);
this
.
tabPage3
.
TabIndex
=
2
;
this
.
tabPage3
.
Text
=
"压紧轴调试"
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
//
// groupBox6
//
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnOpenDoor
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblWaitTragGo
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnWaitTrgGo
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblBatchStatus
);
...
...
@@ -2530,12 +2404,23 @@
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"批量上下料操作"
;
//
// btnOpenDoor
//
this
.
btnOpenDoor
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenDoor
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
66
);
this
.
btnOpenDoor
.
Name
=
"btnOpenDoor"
;
this
.
btnOpenDoor
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
38
);
this
.
btnOpenDoor
.
TabIndex
=
232
;
this
.
btnOpenDoor
.
Text
=
"打开门锁"
;
this
.
btnOpenDoor
.
UseVisualStyleBackColor
=
true
;
this
.
btnOpenDoor
.
Click
+=
new
System
.
EventHandler
(
this
.
BtnOpenDoor_Click
);
//
// lblWaitTragGo
//
this
.
lblWaitTragGo
.
AutoSize
=
true
;
this
.
lblWaitTragGo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblWaitTragGo
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblWaitTragGo
.
Location
=
new
System
.
Drawing
.
Point
(
1
67
,
120
);
this
.
lblWaitTragGo
.
Location
=
new
System
.
Drawing
.
Point
(
1
50
,
120
);
this
.
lblWaitTragGo
.
Name
=
"lblWaitTragGo"
;
this
.
lblWaitTragGo
.
Size
=
new
System
.
Drawing
.
Size
(
247
,
20
);
this
.
lblWaitTragGo
.
TabIndex
=
231
;
...
...
@@ -2544,11 +2429,11 @@
// btnWaitTrgGo
//
this
.
btnWaitTrgGo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnWaitTrgGo
.
Location
=
new
System
.
Drawing
.
Point
(
39
,
112
);
this
.
btnWaitTrgGo
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
112
);
this
.
btnWaitTrgGo
.
Name
=
"btnWaitTrgGo"
;
this
.
btnWaitTrgGo
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
38
);
this
.
btnWaitTrgGo
.
TabIndex
=
230
;
this
.
btnWaitTrgGo
.
Text
=
"料盘已拿出"
;
this
.
btnWaitTrgGo
.
Text
=
"
门口
料盘已拿出"
;
this
.
btnWaitTrgGo
.
UseVisualStyleBackColor
=
true
;
this
.
btnWaitTrgGo
.
Click
+=
new
System
.
EventHandler
(
this
.
btnWaitTrgGo_Click
);
//
...
...
@@ -2566,7 +2451,7 @@
// btnBatchOutTest
//
this
.
btnBatchOutTest
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnBatchOutTest
.
Location
=
new
System
.
Drawing
.
Point
(
39
,
156
);
this
.
btnBatchOutTest
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
156
);
this
.
btnBatchOutTest
.
Name
=
"btnBatchOutTest"
;
this
.
btnBatchOutTest
.
Size
=
new
System
.
Drawing
.
Size
(
237
,
38
);
this
.
btnBatchOutTest
.
TabIndex
=
228
;
...
...
@@ -2577,7 +2462,7 @@
// btnBatchReset
//
this
.
btnBatchReset
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnBatchReset
.
Location
=
new
System
.
Drawing
.
Point
(
2
82
,
156
);
this
.
btnBatchReset
.
Location
=
new
System
.
Drawing
.
Point
(
2
65
,
156
);
this
.
btnBatchReset
.
Name
=
"btnBatchReset"
;
this
.
btnBatchReset
.
Size
=
new
System
.
Drawing
.
Size
(
175
,
38
);
this
.
btnBatchReset
.
TabIndex
=
227
;
...
...
@@ -2588,7 +2473,7 @@
// btnStartBatchInStore
//
this
.
btnStartBatchInStore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnStartBatchInStore
.
Location
=
new
System
.
Drawing
.
Point
(
3
20
,
68
);
this
.
btnStartBatchInStore
.
Location
=
new
System
.
Drawing
.
Point
(
3
62
,
66
);
this
.
btnStartBatchInStore
.
Name
=
"btnStartBatchInStore"
;
this
.
btnStartBatchInStore
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
38
);
this
.
btnStartBatchInStore
.
TabIndex
=
226
;
...
...
@@ -2599,11 +2484,11 @@
// btnGetOutTray
//
this
.
btnGetOutTray
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnGetOutTray
.
Location
=
new
System
.
Drawing
.
Point
(
171
,
68
);
this
.
btnGetOutTray
.
Location
=
new
System
.
Drawing
.
Point
(
254
,
66
);
this
.
btnGetOutTray
.
Name
=
"btnGetOutTray"
;
this
.
btnGetOutTray
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
38
);
this
.
btnGetOutTray
.
TabIndex
=
225
;
this
.
btnGetOutTray
.
Text
=
"取出料盘"
;
this
.
btnGetOutTray
.
Text
=
"取出
出库
料盘"
;
this
.
btnGetOutTray
.
UseVisualStyleBackColor
=
true
;
this
.
btnGetOutTray
.
Click
+=
new
System
.
EventHandler
(
this
.
btnGetOutTray_Click
);
//
...
...
@@ -2621,19 +2506,183 @@
// btnBatchInStore
//
this
.
btnBatchInStore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnBatchInStore
.
Location
=
new
System
.
Drawing
.
Point
(
39
,
68
);
this
.
btnBatchInStore
.
Location
=
new
System
.
Drawing
.
Point
(
133
,
66
);
this
.
btnBatchInStore
.
Name
=
"btnBatchInStore"
;
this
.
btnBatchInStore
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
38
);
this
.
btnBatchInStore
.
TabIndex
=
103
;
this
.
btnBatchInStore
.
Text
=
"批量入库"
;
this
.
btnBatchInStore
.
Text
=
"
开始
批量入库"
;
this
.
btnBatchInStore
.
UseVisualStyleBackColor
=
true
;
this
.
btnBatchInStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBatchInStore_Click
);
//
// axis_5_Alarm
//
this
.
axis_5_Alarm
.
IOName
=
""
;
this
.
axis_5_Alarm
.
IOValue
=
0
;
this
.
axis_5_Alarm
.
isCanClick
=
false
;
this
.
axis_5_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
418
,
37
);
this
.
axis_5_Alarm
.
Name
=
"axis_5_Alarm"
;
this
.
axis_5_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_5_Alarm
.
TabIndex
=
271
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
116
,
37
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
318
,
37
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
213
,
37
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// tabPage1
//
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox7
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
567
,
405
);
this
.
tabPage1
.
TabIndex
=
3
;
this
.
tabPage1
.
Text
=
"温湿度调试"
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
//
// btnTempClose
//
this
.
btnTempClose
.
Location
=
new
System
.
Drawing
.
Point
(
322
,
30
);
this
.
btnTempClose
.
Name
=
"btnTempClose"
;
this
.
btnTempClose
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
btnTempClose
.
TabIndex
=
89
;
this
.
btnTempClose
.
Text
=
"断开"
;
this
.
btnTempClose
.
UseVisualStyleBackColor
=
true
;
this
.
btnTempClose
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTempClose_Click
);
//
// btnTempInit
//
this
.
btnTempInit
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
30
);
this
.
btnTempInit
.
Name
=
"btnTempInit"
;
this
.
btnTempInit
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
btnTempInit
.
TabIndex
=
88
;
this
.
btnTempInit
.
Text
=
"初始化"
;
this
.
btnTempInit
.
UseVisualStyleBackColor
=
true
;
this
.
btnTempInit
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTempInit_Click
);
//
// groupBox7
//
this
.
groupBox7
.
Controls
.
Add
(
this
.
btnSelTemp
);
this
.
groupBox7
.
Controls
.
Add
(
this
.
txtHum
);
this
.
groupBox7
.
Controls
.
Add
(
this
.
label29
);
this
.
groupBox7
.
Controls
.
Add
(
this
.
txtTemp
);
this
.
groupBox7
.
Controls
.
Add
(
this
.
label28
);
this
.
groupBox7
.
Controls
.
Add
(
this
.
txtTempPort
);
this
.
groupBox7
.
Controls
.
Add
(
this
.
label27
);
this
.
groupBox7
.
Controls
.
Add
(
this
.
btnTempClose
);
this
.
groupBox7
.
Controls
.
Add
(
this
.
btnTempInit
);
this
.
groupBox7
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
14
);
this
.
groupBox7
.
Name
=
"groupBox7"
;
this
.
groupBox7
.
Size
=
new
System
.
Drawing
.
Size
(
549
,
134
);
this
.
groupBox7
.
TabIndex
=
90
;
this
.
groupBox7
.
TabStop
=
false
;
this
.
groupBox7
.
Text
=
"温控器调试"
;
//
// txtTempPort
//
this
.
txtTempPort
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtTempPort
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
28
);
this
.
txtTempPort
.
MaxLength
=
10
;
this
.
txtTempPort
.
Name
=
"txtTempPort"
;
this
.
txtTempPort
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
21
);
this
.
txtTempPort
.
TabIndex
=
243
;
this
.
txtTempPort
.
Text
=
"0"
;
//
// label27
//
this
.
label27
.
AutoSize
=
true
;
this
.
label27
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label27
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label27
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
33
);
this
.
label27
.
Name
=
"label27"
;
this
.
label27
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
label27
.
TabIndex
=
242
;
this
.
label27
.
Text
=
"端口号:"
;
this
.
label27
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtTemp
//
this
.
txtTemp
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtTemp
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
63
);
this
.
txtTemp
.
MaxLength
=
10
;
this
.
txtTemp
.
Name
=
"txtTemp"
;
this
.
txtTemp
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
21
);
this
.
txtTemp
.
TabIndex
=
245
;
this
.
txtTemp
.
Text
=
"0"
;
//
// label28
//
this
.
label28
.
AutoSize
=
true
;
this
.
label28
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label28
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label28
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
67
);
this
.
label28
.
Name
=
"label28"
;
this
.
label28
.
Size
=
new
System
.
Drawing
.
Size
(
44
,
17
);
this
.
label28
.
TabIndex
=
244
;
this
.
label28
.
Text
=
"温度:"
;
this
.
label28
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtHum
//
this
.
txtHum
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtHum
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
98
);
this
.
txtHum
.
MaxLength
=
10
;
this
.
txtHum
.
Name
=
"txtHum"
;
this
.
txtHum
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
21
);
this
.
txtHum
.
TabIndex
=
247
;
this
.
txtHum
.
Text
=
"0"
;
//
// label29
//
this
.
label29
.
AutoSize
=
true
;
this
.
label29
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label29
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label29
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
101
);
this
.
label29
.
Name
=
"label29"
;
this
.
label29
.
Size
=
new
System
.
Drawing
.
Size
(
44
,
17
);
this
.
label29
.
TabIndex
=
246
;
this
.
label29
.
Text
=
"湿度:"
;
this
.
label29
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// btnSelTemp
//
this
.
btnSelTemp
.
Location
=
new
System
.
Drawing
.
Point
(
212
,
82
);
this
.
btnSelTemp
.
Name
=
"btnSelTemp"
;
this
.
btnSelTemp
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
btnSelTemp
.
TabIndex
=
248
;
this
.
btnSelTemp
.
Text
=
"查询"
;
this
.
btnSelTemp
.
UseVisualStyleBackColor
=
true
;
this
.
btnSelTemp
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSelTemp_Click
);
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Dpi
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
10
31
,
749
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
10
87
,
749
);
this
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
...
...
@@ -2668,6 +2717,9 @@
this
.
tabPage3
.
ResumeLayout
(
false
);
this
.
groupBox6
.
ResumeLayout
(
false
);
this
.
groupBox6
.
PerformLayout
();
this
.
tabPage1
.
ResumeLayout
(
false
);
this
.
groupBox7
.
ResumeLayout
(
false
);
this
.
groupBox7
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
...
...
@@ -2700,14 +2752,8 @@
public
System
.
Windows
.
Forms
.
TextBox
txtInOutP1
;
public
System
.
Windows
.
Forms
.
Button
btnMiddleP1
;
public
System
.
Windows
.
Forms
.
TextBox
txtMiddleP1
;
public
System
.
Windows
.
Forms
.
Button
btnUpDownP7
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP7
;
public
System
.
Windows
.
Forms
.
Button
btnUpDownP8
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP8
;
public
System
.
Windows
.
Forms
.
Button
btnUpDownP1
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP1
;
public
System
.
Windows
.
Forms
.
Button
btnUpDownP2
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP2
;
public
System
.
Windows
.
Forms
.
Button
btnComP3
;
public
System
.
Windows
.
Forms
.
TextBox
txtComP3
;
public
System
.
Windows
.
Forms
.
Button
btnComP2
;
...
...
@@ -2882,6 +2928,19 @@
private
System
.
Windows
.
Forms
.
Button
btnWaitTrgGo
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownDoor
;
public
System
.
Windows
.
Forms
.
Button
btnUpDownDoor
;
private
System
.
Windows
.
Forms
.
CheckBox
chbIsUseBatch
;
private
System
.
Windows
.
Forms
.
Button
btnOpenDoor
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage1
;
private
System
.
Windows
.
Forms
.
Button
btnTempClose
;
private
System
.
Windows
.
Forms
.
Button
btnTempInit
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox7
;
private
System
.
Windows
.
Forms
.
TextBox
txtTempPort
;
private
System
.
Windows
.
Forms
.
Label
label27
;
private
System
.
Windows
.
Forms
.
Button
btnSelTemp
;
private
System
.
Windows
.
Forms
.
TextBox
txtHum
;
private
System
.
Windows
.
Forms
.
Label
label29
;
private
System
.
Windows
.
Forms
.
TextBox
txtTemp
;
private
System
.
Windows
.
Forms
.
Label
label28
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
615e6b7
...
...
@@ -136,11 +136,11 @@ namespace OnlineStore.AutoInOutStore
btnOutStore
.
Enabled
=
isOpen
;
btnInStore
.
Enabled
=
isOpen
;
btnAxisAMove
.
Enabled
=
isOpen
;
//
btnAxisAMove.Enabled = isOpen;
btnAxisReturnHome
.
Enabled
=
isOpen
;
btnAxisRMove
.
Enabled
=
isOpen
;
btnAxisVMove
.
Enabled
=
isOpen
;
//
btnAxisReturnHome.Enabled = isOpen;
//
btnAxisRMove.Enabled = isOpen;
//
btnAxisVMove.Enabled = isOpen;
启动
ToolStripMenuItem
.
Enabled
=
!
isOpen
;
停止
ToolStripMenuItem
.
Enabled
=
isOpen
;
...
...
@@ -154,7 +154,8 @@ namespace OnlineStore.AutoInOutStore
this
.
ShowInTaskbar
=
true
;
this
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
HideForm
();
initValue
();
initValue
();
txtTempPort
.
Text
=
store
.
Config
.
Humiture_Port
;
LoadOk
=
true
;
cmbHomeType
.
SelectedIndex
=
1
;
timer1
.
Start
();
...
...
@@ -326,7 +327,20 @@ namespace OnlineStore.AutoInOutStore
UpdateFormDoorStats
(
true
);
}
}
if
(
HumitureController
.
IsRun
)
{
btnSelTemp
.
Enabled
=
true
;
btnTempClose
.
Enabled
=
true
;
btnTempInit
.
Enabled
=
false
;
}
else
{
btnSelTemp
.
Enabled
=
false
;
btnTempClose
.
Enabled
=
false
;
btnTempInit
.
Enabled
=
true
;
}
}
private
void
UpdateFormDoorStats
(
bool
dooIsOpen
)
...
...
@@ -495,6 +509,7 @@ namespace OnlineStore.AutoInOutStore
ktk
.
UpDown_P6
=
FormUtil
.
GetIntValue
(
txtUpDownP6
);
//ktk.UpDown_P7 = FormUtil.GetIntValue(txtUpDownP7);
//ktk.UpDown_P8 = FormUtil.GetIntValue(txtUpDownP8);
return
ktk
;
}
private
void
btnComAlarmClear_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -1111,13 +1126,13 @@ namespace OnlineStore.AutoInOutStore
{
SetSkin
(
this
);
this
.
btnUpDownP1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
this
.
btnUpDownP2
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
//
this.btnUpDownP2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this
.
btnUpDownP3
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
this
.
btnUpDownP4
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
this
.
btnUpDownP5
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
this
.
btnUpDownP6
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
this
.
btnUpDownP7
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
this
.
btnUpDownP8
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
0
)))));
//
this.btnUpDownP7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
//
this.btnUpDownP8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
//this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
//this.lblThisSta.ForeColor = System.Drawing.Color.Red;
...
...
@@ -1462,70 +1477,7 @@ namespace OnlineStore.AutoInOutStore
}
}
private
void
btnBatchInStore_Click
(
object
sender
,
EventArgs
e
)
{
if
(
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
))
{
AutomaticBaiting
.
BatchDoorOpen
(
false
);
}
else
{
MessageBox
.
Show
(
"当前忙碌中,无法进行此操作"
);
}
}
private
void
btnStartBatchInStore_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
AutomaticBaiting
.
DoorStatus
.
Equals
(
1
))
{
return
;
}
if
(
AutomaticBaiting
.
DoorIsClose
())
{
AutomaticBaiting
.
BatchDoorClose
(
false
);
AutomaticBaiting
.
Reset
();
}
else
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
}
}
private
void
btnGetOutTray_Click
(
object
sender
,
EventArgs
e
)
{
if
(
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
))
{
if
(
AutomaticBaiting
.
BatchOutStoreCount
>
0
&&
AutomaticBaiting
.
BatchOutStoreHeight
>
0
)
{
AutomaticBaiting
.
BatchDoorOpen
(
false
);
}
else
{
MessageBox
.
Show
(
"未出库,无料盘可取"
);
}
}
else
{
MessageBox
.
Show
(
"当前忙碌中,无法进行此操作"
);
}
}
private
void
btnBatchOutEnd_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
AutomaticBaiting
.
DoorStatus
.
Equals
(
1
))
{
return
;
}
if
(
AutomaticBaiting
.
DoorIsClose
())
{
AutomaticBaiting
.
BatchDoorClose
(
false
);
bool
result
=
AutomaticBaiting
.
Reset
();
}
else
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
}
}
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -1600,5 +1552,117 @@ namespace OnlineStore.AutoInOutStore
AxisABSMove
(
store
.
Config
.
UpDown_Axis
,
value
,
store
.
Config
.
UpDownAxis_Door_Speed
);
}
}
private
void
chbIsUseBatch_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
store
.
UseBatchInout
=
chbIsUseBatch
.
Checked
;
LogUtil
.
info
(
"切换是否使用批量上下料:"
+
store
.
UseBatchInout
);
}
private
void
BtnOpenDoor_Click
(
object
sender
,
EventArgs
e
)
{
if
(
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
))
{
AutomaticBaiting
.
BatchDoorOpen
(
false
);
AutomaticBaiting
.
IsNeedStartInout
=
false
;
}
else
{
MessageBox
.
Show
(
"当前忙碌中,无法进行此操作"
);
}
}
private
void
btnBatchInStore_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
AutomaticBaiting
.
DoorStatus
.
Equals
(
1
))
{
return
;
}
if
(
AutomaticBaiting
.
DoorIsClose
())
{
AutomaticBaiting
.
IsNeedStartInout
=
true
;
AutomaticBaiting
.
BatchDoorClose
(
false
);
AutomaticBaiting
.
Reset
();
}
else
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
}
}
private
void
btnStartBatchInStore_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
AutomaticBaiting
.
DoorStatus
.
Equals
(
1
))
{
return
;
}
if
(
AutomaticBaiting
.
DoorIsClose
())
{
AutomaticBaiting
.
BatchDoorClose
(
false
);
AutomaticBaiting
.
Reset
();
}
else
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
}
}
private
void
btnGetOutTray_Click
(
object
sender
,
EventArgs
e
)
{
if
(
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
))
{
if
(
AutomaticBaiting
.
BatchOutStoreCount
>
0
&&
AutomaticBaiting
.
BatchOutStoreHeight
>
0
)
{
AutomaticBaiting
.
BatchDoorOpen
(
false
);
}
else
{
MessageBox
.
Show
(
"未出库,无料盘可取"
);
}
}
else
{
MessageBox
.
Show
(
"当前忙碌中,无法进行此操作"
);
}
}
private
void
btnBatchOutEnd_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
AutomaticBaiting
.
DoorStatus
.
Equals
(
1
))
{
return
;
}
if
(
AutomaticBaiting
.
DoorIsClose
())
{
AutomaticBaiting
.
BatchDoorClose
(
false
);
bool
result
=
AutomaticBaiting
.
Reset
();
}
else
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
}
}
private
void
btnTempInit_Click
(
object
sender
,
EventArgs
e
)
{
string
port
=
txtTempPort
.
Text
.
ToString
();
if
(
HumitureController
.
IsRun
)
{
HumitureController
.
Release
();
}
HumitureController
.
Init
(
port
);
}
private
void
btnTempClose_Click
(
object
sender
,
EventArgs
e
)
{
HumitureController
.
Release
();
}
private
void
btnSelTemp_Click
(
object
sender
,
EventArgs
e
)
{
ASTemperateParam
param
=
HumitureController
.
QueryData
();
txtTemp
.
Text
=
param
.
Temperate
.
ToString
();
txtHum
.
Text
=
param
.
Humidity
.
ToString
();
}
}
}
source/Common/util/LogUtil.cs
查看文件 @
615e6b7
...
...
@@ -73,7 +73,7 @@ namespace OnlineStore.Common
}
}
private
static
List
<
string
>
lasErrorLogList
=
new
List
<
string
>();
//
private static List<string> lasErrorLogList = new List<string>();
private
static
int
errCount
=
5
;
public
static
void
error
(
ILog
log
,
string
errorMsg
,
int
type
)
...
...
@@ -100,7 +100,7 @@ namespace OnlineStore.Common
}
public
static
void
error
(
ILog
log
,
string
errorMsg
)
{
if
(!
lasErrorLogList
.
Contains
(
errorMsg
))
//
if (!lasErrorLogList.Contains(errorMsg))
{
log
.
Error
(
log
.
Logger
.
Name
+
" - "
+
errorMsg
);
if
(
logBox
==
null
)
...
...
@@ -109,17 +109,17 @@ namespace OnlineStore.Common
}
AddToBox
(
errorMsg
,
Color
.
Red
);
}
lasErrorLogList
.
Add
(
errorMsg
);
if
(
lasErrorLogList
.
Count
>
errCount
)
{
lasErrorLogList
.
RemoveAt
(
0
);
}
//
lasErrorLogList.Add(errorMsg);
//
if (lasErrorLogList.Count > errCount)
//
{
//
lasErrorLogList.RemoveAt(0);
//
}
}
private
static
void
AddToBox
(
string
msg
,
Color
color
)
{
try
{
ShowLogPro
(
msg
,
color
);
ShowLogPro
(
msg
);
}
catch
(
Exception
ex
)
{
...
...
@@ -127,7 +127,7 @@ namespace OnlineStore.Common
}
}
private
static
int
count
=
0
;
private
static
void
ShowLogPro
(
string
msg
,
Color
color
)
private
static
void
ShowLogPro
(
string
msg
)
{
try
{
...
...
source/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
查看文件 @
615e6b7
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.IO.Ports
;
...
...
@@ -422,7 +423,11 @@ namespace OnlineStore.DeviceLibrary
return
GetRegisterData
(
portName
,
reviceData
,
ACCMDManager
.
TargetPostion
);
}
public
static
int
GetActualtPosition
(
string
portName
,
int
slvAddr
)
public
static
int
GetActualtPosition
(
ConfigMoveAxis
axis
)
{
return
GetActualtPosition
(
axis
.
DeviceName
,
axis
.
GetAxisValue
());
}
public
static
int
GetActualtPosition
(
string
portName
,
int
slvAddr
)
{
PreReadAddr
=
ACCMDManager
.
ActualPosition
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadRegisters
,
ACCMDManager
.
ActualPosition
,
"0000"
,
2
);
...
...
@@ -506,6 +511,20 @@ namespace OnlineStore.DeviceLibrary
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
/// <summary>
/// 负极限
/// </summary>
public
static
int
GetLimitNegativeSingle
(
ConfigMoveAxis
axis
)
{
return
GetLimitNegativeSingle
(
axis
);
}
/// <summary>
/// 正极限
/// </summary>
public
static
int
GetLimitPositiveSingle
(
ConfigMoveAxis
axis
)
{
return
GetLimitPositiveSingle
(
axis
);
}
/// <summary>
/// 正极限
/// </summary>
public
static
int
GetLimitPositiveSingle
(
string
portName
,
int
slvAddr
)
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
615e6b7
...
...
@@ -9,7 +9,7 @@ DI,吸盘气缸上升端,SuckingDisc_Up,206,192.168.200.11,0,吸盘气缸上升端,X07,DI-07,0
DI,吸盘气缸下降端,SuckingDisc_Down,207,192.168.200.11,0,吸盘气缸下降端,X08,DI-08,0,
DI,料盘宽度检测1,WidthCheck1,208,192.168.200.11,0,料盘宽度检测1,X09,DI-09,0,
DI,料盘宽度检测2,WidthCheck2,209,192.168.200.11,0,料盘宽度检测2,X10,DI-10,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial,210,192.168.200.11,0,料盘检测1
(上料机构)
,X11,DI-11,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial,210,192.168.200.11,0,料盘检测1
(上料机构)
,X11,DI-11,0,
DI,上料机构出料检测,OutCheck,211,192.168.200.11,0,上料机构出料检测,X12,DI-12,0,
DI,门锁气缸打开端,BatchDoor_Open,212,192.168.200.11,0,门锁气缸打开端,X13,DI-13,0,
DI,门锁气缸关闭端,BatchDoor_Close,213,192.168.200.11,0,门锁气缸关闭端,X14,DI-14,0,
...
...
@@ -27,8 +27,8 @@ DO,进料口门上升SOL,Door_Up,108,192.168.200.11,0,进料口门上升SOL,Y09,DO-09,0,
DO,进料口门下降SOL,Door_Down,109,192.168.200.11,0,进料口门下降SOL,Y10,DO-10,0,
DO,吸盘气缸上升SOL,SuckingDisc_Up,110,192.168.200.11,0,吸盘气缸上升SOL,Y11,DO-11,0,
DO,吸盘气缸下降SOL,SuckingDisc_Down,111,192.168.200.11,0,吸盘气缸下降SOL,Y12,DO-12,0,
DO,门锁气缸打开SOL,
Auto
Door_Open,112,192.168.200.11,0,门锁气缸打开SOL,Y13,DO-13,0,
DO,门锁气缸关闭SOL,
Auto
Door_Close,113,192.168.200.11,0,门锁气缸关闭SOL,Y14,DO-14,0,
DO,门锁气缸打开SOL,
Batch
Door_Open,112,192.168.200.11,0,门锁气缸打开SOL,Y13,DO-13,0,
DO,门锁气缸关闭SOL,
Batch
Door_Close,113,192.168.200.11,0,门锁气缸关闭SOL,Y14,DO-14,0,
,,,114,192.168.200.11,0,,Y15,DO-15,0,
,,,115,192.168.200.11,0,,Y16,DO-16,0,
DI,上料机构门关闭,DoorClose_LoadMaterial,200,192.168.200.12,0,上料机构门关闭,X21,DI-21,0,
...
...
@@ -45,15 +45,15 @@ AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM6,0,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,升降轴 进料口仓门位置,UpDownAxis_DoorPosition,
403
000,,,,,,,
PRO,升降轴 进料口仓门位置,UpDownAxis_DoorPosition,
355
000,,,,,,,
,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,403000,,,,,,,
,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,415000,,,,,,,
,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000,,,,,,,
,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000,,,,,,,
PRO,升降轴 出入料待机点P1集合,UpDownAxis_P1_List,8#
20000;12#22000
,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,26
8093
,,,,,,,
PRO,升降轴 出入料待机点P1集合,UpDownAxis_P1_List,8#
355000;12#350000;
,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,26
0000
,,,,,,,
PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-
75
000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-
40
000,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
...
...
@@ -62,7 +62,7 @@ PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,
25
0,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,
10
0,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,80,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,
...
...
@@ -128,18 +128,18 @@ PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,15000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,
5
0,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,
20
0,,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,
2
00,,,,,, ,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,
17300
00,,,,,, ,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,
5
0,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,
20
0,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.11#16;192.168.200.12#4,,,,,, ,
...
...
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
615e6b7
位置,优先级,高度,宽度,料仓ID,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,进出轴仓门取料点P2,进出轴吸盘取料点P2
1#AC1_1_1_4,774,8,7,1,211783,51884,55245,55245,51884,68000,-110000,-75000,
81000,81
000
1#AC1_1_1_5,773,12,7,1,211783,67807,71168,71168,67807,68000,-110000,-75000,
81000,81
000
1#AC1_1_1_4,774,8,7,1,211783,51884,55245,55245,51884,68000,-110000,-75000,
5000,5
000
1#AC1_1_1_5,773,12,7,1,211783,67807,71168,71168,67807,68000,-110000,-75000,
5000,5
000
1#AC1_1_1_6,772,8,7,,211783,83730,87091,87091,83730,68000,-110000,-75000,81000,81000
1#AC1_1_1_7,771,8,7,,211783,99653,103014,103014,99653,68000,-110000,-75000,81000,81000
1#AC1_1_1_8,770,8,7,,211783,115576,118937,118937,115576,68000,-110000,-75000,81000,81000
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
615e6b7
...
...
@@ -16,8 +16,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
partial
class
AC_SA_BoxBean
:
AC_Store
{
private
static
bool
IsIntSlvBlock
=
false
;
private
bool
IsIntSlvBlock
=
false
;
public
bool
UseBatchInout
=
true
;
public
string
CID
=
""
;
public
AUTO_SA_Config
Config
;
/// <summary>
...
...
@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
override
bool
StartRun
()
{
runTimeWatch
.
Res
e
t
();
runTimeWatch
.
Res
tar
t
();
LogUtil
.
info
(
LOGGER
,
StoreName
+
"开始启动,启动时间:"
+
DateTime
.
Now
.
ToLongTimeString
());
if
(
IsHasCompress_Axis
)
...
...
@@ -147,11 +147,14 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
}
string
canStart
=
AutomaticBaiting
.
CanStart
();
if
(!
canStart
.
Equals
(
""
))
if
(
UseBatchInout
)
{
LogUtil
.
info
(
StoreName
+
canStart
);
return
false
;
string
canStart
=
AutomaticBaiting
.
CanStart
();
if
(!
canStart
.
Equals
(
""
))
{
LogUtil
.
info
(
StoreName
+
canStart
);
return
false
;
}
}
autoNext
=
false
;
mainTimer
.
Enabled
=
false
;
...
...
@@ -170,8 +173,10 @@ namespace OnlineStore.DeviceLibrary
{
return
false
;
}
AutomaticBaiting
.
Reset
();
if
(
UseBatchInout
)
{
AutomaticBaiting
.
Reset
();
}
//TODO 启动时先所有轴远点返回,测试暂时关闭
storeRunStatus
=
StoreRunStatus
.
HomeMoving
;
HumitureController
.
Init
(
Config
.
Humiture_Port
);
...
...
@@ -698,11 +703,12 @@ namespace OnlineStore.DeviceLibrary
//private DateTime preProcessTime = DateTime.Now;
private
bool
IsChongfu
=
false
;
private
Stopwatch
stopwatch
=
new
Stopwatch
();
private
object
TimerLock
=
""
;
protected
override
void
timersTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
if
(
InProcess
)
{
//TimeSpan span = DateTime.Now - preProcessTime;
if
(
stopwatch
.
Elapsed
.
TotalMinutes
<
1
)
{
return
;
...
...
@@ -711,30 +717,46 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
error
(
"主定时器:InProcess已等待"
+
stopwatch
.
Elapsed
.
ToString
()
+
"重新处理"
);
IsChongfu
=
true
;
Monitor
.
Exit
(
TimerLock
);
}
}
try
InProcess
=
true
;
stopwatch
.
Restart
();
if
(
Monitor
.
TryEnter
(
TimerLock
))
{
InProcess
=
true
;
//preProcessTime = DateTime.Now;
stopwatch
.
Restart
();
IoCheckProcess
();
ShowTimeLog
(
"IoCheckProcess"
);
TimerProcess
();
ShowTimeLog
(
"TimerProcess"
);
//检查运动轴报警
if
(
storeRunStatus
>
StoreRunStatus
.
Wait
&&
(!
isInSuddenDown
)
&&
(!
isNoAirCheck
))
try
{
IoCheckProcess
();
ShowTimeLog
(
"IoCheckProcess"
);
TimerProcess
();
ShowTimeLog
(
"TimerProcess"
);
//检查运动轴报警
if
(
storeRunStatus
>
StoreRunStatus
.
Wait
&&
(!
isInSuddenDown
)
&&
(!
isNoAirCheck
))
{
ShowTimeLog
(
"开始检测轴报警"
);
CheckAxisAlarm
();
ShowTimeLog
(
"轴报警检测完成"
);
}
if
(
UseBatchInout
)
{
AutomaticBaiting
.
TimerProcess
();
}
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
StoreName
+
"定时处理出错:"
+
ex
.
ToString
());
}
finally
{
ShowTimeLog
(
"开始检测轴报警"
);
CheckAxisAlarm
();
ShowTimeLog
(
"轴报警检测完成"
);
Monitor
.
Exit
(
TimerLock
);
}
AutomaticBaiting
.
TimerProcess
();
}
catch
(
Exception
ex
)
else
{
LOGGER
.
Error
(
StoreName
+
"定时处理
出错:"
+
ex
.
ToString
()
);
LOGGER
.
Error
(
StoreName
+
"定时处理
未得到锁"
);
}
IsChongfu
=
false
;
InProcess
=
false
;
}
...
...
@@ -923,37 +945,37 @@ namespace OnlineStore.DeviceLibrary
//遮挡光栅信号
if
(
KND
.
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
NeedCheckSafetyLight
.
Equals
(
1
))
{
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
))
{
NeedCheckSafetyLight
=
2
;
LOGGER
.
Info
(
"出库SO_10_DeviceToDoor运动中,光栅被遮挡,停止进出轴运动"
);
ACServerManager
.
SuddenStop
(
Config
.
InOut_Axis
.
DeviceName
,
Config
.
InOut_Axis
.
GetAxisValue
());
}
else
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_05_DeviceToDoor
))
{
NeedCheckSafetyLight
=
2
;
LOGGER
.
Info
(
"入库SI_05_DeviceToDoor运动中,光栅被遮挡,停止进出轴运动"
);
ACServerManager
.
SuddenStop
(
Config
.
InOut_Axis
.
DeviceName
,
Config
.
InOut_Axis
.
GetAxisValue
());
}
}
//
if (NeedCheckSafetyLight.Equals(1))
//
{
//
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor))
//
{
//
NeedCheckSafetyLight = 2;
//
LOGGER.Info("出库SO_10_DeviceToDoor运动中,光栅被遮挡,停止进出轴运动");
//
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
//
}
//
else if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SI_05_DeviceToDoor))
//
{
//
NeedCheckSafetyLight = 2;
//
LOGGER.Info("入库SI_05_DeviceToDoor运动中,光栅被遮挡,停止进出轴运动");
//
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
//
}
//
}
}
else
{
if
(
NeedCheckSafetyLight
.
Equals
(
2
))
{
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
))
{
LOGGER
.
Info
(
"出库SO_10_DeviceToDoor运动中,光栅已恢复,继续进出轴运动"
);
SO_10_DeviceToDoorPro
();
}
else
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_05_DeviceToDoor
))
{
LOGGER
.
Info
(
"入库SI_05_DeviceToDoor运动中,光栅已恢复,继续进出轴运动"
);
SI_05_DeviceToDoor
();
}
}
//
if (NeedCheckSafetyLight.Equals(2))
//
{
//
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor))
//
{
//
LOGGER.Info("出库SO_10_DeviceToDoor运动中,光栅已恢复,继续进出轴运动");
//
SO_10_DeviceToDoorPro();
//
}
//
else if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SI_05_DeviceToDoor))
//
{
//
LOGGER.Info("入库SI_05_DeviceToDoor运动中,光栅已恢复,继续进出轴运动");
//
SI_05_DeviceToDoor();
//
}
//
}
}
}
catch
(
Exception
ex
)
...
...
@@ -1232,7 +1254,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
LOGGER
,
StoreName
+
"StopMove"
);
KND
.
IOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
AutomaticBaiting
.
StopMove
();
if
(
UseBatchInout
)
{
AutomaticBaiting
.
StopMove
();
}
//HDevelopExport.CloseAllCamera();
isInPro
=
false
;
}
...
...
@@ -1502,8 +1527,9 @@ namespace OnlineStore.DeviceLibrary
LOGGER
.
Error
(
"定时给服务器发送消息出错:"
,
ex
);
}
}
HumitureController
.
QueryData
();
HumidityProcess
();
//温湿度暂时注释
//HumitureController.QueryData();
//HumidityProcess();
LedProcess
();
isInProcess
=
false
;
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
615e6b7
...
...
@@ -31,7 +31,7 @@ namespace OnlineStore.DeviceLibrary
#
region
出入库参数
private
int
CurrInOutCount
=
0
;
private
int
CurrInOutACount
=
0
;
private
int
CurrInOutACount
=
0
;
private
bool
LoadParamPosition
(
InOutStoreParam
param
,
bool
IsBatch
)
{
if
(
param
==
null
)
...
...
@@ -66,9 +66,9 @@ namespace OnlineStore.DeviceLibrary
//if (IsBatch)
//{
// p.UpDown_P1 = Config.GetUpDownP1(position.BagHeight);
//p.UpDown_P8 = p.UpDown_P1;
//p.UpDown_P2 = p.UpDown_P1;
//p.UpDown_P7 = p.UpDown_P1;
//p.UpDown_P8 = p.UpDown_P1;
//p.UpDown_P2 = p.UpDown_P1;
//p.UpDown_P7 = p.UpDown_P1;
//}
p
.
ComPress_P2
=
position
.
CompressAxis_Position_P2
;
...
...
@@ -82,9 +82,24 @@ namespace OnlineStore.DeviceLibrary
//出库时批量上下料轴需要下降的高度
p
.
BatchAxis_DownValue
=
AutomaticBaiting
.
AxisChangeValue
*
position
.
BagHeight
;
LogUtil
.
info
(
"【"
+
position
.
PositionNum
+
"】高度【"
+
position
.
BagHeight
+
"】批量上下料轴需要下降【"
+
p
.
BatchAxis_DownValue
+
"】"
);
param
.
MoveP
=
p
;
return
true
;
}
else
{
AutoStorePosition
position
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
param
.
PositionNum
);
if
(
position
!=
null
)
{
param
.
MoveP
.
BatchAxis_DownValue
=
AutomaticBaiting
.
AxisChangeValue
*
position
.
BagHeight
;
LogUtil
.
info
(
"【"
+
position
.
PositionNum
+
"】高度【"
+
position
.
BagHeight
+
"】批量上下料轴需要下降【"
+
param
.
MoveP
.
BatchAxis_DownValue
+
"】"
);
}
else
{
param
.
MoveP
.
BatchAxis_DownValue
=
AutomaticBaiting
.
AxisChangeValue
*
8
;
LogUtil
.
info
(
"【"
+
position
.
PositionNum
+
"】高度【"
+
8
+
"】批量上下料轴需要下降【"
+
param
.
MoveP
.
BatchAxis_DownValue
+
"】"
);
}
}
return
true
;
}
...
...
@@ -104,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
else
{
ACAxisMove
(
Config
.
InOut_Axis
,
InOut_P1
,
Config
.
InOutAxis_P1_Speed
);
}
}
}
private
void
CheckWait
()
...
...
@@ -145,6 +160,7 @@ namespace OnlineStore.DeviceLibrary
{
isOk
=
false
;
WarnMsg
=
msg
;
LogUtil
.
info
(
msg
);
Alarm
(
StoreAlarmType
.
AxisMoveError
,
GetAlarmCodeByAxis
(
wait
.
AxisInfo
).
ToString
(),
WarnMsg
,
StoreMove
.
MoveType
);
break
;
}
...
...
@@ -170,10 +186,12 @@ namespace OnlineStore.DeviceLibrary
else
if
(
wait
.
WaitType
==
3
)
{
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
}
else
if
(
wait
.
WaitType
==
7
)
}
else
if
(
wait
.
WaitType
==
7
)
{
//wait.IsEnd = (wait.HeightValue.Equals(GetHeight()));
}
else
if
(
wait
.
WaitType
==
12
)
}
else
if
(
wait
.
WaitType
==
12
)
{
wait
.
IsEnd
=
AutomaticBaiting
.
IsGetTrayGo
;
}
...
...
@@ -182,7 +200,7 @@ namespace OnlineStore.DeviceLibrary
ShuoKeInfo
info
=
null
;
if
(
wait
.
IsHomeMove
)
{
wait
.
IsEnd
=
ShuoKeControls
.
IsHomeMoveEnd
(
wait
.
SlvAddr
,
StoreMove
.
LastSetpTime
,
out
info
);
wait
.
IsEnd
=
ShuoKeControls
.
IsHomeMoveEnd
(
wait
.
SlvAddr
,
StoreMove
.
LastSetpTime
,
out
info
);
}
else
{
...
...
@@ -190,13 +208,15 @@ namespace OnlineStore.DeviceLibrary
}
if
(!
wait
.
IsEnd
)
{
if
(
info
==
null
)
{
if
(
info
==
null
)
{
NotOkMsg
+=
"info=null;"
;
}
else
}
else
{
NotOkMsg
+=
""
+
info
.
ToShowStr
();
NotOkMsg
+=
""
+
info
.
ToShowStr
();
}
ShuoKeControls
.
GetStatus
(
wait
.
SlvAddr
);
}
...
...
@@ -211,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if
(!
StoreMove
.
OneWaitCanEndStep
)
if
(!
StoreMove
.
OneWaitCanEndStep
)
{
isOk
=
false
;
break
;
...
...
@@ -235,12 +255,12 @@ namespace OnlineStore.DeviceLibrary
}
else
{
WarnMsg
=
StoreName
+
"【"
+
StoreMove
.
MoveType
+
"】【"
+
StoreMove
.
MoveStep
+
"】等待超时 ["
+
NotOkMsg
WarnMsg
=
StoreName
+
"【"
+
StoreMove
.
MoveType
+
"】【"
+
StoreMove
.
MoveStep
+
"】等待超时 ["
+
NotOkMsg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
LOGGER
,
WarnMsg
);
}
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
}
}
}
#
endregion
...
...
@@ -249,14 +269,14 @@ namespace OnlineStore.DeviceLibrary
private
Stopwatch
InOutWatch
=
new
Stopwatch
();
public
bool
StartInStoreMove
(
InOutStoreParam
param
,
bool
IsBatchWork
)
{
return
StartInStoreMove
(
param
,
IsBatchWork
,
true
);
return
StartInStoreMove
(
param
,
IsBatchWork
,
true
);
}
/// <summary>
/// 开始入库移动移动
/// </summary>
public
bool
StartInStoreMove
(
InOutStoreParam
param
,
bool
IsBatchWork
,
bool
isNeedInStore
)
/// <summary>
/// 开始入库移动移动
/// </summary>
public
bool
StartInStoreMove
(
InOutStoreParam
param
,
bool
IsBatchWork
,
bool
isNeedInStore
)
{
InOutWatch
.
Res
e
t
();
InOutWatch
.
Res
tar
t
();
string
posId
=
param
!=
null
?
param
.
PositionNum
:
""
;
string
logMsg
=
IsBatchWork
?
" 启动批量入库【"
+
posId
+
"】"
:
" 启动入库【"
+
posId
+
"】"
;
if
(!
AutomaticBaiting
.
DoorStatus
.
Equals
(
2
))
...
...
@@ -266,17 +286,17 @@ namespace OnlineStore.DeviceLibrary
}
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
{
if
(!
LoadParamPosition
(
param
,
false
))
if
(!
LoadParamPosition
(
param
,
false
))
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,找不到库位信息"
);
return
false
;
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,找不到库位信息"
);
return
false
;
}
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,叉子料盘检测有料"
);
return
false
;
return
false
;
}
LogUtil
.
info
(
LOGGER
,
StoreName
+
logMsg
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
logMsg
);
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
StoreMove
.
NewMove
(
StoreMoveType
.
InStore
,
param
);
...
...
@@ -299,13 +319,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动【"
+
posId
+
"】入库出错,当前状态,storeStatus="
+
storeRunStatus
);
return
false
;
}
}
private
void
SI_02_Move
(
LineMoveP
moveP
)
{
}
private
void
SI_02_Move
(
LineMoveP
moveP
)
{
InStoreLog
(
"入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
OpenDoorAndWait
();
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
OpenDoorAndWait
();
InOutBackToP1
(
moveP
.
InOut_P1
);
}
private
void
SI_05_DeviceToDoor
()
...
...
@@ -313,7 +333,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog
(
"入库:SI_05 叉子进入入料口,进出轴至P2(进料口取料点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_05_DeviceToDoor
);
ACAxisMove
(
Config
.
InOut_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
// NeedCheckSafetyLight = 1;
// NeedCheckSafetyLight = 1;
}
protected
override
void
InStoreProcess
()
{
...
...
@@ -512,8 +532,8 @@ namespace OnlineStore.DeviceLibrary
else
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 入库,moveStatus="
+
StoreMove
.
MoveStep
+
",没有对应的处理!"
);
}
}
}
}
#
endregion
...
...
@@ -521,9 +541,9 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 开始出库运动
/// </summary>
public
bool
StartOutStoreMove
(
InOutStoreParam
param
,
bool
IsBatchWork
)
public
bool
StartOutStoreMove
(
InOutStoreParam
param
,
bool
IsBatchWork
)
{
InOutWatch
.
Res
e
t
();
InOutWatch
.
Res
tar
t
();
string
posId
=
param
!=
null
?
param
.
PositionNum
:
""
;
string
logMsg
=
IsBatchWork
?
" 启动批量出库【"
+
posId
+
"】"
:
" 启动出库【"
+
posId
+
"】"
;
if
(!
AutomaticBaiting
.
DoorStatus
.
Equals
(
2
))
...
...
@@ -533,15 +553,15 @@ namespace OnlineStore.DeviceLibrary
}
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
{
if
(!
LoadParamPosition
(
param
,
IsBatchWork
))
if
(!
LoadParamPosition
(
param
,
IsBatchWork
))
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,找不到库位信息"
);
return
false
;
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,找不到库位信息"
);
return
false
;
}
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,叉子料盘检测有料"
);
return
false
;
return
false
;
}
//若自动上料机构正在入库中,不可以出库
if
(!
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
))
...
...
@@ -558,7 +578,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,批量上下料机构已满,请先拿出料盘"
);
return
false
;
}
}
}
storeStatus
=
StoreStatus
.
OutStoreExecute
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
logMsg
);
...
...
@@ -567,12 +587,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
IsBatchInOutStore
=
IsBatchWork
;
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_02_DeviceBack
);
OutStoreLog
(
"出库:SO_02 叉子先运动到P1 , 开始"
);
//ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1
(
StoreMove
.
MoveParam
.
MoveP
.
InOut_P1
);
//OpenDoorAndWait();
SO_02_DeviceBack
();
}
else
{
...
...
@@ -601,22 +616,7 @@ namespace OnlineStore.DeviceLibrary
}
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_01_LocationCylinderDown
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_02_DeviceBack
);
if
(
StoreMove
.
IsBatchInOutStore
)
{
//如果批量能未检测到料盘,需要把批量轴走到能检测到料盘的位置
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
//int currBatchValue = ACServerManager.GetActualtPosition(Config.Batch_Axis.DeviceName, Config.Batch_Axis.GetAxisValue());
ACAxisMove
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P1
,
Config
.
BatchAxis_P1_Speed
);
OutStoreLog
(
"出库:SO_02 批量上下料轴走到P1点 "
);
}
}
OutStoreLog
(
"出库:SO_02 叉子先运动到P1 "
);
InOutBackToP1
(
StoreMove
.
MoveParam
.
MoveP
.
InOut_P1
);
SO_02_DeviceBack
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_02_DeviceBack
)
{
...
...
@@ -708,7 +708,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_22_WaitTrayGo
);
OutStoreLog
(
"出库:SO_22等待操作人员拿走料盘 "
);
AutomaticBaiting
.
IsWaitTragGo
=
true
;
AutomaticBaiting
.
IsGetTrayGo
=
false
;
AutomaticBaiting
.
IsGetTrayGo
=
false
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTakeTray
());
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_22_WaitTrayGo
))
...
...
@@ -717,7 +717,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_11_PutTray
)
{
SO_13_InoutBack
();
SO_13_InoutBack
();
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_13_InoutBack
))
{
...
...
@@ -733,29 +733,48 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 出库处理,moveStatus="
+
StoreMove
.
MoveStep
+
",没有对应的处理!"
);
}
}
private
void
SO_02_DeviceBack
()
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_02_DeviceBack
);
OutStoreLog
(
"出库:SO_02 叉子先运动到P1 , 开始"
);
InOutBackToP1
(
StoreMove
.
MoveParam
.
MoveP
.
InOut_P1
);
if
(
StoreMove
.
IsBatchInOutStore
)
{
//如果批量能未检测到料盘,需要把批量轴走到能检测到料盘的位置
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMove
.
TimeOutSeconds
=
120
;
ACAxisMove
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P1
,
Config
.
BatchAxis_P1_Speed
);
OutStoreLog
(
"出库:SO_02 批量上下料轴走到P1点 "
);
}
}
}
private
void
BatchAxisUpTrayHeight
()
{
//上料轴需要向下走
int
currPosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
int
currPosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
);
if
(
currPosition
.
Equals
(-
1
))
{
currPosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
);
}
int
targetValue
=
currPosition
-
StoreMove
.
MoveParam
.
MoveP
.
BatchAxis_DownValue
;
//记录高度
AutomaticBaiting
.
BatchOutStoreCount
++;
AutomaticBaiting
.
BatchOutStoreHeight
+=
StoreMove
.
MoveParam
.
GetACPosition
().
BagHeight
;
OutStoreLog
(
"出库:SO_13 升降轴返回,将物品放下,批量上下料轴下降【"
+
StoreMove
.
MoveParam
.
MoveP
.
BatchAxis_DownValue
+
"】,目标位置【"
+
targetValue
+
"】"
);
AutomaticBaiting
.
BatchOutStoreHeight
+=
StoreMove
.
MoveParam
.
GetACPosition
().
BagHeight
;
OutStoreLog
(
"出库:SO_13 升降轴返回,将物品放下,批量上下料轴下降【"
+
StoreMove
.
MoveParam
.
MoveP
.
BatchAxis_DownValue
+
"】,目标位置【"
+
targetValue
+
"】"
);
//判断盘满后,需要报警?
if
(
targetValue
<
0
)
if
(
targetValue
<
=
0
)
{
//TODO
WarnMsg
=
"库已满,请先拿走!"
;
}
else
{
ACAxisMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
,
targetValue
);
ACAxisMove
(
StoreManager
.
Config
.
Batch_Axis
,
targetValue
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
}
}
private
void
SO_13_InoutBack
()
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_13_InoutBack
);
OutStoreLog
(
"出库:SO_13 叉子返回"
);
ACAxisMove
(
Config
.
InOut_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
InOut_P1
,
Config
.
InOutAxis_P1_Speed
);
...
...
@@ -785,13 +804,13 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
//此处需要等待box门口没有盘
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
}
}
private
void
SO_10_DeviceToDoorPro
()
{
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_10_DeviceToDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_10_DeviceToDoor
);
OutStoreLog
(
"出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) "
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
NeedCheckSafetyLight
=
1
;
...
...
@@ -841,7 +860,7 @@ namespace OnlineStore.DeviceLibrary
}
public
List
<
FixtureCodeInfo
>
waitOutStoreList
=
new
List
<
FixtureCodeInfo
>();
public
object
waitOutListLock
=
""
;
public
void
AddWaitOutInfo
(
FixtureCodeInfo
code
)
{
lock
(
waitOutListLock
)
...
...
@@ -943,20 +962,20 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
error
(
LOGGER
,
ex
.
ToString
());
}
}
}
#
endregion
private
void
InStoreLog
(
string
msg
)
{
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
string
isBatchMsg
=
StoreMove
.
IsBatchInOutStore
?
"批量"
:
""
;
LogUtil
.
info
(
LOGGER
,
isBatchMsg
+
"【"
+
posId
+
"】"
+
msg
);
LogUtil
.
info
(
LOGGER
,
isBatchMsg
+
"【"
+
posId
+
"】"
+
msg
);
}
private
void
OutStoreLog
(
string
msg
)
{
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
string
isBatchMsg
=
StoreMove
.
IsBatchInOutStore
?
"批量"
:
""
;
LogUtil
.
info
(
LOGGER
,
isBatchMsg
+
"【"
+
posId
+
"】"
+
msg
);
LogUtil
.
info
(
LOGGER
,
isBatchMsg
+
"【"
+
posId
+
"】"
+
msg
);
}
}
}
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
615e6b7
...
...
@@ -10,8 +10,8 @@ namespace OnlineStore.DeviceLibrary
public
partial
class
AutomaticBaiting
{
/// <summary>
/// 操作人员是否拿走料盘
/// </summary>
/// 操作人员是否拿走料盘
/// </summary>
public
static
bool
IsGetTrayGo
=
false
;
public
static
bool
IsWaitTragGo
=
false
;
/// <summary>
...
...
@@ -29,6 +29,7 @@ namespace OnlineStore.DeviceLibrary
public
static
StoreMoveInfo
StoreMove
=
null
;
public
static
StoreRunStatus
AutoBaitingStatus
=
StoreRunStatus
.
Wait
;
public
static
bool
IsNeedStartInout
=
false
;
//记录没开门状态下,已经出库的数量
public
static
int
BatchOutStoreCount
=
0
;
...
...
@@ -46,20 +47,26 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
static
void
TimerProcess
()
{
if
(
AutoBaitingStatus
>=
StoreRunStatus
.
Wait
)
try
{
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
StoreReset
))
{
ResetProcess
();
}
else
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
))
{
InStoreProcess
();
}
else
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
if
(
AutoBaitingStatus
>=
StoreRunStatus
.
Wait
)
{
//OutStoreProcess();
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
StoreReset
))
{
ResetProcess
();
}
else
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
))
{
InStoreProcess
();
}
else
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
//OutStoreProcess();
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"出错:"
+
ex
.
StackTrace
);
}
}
...
...
@@ -115,6 +122,7 @@ namespace OnlineStore.DeviceLibrary
//关闭门,轴回原点,检测
BatchDoorClose
(
true
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
LogUtil
.
info
(
Name
+
"复位中:关闭门锁"
);
return
true
;
}
...
...
@@ -136,19 +144,33 @@ namespace OnlineStore.DeviceLibrary
case
StoreMoveStep
.
AUTO_R01_CloseDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R02_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:批量上下料轴原点返回"
);
StoreMove
.
TimeOutSeconds
=
120
;
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
break
;
case
StoreMoveStep
.
AUTO_R02_AutoAxisHome
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:匀速向上运动,检测 是否有料盘"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
if
(
IsNeedStartInout
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:匀速向上运动,检测 是否有料盘"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
}
else
{
LogUtil
.
info
(
Name
+
"复位完成"
);
StoreMove
.
EndMove
();
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
WarnMsg
=
""
;
IsNeedStartInout
=
false
;
}
break
;
case
StoreMoveStep
.
AUTO_R03_AutoAxisHome
:
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
//if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW))
if
(
ACServerManager
.
GetLimitPositiveSingle
(
StoreManager
.
Config
.
Batch_Axis
).
Equals
(
1
))
{
LogUtil
.
info
(
Name
+
"复位中: 没有料盘,不需要上料,上料轴回0点"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R04_AutoBack
);
StoreMove
.
TimeOutSeconds
=
120
;
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
}
else
...
...
@@ -165,6 +187,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
EndMove
();
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
WarnMsg
=
""
;
IsNeedStartInout
=
false
;
break
;
default
:
break
;
}
...
...
@@ -343,7 +366,8 @@ namespace OnlineStore.DeviceLibrary
LastSize
=
0
;
LastPosId
=
""
;
SuckingDisc_WorkCount
=
0
;
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
ACServerManager
.
GetLimitPositiveSingle
(
StoreManager
.
Config
.
Batch_Axis
).
Equals
(
0
))
//if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I01_ScanCode
);
LogUtil
.
info
(
Name
+
"入料: 开始扫码 "
);
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
615e6b7
...
...
@@ -72,6 +72,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
EndStepWait
();
return
;
}
try
{
//当等待超过一分钟时,需要打印提示
TimeSpan
span
=
DateTime
.
Now
-
StoreMove
.
LastSetpTime
;
string
NotOkMsg
=
""
;
...
...
@@ -119,12 +120,12 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
wait
.
WaitType
==
8
)
{
IO_VALUE
value
=
(
IO_VALUE
)
ACServerManager
.
GetLimitNegativeSingle
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()
);
IO_VALUE
value
=
(
IO_VALUE
)
ACServerManager
.
GetLimitNegativeSingle
(
wait
.
AxisInfo
);
wait
.
IsEnd
=
wait
.
IoValue
.
Equals
(
value
);
}
else
if
(
wait
.
WaitType
==
9
)
{
IO_VALUE
value
=
(
IO_VALUE
)
ACServerManager
.
GetLimitPositiveSingle
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()
);
IO_VALUE
value
=
(
IO_VALUE
)
ACServerManager
.
GetLimitPositiveSingle
(
wait
.
AxisInfo
);
wait
.
IsEnd
=
wait
.
IoValue
.
Equals
(
value
);
}
else
if
(
wait
.
WaitType
==
10
)
...
...
@@ -174,6 +175,11 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
WarnMsg
);
}
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"CheckWait出错:"
+
ex
.
StackTrace
);
}
}
/// <summary>
...
...
@@ -218,16 +224,16 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
ACAxisMoveIsEnd
(
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
}
if
(!
wait
.
IsEnd
)
{
IO_VALUE
value
=
(
IO_VALUE
)
ACServerManager
.
GetHomeSingle
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()
);
if
(
value
.
Equals
(
IO_VALUE
.
HIGH
))
{
ACServerManager
.
SuddenStop
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
());
LogUtil
.
error
(
Name
+
wait
.
ToStr
()
+
"原点返回过程中到达 负限位,直接停止运动"
);
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
AxisMoveError
,
StoreManager
.
Store
.
GetAlarmCodeByAxis
(
wait
.
AxisInfo
).
ToString
(),
WarnMsg
,
StoreMove
.
MoveType
);
}
}
//
if (!wait.IsEnd)
//
{
// IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitNegativeSingle(wait.AxisInfo
);
//
if (value.Equals(IO_VALUE.HIGH))
//
{
//
ACServerManager.SuddenStop(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
//
LogUtil.error(Name + wait.ToStr() + "原点返回过程中到达 负限位,直接停止运动");
//
StoreManager.Store.Alarm(StoreAlarmType.AxisMoveError, StoreManager.Store.GetAlarmCodeByAxis(wait.AxisInfo).ToString(), WarnMsg, StoreMove.MoveType);
//
}
//
}
if
(!
msg
.
Equals
(
""
))
{
WarnMsg
=
msg
;
...
...
@@ -288,6 +294,10 @@ namespace OnlineStore.DeviceLibrary
if
(
codeList
.
Count
<=
0
)
{
codeList
=
CodeManager
.
CameraScan
();
}
else
if
(
StoreManager
.
Store
.
IsDebug
)
{
codeList
=
new
List
<
string
>()
{
"NoCode"
};
LogUtil
.
info
(
Name
+
"未扫到二维码,默认为NoCode"
);
}
foreach
(
string
str
in
codeList
)
{
...
...
@@ -356,6 +366,31 @@ namespace OnlineStore.DeviceLibrary
IsScanCode
=
false
;
return
;
}
if
(
StoreManager
.
Store
.
IsDebug
)
{
string
posId
=
"1#AC1_1_1_4"
;
LogUtil
.
info
(
Name
+
"调试模式,不需要连接服务器,直接模拟库位号【"
+
posId
+
"】"
);
string
plateH
=
"8"
;
string
plateW
=
"7"
;
if
(
StoreManager
.
Store
.
CanStarInOut
())
{
LastPosId
=
posId
;
IsScanCode
=
false
;
InOutStoreParam
param
=
new
InOutStoreParam
(
message
,
posId
,
plateH
,
plateW
,
0
);
StoreManager
.
Store
.
StartInStoreMove
(
param
,
true
);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil
.
info
(
Name
+
" 入库调试模拟:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 开始入库!"
);
}
else
{
LogUtil
.
info
(
Name
+
" 入库调试模拟:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 正在忙碌中,无法入库!"
);
IsScanCode
=
false
;
}
return
;
}
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
LogUtil
.
info
(
Name
+
"收到二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
//发送扫码内容到服务器进行入库操作
...
...
source/DeviceLibrary/store/AC_Store.cs
查看文件 @
615e6b7
...
...
@@ -370,8 +370,7 @@ namespace OnlineStore.DeviceLibrary
string
deviceName
=
moveAxis
.
DeviceName
;
short
axisNo
=
moveAxis
.
GetAxisValue
();
//如果是进出轴,并且光栅被遮挡,直接返回false
//如果是进出轴,并且光栅被遮挡,直接返回false
if
(
NeedCheckSafetyLight
.
Equals
(
2
))
{
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
)
||
...
...
@@ -401,7 +400,6 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
error
(
LOGGER
,
moveAxis
.
DisplayStr
+
"目标位置["
+
targetPosition
+
"]当前位置["
+
outCount
+
"],误差过大,重新开始运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
//LogUtil.error(LOGGER, StoreName + " storeMoveStep=" + StoreMove.MoveStep + moveAxis.DisplayStr + "目标位置[" + targetPosition + "]重新开始运动");
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
StoreMove
.
CanWhileCount
--;
return
false
;
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
615e6b7
...
...
@@ -243,20 +243,20 @@ namespace OnlineStore.DeviceLibrary
// wait.IsEnd = false;
// return wait;
//}
/// <summary>
///8= 等待轴的反限位为指定值
/// </summary>
public
static
WaitResultInfo
WaitAxistNegativeLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
8
;
wait
.
AxisInfo
=
moveAxis
;
wait
.
IsHomeMove
=
true
;
wait
.
IoValue
=
ioValue
;
wait
.
IsEnd
=
false
;
return
wait
;
}
///
//
<summary>
///
//
8= 等待轴的反限位为指定值
///
//
</summary>
//
public static WaitResultInfo WaitAxistNegativeLimit(ConfigMoveAxis moveAxis ,IO_VALUE ioValue)
//
{
//
WaitResultInfo wait = new WaitResultInfo();
//
wait.CanWhileMoveCount = 0;
//
wait.WaitType = 8;
//
wait.AxisInfo = moveAxis;
//
wait.IsHomeMove = true;
//
wait.IoValue = ioValue;
//
wait.IsEnd = false;
//
return wait;
//
}
/// <summary>
///9= 等待轴的正限位为指定值
/// </summary>
...
...
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
查看文件 @
615e6b7
...
...
@@ -150,11 +150,11 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// 门锁气缸打开端 Door_Open X13 DI-13
/// </summary>
public
static
string
BatchDoor_Open
=
"Door_Open"
;
public
static
string
BatchDoor_Open
=
"
Batch
Door_Open"
;
/// <summary>
/// 门锁气缸关闭端 Door_Close X14 DI-14
/// </summary>
public
static
string
BatchDoor_Close
=
"Door_Close"
;
public
static
string
BatchDoor_Close
=
"
Batch
Door_Close"
;
/// <summary>
/// 料盘检测2(料叉机构) TrayCheck_Fixture X15 DI-15
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论