Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b16c6142
由
几米阳光
编写于
2018-12-09 11:14:34 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
0fdd68d1
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
561 行增加
和
305 行删除
doc/设备IP地址分配.xlsx
source/ACServoDriveTest/FrmACTest.cs
source/ACSingleStore/FrmIOStatus.Designer.cs
source/ACSingleStore/FrmIOStatus.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/KangNaiDe/MasterTcpClient.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/IOUtil.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
doc/设备IP地址分配.xlsx
查看文件 @
b16c614
此文件类型无法预览
source/ACServoDriveTest/FrmACTest.cs
查看文件 @
b16c614
...
@@ -130,7 +130,7 @@ namespace ACServoDriveTest
...
@@ -130,7 +130,7 @@ namespace ACServoDriveTest
formStatus
(
false
);
formStatus
(
false
);
}
}
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
{
{
ACServerManager
.
IsShowMsg
=
true
;
ACServerManager
.
IsShowMsg
=
true
;
LogUtil
.
logBox
=
this
.
richTextBox1
;
LogUtil
.
logBox
=
this
.
richTextBox1
;
//ACServerManager.richeBox = this.richTextBox1;
//ACServerManager.richeBox = this.richTextBox1;
...
...
source/ACSingleStore/FrmIOStatus.Designer.cs
查看文件 @
b16c614
...
@@ -18,6 +18,12 @@
...
@@ -18,6 +18,12 @@
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnSXil
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSXi
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnDClose
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnDOpen
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSuckingDiscDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSuckingDiscUp
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnCloseLed
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnCloseLed
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtSlaveId
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtSlaveId
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
@@ -46,12 +52,10 @@
...
@@ -46,12 +52,10 @@
this
.
tableLayoutPanel2
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tableLayoutPanel2
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
btnSXil
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSXi
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnDClose
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnDOpen
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button5
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSuckingDiscDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSuckingDiscUp
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
@@ -67,6 +71,10 @@
...
@@ -67,6 +71,10 @@
//
//
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
groupBox1
.
Controls
.
Add
(
this
.
button4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
button5
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
button2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
button3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnSXil
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnSXil
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnSXi
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnSXi
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnDClose
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnDClose
);
...
@@ -98,15 +106,81 @@
...
@@ -98,15 +106,81 @@
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
482
,
8
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
482
,
8
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
3
3
2
,
514
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
3
8
2
,
514
);
this
.
groupBox1
.
TabIndex
=
105
;
this
.
groupBox1
.
TabIndex
=
105
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"DO写入"
;
this
.
groupBox1
.
Text
=
"DO写入"
;
//
//
// btnSXil
//
this
.
btnSXil
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSXil
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
438
);
this
.
btnSXil
.
Name
=
"btnSXil"
;
this
.
btnSXil
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnSXil
.
TabIndex
=
262
;
this
.
btnSXil
.
Text
=
"停止吸料"
;
this
.
btnSXil
.
UseVisualStyleBackColor
=
true
;
this
.
btnSXil
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSXil_Click
);
//
// btnSXi
//
this
.
btnSXi
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSXi
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
401
);
this
.
btnSXi
.
Name
=
"btnSXi"
;
this
.
btnSXi
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnSXi
.
TabIndex
=
261
;
this
.
btnSXi
.
Text
=
"开始吸料"
;
this
.
btnSXi
.
UseVisualStyleBackColor
=
true
;
this
.
btnSXi
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSXi_Click
);
//
// btnDClose
//
this
.
btnDClose
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDClose
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
348
);
this
.
btnDClose
.
Name
=
"btnDClose"
;
this
.
btnDClose
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnDClose
.
TabIndex
=
260
;
this
.
btnDClose
.
Text
=
"门锁关闭"
;
this
.
btnDClose
.
UseVisualStyleBackColor
=
true
;
this
.
btnDClose
.
Click
+=
new
System
.
EventHandler
(
this
.
btnDClose_Click
);
//
// btnDOpen
//
this
.
btnDOpen
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDOpen
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
311
);
this
.
btnDOpen
.
Name
=
"btnDOpen"
;
this
.
btnDOpen
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnDOpen
.
TabIndex
=
259
;
this
.
btnDOpen
.
Text
=
"门锁打开"
;
this
.
btnDOpen
.
UseVisualStyleBackColor
=
true
;
this
.
btnDOpen
.
Click
+=
new
System
.
EventHandler
(
this
.
btnDOpen_Click
);
//
// btnSuckingDiscDown
//
this
.
btnSuckingDiscDown
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSuckingDiscDown
.
Location
=
new
System
.
Drawing
.
Point
(
143
,
348
);
this
.
btnSuckingDiscDown
.
Name
=
"btnSuckingDiscDown"
;
this
.
btnSuckingDiscDown
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnSuckingDiscDown
.
TabIndex
=
258
;
this
.
btnSuckingDiscDown
.
Text
=
"吸盘下降"
;
this
.
btnSuckingDiscDown
.
UseVisualStyleBackColor
=
true
;
this
.
btnSuckingDiscDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSuckingDiscDown_Click
);
//
// btnSuckingDiscUp
//
this
.
btnSuckingDiscUp
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSuckingDiscUp
.
Location
=
new
System
.
Drawing
.
Point
(
143
,
311
);
this
.
btnSuckingDiscUp
.
Name
=
"btnSuckingDiscUp"
;
this
.
btnSuckingDiscUp
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnSuckingDiscUp
.
TabIndex
=
257
;
this
.
btnSuckingDiscUp
.
Text
=
"吸盘上升"
;
this
.
btnSuckingDiscUp
.
UseVisualStyleBackColor
=
true
;
this
.
btnSuckingDiscUp
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSuckingDiscUp_Click
);
//
// btnCloseLed
// btnCloseLed
//
//
this
.
btnCloseLed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseLed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseLed
.
Location
=
new
System
.
Drawing
.
Point
(
1
73
,
281
);
this
.
btnCloseLed
.
Location
=
new
System
.
Drawing
.
Point
(
1
43
,
260
);
this
.
btnCloseLed
.
Name
=
"btnCloseLed"
;
this
.
btnCloseLed
.
Name
=
"btnCloseLed"
;
this
.
btnCloseLed
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnCloseLed
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnCloseLed
.
TabIndex
=
256
;
this
.
btnCloseLed
.
TabIndex
=
256
;
...
@@ -139,7 +213,7 @@
...
@@ -139,7 +213,7 @@
// btnOpenLed
// btnOpenLed
//
//
this
.
btnOpenLed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenLed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenLed
.
Location
=
new
System
.
Drawing
.
Point
(
56
,
281
);
this
.
btnOpenLed
.
Location
=
new
System
.
Drawing
.
Point
(
143
,
223
);
this
.
btnOpenLed
.
Name
=
"btnOpenLed"
;
this
.
btnOpenLed
.
Name
=
"btnOpenLed"
;
this
.
btnOpenLed
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnOpenLed
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnOpenLed
.
TabIndex
=
255
;
this
.
btnOpenLed
.
TabIndex
=
255
;
...
@@ -182,7 +256,7 @@
...
@@ -182,7 +256,7 @@
// btnCloseAxisBreak
// btnCloseAxisBreak
//
//
this
.
btnCloseAxisBreak
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseAxisBreak
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseAxisBreak
.
Location
=
new
System
.
Drawing
.
Point
(
173
,
247
);
this
.
btnCloseAxisBreak
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
260
);
this
.
btnCloseAxisBreak
.
Name
=
"btnCloseAxisBreak"
;
this
.
btnCloseAxisBreak
.
Name
=
"btnCloseAxisBreak"
;
this
.
btnCloseAxisBreak
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnCloseAxisBreak
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnCloseAxisBreak
.
TabIndex
=
253
;
this
.
btnCloseAxisBreak
.
TabIndex
=
253
;
...
@@ -216,7 +290,7 @@
...
@@ -216,7 +290,7 @@
// btnOpenAxisBreak
// btnOpenAxisBreak
//
//
this
.
btnOpenAxisBreak
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenAxisBreak
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenAxisBreak
.
Location
=
new
System
.
Drawing
.
Point
(
56
,
247
);
this
.
btnOpenAxisBreak
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
223
);
this
.
btnOpenAxisBreak
.
Name
=
"btnOpenAxisBreak"
;
this
.
btnOpenAxisBreak
.
Name
=
"btnOpenAxisBreak"
;
this
.
btnOpenAxisBreak
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnOpenAxisBreak
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnOpenAxisBreak
.
TabIndex
=
252
;
this
.
btnOpenAxisBreak
.
TabIndex
=
252
;
...
@@ -336,22 +410,22 @@
...
@@ -336,22 +410,22 @@
// btnCloseDoor
// btnCloseDoor
//
//
this
.
btnCloseDoor
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseDoor
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseDoor
.
Location
=
new
System
.
Drawing
.
Point
(
173
,
213
);
this
.
btnCloseDoor
.
Location
=
new
System
.
Drawing
.
Point
(
25
,
348
);
this
.
btnCloseDoor
.
Name
=
"btnCloseDoor"
;
this
.
btnCloseDoor
.
Name
=
"btnCloseDoor"
;
this
.
btnCloseDoor
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnCloseDoor
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnCloseDoor
.
TabIndex
=
249
;
this
.
btnCloseDoor
.
TabIndex
=
249
;
this
.
btnCloseDoor
.
Text
=
"关闭
进料口
仓门"
;
this
.
btnCloseDoor
.
Text
=
"关闭仓门"
;
this
.
btnCloseDoor
.
UseVisualStyleBackColor
=
true
;
this
.
btnCloseDoor
.
UseVisualStyleBackColor
=
true
;
this
.
btnCloseDoor
.
Click
+=
new
System
.
EventHandler
(
this
.
btnCloseDoor_Click
);
this
.
btnCloseDoor
.
Click
+=
new
System
.
EventHandler
(
this
.
btnCloseDoor_Click
);
//
//
// btnOpenDoor
// btnOpenDoor
//
//
this
.
btnOpenDoor
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
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
(
56
,
213
);
this
.
btnOpenDoor
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
311
);
this
.
btnOpenDoor
.
Name
=
"btnOpenDoor"
;
this
.
btnOpenDoor
.
Name
=
"btnOpenDoor"
;
this
.
btnOpenDoor
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnOpenDoor
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnOpenDoor
.
TabIndex
=
248
;
this
.
btnOpenDoor
.
TabIndex
=
248
;
this
.
btnOpenDoor
.
Text
=
"打开
进料口
仓门"
;
this
.
btnOpenDoor
.
Text
=
"打开仓门"
;
this
.
btnOpenDoor
.
UseVisualStyleBackColor
=
true
;
this
.
btnOpenDoor
.
UseVisualStyleBackColor
=
true
;
this
.
btnOpenDoor
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOpenDoor_Click
);
this
.
btnOpenDoor
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOpenDoor_Click
);
//
//
...
@@ -370,8 +444,10 @@
...
@@ -370,8 +444,10 @@
//
//
this
.
chbAutoRead
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbAutoRead
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbAutoRead
.
AutoSize
=
true
;
this
.
chbAutoRead
.
AutoSize
=
true
;
this
.
chbAutoRead
.
Checked
=
true
;
this
.
chbAutoRead
.
CheckState
=
System
.
Windows
.
Forms
.
CheckState
.
Checked
;
this
.
chbAutoRead
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAutoRead
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAutoRead
.
Location
=
new
System
.
Drawing
.
Point
(
499
,
536
);
this
.
chbAutoRead
.
Location
=
new
System
.
Drawing
.
Point
(
546
,
536
);
this
.
chbAutoRead
.
Name
=
"chbAutoRead"
;
this
.
chbAutoRead
.
Name
=
"chbAutoRead"
;
this
.
chbAutoRead
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
21
);
this
.
chbAutoRead
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
21
);
this
.
chbAutoRead
.
TabIndex
=
244
;
this
.
chbAutoRead
.
TabIndex
=
244
;
...
@@ -432,77 +508,55 @@
...
@@ -432,77 +508,55 @@
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
218
,
542
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
218
,
542
);
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
//
//
// btnSXil
// button2
//
//
this
.
btnSXil
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
button2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSXil
.
Location
=
new
System
.
Drawing
.
Point
(
173
,
393
);
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
260
);
this
.
btnSXil
.
Name
=
"btnSXil"
;
this
.
button2
.
Name
=
"button2"
;
this
.
btnSXil
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnSXil
.
TabIndex
=
262
;
this
.
button2
.
TabIndex
=
264
;
this
.
btnSXil
.
Text
=
"停止吸料"
;
this
.
button2
.
Text
=
"关闭运转ON"
;
this
.
btnSXil
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
btnSXil
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSXil_Click
);
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
//
//
// btnSXi
// button3
//
//
this
.
btnSXi
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
button3
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSXi
.
Location
=
new
System
.
Drawing
.
Point
(
56
,
393
);
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
223
);
this
.
btnSXi
.
Name
=
"btnSXi"
;
this
.
button3
.
Name
=
"button3"
;
this
.
btnSXi
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnSXi
.
TabIndex
=
261
;
this
.
button3
.
TabIndex
=
263
;
this
.
btnSXi
.
Text
=
"开始吸料"
;
this
.
button3
.
Text
=
"打开运转ON"
;
this
.
btnSXi
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
btnSXi
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSXi_Click
);
this
.
button3
.
Click
+=
new
System
.
EventHandler
(
this
.
button3_Click
);
//
//
// btnDClose
// button4
//
//
this
.
btnDClose
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
button4
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDClose
.
Location
=
new
System
.
Drawing
.
Point
(
173
,
359
);
this
.
button4
.
Location
=
new
System
.
Drawing
.
Point
(
143
,
438
);
this
.
btnDClose
.
Name
=
"btnDClose"
;
this
.
button4
.
Name
=
"button4"
;
this
.
btnDClose
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
button4
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnDClose
.
TabIndex
=
260
;
this
.
button4
.
TabIndex
=
266
;
this
.
btnDClose
.
Text
=
"门锁关闭"
;
this
.
button4
.
Text
=
"停止吹气"
;
this
.
btnDClose
.
UseVisualStyleBackColor
=
true
;
this
.
button4
.
UseVisualStyleBackColor
=
true
;
this
.
btnDClose
.
Click
+=
new
System
.
EventHandler
(
this
.
btnDClose_Click
);
this
.
button4
.
Click
+=
new
System
.
EventHandler
(
this
.
button4_Click
);
//
//
// btnDOpen
// button5
//
//
this
.
btnDOpen
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
button5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDOpen
.
Location
=
new
System
.
Drawing
.
Point
(
56
,
359
);
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
143
,
401
);
this
.
btnDOpen
.
Name
=
"btnDOpen"
;
this
.
button5
.
Name
=
"button5"
;
this
.
btnDOpen
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
button5
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnDOpen
.
TabIndex
=
259
;
this
.
button5
.
TabIndex
=
265
;
this
.
btnDOpen
.
Text
=
"门锁打开"
;
this
.
button5
.
Text
=
"开始吹气"
;
this
.
btnDOpen
.
UseVisualStyleBackColor
=
true
;
this
.
button5
.
UseVisualStyleBackColor
=
true
;
this
.
btnDOpen
.
Click
+=
new
System
.
EventHandler
(
this
.
btnDOpen_Click
);
this
.
button5
.
Click
+=
new
System
.
EventHandler
(
this
.
button5_Click
);
//
// btnSuckingDiscDown
//
this
.
btnSuckingDiscDown
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSuckingDiscDown
.
Location
=
new
System
.
Drawing
.
Point
(
173
,
325
);
this
.
btnSuckingDiscDown
.
Name
=
"btnSuckingDiscDown"
;
this
.
btnSuckingDiscDown
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnSuckingDiscDown
.
TabIndex
=
258
;
this
.
btnSuckingDiscDown
.
Text
=
"吸盘下降"
;
this
.
btnSuckingDiscDown
.
UseVisualStyleBackColor
=
true
;
this
.
btnSuckingDiscDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSuckingDiscDown_Click
);
//
// btnSuckingDiscUp
//
this
.
btnSuckingDiscUp
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSuckingDiscUp
.
Location
=
new
System
.
Drawing
.
Point
(
56
,
325
);
this
.
btnSuckingDiscUp
.
Name
=
"btnSuckingDiscUp"
;
this
.
btnSuckingDiscUp
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
34
);
this
.
btnSuckingDiscUp
.
TabIndex
=
257
;
this
.
btnSuckingDiscUp
.
Text
=
"吸盘上升"
;
this
.
btnSuckingDiscUp
.
UseVisualStyleBackColor
=
true
;
this
.
btnSuckingDiscUp
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSuckingDiscUp_Click
);
//
//
// FrmIOStatus
// FrmIOStatus
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
8
29
,
580
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
8
76
,
580
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
...
@@ -562,6 +616,10 @@
...
@@ -562,6 +616,10 @@
private
System
.
Windows
.
Forms
.
Button
btnDOpen
;
private
System
.
Windows
.
Forms
.
Button
btnDOpen
;
private
System
.
Windows
.
Forms
.
Button
btnSuckingDiscDown
;
private
System
.
Windows
.
Forms
.
Button
btnSuckingDiscDown
;
private
System
.
Windows
.
Forms
.
Button
btnSuckingDiscUp
;
private
System
.
Windows
.
Forms
.
Button
btnSuckingDiscUp
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Button
button3
;
private
System
.
Windows
.
Forms
.
Button
button4
;
private
System
.
Windows
.
Forms
.
Button
button5
;
}
}
}
}
source/ACSingleStore/FrmIOStatus.cs
查看文件 @
b16c614
...
@@ -318,5 +318,25 @@ namespace OnlineStore.AutoInOutStore
...
@@ -318,5 +318,25 @@ namespace OnlineStore.AutoInOutStore
{
{
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
}
}
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
HIGH
);
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
LOW
);
}
private
void
button5_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
HIGH
);
}
private
void
button4_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
}
}
}
}
}
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
b16c614
...
@@ -223,6 +223,10 @@
...
@@ -223,6 +223,10 @@
this
.
btnGetOutTray
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnGetOutTray
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblDoorStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblDoorStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnBatchInStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnBatchInStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
批量上下轴
ONToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
批量上下轴
OFFToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator13
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator14
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
@@ -1894,55 +1898,55 @@
...
@@ -1894,55 +1898,55 @@
// 启动ToolStripMenuItem
// 启动ToolStripMenuItem
//
//
this
.
启动
ToolStripMenuItem
.
Name
=
"启动ToolStripMenuItem"
;
this
.
启动
ToolStripMenuItem
.
Name
=
"启动ToolStripMenuItem"
;
this
.
启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
启动
ToolStripMenuItem
.
Text
=
"启动"
;
this
.
启动
ToolStripMenuItem
.
Text
=
"启动"
;
this
.
启动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启动
ToolStripMenuItem_Click
);
this
.
启动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启动
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator1
// toolStripSeparator1
//
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
//
// 停止ToolStripMenuItem
// 停止ToolStripMenuItem
//
//
this
.
停止
ToolStripMenuItem
.
Name
=
"停止ToolStripMenuItem"
;
this
.
停止
ToolStripMenuItem
.
Name
=
"停止ToolStripMenuItem"
;
this
.
停止
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
停止
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
停止
ToolStripMenuItem
.
Text
=
"停止"
;
this
.
停止
ToolStripMenuItem
.
Text
=
"停止"
;
this
.
停止
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
停止
ToolStripMenuItem_Click
);
this
.
停止
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
停止
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator2
// toolStripSeparator2
//
//
this
.
toolStripSeparator2
.
Name
=
"toolStripSeparator2"
;
this
.
toolStripSeparator2
.
Name
=
"toolStripSeparator2"
;
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
//
// 复位ToolStripMenuItem
// 复位ToolStripMenuItem
//
//
this
.
复位
ToolStripMenuItem
.
Name
=
"复位ToolStripMenuItem"
;
this
.
复位
ToolStripMenuItem
.
Name
=
"复位ToolStripMenuItem"
;
this
.
复位
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
复位
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
复位
ToolStripMenuItem
.
Text
=
"复位"
;
this
.
复位
ToolStripMenuItem
.
Text
=
"复位"
;
this
.
复位
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复位
ToolStripMenuItem_Click
);
this
.
复位
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复位
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator3
// toolStripSeparator3
//
//
this
.
toolStripSeparator3
.
Name
=
"toolStripSeparator3"
;
this
.
toolStripSeparator3
.
Name
=
"toolStripSeparator3"
;
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
//
// 回待机点ToolStripMenuItem
// 回待机点ToolStripMenuItem
//
//
this
.
回待机点
ToolStripMenuItem
.
Name
=
"回待机点ToolStripMenuItem"
;
this
.
回待机点
ToolStripMenuItem
.
Name
=
"回待机点ToolStripMenuItem"
;
this
.
回待机点
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
回待机点
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
回待机点
ToolStripMenuItem
.
Text
=
"回待机点"
;
this
.
回待机点
ToolStripMenuItem
.
Text
=
"回待机点"
;
this
.
回待机点
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
回待机点
ToolStripMenuItem_Click
);
this
.
回待机点
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
回待机点
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator4
// toolStripSeparator4
//
//
this
.
toolStripSeparator4
.
Name
=
"toolStripSeparator4"
;
this
.
toolStripSeparator4
.
Name
=
"toolStripSeparator4"
;
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
//
// 退出ToolStripMenuItem
// 退出ToolStripMenuItem
//
//
this
.
退出
ToolStripMenuItem
.
Name
=
"退出ToolStripMenuItem"
;
this
.
退出
ToolStripMenuItem
.
Name
=
"退出ToolStripMenuItem"
;
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
退出
ToolStripMenuItem
.
Text
=
"退出系统"
;
this
.
退出
ToolStripMenuItem
.
Text
=
"退出系统"
;
this
.
退出
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
退出
ToolStripMenuItem_Click
);
this
.
退出
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
退出
ToolStripMenuItem_Click
);
//
//
...
@@ -1956,8 +1960,12 @@
...
@@ -1956,8 +1960,12 @@
this
.
料仓运转
OFFToolStripMenuItem
,
this
.
料仓运转
OFFToolStripMenuItem
,
this
.
toolStripSeparator7
,
this
.
toolStripSeparator7
,
this
.
打开舱门
ToolStripMenuItem
,
this
.
打开舱门
ToolStripMenuItem
,
this
.
toolStripSeparator14
,
this
.
关闭仓门
ToolStripMenuItem
,
this
.
toolStripSeparator8
,
this
.
toolStripSeparator8
,
this
.
关闭仓门
ToolStripMenuItem
});
this
.
批量上下轴
ONToolStripMenuItem
,
this
.
toolStripSeparator13
,
this
.
批量上下轴
OFFToolStripMenuItem
});
this
.
iO
状态查看
ToolStripMenuItem
.
Name
=
"iO状态查看ToolStripMenuItem"
;
this
.
iO
状态查看
ToolStripMenuItem
.
Name
=
"iO状态查看ToolStripMenuItem"
;
this
.
iO
状态查看
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
25
);
this
.
iO
状态查看
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
25
);
this
.
iO
状态查看
ToolStripMenuItem
.
Text
=
"IO状态查看"
;
this
.
iO
状态查看
ToolStripMenuItem
.
Text
=
"IO状态查看"
;
...
@@ -2528,6 +2536,30 @@
...
@@ -2528,6 +2536,30 @@
this
.
btnBatchInStore
.
UseVisualStyleBackColor
=
true
;
this
.
btnBatchInStore
.
UseVisualStyleBackColor
=
true
;
this
.
btnBatchInStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBatchInStore_Click
);
this
.
btnBatchInStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBatchInStore_Click
);
//
//
// 批量上下轴ONToolStripMenuItem
//
this
.
批量上下轴
ONToolStripMenuItem
.
Name
=
"批量上下轴ONToolStripMenuItem"
;
this
.
批量上下轴
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
26
);
this
.
批量上下轴
ONToolStripMenuItem
.
Text
=
"批量上下轴ON"
;
this
.
批量上下轴
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
批量上下轴
ONToolStripMenuItem_Click
);
//
// 批量上下轴OFFToolStripMenuItem
//
this
.
批量上下轴
OFFToolStripMenuItem
.
Name
=
"批量上下轴OFFToolStripMenuItem"
;
this
.
批量上下轴
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
26
);
this
.
批量上下轴
OFFToolStripMenuItem
.
Text
=
"批量上下轴OFF"
;
this
.
批量上下轴
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
批量上下轴
OFFToolStripMenuItem_Click
);
//
// toolStripSeparator13
//
this
.
toolStripSeparator13
.
Name
=
"toolStripSeparator13"
;
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
6
);
//
// toolStripSeparator14
//
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
6
);
//
// FrmStoreBox
// FrmStoreBox
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
@@ -2773,6 +2805,10 @@
...
@@ -2773,6 +2805,10 @@
private
System
.
Windows
.
Forms
.
Button
btnReadLimit1
;
private
System
.
Windows
.
Forms
.
Button
btnReadLimit1
;
private
System
.
Windows
.
Forms
.
TextBox
txtLimit1
;
private
System
.
Windows
.
Forms
.
TextBox
txtLimit1
;
public
System
.
Windows
.
Forms
.
Button
btnUpdateStatus
;
public
System
.
Windows
.
Forms
.
Button
btnUpdateStatus
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
批量上下轴
ONToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
批量上下轴
OFFToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator14
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator13
;
}
}
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
b16c614
...
@@ -1524,5 +1524,32 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1524,5 +1524,32 @@ namespace OnlineStore.AutoInOutStore
btnReadLimit1_Click
(
null
,
null
);
btnReadLimit1_Click
(
null
,
null
);
btnReadLimit2_Click
(
null
,
null
);
btnReadLimit2_Click
(
null
,
null
);
}
}
private
void
批量上下轴
ONToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
HIGH
);
Thread
.
Sleep
(
1000
);
string
portName
=
store
.
Config
.
Batch_Axis
.
DeviceName
;
int
slvAddr
=
store
.
Config
.
Batch_Axis
.
GetAxisValue
();
ACServerManager
.
OpenPort
(
portName
);
Thread
.
Sleep
(
50
);
ACServerManager
.
InitSlvAddr
(
portName
,
slvAddr
,
store
.
Config
.
Batch_Axis
.
TargetSpeed
,
store
.
Config
.
Batch_Axis
.
AddSpeed
,
store
.
Config
.
Batch_Axis
.
DelSpeed
);
Thread
.
Sleep
(
100
);
ACServerManager
.
AlarmClear
(
portName
,
slvAddr
);
Thread
.
Sleep
(
50
);
ACServerManager
.
ServoOn
(
portName
,
slvAddr
);
}
private
void
批量上下轴
OFFToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
ACServerManager
.
ServoOff
(
store
.
Config
.
Batch_Axis
.
DeviceName
,
store
.
Config
.
Batch_Axis
.
GetAxisValue
());
//关闭串口,等下次重新打开
ACServerManager
.
ColsePort
(
store
.
Config
.
Batch_Axis
.
DeviceName
);
Thread
.
Sleep
(
100
);
KND
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
LOW
);
}
}
}
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
b16c614
...
@@ -71,9 +71,6 @@
...
@@ -71,9 +71,6 @@
<Compile Include="store\LineAlarm.cs">
<Compile Include="store\LineAlarm.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</Compile>
<Compile Include="store\IOUtil.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ShuoKe\ShuoKeControls.cs" />
<Compile Include="ShuoKe\ShuoKeControls.cs" />
<Compile Include="store\model\AxisAlarmInfo.cs" />
<Compile Include="store\model\AxisAlarmInfo.cs" />
...
...
source/DeviceLibrary/KangNaiDe/MasterTcpClient.cs
查看文件 @
b16c614
...
@@ -9,6 +9,7 @@ using System.Diagnostics;
...
@@ -9,6 +9,7 @@ using System.Diagnostics;
using
log4net
;
using
log4net
;
using
System.Reflection
;
using
System.Reflection
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
b16c614
...
@@ -42,7 +42,7 @@ DI,左侧门关闭,DoorColse_Single,203,192.168.200.11,0,左侧门关闭,X20,DI-24,0,
...
@@ -42,7 +42,7 @@ DI,左侧门关闭,DoorColse_Single,203,192.168.200.11,0,左侧门关闭,X20,DI-24,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM4,0,,,,,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM4,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM5,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM5,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM6,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM6,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM
7
,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM
3
,0,,,,,
,,,,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,403000,,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,403000,,,,,,,
...
@@ -114,7 +114,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
...
@@ -114,7 +114,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM
3
,,,,,,,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM
2
,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
b16c614
...
@@ -1252,106 +1252,105 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1252,106 +1252,105 @@ namespace OnlineStore.DeviceLibrary
#
region
datalogic
扫码枪代码
#
region
datalogic
扫码枪代码
private
bool
IsNotScanCode
=
false
;
//private bool IsNotScanCode = false;
private
bool
IsScanCode
=
false
;
//private bool IsScanCode = false;
/// <summary>
///// <summary>
/// 扫码枪数据接收
///// 发送二维码到服务器获取PosID
/// </summary>
///// </summary>
/// <param name="message"></param>
//public void GetInStorePosId(string message)
public
void
onCodeReceived
(
string
message
)
//{
{
// try
try
// {
{
// message = ScanCodeManager.ReplaceCode(message);
message
=
ScanCodeManager
.
ReplaceCode
(
message
);
// if (message.Equals("") || string.IsNullOrEmpty(message))
if
(
message
.
Equals
(
""
)
||
string
.
IsNullOrEmpty
(
message
))
// {
{
// IsNotScanCode = true;
IsNotScanCode
=
true
;
// IsScanCode = false;
IsScanCode
=
false
;
// CodeMsg = "没有收到二维码信息,请重新放入料盘";
CodeMsg
=
"没有收到二维码信息,请重新放入料盘"
;
// LogUtil.info(LOGGER, StoreName + "没有收到二维码信息,请重新放入料盘");
LogUtil
.
info
(
LOGGER
,
StoreName
+
"没有收到二维码信息,请重新放入料盘"
);
// return;
return
;
// }
}
// IsNotScanCode = false;
IsNotScanCode
=
false
;
// if (storeRunStatus.Equals(StoreRunStatus.Wait))
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
// {
{
// LogUtil.info(LOGGER, StoreName + "收到二维码【 " + message + "】,设备未启动,不需要发送服务器");
LogUtil
.
info
(
LOGGER
,
StoreName
+
"收到二维码【 "
+
message
+
"】,设备未启动,不需要发送服务器"
);
// IsScanCode = false;
IsScanCode
=
false
;
// return;
return
;
// }
}
// // CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
// LogUtil.info(LOGGER, StoreName + "收到二维码【 " + message + "】,发送给服务器获取入库PosID");
LogUtil
.
info
(
LOGGER
,
StoreName
+
"收到二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
// //发送扫码内容到服务器进行入库操作
//发送扫码内容到服务器进行入库操作
// Operation operation = getLineBoxStatus();
Operation
operation
=
getLineBoxStatus
();
// operation.op = 1;
operation
.
op
=
1
;
// operation.data = new Dictionary<string, string>() { { "code", message }, { "boxId", StoreID.ToString() } };
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
StoreID
.
ToString
()
}
};
// string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
// Operation resultOperation = HttpHelper.Post(StoreManager.GetPostApi(server), operation, false);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
// if (resultOperation == null)
if
(
resultOperation
==
null
)
// {
{
// // CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
// LogUtil.info(LOGGER, StoreName + "二维码【" + message + "】没有收到服务器反馈!");
LogUtil
.
info
(
LOGGER
,
StoreName
+
"二维码【"
+
message
+
"】没有收到服务器反馈!"
);
// IsScanCode = false;
IsScanCode
=
false
;
// return;
return
;
// }
}
// else if (!string.IsNullOrEmpty(resultOperation.msg))
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
// {
{
// //如果有提示消息,直接显示提示
//如果有提示消息,直接显示提示
// LogUtil.info(LOGGER, StoreName + "服务器反馈 二维码【" + message + "】 :" + resultOperation.msg);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"服务器反馈 二维码【"
+
message
+
"】 :"
+
resultOperation
.
msg
);
// IsScanCode = false;
IsScanCode
=
false
;
// return;
return
;
// }
}
// IsScanCode = false;
IsScanCode
=
false
;
// Dictionary<string, string> data = resultOperation.data;
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
// if (data != null && data.ContainsKey(ParamDefine.posId) && data.ContainsKey(ParamDefine.plateH) && data.ContainsKey(ParamDefine.plateW))
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
posId
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateH
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateW
))
// {
{
// //服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
// //postId格式BoxId#位置
//postId格式BoxId#位置
// string posId = data[ParamDefine.posId];
string
posId
=
data
[
ParamDefine
.
posId
];
// string plateW = data[ParamDefine.plateW];
string
plateW
=
data
[
ParamDefine
.
plateW
];
// string plateH = data[ParamDefine.plateH];
string
plateH
=
data
[
ParamDefine
.
plateH
];
// string[] posArray = posId.Split('#');
string
[]
posArray
=
posId
.
Split
(
'#'
);
// if (!(posArray.Length == 2))
if
(!(
posArray
.
Length
==
2
))
// {
{
// WarnMsg = StoreName + "入库库位格式错误:二维码【" + message + "】库位【" + posId + "】";
WarnMsg
=
StoreName
+
"入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
;
// LogUtil.error(LOGGER, "服务器反馈 入库库位格式错误:二维码【" + message + "】库位【" + posId + "】");
LogUtil
.
error
(
LOGGER
,
"服务器反馈 入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
// LogUtil.info(LOGGER, "服务器反馈 入库库位格式错误:二维码【" + message + "】库位【" + posId + "】");
LogUtil
.
info
(
LOGGER
,
"服务器反馈 入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
// return;
return
;
// }
}
// int storeId = int.Parse(posArray[0]);
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
// //根据发送的posId获取位置列表
//根据发送的posId获取位置列表
// AutoStorePosition position = CSVPositionReader<AutoStorePosition>.GetPositon(posId);
AutoStorePosition
position
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
posId
);
// if (position == null)
if
(
position
==
null
)
// { //出入库没有找到服务器发送的库位,需要打印日志方便查询原因
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
// WarnMsg = "入库未找到库位:二维码【" + message + "】库位【" + posId + "】 ";
WarnMsg
=
"入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】 "
;
// LogUtil.error(LOGGER, "收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
LogUtil
.
error
(
LOGGER
,
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
// LogUtil.info(LOGGER, "收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
LogUtil
.
info
(
LOGGER
,
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
// return;
return
;
// }
}
// //TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
// if (CanStarInOut())
if
(
CanStarInOut
())
// {
{
// IsScanCode = false;
IsScanCode
=
false
;
// InOutStoreParam param = new InOutStoreParam(message, posId, plateH, plateW, 0);
InOutStoreParam
param
=
new
InOutStoreParam
(
message
,
posId
,
plateH
,
plateW
,
0
);
// StartInStoreMove(param, true);
StartInStoreMove
(
param
,
true
);
// //如果当前正在出入库中,需要记录下来,等待空闲时执行
//如果当前正在出入库中,需要记录下来,等待空闲时执行
// LogUtil.info(LOGGER, StoreName + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 收到服务器入库命令:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 开始入库!"
);
// }
}
// else
else
// {
{
// LogUtil.info(LOGGER, StoreName + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 正在忙碌中,无法入库!");
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 收到服务器入库命令:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 正在忙碌中,无法入库!"
);
// IsScanCode = false;
IsScanCode
=
false
;
// }
}
// }
}
// }
}
// catch (Exception ex)
catch
(
Exception
ex
)
// {
{
// IsScanCode = false;
IsScanCode
=
false
;
// LOGGER.Error(StoreName + ex.StackTrace);
LOGGER
.
Error
(
StoreName
+
ex
.
StackTrace
);
// }
}
//}
}
#
endregion
#
endregion
...
@@ -1480,16 +1479,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1480,16 +1479,13 @@ namespace OnlineStore.DeviceLibrary
#
region
与服务器通信定时器,每
1
秒向服务器通知一次状态
,
同时执行出库操作
#
region
与服务器通信定时器,每
1
秒向服务器通知一次状态
,
同时执行出库操作
private
string
CodeMsg
=
""
;
private
bool
isInProcess
=
false
;
private
bool
isInProcess
=
false
;
private
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
private
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
{
{
if
(
isInProcess
)
if
(
isInProcess
)
{
{
return
;
return
;
}
}
//HumitureServer.RandomData(Config.GetTempAddrList());
isInProcess
=
true
;
isInProcess
=
true
;
if
(
StoreManager
.
IsConnectServer
)
if
(
StoreManager
.
IsConnectServer
)
{
{
...
@@ -1511,7 +1507,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1511,7 +1507,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 获取整个料仓的状态
/// 获取整个料仓的状态
/// </summary>
/// </summary>
p
rivate
Operation
getLineBoxStatus
()
p
ublic
Operation
getLineBoxStatus
()
{
{
//构建发送给服务器的对象
//构建发送给服务器的对象
Operation
lineOperation
=
new
Operation
();
Operation
lineOperation
=
new
Operation
();
...
@@ -1543,9 +1539,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1543,9 +1539,9 @@ namespace OnlineStore.DeviceLibrary
if
(
WarnMsg
.
Equals
(
""
))
if
(
WarnMsg
.
Equals
(
""
))
{
{
boxStatus
.
msg
=
CodeMsg
;
boxStatus
.
msg
=
AutomaticBaiting
.
CodeMsg
;
lineOperation
.
msg
=
CodeMsg
;
lineOperation
.
msg
=
AutomaticBaiting
.
CodeMsg
;
CodeMsg
=
""
;
AutomaticBaiting
.
CodeMsg
=
""
;
}
}
//WarnMsg = "";
//WarnMsg = "";
//状态
//状态
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
b16c614
...
@@ -13,21 +13,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -13,21 +13,22 @@ namespace OnlineStore.DeviceLibrary
/// 0=未知。1=门打开,2=门关闭
/// 0=未知。1=门打开,2=门关闭
/// </summary>
/// </summary>
public
static
int
DoorStatus
=
2
;
public
static
int
DoorStatus
=
2
;
p
ublic
static
int
LastHeight
=
0
;
p
rivate
static
int
LastHeight
=
0
;
p
ublic
static
int
LastSize
=
0
;
p
rivate
static
int
LastSize
=
0
;
p
ublic
static
string
LastCode
=
""
;
p
rivate
static
string
LastCode
=
""
;
p
ublic
static
string
LastPosId
=
""
;
p
rivate
static
string
LastPosId
=
""
;
public
static
int
AxisChangeValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
AxisChangeValue
);
public
static
int
AxisChangeValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
AxisChangeValue
);
public
static
string
WarnMsg
=
""
;
public
static
string
WarnMsg
=
""
;
public
static
string
Name
=
"自动上下料"
;
public
static
string
CodeMsg
=
""
;
public
static
StoreMoveInfo
StoreMove
=
null
;
public
static
string
Name
=
"批量上下料 "
;
public
static
StoreMoveInfo
StoreMove
=
null
;
public
static
StoreRunStatus
AutoBaitingStatus
=
StoreRunStatus
.
Wait
;
public
static
StoreRunStatus
AutoBaitingStatus
=
StoreRunStatus
.
Wait
;
//记录没开门状态下,已经出库的数量
//记录没开门状态下,已经出库的数量
public
static
int
BatchOutStoreCount
=
0
;
public
static
int
BatchOutStoreCount
=
0
;
public
static
int
BatchOutStoreHeight
=
0
;
public
static
int
BatchOutStoreHeight
=
0
;
/// <summary>
/// <summary>
/// 初始化数据
/// 初始化数据
/// </summary>
/// </summary>
...
@@ -61,16 +62,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -61,16 +62,16 @@ namespace OnlineStore.DeviceLibrary
/// 判断是否可以启动
/// 判断是否可以启动
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
static
string
CanStart
()
public
static
string
CanStart
()
{
{
string
msg
=
""
;
string
msg
=
""
;
//需要判断门关闭
//需要判断门关闭
if
(!
DoorIsClose
())
if
(!
DoorIsClose
())
{
{
msg
=
"上料机构门未关闭"
;
msg
=
"上料机构门未关闭"
;
return
msg
;
return
msg
;
}
}
return
msg
;
return
msg
;
}
}
...
@@ -80,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -80,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
BatchOutStoreHeight
=
0
;
BatchOutStoreHeight
=
0
;
LastCode
=
""
;
LastCode
=
""
;
LastPosId
=
""
;
LastPosId
=
""
;
LastHeight
=
0
;
LastHeight
=
0
;
LastSize
=
0
;
LastSize
=
0
;
}
}
...
@@ -90,7 +91,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -90,7 +91,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
ClearInOutInfo
();
ClearInOutInfo
();
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
false
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
false
);
BatchDoorClose
(
false
);
BatchDoorClose
(
false
);
}
}
public
static
bool
Reset
()
public
static
bool
Reset
()
...
@@ -98,7 +99,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -98,7 +99,7 @@ namespace OnlineStore.DeviceLibrary
string
msg
=
CanStart
();
string
msg
=
CanStart
();
if
(!
String
.
IsNullOrEmpty
(
msg
))
if
(!
String
.
IsNullOrEmpty
(
msg
))
{
{
LogUtil
.
info
(
Name
+
"复位失败:"
+
msg
);
LogUtil
.
info
(
Name
+
"复位失败:"
+
msg
);
return
false
;
return
false
;
}
}
ClearInOutInfo
();
ClearInOutInfo
();
...
@@ -129,11 +130,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -129,11 +130,11 @@ namespace OnlineStore.DeviceLibrary
{
{
case
StoreMoveStep
.
AUTO_R01_CloseDoor
:
case
StoreMoveStep
.
AUTO_R01_CloseDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R02_AutoAxisHome
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R02_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:
自动
轴原点返回"
);
LogUtil
.
info
(
Name
+
"复位中:
批量上下料
轴原点返回"
);
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
break
;
break
;
case
StoreMoveStep
.
AUTO_R02_AutoAxisHome
:
case
StoreMoveStep
.
AUTO_R02_AutoAxisHome
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:匀速向上运动,检测 是否有料盘"
);
LogUtil
.
info
(
Name
+
"复位中:匀速向上运动,检测 是否有料盘"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
break
;
break
;
...
@@ -142,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -142,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
{
LogUtil
.
info
(
Name
+
"复位中: 没有料盘,不需要上料,上料轴回0点"
);
LogUtil
.
info
(
Name
+
"复位中: 没有料盘,不需要上料,上料轴回0点"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R04_AutoBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R04_AutoBack
);
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
}
}
else
else
...
@@ -152,8 +153,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -152,8 +153,8 @@ namespace OnlineStore.DeviceLibrary
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
//TODO
//TODO
StartInOut
();
StartInOut
();
}
}
break
;
break
;
case
StoreMoveStep
.
AUTO_R04_AutoBack
:
case
StoreMoveStep
.
AUTO_R04_AutoBack
:
LogUtil
.
info
(
Name
+
"复位完成"
);
LogUtil
.
info
(
Name
+
"复位完成"
);
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
...
@@ -166,7 +167,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -166,7 +167,7 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
StartInOut
()
public
static
bool
StartInOut
()
{
{
if
((!
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
))
||
if
((!
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
))
||
(!
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
)))
(!
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
)))
{
{
LogUtil
.
error
(
Name
+
" 启动入料失败,料仓不在待机状态"
+
StoreManager
.
Store
.
storeRunStatus
+
",MoveType"
+
StoreManager
.
Store
.
StoreMove
.
MoveType
);
LogUtil
.
error
(
Name
+
" 启动入料失败,料仓不在待机状态"
+
StoreManager
.
Store
.
storeRunStatus
+
",MoveType"
+
StoreManager
.
Store
.
StoreMove
.
MoveType
);
...
@@ -190,11 +191,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -190,11 +191,11 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
LogUtil
.
error
(
Name
+
" 启动入料失败, Status="
+
AutoBaitingStatus
+
",MoveType="
+
StoreMove
.
MoveType
);
LogUtil
.
error
(
Name
+
" 启动入料失败, Status="
+
AutoBaitingStatus
+
",MoveType="
+
StoreMove
.
MoveType
);
return
false
;
return
false
;
}
}
}
}
private
static
int
SuckingDisc_WorkCount
=
0
;
private
static
int
SuckingDisc_WorkCount
=
0
;
private
static
void
InStoreProcess
()
private
static
void
InStoreProcess
()
{
{
...
@@ -249,24 +250,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -249,24 +250,24 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
IO_Type
.
Door_Up
,
IO_Type
.
Door_Down
,
true
);
CylinderMove
(
IO_Type
.
Door_Up
,
IO_Type
.
Door_Down
,
true
);
}
}
else
if
(
StoreManager
.
Store
.
CanStarInOut
())
else
if
(
StoreManager
.
Store
.
CanStarInOut
())
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I05_GetPosId
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I05_GetPosId
);
//计算高度
//计算高度
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
int
h
eight
=
Math
.
Abs
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
;
LastH
eight
=
Math
.
Abs
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
;
int
s
ize
=
GetSize
();
LastS
ize
=
GetSize
();
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
size
+
"*"
+
h
eight
+
"】二维码【"
+
LastCode
+
"】"
);
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
LastSize
+
"*"
+
LastH
eight
+
"】二维码【"
+
LastCode
+
"】"
);
LastHeight
=
height
;
LastSize
=
size
;
GetInStorePosId
(
ProcessMsg
())
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
OneWaitCanEndStep
=
true
;
}
}
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I05_GetPosId
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I05_GetPosId
))
{
{
//判断是否开始入库
//判断是否开始入库
if
(
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
))
if
(
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
))
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I06_WaitTrayLeave
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I06_WaitTrayLeave
);
LogUtil
.
info
(
Name
+
"入料: 开始入料,等待料盘拿走"
);
LogUtil
.
info
(
Name
+
"入料: 开始入料,等待料盘拿走"
);
...
@@ -319,15 +320,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -319,15 +320,15 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
private
static
void
SuckingDiscWork
()
private
static
void
SuckingDiscWork
()
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I03_SuckingDisc_Work
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I03_SuckingDisc_Work
);
SuckingDisc_WorkCount
++;
SuckingDisc_WorkCount
++;
LogUtil
.
info
(
Name
+
"入料: 吸盘开始第"
+
SuckingDisc_WorkCount
+
"次工作"
);
LogUtil
.
info
(
Name
+
"入料: 吸盘开始第"
+
SuckingDisc_WorkCount
+
"次工作"
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
HIGH
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Air
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Air
,
IO_VALUE
.
HIGH
));
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
OneWaitCanEndStep
=
true
;
}
}
private
static
void
IsNeedScanCode
()
private
static
void
IsNeedScanCode
()
{
{
LastCode
=
""
;
LastCode
=
""
;
...
@@ -338,7 +339,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -338,7 +339,7 @@ namespace OnlineStore.DeviceLibrary
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I01_ScanCode
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I01_ScanCode
);
LogUtil
.
info
(
Name
+
"入料: 开始扫码 "
);
LogUtil
.
info
(
Name
+
"入料: 开始扫码 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitCodeOK
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitCodeOK
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
GetCameraCode
();
GetCameraCode
();
...
@@ -352,7 +353,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -352,7 +353,7 @@ namespace OnlineStore.DeviceLibrary
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
}
}
}
}
//public static bool StartOutStore(string PosId)
//public static bool StartOutStore(string PosId)
//{
//{
...
@@ -452,10 +453,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -452,10 +453,10 @@ namespace OnlineStore.DeviceLibrary
// }
// }
//}
//}
public
static
bool
DoorIsClose
()
public
static
bool
DoorIsClose
()
{
{
if
(
KND
.
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
return
true
;
return
true
;
}
}
...
@@ -473,11 +474,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -473,11 +474,10 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
HIGH
));
}
}
}
}
public
static
void
BatchDoorClose
(
bool
isWait
)
public
static
void
BatchDoorClose
(
bool
isWait
)
{
{
ClearInOutInfo
();
ClearInOutInfo
();
DoorStatus
=
2
;
DoorStatus
=
2
;
if
(
isWait
)
if
(
isWait
)
...
@@ -488,6 +488,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -488,6 +488,6 @@ namespace OnlineStore.DeviceLibrary
KND
.
IOMove
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
HIGH
);
}
}
}
}
}
}
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
b16c614
...
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
...
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
public
partial
class
AutomaticBaiting
public
partial
class
AutomaticBaiting
{
{
private
static
int
StartMovePosition
=
0
;
private
static
int
StartMovePosition
=
0
;
...
@@ -17,13 +17,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -17,13 +17,13 @@ namespace OnlineStore.DeviceLibrary
private
static
void
ACAxisSpeedMove
(
ConfigMoveAxis
moveAxis
,
int
targetSpeed
)
private
static
void
ACAxisSpeedMove
(
ConfigMoveAxis
moveAxis
,
int
targetSpeed
)
{
{
AutoAxisIsMove
=
1
;
AutoAxisIsMove
=
1
;
StartMovePosition
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
StartMovePosition
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
EndMovePosition
=
StartMovePosition
;
EndMovePosition
=
StartMovePosition
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAutoAxisStop
(
moveAxis
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAutoAxisStop
(
moveAxis
));
ACServerManager
.
SpeedMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetSpeed
);
ACServerManager
.
SpeedMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetSpeed
);
}
}
private
static
void
ACAxisRelMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
private
static
void
ACAxisRelMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
{
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
targetPosition
,
targetSpeed
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
targetPosition
,
targetSpeed
));
moveAxis
.
TargetPosition
=
targetPosition
;
moveAxis
.
TargetPosition
=
targetPosition
;
...
@@ -33,10 +33,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -33,10 +33,10 @@ namespace OnlineStore.DeviceLibrary
{
{
moveAxis
.
TargetPosition
=
0
;
moveAxis
.
TargetPosition
=
0
;
LogUtil
.
debug
(
Name
+
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
LogUtil
.
debug
(
Name
+
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
}
}
private
static
bool
ACHomeMoveIsEnd
(
ConfigMoveAxis
moveAxis
,
out
string
msg
)
private
static
bool
ACHomeMoveIsEnd
(
ConfigMoveAxis
moveAxis
,
out
string
msg
)
{
{
msg
=
""
;
msg
=
""
;
if
(
ACServerManager
.
IsHomeMoveEnd
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
()))
if
(
ACServerManager
.
IsHomeMoveEnd
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
()))
...
@@ -55,27 +55,27 @@ namespace OnlineStore.DeviceLibrary
...
@@ -55,27 +55,27 @@ namespace OnlineStore.DeviceLibrary
//}
//}
//else
//else
//{
//{
msg
=
Name
+
" storeMoveStep="
+
StoreMove
.
MoveStep
+
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],误差过大,需要报警"
;
msg
=
Name
+
" storeMoveStep="
+
StoreMove
.
MoveStep
+
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
msg
);
LogUtil
.
error
(
msg
);
return
false
;
return
false
;
//}
//}
}
}
return
true
;
return
true
;
}
}
return
false
;
return
false
;
}
}
private
static
void
CheckWait
()
private
static
void
CheckWait
()
{
{
List
<
WaitResultInfo
>
list
=
StoreMove
.
WaitList
;
List
<
WaitResultInfo
>
list
=
StoreMove
.
WaitList
;
if
(
list
.
Count
<=
0
)
if
(
list
.
Count
<=
0
)
{
{
StoreMove
.
EndStepWait
();
StoreMove
.
EndStepWait
();
return
;
return
;
}
}
//当等待超过一分钟时,需要打印提示
//当等待超过一分钟时,需要打印提示
TimeSpan
span
=
DateTime
.
Now
-
StoreMove
.
LastSetpTime
;
TimeSpan
span
=
DateTime
.
Now
-
StoreMove
.
LastSetpTime
;
string
NotOkMsg
=
""
;
string
NotOkMsg
=
""
;
bool
isOk
=
!
StoreMove
.
OneWaitCanEndStep
;
bool
isOk
=
!
StoreMove
.
OneWaitCanEndStep
;
foreach
(
WaitResultInfo
wait
in
list
)
foreach
(
WaitResultInfo
wait
in
list
)
{
{
if
(
wait
.
IsEnd
)
if
(
wait
.
IsEnd
)
...
@@ -181,16 +181,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -181,16 +181,16 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
private
static
bool
ACAxisMoveIsEnd
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
,
out
string
msg
)
private
static
bool
ACAxisMoveIsEnd
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
,
out
string
msg
)
{
{
msg
=
""
;
msg
=
""
;
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
()).
Equals
(
0
);
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
()).
Equals
(
0
);
if
(
isOk
)
if
(
isOk
)
{
{
int
outCount
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
int
outCount
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
int
errorCount
=
Math
.
Abs
(
outCount
-
targetPosition
);
int
errorCount
=
Math
.
Abs
(
outCount
-
targetPosition
);
if
(
errorCount
<=
moveAxis
.
CanErrorCountMax
)
if
(
errorCount
<=
moveAxis
.
CanErrorCountMax
)
{
{
return
true
;
return
true
;
}
}
//判断是否需要重新运动
//判断是否需要重新运动
if
(
StoreMove
.
CanWhileCount
>
0
)
if
(
StoreMove
.
CanWhileCount
>
0
)
{
{
...
@@ -203,8 +203,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -203,8 +203,8 @@ namespace OnlineStore.DeviceLibrary
{
{
msg
=
Name
+
moveAxis
.
DisplayStr
+
"目标["
+
targetPosition
+
"]当前["
+
outCount
+
"],误差过大,需要报警"
;
msg
=
Name
+
moveAxis
.
DisplayStr
+
"目标["
+
targetPosition
+
"]当前["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
msg
);
LogUtil
.
error
(
msg
);
}
}
}
}
return
false
;
return
false
;
}
}
private
static
bool
AxisMoveISEnd
(
WaitResultInfo
wait
)
private
static
bool
AxisMoveISEnd
(
WaitResultInfo
wait
)
...
@@ -213,7 +213,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -213,7 +213,8 @@ namespace OnlineStore.DeviceLibrary
if
(
wait
.
IsHomeMove
)
if
(
wait
.
IsHomeMove
)
{
{
wait
.
IsEnd
=
ACHomeMoveIsEnd
(
wait
.
AxisInfo
,
out
msg
);
wait
.
IsEnd
=
ACHomeMoveIsEnd
(
wait
.
AxisInfo
,
out
msg
);
}
else
}
else
{
{
wait
.
IsEnd
=
ACAxisMoveIsEnd
(
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
wait
.
IsEnd
=
ACAxisMoveIsEnd
(
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
}
}
...
@@ -228,9 +229,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -228,9 +229,9 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
if
(!
msg
.
Equals
(
""
))
if
(!
msg
.
Equals
(
""
))
{
{
WarnMsg
=
msg
;
WarnMsg
=
msg
;
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
AxisMoveError
,
StoreManager
.
Store
.
GetAlarmCodeByAxis
(
wait
.
AxisInfo
).
ToString
(),
WarnMsg
,
StoreMove
.
MoveType
);
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
AxisMoveError
,
StoreManager
.
Store
.
GetAlarmCodeByAxis
(
wait
.
AxisInfo
).
ToString
(),
WarnMsg
,
StoreMove
.
MoveType
);
}
}
return
wait
.
IsEnd
;
return
wait
.
IsEnd
;
}
}
...
@@ -258,7 +259,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -258,7 +259,7 @@ namespace OnlineStore.DeviceLibrary
return
result
;
return
result
;
}
}
public
static
int
GetSize
()
public
static
int
GetSize
()
{
{
if
(
KND
.
IOValue
(
IO_Type
.
WidthCheck1
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
IO_Type
.
WidthCheck1
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
...
@@ -270,17 +271,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -270,17 +271,17 @@ namespace OnlineStore.DeviceLibrary
{
{
return
7
;
return
7
;
}
}
}
}
return
0
;
return
0
;
}
}
#
region
Halcon
扫码枪代码
#
region
Halcon
扫码枪代码
public
bool
IsTestCamera
=
false
;
public
bool
IsTestCamera
=
false
;
private
static
string
spiltStr
=
"##"
;
private
static
char
spiltStr
=
'#'
;
public
static
void
GetCameraCode
()
public
static
void
GetCameraCode
()
{
{
Task
.
Factory
.
StartNew
(
delegate
()
Task
.
Factory
.
StartNew
(
delegate
()
{
{
KND
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
string
message
=
""
;
string
message
=
""
;
List
<
string
>
codeList
=
CodeManager
.
CameraScan
();
List
<
string
>
codeList
=
CodeManager
.
CameraScan
();
...
@@ -290,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -290,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
}
}
foreach
(
string
str
in
codeList
)
foreach
(
string
str
in
codeList
)
{
{
message
=
message
+
spiltStr
+
str
;
message
=
message
+
spiltStr
+
str
;
//message = message + "=1+0x0-" + LastSize + "x" + LastHeight + " =" + str + spiltStr;
//message = message + "=1+0x0-" + LastSize + "x" + LastHeight + " =" + str + spiltStr;
}
}
LastCode
=
message
;
LastCode
=
message
;
...
@@ -300,9 +301,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -300,9 +301,9 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
"未扫到二维码,请拿走料盘"
;
WarnMsg
=
"未扫到二维码,请拿走料盘"
;
}
}
KND
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
// StoreManager.Store.onCodeReceived(message);
// StoreManager.Store.onCodeReceived(message);
});
});
}
}
#
endregion
#
endregion
private
static
void
CylinderMove
(
string
highType
,
string
lowType
,
bool
isWait
)
private
static
void
CylinderMove
(
string
highType
,
string
lowType
,
bool
isWait
)
...
@@ -315,5 +316,118 @@ namespace OnlineStore.DeviceLibrary
...
@@ -315,5 +316,118 @@ namespace OnlineStore.DeviceLibrary
KND
.
IOMove
(
lowType
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
lowType
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
highType
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
highType
,
IO_VALUE
.
HIGH
);
}
}
private
static
string
ProcessMsg
()
{
string
msg
=
""
;
string
[]
codeArray
=
LastCode
.
Split
(
spiltStr
);
foreach
(
string
code
in
codeArray
)
{
if
(!
code
.
Equals
(
""
))
{
msg
=
msg
+
"=1+0x0-"
+
LastSize
+
"x"
+
LastHeight
+
" ="
+
code
+
spiltStr
+
spiltStr
;
}
}
return
msg
;
}
private
static
bool
IsNotScanCode
=
false
;
private
static
bool
IsScanCode
=
false
;
/// <summary>
/// 发送二维码到服务器获取PosID
/// </summary>
private
static
void
GetInStorePosId
(
string
message
)
{
try
{
message
=
ScanCodeManager
.
ReplaceCode
(
message
);
if
(
message
.
Equals
(
""
)
||
string
.
IsNullOrEmpty
(
message
))
{
IsNotScanCode
=
true
;
IsScanCode
=
false
;
CodeMsg
=
"没有收到二维码信息,请重新放入料盘"
;
LogUtil
.
info
(
Name
+
"没有收到二维码信息,请重新放入料盘"
);
return
;
}
IsNotScanCode
=
false
;
if
(
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
LogUtil
.
info
(
Name
+
"收到二维码【 "
+
message
+
"】,设备未启动,不需要发送服务器"
);
IsScanCode
=
false
;
return
;
}
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
LogUtil
.
info
(
Name
+
"收到二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
//发送扫码内容到服务器进行入库操作
Operation
operation
=
StoreManager
.
Store
.
getLineBoxStatus
();
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
StoreManager
.
Store
.
StoreID
.
ToString
()
}
};
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
if
(
resultOperation
==
null
)
{
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
LogUtil
.
info
(
Name
+
"二维码【"
+
message
+
"】没有收到服务器反馈!"
);
IsScanCode
=
false
;
return
;
}
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
{
//如果有提示消息,直接显示提示
LogUtil
.
info
(
Name
+
"服务器反馈 二维码【"
+
message
+
"】 :"
+
resultOperation
.
msg
);
IsScanCode
=
false
;
return
;
}
IsScanCode
=
false
;
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
posId
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateH
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateW
))
{
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//postId格式BoxId#位置
string
posId
=
data
[
ParamDefine
.
posId
];
string
plateW
=
data
[
ParamDefine
.
plateW
];
string
plateH
=
data
[
ParamDefine
.
plateH
];
string
[]
posArray
=
posId
.
Split
(
'#'
);
if
(!(
posArray
.
Length
==
2
))
{
WarnMsg
=
Name
+
"入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
;
LogUtil
.
error
(
"服务器反馈 入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
LogUtil
.
info
(
"服务器反馈 入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
;
}
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
//根据发送的posId获取位置列表
AutoStorePosition
position
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
WarnMsg
=
"入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】 "
;
LogUtil
.
error
(
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
;
}
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
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
;
}
}
}
catch
(
Exception
ex
)
{
IsScanCode
=
false
;
LogUtil
.
error
(
Name
+
ex
.
StackTrace
);
}
}
}
}
}
}
source/DeviceLibrary/store/IOUtil.cs
查看文件 @
b16c614
...
@@ -6,19 +6,17 @@ using System.Text;
...
@@ -6,19 +6,17 @@ using System.Text;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
public
enum
IO_VALUE
public
enum
IO_VALUE
{
{
/// <summary>
/// <summary>
/// 低位
/// 低位
/// </summary>
/// </summary>
LOW
=
0
,
LOW
=
0
,
/// <summary>
/// 高位
/// </summary>
HIGH
=
1
,
/// <summary>
/// 高位
/// </summary>
HIGH
=
1
,
}
}
}
}
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
b16c614
...
@@ -129,20 +129,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -129,20 +129,7 @@ namespace OnlineStore.DeviceLibrary
IsInWait
=
false
;
IsInWait
=
false
;
WaitList
=
new
List
<
WaitResultInfo
>();
WaitList
=
new
List
<
WaitResultInfo
>();
CanWhileCount
=
0
;
CanWhileCount
=
0
;
}
}
//public StoreMoveInfo clone()
//{
// return (StoreMoveInfo)this.MemberwiseClone();
//}
///// <summary>
///// 重置之后继续出入库时,退回上一个步骤执行
///// </summary>
//public void BackStep()
//{
// moveStep = PreMoveStep;
// IsInWait = false;
//}
}
}
public
class
WaitResultInfo
public
class
WaitResultInfo
...
@@ -227,6 +214,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -227,6 +214,12 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
false
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
/// <summary>
/// 6=等待轴原点信号亮
/// </summary>
/// <param name="axis"></param>
/// <param name="value"></param>
/// <returns></returns>
public
static
WaitResultInfo
WaitAxisOrg
(
ConfigMoveAxis
axis
,
IO_VALUE
value
)
public
static
WaitResultInfo
WaitAxisOrg
(
ConfigMoveAxis
axis
,
IO_VALUE
value
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
...
@@ -248,7 +241,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -248,7 +241,7 @@ namespace OnlineStore.DeviceLibrary
// return wait;
// return wait;
//}
//}
/// <summary>
/// <summary>
/// 等待轴的反限位为指定值
///
8=
等待轴的反限位为指定值
/// </summary>
/// </summary>
public
static
WaitResultInfo
WaitAxistNegativeLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
public
static
WaitResultInfo
WaitAxistNegativeLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
{
{
...
@@ -262,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -262,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
return
wait
;
return
wait
;
}
}
/// <summary>
/// <summary>
/// 等待轴的正限位为指定值
///
9=
等待轴的正限位为指定值
/// </summary>
/// </summary>
public
static
WaitResultInfo
WaitAxistPositiveLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
public
static
WaitResultInfo
WaitAxistPositiveLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
{
{
...
@@ -278,7 +271,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -278,7 +271,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 等待上料轴运动 停止
///
10=
等待上料轴运动 停止
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
static
WaitResultInfo
WaitAutoAxisStop
(
ConfigMoveAxis
moveAxis
)
public
static
WaitResultInfo
WaitAutoAxisStop
(
ConfigMoveAxis
moveAxis
)
...
@@ -291,6 +284,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -291,6 +284,10 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
false
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
/// <summary>
/// 11=扫码OK
/// </summary>
/// <returns></returns>
public
static
WaitResultInfo
WaitCodeOK
()
public
static
WaitResultInfo
WaitCodeOK
()
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
...
...
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
查看文件 @
b16c614
...
@@ -7,6 +7,18 @@ using System.Text;
...
@@ -7,6 +7,18 @@ using System.Text;
namespace
OnlineStore.LoadCSVLibrary
namespace
OnlineStore.LoadCSVLibrary
{
{
public
enum
IO_VALUE
{
/// <summary>
/// 低位
/// </summary>
LOW
=
0
,
/// <summary>
/// 高位
/// </summary>
HIGH
=
1
,
}
public
class
IO_Type
public
class
IO_Type
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论