Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4016eb2b
由
LN
编写于
2019-11-09 16:11:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
更改部分点位名称
1 个父辈
1cbba93f
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
728 行增加
和
579 行删除
source/ACPackingStore/FrmBox.Designer.cs
source/ACPackingStore/FrmBox.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/StoreManager.cs
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
source/DeviceLibrary/StoreConfig/linePositions_1.csv
source/DeviceLibrary/StoreConfig/linePositions_2.csv
source/DeviceLibrary/store/InOutParam.cs
source/DeviceLibrary/store/LineMoveP.cs
source/DeviceLibrary/store/StoreStep.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/LoadCVSLibrary/position/ACBoxPosition.cs
source/LoadCVSLibrary/storeConfig/config/AC_Box_Config.cs
source/LoadCVSLibrary/storeConfig/config/Store_Config.cs
source/ACPackingStore/FrmBox.Designer.cs
查看文件 @
4016eb2
...
...
@@ -99,8 +99,6 @@
this
.
txtInOutP2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtInOutP1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtMiddleP1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpDownP7
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpDownP8
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpDownP1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpDownP2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtComP3
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -119,8 +117,6 @@
this
.
btnInOutP2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInOutP1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnMiddleP1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP7
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP8
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnComP3
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -173,6 +169,7 @@
this
.
btnScanTest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cmbShelfPosition
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
groupShelf
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnSaveShelf
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtInoutPA
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnInoutPA
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -182,7 +179,6 @@
this
.
txtUpdownPA2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnUpdownPA1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpdownPA2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSaveShelf
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupAxis
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupInout
.
SuspendLayout
();
...
...
@@ -939,8 +935,6 @@
this
.
groupInout
.
Controls
.
Add
(
this
.
txtInOutP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtInOutP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtMiddleP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP7
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP8
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtComP3
);
...
...
@@ -959,8 +953,6 @@
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnMiddleP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP7
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP8
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnComP3
);
...
...
@@ -984,7 +976,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
(
11
,
4
6
4
);
this
.
lblTemp
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
4
9
4
);
this
.
lblTemp
.
Name
=
"lblTemp"
;
this
.
lblTemp
.
Size
=
new
System
.
Drawing
.
Size
(
159
,
20
);
this
.
lblTemp
.
TabIndex
=
270
;
...
...
@@ -1004,7 +996,7 @@
// btnSavePosition
//
this
.
btnSavePosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSavePosition
.
Location
=
new
System
.
Drawing
.
Point
(
362
,
4
6
0
);
this
.
btnSavePosition
.
Location
=
new
System
.
Drawing
.
Point
(
362
,
4
9
0
);
this
.
btnSavePosition
.
Name
=
"btnSavePosition"
;
this
.
btnSavePosition
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
38
);
this
.
btnSavePosition
.
TabIndex
=
217
;
...
...
@@ -1101,36 +1093,6 @@
this
.
txtMiddleP1
.
TabIndex
=
208
;
this
.
txtMiddleP1
.
Text
=
"999"
;
//
// 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
(
153
,
218
);
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
=
"999"
;
//
// 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
(
153
,
258
);
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
=
"999"
;
//
// txtUpDownP1
//
this
.
txtUpDownP1
.
AcceptsReturn
=
true
;
...
...
@@ -1359,7 +1321,7 @@
this
.
btnInOutP2
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnInOutP2
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
33
);
this
.
btnInOutP2
.
TabIndex
=
211
;
this
.
btnInOutP2
.
Text
=
"进出轴
取
料点P2:"
;
this
.
btnInOutP2
.
Text
=
"进出轴
NG放
料点P2:"
;
this
.
btnInOutP2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnInOutP2
.
UseVisualStyleBackColor
=
true
;
this
.
btnInOutP2
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInOutP2_Click
);
...
...
@@ -1395,47 +1357,11 @@
this
.
btnMiddleP1
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnMiddleP1
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
33
);
this
.
btnMiddleP1
.
TabIndex
=
207
;
this
.
btnMiddleP1
.
Text
=
"旋转轴待机点P1:"
;
this
.
btnMiddleP1
.
Text
=
"旋转轴待机
/NG
点P1:"
;
this
.
btnMiddleP1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnMiddleP1
.
UseVisualStyleBackColor
=
true
;
this
.
btnMiddleP1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnMiddleP1_Click
);
//
// 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
(
10
,
213
);
this
.
btnUpDownP7
.
Name
=
"btnUpDownP7"
;
this
.
btnUpDownP7
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP7
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
33
);
this
.
btnUpDownP7
.
TabIndex
=
203
;
this
.
btnUpDownP7
.
Text
=
"升降轴入料缓冲点P7:"
;
this
.
btnUpDownP7
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP7
.
UseVisualStyleBackColor
=
true
;
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
(
10
,
253
);
this
.
btnUpDownP8
.
Name
=
"btnUpDownP8"
;
this
.
btnUpDownP8
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP8
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
33
);
this
.
btnUpDownP8
.
TabIndex
=
205
;
this
.
btnUpDownP8
.
Text
=
"升降轴出料缓冲点P8:"
;
this
.
btnUpDownP8
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP8
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP8
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP8_Click
);
//
// btnUpDownP1
//
this
.
btnUpDownP1
.
AutoSize
=
true
;
...
...
@@ -1449,7 +1375,7 @@
this
.
btnUpDownP1
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP1
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
33
);
this
.
btnUpDownP1
.
TabIndex
=
199
;
this
.
btnUpDownP1
.
Text
=
"升降轴
入
料点P1:"
;
this
.
btnUpDownP1
.
Text
=
"升降轴
NG放
料点P1:"
;
this
.
btnUpDownP1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP1
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP1_Click
);
...
...
@@ -1467,7 +1393,7 @@
this
.
btnUpDownP2
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP2
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
33
);
this
.
btnUpDownP2
.
TabIndex
=
201
;
this
.
btnUpDownP2
.
Text
=
"升降轴
出料前
点P2:"
;
this
.
btnUpDownP2
.
Text
=
"升降轴
NG缓冲
点P2:"
;
this
.
btnUpDownP2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP2
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP2
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP2_Click
);
...
...
@@ -2107,6 +2033,17 @@
this
.
groupShelf
.
TabStop
=
false
;
this
.
groupShelf
.
Text
=
"料架位置"
;
//
// btnSaveShelf
//
this
.
btnSaveShelf
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSaveShelf
.
Location
=
new
System
.
Drawing
.
Point
(
70
,
357
);
this
.
btnSaveShelf
.
Name
=
"btnSaveShelf"
;
this
.
btnSaveShelf
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
38
);
this
.
btnSaveShelf
.
TabIndex
=
282
;
this
.
btnSaveShelf
.
Text
=
"保存位置"
;
this
.
btnSaveShelf
.
UseVisualStyleBackColor
=
true
;
this
.
btnSaveShelf
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSaveShelf_Click
);
//
// label13
//
this
.
label13
.
AutoSize
=
true
;
...
...
@@ -2246,17 +2183,6 @@
this
.
btnUpdownPA2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpdownPA2
.
UseVisualStyleBackColor
=
true
;
//
// btnSaveShelf
//
this
.
btnSaveShelf
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSaveShelf
.
Location
=
new
System
.
Drawing
.
Point
(
70
,
357
);
this
.
btnSaveShelf
.
Name
=
"btnSaveShelf"
;
this
.
btnSaveShelf
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
38
);
this
.
btnSaveShelf
.
TabIndex
=
282
;
this
.
btnSaveShelf
.
Text
=
"保存位置"
;
this
.
btnSaveShelf
.
UseVisualStyleBackColor
=
true
;
this
.
btnSaveShelf
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSaveShelf_Click
);
//
// FrmBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -2323,10 +2249,6 @@
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
;
...
...
source/ACPackingStore/FrmBox.cs
查看文件 @
4016eb2
...
...
@@ -77,32 +77,31 @@ namespace OnlineStore.ACPackingStore
txtMPA
.
Text
=
shelrfP
.
MiddleAxis_PA
.
ToString
();
}
txtMiddleP1
.
Text
=
BoxBean
.
Config
.
MiddleAxis_P1
_Position
.
ToString
();
txtUpDownP1
.
Text
=
BoxBean
.
Config
.
UpDownAxis_
DoorOPosition_
P1
.
ToString
();
txtMiddleP1
.
Text
=
BoxBean
.
Config
.
MiddleAxis_P1
.
ToString
();
txtUpDownP1
.
Text
=
BoxBean
.
Config
.
UpDownAxis_P1
.
ToString
();
txtInOutP1
.
Text
=
BoxBean
.
Config
.
InOutAxis_P1_Position
.
ToString
();
txtComP1
.
Text
=
BoxBean
.
Config
.
CompAxis_P1_Position
.
ToString
();
txtUpDownP2
.
Text
=
BoxBean
.
Config
.
UpDownAxis_DoorIPosition_P2
.
ToString
();
txtUpDownP7
.
Text
=
BoxBean
.
Config
.
UpDownAxis_DoorOBPosition_P7
.
ToString
();
txtUpDownP8
.
Text
=
BoxBean
.
Config
.
UpDownAxis_DoorIBPosition_P8
.
ToString
();
txtUpDownP2
.
Text
=
BoxBean
.
Config
.
UpDownAxis_P2
.
ToString
();
//txtInOutP2.Text = BoxBean.Config.InOutAxis_DoorPosition_P2.ToString();
txtUpDownP1
.
Text
=
BoxBean
.
Config
.
UpDownAxis_
DoorOPosition_
P1
.
ToString
();
txtUpDownP1
.
Text
=
BoxBean
.
Config
.
UpDownAxis_P1
.
ToString
();
if
(
ktkPosition
!=
null
)
{
txtMiddleP2
.
Text
=
ktkPosition
.
MiddleAxis_P
osition_P
2
.
ToString
();
txtUpDownP3
.
Text
=
ktkPosition
.
Up
DownAxis_IHPosition
_P3
.
ToString
();
txtUpDownP4
.
Text
=
ktkPosition
.
Up
DownAxis_ILPosition
_P4
.
ToString
();
txtUpDownP5
.
Text
=
ktkPosition
.
Up
DownAxis_OHPosition
_P5
.
ToString
();
txtUpDownP6
.
Text
=
ktkPosition
.
Up
DownAxis_OLPosition
_P6
.
ToString
();
txtComP2
.
Text
=
ktkPosition
.
Com
pressAxis_Position
_P2
.
ToString
();
txtComP3
.
Text
=
ktkPosition
.
Com
pressAxis_CPosition
_P3
.
ToString
();
txtInOutP3
.
Text
=
ktkPosition
.
In
OutAxis_Position
_P3
.
ToString
();
txtMiddleP2
.
Text
=
ktkPosition
.
MiddleAxis_P2
.
ToString
();
txtUpDownP3
.
Text
=
ktkPosition
.
Up
downAxis_IH
_P3
.
ToString
();
txtUpDownP4
.
Text
=
ktkPosition
.
Up
downAxis_IL
_P4
.
ToString
();
txtUpDownP5
.
Text
=
ktkPosition
.
Up
downAxis_OH
_P5
.
ToString
();
txtUpDownP6
.
Text
=
ktkPosition
.
Up
downAxis_OL
_P6
.
ToString
();
txtComP2
.
Text
=
ktkPosition
.
Com
Axis
_P2
.
ToString
();
txtComP3
.
Text
=
ktkPosition
.
Com
Axis
_P3
.
ToString
();
txtInOutP3
.
Text
=
ktkPosition
.
In
outAxis
_P3
.
ToString
();
//txtUpDownP2.Text = ktkPosition.UpDownAxis_
DoorIPosition_
P2.ToString();
//txtUpDownP2.Text = ktkPosition.UpDownAxis_P2.ToString();
//txtUpDownP7.Text = ktkPosition.UpDownAxis_DoorOBPosition_P7.ToString();
//txtUpDownP8.Text = ktkPosition.UpDownAxis_DoorIBPosition_P8.ToString();
txtInOutP2
.
Text
=
ktkPosition
.
InOutAxis_
DoorPosition_
P2
.
ToString
();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_
DoorOPosition_
P1.ToString();
txtInOutP2
.
Text
=
ktkPosition
.
InOutAxis_P2
.
ToString
();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_P1.ToString();
}
timer1
.
Enabled
=
true
;
...
...
@@ -394,8 +393,8 @@ namespace OnlineStore.ACPackingStore
ktk
.
UpDown_P4
=
FormUtil
.
GetIntValue
(
txtUpDownP4
);
ktk
.
UpDown_P5
=
FormUtil
.
GetIntValue
(
txtUpDownP5
);
ktk
.
UpDown_P6
=
FormUtil
.
GetIntValue
(
txtUpDownP6
);
ktk
.
UpDown_P7
=
FormUtil
.
GetIntValue
(
txtUpDownP7
);
ktk
.
UpDown_P8
=
FormUtil
.
GetIntValue
(
txtUpDownP8
);
//
ktk.UpDown_P7 = FormUtil.GetIntValue(txtUpDownP7);
//
ktk.UpDown_P8 = FormUtil.GetIntValue(txtUpDownP8);
ktk
.
InOut_PA
=
FormUtil
.
GetIntValue
(
txtInoutPA
);
ktk
.
UpDown_LPA1
=
FormUtil
.
GetIntValue
(
txtUpdownPA1
);
...
...
@@ -422,21 +421,21 @@ namespace OnlineStore.ACPackingStore
if
(
ktkPosition
!=
null
)
{
txtMiddleP2
.
Text
=
ktkPosition
.
MiddleAxis_P
osition_P
2
.
ToString
();
txtUpDownP3
.
Text
=
ktkPosition
.
Up
DownAxis_IHPosition
_P3
.
ToString
();
txtUpDownP4
.
Text
=
ktkPosition
.
Up
DownAxis_ILPosition
_P4
.
ToString
();
txtUpDownP5
.
Text
=
ktkPosition
.
Up
DownAxis_OHPosition
_P5
.
ToString
();
txtUpDownP6
.
Text
=
ktkPosition
.
Up
DownAxis_OLPosition
_P6
.
ToString
();
txtComP2
.
Text
=
ktkPosition
.
Com
pressAxis_Position
_P2
.
ToString
();
txtComP3
.
Text
=
ktkPosition
.
Com
pressAxis_CPosition
_P3
.
ToString
();
txtInOutP3
.
Text
=
ktkPosition
.
In
OutAxis_Position
_P3
.
ToString
();
txtInOutP2
.
Text
=
ktkPosition
.
InOutAxis_
DoorPosition_
P2
.
ToString
();
//txtUpDownP2.Text = ktkPosition.UpDownAxis_
DoorIPosition_
P2.ToString();
txtMiddleP2
.
Text
=
ktkPosition
.
MiddleAxis_P2
.
ToString
();
txtUpDownP3
.
Text
=
ktkPosition
.
Up
downAxis_IH
_P3
.
ToString
();
txtUpDownP4
.
Text
=
ktkPosition
.
Up
downAxis_IL
_P4
.
ToString
();
txtUpDownP5
.
Text
=
ktkPosition
.
Up
downAxis_OH
_P5
.
ToString
();
txtUpDownP6
.
Text
=
ktkPosition
.
Up
downAxis_OL
_P6
.
ToString
();
txtComP2
.
Text
=
ktkPosition
.
Com
Axis
_P2
.
ToString
();
txtComP3
.
Text
=
ktkPosition
.
Com
Axis
_P3
.
ToString
();
txtInOutP3
.
Text
=
ktkPosition
.
In
outAxis
_P3
.
ToString
();
txtInOutP2
.
Text
=
ktkPosition
.
InOutAxis_P2
.
ToString
();
//txtUpDownP2.Text = ktkPosition.UpDownAxis_P2.ToString();
//txtUpDownP7.Text = ktkPosition.UpDownAxis_DoorOBPosition_P7.ToString();
//txtUpDownP8.Text = ktkPosition.UpDownAxis_DoorIBPosition_P8.ToString();
//txtInOutP2.Text = ktkPosition.InOutAxis_DoorPosition_P2.ToString();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_
DoorOPosition_
P1.ToString();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_P1.ToString();
}
}
}
...
...
@@ -563,22 +562,22 @@ namespace OnlineStore.ACPackingStore
ACBoxPosition
ktkPosition
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
selectPositionNum
);
if
(
ktkPosition
!=
null
)
{
ktkPosition
.
MiddleAxis_P
osition_P
2
=
FormUtil
.
GetIntValue
(
txtMiddleP2
);
ktkPosition
.
Up
DownAxis_IHPosition
_P3
=
FormUtil
.
GetIntValue
(
txtUpDownP3
);
ktkPosition
.
Up
DownAxis_ILPosition
_P4
=
FormUtil
.
GetIntValue
(
txtUpDownP4
);
ktkPosition
.
Up
DownAxis_ILPosition
_P4
=
FormUtil
.
GetIntValue
(
txtUpDownP4
);
ktkPosition
.
In
OutAxis_Position
_P3
=
FormUtil
.
GetIntValue
(
txtInOutP3
);
ktkPosition
.
Com
pressAxis_CPosition
_P3
=
FormUtil
.
GetIntValue
(
txtComP3
);
ktkPosition
.
Up
DownAxis_OHPosition
_P5
=
FormUtil
.
GetIntValue
(
txtUpDownP5
);
ktkPosition
.
Up
DownAxis_OLPosition
_P6
=
FormUtil
.
GetIntValue
(
txtUpDownP6
);
ktkPosition
.
Com
pressAxis_Position
_P2
=
FormUtil
.
GetIntValue
(
txtComP2
);
ktkPosition
.
InOutAxis_
DoorPosition_
P2
=
FormUtil
.
GetIntValue
(
txtInOutP2
);
//ktkPosition.UpDownAxis_
DoorIPosition_
P2 = FormUtil.GetIntValue(txtUpDownP2);
ktkPosition
.
MiddleAxis_P2
=
FormUtil
.
GetIntValue
(
txtMiddleP2
);
ktkPosition
.
Up
downAxis_IH
_P3
=
FormUtil
.
GetIntValue
(
txtUpDownP3
);
ktkPosition
.
Up
downAxis_IL
_P4
=
FormUtil
.
GetIntValue
(
txtUpDownP4
);
ktkPosition
.
Up
downAxis_IL
_P4
=
FormUtil
.
GetIntValue
(
txtUpDownP4
);
ktkPosition
.
In
outAxis
_P3
=
FormUtil
.
GetIntValue
(
txtInOutP3
);
ktkPosition
.
Com
Axis
_P3
=
FormUtil
.
GetIntValue
(
txtComP3
);
ktkPosition
.
Up
downAxis_OH
_P5
=
FormUtil
.
GetIntValue
(
txtUpDownP5
);
ktkPosition
.
Up
downAxis_OL
_P6
=
FormUtil
.
GetIntValue
(
txtUpDownP6
);
ktkPosition
.
Com
Axis
_P2
=
FormUtil
.
GetIntValue
(
txtComP2
);
ktkPosition
.
InOutAxis_P2
=
FormUtil
.
GetIntValue
(
txtInOutP2
);
//ktkPosition.UpDownAxis_P2 = FormUtil.GetIntValue(txtUpDownP2);
//ktkPosition.UpDownAxis_DoorOBPosition_P7 = FormUtil.GetIntValue(txtUpDownP7);
//ktkPosition.UpDownAxis_DoorIBPosition_P8 = FormUtil.GetIntValue(txtUpDownP8);
//ktkPosition.InOutAxis_DoorPosition_P2 = FormUtil.GetIntValue(txtInOutP2);
//ktkPosition.UpDownAxis_
DoorOPosition_
P1 = FormUtil.GetIntValue(txtUpDownP1);
//ktkPosition.UpDownAxis_P1 = FormUtil.GetIntValue(txtUpDownP1);
}
//位置配置
string
appPath
=
Application
.
StartupPath
;
...
...
@@ -596,14 +595,14 @@ namespace OnlineStore.ACPackingStore
}
//料仓固定位置保存
bool
needUpdate
=
false
;
if
(
BoxBean
.
Config
.
MiddleAxis_P1
_Position
!=
FormUtil
.
GetIntValue
(
txtMiddleP1
))
if
(
BoxBean
.
Config
.
MiddleAxis_P1
!=
FormUtil
.
GetIntValue
(
txtMiddleP1
))
{
BoxBean
.
Config
.
MiddleAxis_P1
_Position
=
FormUtil
.
GetIntValue
(
txtMiddleP1
);
BoxBean
.
Config
.
MiddleAxis_P1
=
FormUtil
.
GetIntValue
(
txtMiddleP1
);
needUpdate
=
true
;
}
if
(
BoxBean
.
Config
.
UpDownAxis_
DoorOPosition_
P1
!=
FormUtil
.
GetIntValue
(
txtUpDownP1
))
if
(
BoxBean
.
Config
.
UpDownAxis_P1
!=
FormUtil
.
GetIntValue
(
txtUpDownP1
))
{
BoxBean
.
Config
.
UpDownAxis_
DoorOPosition_
P1
=
FormUtil
.
GetIntValue
(
txtUpDownP1
);
BoxBean
.
Config
.
UpDownAxis_P1
=
FormUtil
.
GetIntValue
(
txtUpDownP1
);
needUpdate
=
true
;
}
...
...
@@ -618,29 +617,20 @@ namespace OnlineStore.ACPackingStore
BoxBean
.
Config
.
CompAxis_P1_Position
=
FormUtil
.
GetIntValue
(
txtComP1
);
needUpdate
=
true
;
}
if
(
BoxBean
.
Config
.
UpDownAxis_DoorIPosition_P2
!=
FormUtil
.
GetIntValue
(
txtUpDownP2
))
{
BoxBean
.
Config
.
UpDownAxis_DoorIPosition_P2
=
FormUtil
.
GetIntValue
(
txtUpDownP2
);
needUpdate
=
true
;
}
if
(
BoxBean
.
Config
.
UpDownAxis_DoorOBPosition_P7
!=
FormUtil
.
GetIntValue
(
txtUpDownP7
))
if
(
BoxBean
.
Config
.
UpDownAxis_P2
!=
FormUtil
.
GetIntValue
(
txtUpDownP2
))
{
BoxBean
.
Config
.
UpDownAxis_DoorOBPosition_P7
=
FormUtil
.
GetIntValue
(
txtUpDownP7
);
needUpdate
=
true
;
}
if
(
BoxBean
.
Config
.
UpDownAxis_DoorIBPosition_P8
!=
FormUtil
.
GetIntValue
(
txtUpDownP8
))
{
BoxBean
.
Config
.
UpDownAxis_DoorIBPosition_P8
=
FormUtil
.
GetIntValue
(
txtUpDownP8
);
BoxBean
.
Config
.
UpDownAxis_P2
=
FormUtil
.
GetIntValue
(
txtUpDownP2
);
needUpdate
=
true
;
}
//if (BoxBean.Config.InOutAxis_DoorPosition_P2 != FormUtil.GetIntValue(txtInOutP2))
//{
// BoxBean.Config.InOutAxis_DoorPosition_P2 = FormUtil.GetIntValue(txtInOutP2);
// needUpdate = true;
//}
if
(
BoxBean
.
Config
.
UpDownAxis_
DoorOPosition_
P1
!=
FormUtil
.
GetIntValue
(
txtUpDownP1
))
if
(
BoxBean
.
Config
.
UpDownAxis_P1
!=
FormUtil
.
GetIntValue
(
txtUpDownP1
))
{
BoxBean
.
Config
.
UpDownAxis_
DoorOPosition_
P1
=
FormUtil
.
GetIntValue
(
txtUpDownP1
);
BoxBean
.
Config
.
UpDownAxis_P1
=
FormUtil
.
GetIntValue
(
txtUpDownP1
);
needUpdate
=
true
;
}
if
(
needUpdate
)
...
...
@@ -706,24 +696,7 @@ namespace OnlineStore.ACPackingStore
AxisABSMove
(
BoxBean
.
Config
.
UpDown_Axis
,
value
,
BoxBean
.
Config
.
UpDownAxis_P2_Speed
);
}
}
private
void
btnUpDownP7_Click
(
object
sender
,
EventArgs
e
)
{
if
(
InOutIsIsP1
())
{
int
value
=
FormUtil
.
GetIntValue
(
txtUpDownP7
);
AxisABSMove
(
BoxBean
.
Config
.
UpDown_Axis
,
value
,
BoxBean
.
Config
.
UpDownAxis_P7_Speed
);
}
}
private
void
btnUpDownP8_Click
(
object
sender
,
EventArgs
e
)
{
if
(
InOutIsIsP1
())
{
int
value
=
FormUtil
.
GetIntValue
(
txtUpDownP8
);
AxisABSMove
(
BoxBean
.
Config
.
UpDown_Axis
,
value
,
BoxBean
.
Config
.
UpDownAxis_P8_Speed
);
}
}
private
void
btnUpDownP3_Click
(
object
sender
,
EventArgs
e
)
{
if
(
InOutIsIsP1
())
...
...
@@ -950,8 +923,7 @@ namespace OnlineStore.ACPackingStore
this
.
btnUpDownP4
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnUpDownP5
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnUpDownP6
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnUpDownP7
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnUpDownP8
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
//this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
//this.lblThisSta.ForeColor = System.Drawing.Color.Red;
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
查看文件 @
4016eb2
...
...
@@ -294,8 +294,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_MiddleAxisToP1
);
LogInfo
(
MoveInfo
.
MoveType
+
": 旋转轴运动到P1,上下轴走到P1,压紧轴到P1!"
);
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1
_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_
DoorOPosition_
P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_P1
,
Config
.
UpDownAxis_P1_Speed
);
ComMoveToPosition
(
Config
.
CompAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
break
;
...
...
@@ -320,8 +320,8 @@ namespace OnlineStore.DeviceLibrary
case
StoreMoveStep
.
BOX_M_H_TOP1_CompressHome
:
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BOX_M_H_TOP1_OtherAxisToP1
);
LogInfo
(
MoveInfo
.
MoveType
+
": 旋转轴运动到P1,上下轴走到P1,压紧轴到P1!"
);
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1
_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_
DoorOPosition_
P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_P1
,
Config
.
UpDownAxis_P1_Speed
);
ComMoveToPosition
(
Config
.
CompAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
break
;
case
StoreMoveStep
.
BOX_M_H_TOP1_OtherAxisToP1
:
...
...
@@ -883,140 +883,7 @@ namespace OnlineStore.DeviceLibrary
}
return
true
;
}
#
region
入库命令处理
private
void
ReviceInStoreProcess
(
string
message
,
Operation
resultOperation
)
{
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
(
Name
+
"服务器反馈 入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
LogUtil
.
info
(
"服务器反馈 入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
;
}
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
//根据发送的posId获取位置列表
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
WarnMsg
=
"入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】 "
;
LogUtil
.
error
(
Name
+
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
LogUtil
.
info
(
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
;
}
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
CanStarInOut
())
{
InOutParam
param
=
new
InOutParam
(
message
,
posId
,
plateH
,
plateW
);
StartInStoreMove
(
param
);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogInfo
(
" 收到服务器入库命令:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 开始入库!"
);
}
else
{
LogInfo
(
" 收到服务器入库命令:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 正在忙碌中,无法入库!"
);
}
}
}
public
bool
ReviceLineCheckInStoreCMD
(
string
posId
,
string
plateH
,
string
plateW
,
string
message
)
{
string
logName
=
Name
+
"入库库位验证【 "
+
message
+
"】【"
+
posId
+
"】:"
;
try
{
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
LogUtil
.
info
(
logName
+
" 设备未启动,验证失败"
);
return
false
;
}
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
LogUtil
.
debug
(
logName
+
"发送给服务器验证入库PosID"
);
//发送扫码内容到服务器进行入库操作
Operation
operation
=
getLineBoxStatus
();
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
DeviceID
.
ToString
()
}
};
operation
.
data
.
Add
(
"inPos"
,
posId
);
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
if
(
resultOperation
==
null
)
{
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
LogUtil
.
info
(
logName
+
" 没有收到服务器反馈 "
);
}
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
{
//如果有提示消息,直接显示提示
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
resultOperation
.
msg
);
}
else
if
(
resultOperation
.
op
.
Equals
(
1
))
{
LogUtil
.
info
(
logName
+
" 成功"
);
return
true
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
info
(
logName
+
" 出错:"
+
ex
.
ToString
());
}
return
false
;
}
public
void
ReviceLineInStoreCMD
(
string
posId
,
string
plateH
,
string
plateW
,
string
message
)
{
string
logName
=
"流水线入库命令【 "
+
message
+
"】【"
+
posId
+
"】:"
;
//if (!LineConnect.WaitInStoreList.Contains(posId))
//{
// LogUtil.error(logName + "库位未验证通过,重新验证库位");
// bool result = ReviceLineCheckInStoreCMD(posId, plateH, plateW, message);
// if (!result)
// {
// return;
// }
//}
//else
//{
// //LineConnect.WaitInStoreList.Remove(posId);
//}
//根据发送的posId获取位置列表
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
WarnMsg
=
"入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】 "
;
LogUtil
.
error
(
logName
+
"未找到库位"
);
// LogUtil.info( "收到流水线入库:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
return
;
}
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
CanStarInOut
())
{
InOutParam
param
=
new
InOutParam
(
message
,
posId
,
plateH
,
plateW
);
LogUtil
.
info
(
logName
+
" 开始入库!"
);
StartInStoreMove
(
param
);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
}
else
{
LogUtil
.
info
(
logName
+
" 正在忙碌中,无法入库!"
);
}
}
#
endregion
#
region
温湿度处理
/// <summary>
...
...
@@ -1287,7 +1154,7 @@ namespace OnlineStore.DeviceLibrary
}
if
(
resultOperation
.
op
.
Equals
(
1
))
{
ReviceInStoreProcess
(
""
,
resultOperation
);
//
ReviceInStoreProcess("", resultOperation);
}
else
if
(
resultOperation
.
op
.
Equals
(
2
))
{
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
4016eb2
...
...
@@ -105,12 +105,26 @@ namespace OnlineStore.DeviceLibrary
// LogUtil.debug("等待height=" + wait.HeightValue + "完成");
//}
}
//else if (wait.WaitType == 5)
//{
// string msg = "";
// wait.IsEnd = ShuoKeIsEnd(wait, out msg);
// NotOkMsg = NotOkMsg +" "+ msg;
//}
else
if
(
wait
.
WaitType
.
Equals
(
8
))
{
string
msg
=
""
;
if
(
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
{
wait
.
IsEnd
=
true
;
}
else
{
bool
result
=
ACAxisMoveIsEnd
(
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
if
(!
result
)
{
LogUtil
.
error
(
msg
);
}
wait
.
IsEnd
=
result
;
}
}
else
if
(
wait
.
WaitType
.
Equals
(
9
))
{
wait
.
IsEnd
=
(
LastScanCodes
.
Count
>
0
);
}
if
(
wait
.
IsEnd
)
{
if
(
MoveInfo
.
OneWaitCanEndStep
)
...
...
@@ -237,7 +251,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_06_DoorWarToDevice
);
InOutStoreLog
(
"入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) "
);
ComMoveToPosition
(
moveP
.
ComPress_P2
,
Config
.
CompAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P7
,
Config
.
UpDownAxis_P7_Speed
);
//
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed);
}
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SI_06_DoorWarToDevice
)
{
...
...
@@ -471,7 +485,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog
(
"出库:SO_11 放下物品,升降轴至P8(进料口出料缓冲点) "
);
//NeedCheckSafetyLight = 0;
ComMoveToPosition
(
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P8
,
Config
.
UpDownAxis_P8_Speed
);
//
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P8, Config.UpDownAxis_P8_Speed);
}
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_11_DevicePutWare
)
{
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
4016eb2
...
...
@@ -13,6 +13,18 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
partial
class
AC_BOX_Bean
{
private
List
<
string
>
LastScanCodes
=
new
List
<
string
>();
private
int
ComTargetPosition
=
0
;
private
int
LastWidth
=
0
;
private
int
LastHeight
=
0
;
private
void
ClearLastTrayInfo
()
{
LastScanCodes
=
new
List
<
string
>();
ComTargetPosition
=
0
;
LastWidth
=
0
;
LastHeight
=
0
;
}
/// <summary>
/// 开始入库移动移动
...
...
@@ -28,8 +40,16 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
MoveInfo
.
NewMove
(
StoreMoveType
.
InStore
,
new
InOutParam
());
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
();
MoveInfo
.
MoveParam
.
MoveP
.
ComPress_P1
=
Config
.
CompAxis_P1_Position
;
MoveInfo
.
MoveParam
.
MoveP
.
InOut_P1
=
Config
.
InOutAxis_P1_Position
;
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P1
=
Config
.
MiddleAxis_P1
;
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P1
=
Config
.
UpDownAxis_P1
;
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P2
=
Config
.
UpDownAxis_P2
;
MoveInfo
.
ShelfPositionList
=
new
List
<
string
>(
ShelfPosList
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
02_DoorOpen
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
02_DoorOpen
);
CylinderMove
(
MoveInfo
,
IO_Type
.
EntranceDoor_Close
,
IO_Type
.
EntranceDoor_Open
);
}
...
...
@@ -39,15 +59,15 @@ namespace OnlineStore.DeviceLibrary
{
LineMoveP
moveP
=
MoveInfo
.
MoveParam
.
MoveP
;
#
region
料架移入料仓内部处理
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
01_LineIn_Check
))
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
01_LineIn_Check
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
02_DoorOpen
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
02_DoorOpen
);
InOutStoreLog
(
"料架入库:入料口移门打开"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
EntranceDoor_Close
,
IO_Type
.
EntranceDoor_Open
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
02_DoorOpen
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
02_DoorOpen
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
03_LineRun
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
03_LineRun
);
InOutStoreLog
(
"料架入库:线体正转,等待取料位检测到信号"
);
IOMove
(
IO_Type
.
Line_BackRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
HIGH
);
...
...
@@ -55,191 +75,437 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LineIn_Check
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LineTake_Check
,
IO_VALUE
.
HIGH
));
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
03_LineRun
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
03_LineRun
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
04_LineStop
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
04_LineStop
);
InOutStoreLog
(
"料架入库:取料位检测到信号,停止线体正转"
);
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
04_LineStop
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
04_LineStop
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
05_DoorClose
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
05_DoorClose
);
InOutStoreLog
(
"料架入库:入料口移门关闭"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
EntranceDoor_Open
,
IO_Type
.
EntranceDoor_Close
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
05_DoorClose
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
05_DoorClose
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
06_LocationUp
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
06_LocationUp
);
InOutStoreLog
(
"料架入库:定位装置上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
LocationCylinder_Down
,
IO_Type
.
LocationCylinder_Up
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
06_LocationUp
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
06_LocationUp
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
07_TopCylinderUp
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
07_TopCylinderUp
);
InOutStoreLog
(
"料架入库:顶升装置上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Down
,
IO_Type
.
TopCylinder_Up
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
07_TopCylinderUp
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
07_TopCylinderUp
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
08_StartGetTray
);
InOutStoreLog
(
"料架入库:开始循环从第一个空位逐个取料盘,扫码入库"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
08_StartGetTray
);
InOutStoreLog
(
"料架入库:开始循环从第一个空位逐个取料盘,扫码入库"
);
}
#
endregion
#
region
料架取料盘扫码获取
POSID
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
08_StartGetTray
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
08_StartGetTray
))
{
if
(
MoveInfo
.
NextShelfPos
())
{
//新的料架库位
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
11_InoutToP1
);
InOutStoreLog
(
"料架取料:叉子后退到待机点P1"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
11_InoutToP1
);
InOutStoreLog
(
"料架取料:叉子后退到待机点P1
, 重置盘信息
"
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
InOutAxis_P1_Speed
);
ClearLastTrayInfo
();
}
else
{
//所有料盘已取料完成
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S11_InoutToP1
))
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_11_InoutToP1
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
12_MoveToShelf
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
12_MoveToShelf
);
InOutStoreLog
(
"料架取料:升降轴移动到PA1低点,旋转轴移动到PA1点,压紧轴到压紧前点"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_LPA1
,
Config
.
UpDownAxis_PA1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_PA
,
Config
.
MiddleAxis_PA_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
Config
.
CompAxis_P3_
Speed
,
Config
.
CompAxis_P3_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
Config
.
CompAxis_P3_
Position
,
Config
.
CompAxis_P3_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
12_MoveToShelf
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
12_MoveToShelf
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
13_InoutToPA
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
13_InoutToPA
);
InOutStoreLog
(
"料架取料:叉子前进到PA点"
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_PA
,
Config
.
InOutAxis_PA_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
13_InoutToPA
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
13_InoutToPA
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
14_UpdownToPA2
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
14_UpdownToPA2
);
InOutStoreLog
(
"料架取料:升降轴上升到PA2点"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_HPA2
,
Config
.
UpDownAxis_PA2_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
14_UpdownToPA2
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
14_UpdownToPA2
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S15_StartCompress
);
InOutStoreLog
(
"料架取料:压紧轴开始缓慢压紧"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_15_StartCompress
);
InOutStoreLog
(
"料架取料:压紧轴开始缓慢压紧到P4"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitComAxis
(
Config
.
Comp_Axis
,
Config
.
CompAxis_P4_Position
,
Config
.
CompAxis_P4_Speed
));
Config
.
Comp_Axis
.
TargetPosition
=
Config
.
CompAxis_P4_Position
;
ACServerManager
.
AbsMove
(
Config
.
Comp_Axis
.
DeviceName
,
Config
.
Comp_Axis
.
GetAxisValue
(),
Config
.
CompAxis_P4_Position
,
Config
.
CompAxis_P4_Speed
);
ComAxisStartCheck
();
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
15_StartCompress
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
15_StartCompress
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
16_ComAxisDownMove
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
16_ComAxisDownMove
);
InOutStoreLog
(
"料架取料:检测到料叉压紧确认信号,再次向下压紧指定的值"
);
int
currPosition
=
ACServerManager
.
GetActualtPosition
(
Config
.
Comp_Axis
);
ComTargetPosition
=
currPosition
;
int
targetP
=
currPosition
+
Config
.
CompAxis_Down_Position
;
ACAxisMove
(
Config
.
Comp_Axis
,
targetP
,
Config
.
CompAxis_P1_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
16_ComAxisDownMove
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
16_ComAxisDownMove
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
17_InoutBack
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
17_InoutBack
);
InOutStoreLog
(
"料架取料:记录压紧高度,叉子后退到扫码点"
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
17_InoutBack
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
17_InoutBack
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
18_ScanCode
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
18_ScanCode
);
InOutStoreLog
(
"料架取料:记录宽度,开始扫码"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitCode
());
Task
.
Factory
.
StartNew
(
delegate
{
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
LastScanCodes
=
CodeManager
.
CameraScan
();
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
});
if
(
IOValue
(
IO_Type
.
TrayCheck_3
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
TrayCheck_4
).
Equals
(
IO_VALUE
.
HIGH
))
{
LastWidth
=
13
;
}
else
if
(
IOValue
(
IO_Type
.
TrayCheck_1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
TrayCheck_2
).
Equals
(
IO_VALUE
.
HIGH
))
{
LastWidth
=
7
;
}
else
{
LogUtil
.
info
(
"未检测到识别区料盘检测信号, 默认高度为7"
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
18_ScanCode
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
18_ScanCode
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S19_GetPosId
);
InOutStoreLog
(
"料架取料:扫码成功,从服务器获取库位号"
);
StartSendTray
();
if
(
LastScanCodes
.
Count
<=
0
)
{
StartSendTray
(
"扫码失败"
);
}
else
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_19_GetPosId
);
InOutStoreLog
(
"料架取料:扫码成功,从服务器获取库位号"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
bool
result
=
GetPosIdByCode
();
if
(
result
)
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_20_SetInstoreParam
);
InOutStoreLog
(
"料架取料: 获取库位号完成,设置位置参数,开始入库"
);
}
else
{
StartSendTray
(
"获取入库库位失败"
);
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
19_GetPosId
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
19_GetPosId
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S20_CompressWare
);
InOutStoreLog
(
"料架取料: 获取库位号完成,设置位置参数,开始入库"
);
StartSendTray
();
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_20_SetInstoreParam
);
InOutStoreLog
(
"料架取料: 获取库位号完成,设置位置参数,开始入库"
);
}
#
endregion
#
region
入库逻辑
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S20_CompressWare
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_20_SetInstoreParam
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
21_MoveToBag
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
21_MoveToBag
);
InOutStoreLog
(
"入库:移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)"
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
21_MoveToBag
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
21_MoveToBag
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
22_DeviceToBag
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
22_DeviceToBag
);
InOutStoreLog
(
"入库:叉子进入库位中,轴3( 叉子) 至P3(库位取放料点)"
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P3
,
Config
.
InOutAxis_P3_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
22_DeviceToBag
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
22_DeviceToBag
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
23_PutWareToBag
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
23_PutWareToBag
);
InOutStoreLog
(
"入库:放下物品,轴2( 上下) 至P4( 库位入料缓冲点)轴4( 压紧) 至P3( 压紧前点)"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S23_PutWareToBag
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S24_DeviceBackFromBag
);
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosID
:
""
;
lastPosId
=
posId
;
lastPosIdStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
//手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P4
,
Config
.
UpDownAxis_P4_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_23_PutWareToBag
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_24_DeviceBackFromBag
);
InOutStoreLog
(
"入库:叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点)"
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
InOutAxis_P1_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
24_DeviceBackFromBag
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
24_DeviceBackFromBag
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
25_GoBack
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
25_GoBack
);
InOutStoreLog
(
"入库:返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始"
);
ComMoveToPosition
(
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
25_GoBack
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
25_GoBack
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
08_StartGetTray
);
InOutStoreLog
(
"料架入库:开始循环
从第一个空位
逐个取料盘,扫码入库"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
08_StartGetTray
);
InOutStoreLog
(
"料架入库:开始循环逐个取料盘,扫码入库"
);
}
#
endregion
#
region
入库
逻辑
#
region
把料盘送到
NG
逻辑
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
31_ToNGDoor
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
31_ToNGDoor
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
32_NGDoorUp
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
32_NGDoorUp
);
InOutStoreLog
(
"送出料盘:NG料口升降门上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
NGDoorCylinder_Down
,
IO_Type
.
NGDoowCylinder_Up
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
32_NGDoorUp
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
32_NGDoorUp
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
33_InoutToNGDoor
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
33_InoutToNGDoor
);
InOutStoreLog
(
"送出料盘:进出轴前进到NG料门口位置"
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
33_InoutToNGDoor
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
33_InoutToNGDoor
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
34_UpdownDown
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
34_UpdownDown
);
InOutStoreLog
(
"送出料盘:升降轴缓慢下降,放下料盘"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P2
,
Config
.
UpDownAxis_P2_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S34_UpdownDown
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S12_MoveToShelf
);
InOutStoreLog
(
"料架取料:叉子后退到待机点P1"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S34_UpdownDown
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S35_InoutToP1
);
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_34_UpdownDown
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_35_InoutToP1
);
InOutStoreLog
(
"送出料盘:叉子后退到P1"
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P1
,
Config
.
InOutAxis_P1_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S
35_InoutToP1
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_
35_InoutToP1
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S
36_NGDoorDown
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_
36_NGDoorDown
);
InOutStoreLog
(
"送出料盘:关门NG料门,送出料盘结束"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
NGDoowCylinder_Up
,
IO_Type
.
NGDoorCylinder_Down
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_36_NGDoorDown
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_08_StartGetTray
);
InOutStoreLog
(
"料架入库:开始循环逐个取料盘,扫码入库"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_S36_NGDoorDown
))
{
}
#
endregion
else
{
LogInfo
(
" 入库,moveStatus="
+
MoveInfo
.
MoveStep
+
",没有对应的处理!"
);
}
}
private
void
StartSendTray
(
string
str
=
"扫码失败"
)
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_31_ToNGDoor
);
InOutStoreLog
(
"送出料盘:"
+
str
+
",升降轴移动到NG料门口上端,旋转轴移动到NG料门口"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
}
private
void
StartSendShelfOut
()
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_01_TopCylinder_Down
);
InOutStoreLog
(
"送出料架:顶升气缸下降"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Up
,
IO_Type
.
TopCylinder_Down
);
}
private
void
SendShelfProcess
()
{
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_01_TopCylinder_Down
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_02_LocatinCylinder_Down
);
InOutStoreLog
(
"送出料架:定位气缸下降"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_02_LocatinCylinder_Down
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_03_DoorOpen
);
InOutStoreLog
(
"送出料架:打开仓门"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_DoorOpen
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_04_LineBack
);
InOutStoreLog
(
"送出料架:线体反转"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_04_LineBack
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_05_WaitInLineSingle
);
InOutStoreLog
(
"送出料架:等待取料工位无信号,入料口有信号"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_05_WaitInLineSingle
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_06_WaitTime
);
InOutStoreLog
(
"送出料架:再转动300时间"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_06_WaitTime
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_07_LineStop
);
InOutStoreLog
(
"送出料架:停止转动"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_07_LineStop
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_08_CallAGV
);
InOutStoreLog
(
"送出料架:通知调度系统拿走"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_08_CallAGV
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_09_CloseDoor
);
InOutStoreLog
(
"送出料架:关闭仓门"
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_09_CloseDoor
))
{
}
}
private
void
StartSendTray
()
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_S31_ToNGDoor
);
InOutStoreLog
(
"送出料盘:扫码或获取库位失败,升降轴移动到NG料门口上端,旋转轴移动到NG料门口"
);
#
region
扫码获取库位
private
string
ProcessCode
()
{
string
message
=
""
;
string
spiltStr
=
"##"
;
string
codeSize
=
LastWidth
+
"x"
+
LastHeight
;
foreach
(
string
str
in
LastScanCodes
)
{
if
(
str
.
Trim
().
Equals
(
""
))
{
continue
;
}
string
code
=
"=1+0x0-"
+
codeSize
+
"="
+
str
.
Trim
();
if
(!
String
.
IsNullOrEmpty
(
code
))
{
message
=
message
+
code
+
spiltStr
;
}
}
return
message
;
}
/// <summary>
/// 扫码枪数据接收
/// </summary>
/// <param name="message"></param>
private
bool
GetPosIdByCode
()
{
try
{
string
message
=
ProcessCode
();
if
(
message
.
Equals
(
""
)
||
string
.
IsNullOrEmpty
(
message
))
{
CodeMsg
=
"未扫到二维码"
;
LogInfo
(
"未扫到二维码"
);
return
false
;
}
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
LogInfo
(
"二维码【 "
+
message
+
"】,设备未启动,不需要发送服务器"
);
return
false
;
}
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
LogUtil
.
info
(
Name
+
"二维码【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
//发送扫码内容到服务器进行入库操作
Operation
operation
=
getLineBoxStatus
();
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
DeviceID
.
ToString
()
}
};
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
if
(
resultOperation
==
null
)
{
CodeMsg
=
"二维码【"
+
message
+
"】没有收到服务器反馈"
;
LogInfo
(
"二维码【 "
+
message
+
"】没有收到服务器反馈!"
);
return
false
;
}
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
{
//如果有提示消息,直接显示提示
LogInfo
(
"二维码【 "
+
message
+
"】 :"
+
resultOperation
.
msg
);
return
false
;
}
if
(
resultOperation
.
op
.
Equals
(
1
))
{
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
(
Name
+
"服务器反馈 入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
false
;
}
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
//根据发送的posId获取位置列表
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
WarnMsg
=
"入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】 "
;
LogUtil
.
error
(
Name
+
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
false
;
}
LogInfo
(
" 收到服务器入库命令:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】设置入库参数 , 开始入库!"
);
MoveInfo
.
MoveParam
.
UpdatePosId
(
message
,
posId
,
plateW
,
plateH
,
ComTargetPosition
);
return
true
;
}
}
else
if
(
resultOperation
.
op
.
Equals
(
2
))
{
ReviceOutStoreProcess
(
resultOperation
);
}
else
if
(
resultOperation
.
op
.
Equals
(
5
))
{
ProcessHumidityCMD
(
resultOperation
);
}
else
{
LogUtil
.
error
(
"收到服务器命令:op="
+
resultOperation
.
op
+
",未找到对应处理"
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"GetPosIdByCode"
+
ex
.
StackTrace
);
}
return
false
;
}
#
endregion
#
region
压紧轴压紧处理
private
System
.
Timers
.
Timer
axisCheckTimer
=
null
;
...
...
source/DeviceLibrary/ACPackingStore/StoreManager.cs
查看文件 @
4016eb2
...
...
@@ -184,22 +184,22 @@ namespace OnlineStore.DeviceLibrary
p
.
ComPress_P1
=
box
.
Config
.
CompAxis_P1_Position
;
p
.
InOut_P1
=
box
.
Config
.
InOutAxis_P1_Position
;
p
.
Middle_P1
=
box
.
Config
.
MiddleAxis_P1
_Position
;
p
.
Middle_P1
=
box
.
Config
.
MiddleAxis_P1
;
p
.
InOut_P2
=
position
.
InOutAxis_
DoorPosition_
P2
;
p
.
UpDown_P1
=
box
.
Config
.
UpDownAxis_
DoorOPosition_
P1
;
p
.
UpDown_P8
=
box
.
Config
.
UpDownAxis_DoorIBPosition_P8
;
p
.
UpDown_P2
=
box
.
Config
.
UpDownAxis_
DoorIPosition_
P2
;
p
.
UpDown_P7
=
box
.
Config
.
UpDownAxis_DoorOBPosition_P7
;
p
.
InOut_P2
=
position
.
InOutAxis_P2
;
p
.
UpDown_P1
=
box
.
Config
.
UpDownAxis_P1
;
//
p.UpDown_P8 = box.Config.UpDownAxis_DoorIBPosition_P8;
p
.
UpDown_P2
=
box
.
Config
.
UpDownAxis_P2
;
//
p.UpDown_P7 = box.Config.UpDownAxis_DoorOBPosition_P7;
p
.
ComPress_P2
=
position
.
Com
pressAxis_Position
_P2
;
p
.
ComPress_P3
=
position
.
Com
pressAxis_CPosition
_P3
;
p
.
InOut_P3
=
position
.
In
OutAxis_Position
_P3
;
p
.
Middle_P2
=
position
.
MiddleAxis_P
osition_P
2
;
p
.
UpDown_P3
=
position
.
Up
DownAxis_IHPosition
_P3
;
p
.
UpDown_P4
=
position
.
Up
DownAxis_ILPosition
_P4
;
p
.
UpDown_P5
=
position
.
Up
DownAxis_OHPosition
_P5
;
p
.
UpDown_P6
=
position
.
Up
DownAxis_OLPosition
_P6
;
p
.
ComPress_P2
=
position
.
Com
Axis
_P2
;
p
.
ComPress_P3
=
position
.
Com
Axis
_P3
;
p
.
InOut_P3
=
position
.
In
outAxis
_P3
;
p
.
Middle_P2
=
position
.
MiddleAxis_P2
;
p
.
UpDown_P3
=
position
.
Up
downAxis_IH
_P3
;
p
.
UpDown_P4
=
position
.
Up
downAxis_IL
_P4
;
p
.
UpDown_P5
=
position
.
Up
downAxis_OH
_P5
;
p
.
UpDown_P6
=
position
.
Up
downAxis_OL
_P6
;
param
.
MoveP
=
p
;
if
(
String
.
IsNullOrEmpty
(
param
.
PlateH
))
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
查看文件 @
4016eb2
...
...
@@ -42,14 +42,16 @@ AXIS,(轴一)旋转轴,Middle_Axis,1,COM1,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM1,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM1,0,,,,,
PRO,升降轴
进料口取料点 P1,UpDownAxis_DoorOPosition
_P1,403000,,,,,,,
PRO,升降轴
进料口出料前点 P2,UpDownAxis_DoorIPosition
_P2,415000,,,,,,,
PRO
,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000,,,,,,,
PRO
,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点
,MiddleAxis_P1_Position
,268093,,,,,,,
PRO,升降轴
NG料口放料点 P1,UpDownAxis
_P1,403000,,,,,,,
PRO,升降轴
NG料口放料缓冲点 P2,UpDownAxis
_P2,415000,,,,,,,
,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000,,,,,,,
,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点
/NG料口位置,MiddleAxis_P1
,268093,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompAxis_P1_Position,10000,,,,,,,
PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,10000,,,,,,,
PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,10000,,,,,,,
PRO,压紧轴(轴4)压紧确认信号收到之后下降的位置,CompAxis_Down_Position,2000,,,,,,,
,,,,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,
...
...
@@ -97,7 +99,7 @@ PRO,升降轴(轴2)PA1速度,UpDownAxis_PA1_Speed,100,,,,,, ,
PRO,升降轴(轴2)PA2速度,UpDownAxis_PA2_Speed,100,,,,,,,
PRO,进出轴(轴3)PA速度,InOutAxis_PA_Speed,100,,,,,,,
PRO,旋转轴(轴1)PA速度,MiddleAxis_PA_Speed,120,,,,,,,
PRO,压紧轴(轴4)
缓慢压紧速度,CompAxis_Com
_Speed,100,,,,,,,
PRO,压紧轴(轴4)
P4速度,CompAxis_P4
_Speed,100,,,,,,,
,,,,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
查看文件 @
4016eb2
...
...
@@ -42,14 +42,16 @@ AXIS,(轴一)旋转轴,Middle_Axis,1,COM1,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM1,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM1,0,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_
DoorOPosition_
P1,403000,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_
DoorIPosition_
P2,415000,,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_P1,403000,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_P2,415000,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1
_Position
,268093,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1,268093,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompAxis_P1_Position,10000,,,,,,,
PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,10000,,,,,,,
PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,10000,,,,,,,
PRO,压紧轴(轴4)压紧确认信号收到之后下降的位置,CompAxis_Down_Position,2000,,,,,,,
,,,,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,
...
...
@@ -96,8 +98,8 @@ PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,100,,,,,,,
PRO,升降轴(轴2)PA1速度,UpDownAxis_PA1_Speed,100,,,,,, ,
PRO,升降轴(轴2)PA2速度,UpDownAxis_PA2_Speed,100,,,,,,,
PRO,进出轴(轴3)PA速度,InOutAxis_PA_Speed,100,,,,,,,
PRO,旋转轴(轴1)PA速度,MiddleAxis_PA_Speed,120,,,,,,,
PRO,压紧轴(轴4)
缓慢压紧速度,CompAxis_Com
_Speed,100,,,,,,,
PRO,旋转轴(轴1)PA速度,MiddleAxis_PA_Speed,120,,,,,,,
PRO,压紧轴(轴4)
P4速度,CompAxis_P4
_Speed,100,,,,,,,
,,,,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
...
...
source/DeviceLibrary/StoreConfig/linePositions_1.csv
查看文件 @
4016eb2
位置,优先级,高度,宽度,料仓ID,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,
进出轴进料口取
料点P2
位置,优先级,高度,宽度,料仓ID,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,
NG口放
料点P2
1#AC1_1_1_4,774,8,7,1,211783,51884,55245,55245,51884,68000,9999,9999,81000
1#AC1_1_1_5,773,8,7,1,211783,67807,71168,71168,67807,68000,12000,75000,81000
1#AC1_1_1_6,772,8,7,1,211783,83730,87091,87091,83730,68000,12000,75000,81000
...
...
source/DeviceLibrary/StoreConfig/linePositions_2.csv
查看文件 @
4016eb2
位置,优先级,高度,宽度,料仓ID,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,
进出轴进料口取
料点P2
位置,优先级,高度,宽度,料仓ID,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,
NG口放
料点P2
2#AC1_1_1_4,774,8,7,2,211783,51884,55245,55245,51884,68000,9999,9999,81000
2#AC1_1_1_5,773,8,7,2,211783,67807,71168,71168,67807,68000,12000,75000,81000
2#AC1_1_1_6,772,8,7,2,211783,83730,87091,87091,83730,68000,12000,75000,81000
...
...
source/DeviceLibrary/store/InOutParam.cs
查看文件 @
4016eb2
...
...
@@ -119,6 +119,31 @@ namespace OnlineStore.DeviceLibrary
MoveP
.
Middle_PA
=
sp
.
MiddleAxis_PA
;
}
internal
void
UpdatePosId
(
string
message
,
string
posId
,
string
plateW
,
string
plateH
,
int
comPosition
)
{
this
.
WareCode
=
message
;
this
.
PosID
=
posId
;
this
.
PlateH
=
plateH
;
this
.
PlateW
=
plateW
;
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
{
LogUtil
.
error
(
"GetPositon["
+
posId
+
"] =null,没有库位不能执行出入库"
);
}
MoveP
.
InOut_P2
=
position
.
InOutAxis_P2
;
MoveP
.
ComPress_P2
=
comPosition
;
MoveP
.
ComPress_P3
=
position
.
ComAxis_P3
;
MoveP
.
InOut_P3
=
position
.
InoutAxis_P3
;
MoveP
.
Middle_P2
=
position
.
MiddleAxis_P2
;
MoveP
.
UpDown_P3
=
position
.
UpdownAxis_IH_P3
;
MoveP
.
UpDown_P4
=
position
.
UpdownAxis_IL_P4
;
MoveP
.
UpDown_P5
=
position
.
UpdownAxis_OH_P5
;
MoveP
.
UpDown_P6
=
position
.
UpdownAxis_OL_P6
;
}
}
}
source/DeviceLibrary/store/LineMoveP.cs
查看文件 @
4016eb2
...
...
@@ -13,72 +13,72 @@ namespace OnlineStore.DeviceLibrary
public
class
LineMoveP
{
/// <summary>
/// 轴2( 升降轴)
进料口取料点 P1
/// 轴2( 升降轴)
NG料口放料点 P2
/// </summary>
public
int
UpDown_P1
{
get
;
set
;
}
public
int
UpDown_P1
=
0
;
/// <summary>
/// 轴2( 升降轴)
进料口出料前点
P2
/// 轴2( 升降轴)
NG料口放料缓冲点
P2
/// </summary>
public
int
UpDown_P2
{
get
;
set
;
}
public
int
UpDown_P2
=
0
;
/// <summary>
/// 轴2( 升降轴) 库位入料前点P3
/// </summary>
public
int
UpDown_P3
{
get
;
set
;
}
public
int
UpDown_P3
=
0
;
/// <summary>
/// 轴2( 升降轴) 库位入料缓冲点P4
/// </summary>
public
int
UpDown_P4
{
get
;
set
;
}
public
int
UpDown_P4
=
0
;
/// <summary>
/// 轴2( 升降轴) 库位出料前点P5
/// </summary>
public
int
UpDown_P5
{
get
;
set
;
}
public
int
UpDown_P5
=
0
;
/// <summary>
/// 轴2( 升降轴) 库位出料缓冲点P6
/// </summary>
public
int
UpDown_P6
{
get
;
set
;
}
/// <summary>
/// 轴2( 升降轴) 进料口取料缓冲点P7
/// </summary>
public
int
UpDown_P7
{
get
;
set
;
}
/// <summary>
/// 轴2( 升降轴) 进料口出料缓冲点P8
/// </summary>
public
int
UpDown_P8
{
get
;
set
;
}
public
int
UpDown_P6
=
0
;
///
//
<summary>
///
//
轴2( 升降轴) 进料口取料缓冲点P7
///
//
</summary>
//public int UpDown_P7 = 0;
///
//
<summary>
///
//
轴2( 升降轴) 进料口出料缓冲点P8
///
//
</summary>
//public int UpDown_P8 = 0;
/// <summary>
/// 轴1旋转轴 待机原位点 P1
/// </summary>
public
int
Middle_P1
{
get
;
set
;
}
public
int
Middle_P1
=
0
;
/// <summary>
/// 轴1旋转轴 库位点 P2
/// </summary>
public
int
Middle_P2
{
get
;
set
;
}
public
int
Middle_P2
=
0
;
/// <summary>
/// 轴3进出轴 待机原位点P1
/// </summary>
public
int
InOut_P1
{
get
;
set
;
}
public
int
InOut_P1
=
0
;
/// <summary>
/// 轴3进出轴
进料口取料点P2
/// 轴3进出轴
NG口放料点
/// </summary>
public
int
InOut_P2
{
get
;
set
;
}
public
int
InOut_P2
=
0
;
/// <summary>
/// 轴3进出轴 库位点取料点P3
/// </summary>
public
int
InOut_P3
{
get
;
set
;
}
public
int
InOut_P3
=
0
;
/// <summary>
/// 轴4( 压紧轴)待机原位点P1
/// </summary>
public
int
ComPress_P1
{
get
;
set
;
}
public
int
ComPress_P1
=
0
;
/// <summary>
/// 轴4( 压紧轴)压紧点 P2
/// </summary>
public
int
ComPress_P2
{
get
;
set
;
}
public
int
ComPress_P2
=
0
;
/// <summary>
/// 轴4( 压紧轴) 压紧前点P3
/// </summary>
public
int
ComPress_P3
{
get
;
set
;
}
public
int
ComPress_P3
=
0
;
/// <summary>
/// 料架进出轴取料点
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
4016eb2
...
...
@@ -316,125 +316,165 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 料架入库:检测到线体入料口信号
/// </summary>
SI_S
01_LineIn_Check
=
20001
,
BI_
01_LineIn_Check
=
20001
,
/// <summary>
/// 料架入库:入料口移门打开
/// </summary>
SI_S
02_DoorOpen
=
20002
,
BI_
02_DoorOpen
=
20002
,
/// <summary>
/// 料架入库:线体正转
/// </summary>
SI_S
03_LineRun
=
20003
,
BI_
03_LineRun
=
20003
,
/// <summary>
/// 料架入库:取料位检测到信号,停止线体正转
/// </summary>
SI_S
04_LineStop
=
20004
,
BI_
04_LineStop
=
20004
,
/// <summary>
/// 料架入库:入料口移门关闭
/// </summary>
SI_S
05_DoorClose
=
20005
,
BI_
05_DoorClose
=
20005
,
/// <summary>
/// 料架入库:定位装置上升
/// </summary>
SI_S
06_LocationUp
=
20006
,
BI_
06_LocationUp
=
20006
,
/// <summary>
/// 料架入库:顶升装置上升
/// </summary>
SI_S
07_TopCylinderUp
=
20007
,
BI_
07_TopCylinderUp
=
20007
,
/// <summary>
/// 料架入库:开始循环从第一个空位逐个取料盘,扫码入库
/// </summary>
SI_S
08_StartGetTray
=
20008
,
BI_
08_StartGetTray
=
20008
,
/// <summary>
/// 料架取料:叉子后退到待机点P1
/// </summary>
SI_S
11_InoutToP1
=
20111
,
BI_
11_InoutToP1
=
20111
,
/// <summary>
/// 料架取料:升降轴移动到PA1低点,旋转轴移动到PA1点,压紧轴到压紧前点
/// </summary>
SI_S
12_MoveToShelf
=
20112
,
BI_
12_MoveToShelf
=
20112
,
/// <summary>
/// 料架取料:叉子前进到PA点
/// </summary>
SI_S
13_InoutToPA
=
20113
,
BI_
13_InoutToPA
=
20113
,
/// <summary>
/// 料架取料:升降轴上升到PA2点
/// </summary>
SI_S
14_UpdownToPA2
=
20114
,
BI_
14_UpdownToPA2
=
20114
,
/// <summary>
/// 料架取料:压紧轴开始缓慢压紧
/// </summary>
SI_S
15_StartCompress
=
20115
,
BI_
15_StartCompress
=
20115
,
/// <summary>
/// 料架取料:检测到料叉压紧确认信号,再次向下压紧指定的值
/// </summary>
SI_S
16_ComAxisDownMove
=
20116
,
BI_
16_ComAxisDownMove
=
20116
,
/// <summary>
/// 料架取料:记录压紧高度,叉子后退到扫码点
/// </summary>
SI_S
17_InoutBack
=
20117
,
BI_
17_InoutBack
=
20117
,
/// <summary>
/// 料架取料:记录宽度,开始扫码
/// </summary>
SI_S
18_ScanCode
=
20118
,
BI_
18_ScanCode
=
20118
,
/// <summary>
/// 料架取料:扫码成功,从服务器获取库位号
/// </summary>
SI_S
19_GetPosId
=
20119
,
BI_
19_GetPosId
=
20119
,
/// <summary>
/// 料架取料: 获取库位号完成,设置位置参数,开始入库
/// </summary>
SI_S20_CompressWare
=
20120
,
BI_20_SetInstoreParam
=
20120
,
/// <summary>
/// 入库。。移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)
/// </summary>
SI_S
21_MoveToBag
=
20121
,
BI_
21_MoveToBag
=
20121
,
/// <summary>
/// 入库。。叉子进入库位中,轴3( 叉子) 至P3(库位取放料点)
/// </summary>
SI_S
22_DeviceToBag
=
20122
,
BI_
22_DeviceToBag
=
20122
,
/// <summary>
/// 入库。。放下物品,轴2( 上下) 至P4( 库位入料缓冲点)轴4( 压紧) 至P3( 压紧前点)
/// </summary>
SI_S
23_PutWareToBag
=
20123
,
BI_
23_PutWareToBag
=
20123
,
/// <summary>
/// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点)
/// </summary>
SI_S
24_DeviceBackFromBag
=
20124
,
BI_
24_DeviceBackFromBag
=
20124
,
/// <summary>
/// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始
/// </summary>
SI_S
25_GoBack
=
20125
,
BI_
25_GoBack
=
20125
,
/// <summary>
/// 送出料盘:扫码或获取库位失败,升降轴移动到NG料门口上端,旋转轴移动到NG料门口
/// </summary>
SI_S
31_ToNGDoor
=
20131
,
BI_
31_ToNGDoor
=
20131
,
/// <summary>
/// 送出料盘:NG料口升降门上升
/// </summary>
SI_S
32_NGDoorUp
=
20132
,
BI_
32_NGDoorUp
=
20132
,
/// <summary>
/// 送出料盘:进出轴前进到NG料门口位置
/// </summary>
SI_S
33_InoutToNGDoor
=
20133
,
BI_
33_InoutToNGDoor
=
20133
,
/// <summary>
/// 送出料盘:升降轴缓慢下降,放下料盘
/// </summary>
SI_S
34_UpdownDown
=
20134
,
BI_
34_UpdownDown
=
20134
,
/// <summary>
/// 送出料盘:叉子后退到P1
/// </summary>
SI_S
35_InoutToP1
=
20135
,
BI_
35_InoutToP1
=
20135
,
/// <summary>
/// 送出料盘:关门NG料门,送出料盘结束
/// </summary>
SI_S36_NGDoorDown
=
20136
,
BI_36_NGDoorDown
=
20136
,
#
endregion
#
region
把料架送出步骤
21000
开始
/// <summary>
/// 送出料架:顶升气缸下降
/// </summary>
BS_01_TopCylinder_Down
=
21001
,
/// <summary>
/// 送出料架:定位气缸下降
/// </summary>
BS_02_LocatinCylinder_Down
=
21002
,
/// <summary>
/// 送出料架:打开仓门
/// </summary>
BS_03_DoorOpen
=
21003
,
/// <summary>
/// 送出料架:线体反转
/// </summary>
BS_04_LineBack
=
21004
,
/// <summary>
/// 送出料架:等待取料工位无信号,入料口有信号
/// </summary>
BS_05_WaitInLineSingle
=
21005
,
/// <summary>
/// 送出料架:再转动300时间
/// </summary>
BS_06_WaitTime
=
21006
,
/// <summary>
/// 送出料架:停止转动
/// </summary>
BS_07_LineStop
=
21007
,
/// <summary>
/// 送出料架:通知调度系统拿走
/// </summary>
BS_08_CallAGV
=
21008
,
/// <summary>
/// 送出料架:关闭仓门
/// </summary>
BS_09_CloseDoor
=
21009
,
#
endregion
}
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
4016eb2
...
...
@@ -242,7 +242,29 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitComAxis
(
ConfigMoveAxis
axis
,
int
targetPosition
,
int
targetSpeed
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
8
;
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
false
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
TargetSpeed
=
targetSpeed
;
wait
.
IsEnd
=
false
;
return
wait
;
}
internal
static
WaitResultInfo
WaitCode
()
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
9
;
wait
.
IsHomeMove
=
false
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
string
ToStr
()
{
if
(
WaitType
==
1
)
...
...
@@ -278,6 +300,12 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
WaitType
==
7
)
{
return
"料盘高度【"
+
HeightValue
+
"】 "
;
}
else
if
(
WaitType
.
Equals
(
8
))
{
return
"压紧轴压紧到位"
;
}
else
if
(
WaitType
.
Equals
(
9
))
{
return
"扫码完成"
;
}
else
{
...
...
@@ -289,7 +317,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
int
CanWhileMoveCount
{
get
;
set
;
}
/// <summary>
/// 等待结果,1=轴运动,2=IO运动,3=时间,4=电钢,5=硕科电机,6=等待轴原点信号
/// 等待结果,1=轴运动,2=IO运动,3=时间,4=电钢,5=硕科电机,6=等待轴原点信号
,8=等待压紧轴压紧到位
/// </summary>
public
int
WaitType
{
get
;
set
;
}
/// <summary>
...
...
source/LoadCVSLibrary/position/ACBoxPosition.cs
查看文件 @
4016eb2
...
...
@@ -21,51 +21,51 @@ namespace OnlineStore.LoadCSVLibrary
/// 中轴位置(旋转轴库位点)P2
/// </summary>
[
CSVAttribute
(
"中轴位置P2"
)]
public
int
MiddleAxis_P
osition_P
2
{
get
;
set
;
}
public
int
MiddleAxis_P2
{
get
;
set
;
}
/// <summary>
/// 升降轴(库位出料前点)P5
/// </summary>
[
CSVAttribute
(
"升降轴库位出料前点P5"
)]
public
int
Up
DownAxis_OHPosition
_P5
{
get
;
set
;
}
public
int
Up
downAxis_OH
_P5
{
get
;
set
;
}
/// <summary>
/// 升降轴(库位出料缓冲点)P6
/// </summary>
[
CSVAttribute
(
"升降轴库位出料缓冲点P6"
)]
public
int
Up
DownAxis_OLPosition
_P6
{
get
;
set
;
}
public
int
Up
downAxis_OL
_P6
{
get
;
set
;
}
/// <summary>
/// 升降轴(库位入料前点)P3
/// </summary>
[
CSVAttribute
(
"升降轴库位入料前点P3"
)]
public
int
Up
DownAxis_IHPosition
_P3
{
get
;
set
;
}
public
int
Up
downAxis_IH
_P3
{
get
;
set
;
}
/// <summary>
/// 升降轴(库位入料缓冲点)P4
/// </summary>
[
CSVAttribute
(
"升降轴库位入料缓冲点P4"
)]
public
int
Up
DownAxis_ILPosition
_P4
{
get
;
set
;
}
public
int
Up
downAxis_IL
_P4
{
get
;
set
;
}
/// <summary>
/// 进出轴(库位点取料点)P3
/// </summary>
[
CSVAttribute
(
"进出轴库位点取料点P3"
)]
public
int
In
OutAxis_Position
_P3
{
get
;
set
;
}
public
int
In
outAxis
_P3
{
get
;
set
;
}
/// <summary>
/// 压紧轴(压紧点)P2
/// </summary>
[
CSVAttribute
(
"压紧轴压紧点P2"
)]
public
int
Com
pressAxis_Position
_P2
{
get
;
set
;
}
public
int
Com
Axis
_P2
{
get
;
set
;
}
/// <summary>
/// 压紧轴(压紧前点)P3
/// </summary>
[
CSVAttribute
(
"压紧轴压紧前点P3"
)]
public
int
Com
pressAxis_CPosition
_P3
{
get
;
set
;
}
public
int
Com
Axis
_P3
{
get
;
set
;
}
/// <summary>
/// 轴3(进出轴)
进料口取
料点P2
/// 轴3(进出轴)
NG口放
料点P2
/// </summary>
[
CSVAttribute
(
"
进出轴进料口取
料点P2"
)]
public
int
InOutAxis_
DoorPosition_
P2
{
get
;
set
;
}
[
CSVAttribute
(
"
NG口放
料点P2"
)]
public
int
InOutAxis_P2
{
get
;
set
;
}
public
static
bool
CheckPosition
(
ACBoxPosition
position
,
AC_BOX_Config
Config
)
{
...
...
@@ -75,9 +75,9 @@ namespace OnlineStore.LoadCSVLibrary
{
int
mMin
=
Config
.
Middle_Axis
.
PositionMin
;
int
mMax
=
Config
.
Middle_Axis
.
PositionMax
;
if
(
mMin
>
position
.
MiddleAxis_P
osition_P2
||
mMax
<
position
.
MiddleAxis_Position
_P2
)
if
(
mMin
>
position
.
MiddleAxis_P
2
||
mMax
<
position
.
MiddleAxis
_P2
)
{
LogUtil
.
error
(
position
.
PositionNum
+
" MiddleAxis_P
osition_P2
位置超出"
+
Config
.
Middle_Axis
.
Explain
+
"上下限("
+
mMin
+
"-"
+
mMax
+
")"
);
LogUtil
.
error
(
position
.
PositionNum
+
" MiddleAxis_P
2
位置超出"
+
Config
.
Middle_Axis
.
Explain
+
"上下限("
+
mMin
+
"-"
+
mMax
+
")"
);
return
false
;
}
}
...
...
@@ -85,12 +85,12 @@ namespace OnlineStore.LoadCSVLibrary
{
int
iMin
=
Config
.
InOut_Axis
.
PositionMin
;
int
iMax
=
Config
.
InOut_Axis
.
PositionMax
;
if
(
iMin
>
position
.
InOutAxis_
DoorPosition_P2
||
iMax
<
position
.
InOutAxis_DoorPosition
_P2
)
if
(
iMin
>
position
.
InOutAxis_
P2
||
iMax
<
position
.
InOutAxis
_P2
)
{
LogUtil
.
error
(
position
.
PositionNum
+
" InOutAxis_
DoorPosition_P2
位置超出"
+
Config
.
InOut_Axis
.
Explain
+
"上下限("
+
iMin
+
"-"
+
iMax
+
")"
);
LogUtil
.
error
(
position
.
PositionNum
+
" InOutAxis_
P2
位置超出"
+
Config
.
InOut_Axis
.
Explain
+
"上下限("
+
iMin
+
"-"
+
iMax
+
")"
);
return
false
;
}
if
(
iMin
>
position
.
In
OutAxis_Position_P3
||
iMax
<
position
.
InOutAxis_Position
_P3
)
if
(
iMin
>
position
.
In
outAxis_P3
||
iMax
<
position
.
InoutAxis
_P3
)
{
LogUtil
.
error
(
position
.
PositionNum
+
" InOutAxis_Position_P3位置超出"
+
Config
.
InOut_Axis
.
Explain
+
"上下限("
+
iMin
+
"-"
+
iMax
+
")"
);
return
false
;
...
...
@@ -100,24 +100,24 @@ namespace OnlineStore.LoadCSVLibrary
{
int
uMin
=
Config
.
UpDown_Axis
.
PositionMin
;
int
uMax
=
Config
.
UpDown_Axis
.
PositionMax
;
if
(
uMin
>
position
.
Up
DownAxis_IHPosition_P3
||
uMax
<
position
.
UpDownAxis_IHPosition
_P3
)
if
(
uMin
>
position
.
Up
downAxis_IH_P3
||
uMax
<
position
.
UpdownAxis_IH
_P3
)
{
LogUtil
.
error
(
position
.
PositionNum
+
" Up
DownAxis_IHPosition_P3
位置超出"
+
Config
.
UpDown_Axis
.
Explain
+
"上下限("
+
uMin
+
"-"
+
uMax
+
")"
);
LogUtil
.
error
(
position
.
PositionNum
+
" Up
downAxis_IH_P3
位置超出"
+
Config
.
UpDown_Axis
.
Explain
+
"上下限("
+
uMin
+
"-"
+
uMax
+
")"
);
return
false
;
}
if
(
uMin
>
position
.
Up
DownAxis_ILPosition_P4
||
uMax
<
position
.
UpDownAxis_ILPosition
_P4
)
if
(
uMin
>
position
.
Up
downAxis_IL_P4
||
uMax
<
position
.
UpdownAxis_IL
_P4
)
{
LogUtil
.
error
(
position
.
PositionNum
+
" Up
DownAxis_ILPosition_P4
位置超出"
+
Config
.
UpDown_Axis
.
Explain
+
"上下限("
+
uMin
+
"-"
+
uMax
+
")"
);
LogUtil
.
error
(
position
.
PositionNum
+
" Up
downAxis_IL_P4
位置超出"
+
Config
.
UpDown_Axis
.
Explain
+
"上下限("
+
uMin
+
"-"
+
uMax
+
")"
);
return
false
;
}
if
(
uMin
>
position
.
Up
DownAxis_OHPosition_P5
||
uMax
<
position
.
UpDownAxis_OHPosition
_P5
)
if
(
uMin
>
position
.
Up
downAxis_OH_P5
||
uMax
<
position
.
UpdownAxis_OH
_P5
)
{
LogUtil
.
error
(
position
.
PositionNum
+
" Up
DownAxis_OHPosition_P5
位置超出"
+
Config
.
UpDown_Axis
.
Explain
+
"上下限("
+
uMin
+
"-"
+
uMax
+
")"
);
LogUtil
.
error
(
position
.
PositionNum
+
" Up
downAxis_OH_P5
位置超出"
+
Config
.
UpDown_Axis
.
Explain
+
"上下限("
+
uMin
+
"-"
+
uMax
+
")"
);
return
false
;
}
if
(
uMin
>
position
.
Up
DownAxis_OLPosition_P6
||
uMax
<
position
.
UpDownAxis_OLPosition
_P6
)
if
(
uMin
>
position
.
Up
downAxis_OL_P6
||
uMax
<
position
.
UpdownAxis_OL
_P6
)
{
LogUtil
.
error
(
position
.
PositionNum
+
"
UpDownAxis_OLPosition_P6
位置超出"
+
Config
.
UpDown_Axis
.
Explain
+
"上下限("
+
uMin
+
"-"
+
uMax
+
")"
);
LogUtil
.
error
(
position
.
PositionNum
+
"
UpdownAxis_OL_P6
位置超出"
+
Config
.
UpDown_Axis
.
Explain
+
"上下限("
+
uMin
+
"-"
+
uMax
+
")"
);
return
false
;
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/AC_Box_Config.cs
查看文件 @
4016eb2
...
...
@@ -229,35 +229,35 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"InoutAxis_ErrorCountMax"
)]
public
int
InoutAxis_ErrorCountMax
{
get
;
set
;
}
/// <summary>
/// 升降轴
进料口取料点
P1
/// 升降轴
NG料口放料点
P1
/// </summary>
[
ConfigProAttribute
(
"UpDownAxis_
DoorOPosition_
P1"
)]
public
int
UpDownAxis_
DoorOPosition_
P1
{
get
;
set
;
}
[
ConfigProAttribute
(
"UpDownAxis_P1"
)]
public
int
UpDownAxis_P1
{
get
;
set
;
}
/// <summary>
/// 升降轴
进料口出料前
点 P2
/// 升降轴
NG料口放料缓冲
点 P2
/// </summary>
[
ConfigProAttribute
(
"UpDownAxis_
DoorIPosition_
P2"
)]
public
int
UpDownAxis_
DoorIPosition_
P2
{
get
;
set
;
}
[
ConfigProAttribute
(
"UpDownAxis_P2"
)]
public
int
UpDownAxis_P2
{
get
;
set
;
}
/// <summary>
/// 升降轴 进料口取料缓冲点 P7
/// </summary>
[
ConfigProAttribute
(
"UpDownAxis_DoorOBPosition_P7"
)]
public
int
UpDownAxis_DoorOBPosition_P7
{
get
;
set
;
}
///// <summary>
///// 升降轴 进料口取料缓冲点 P7
///// </summary>
//[ConfigProAttribute("UpDownAxis_DoorOBPosition_P7")]
//public int UpDownAxis_DoorOBPosition_P7 { get; set; }
///// <summary>
///// 升降轴 进料口出料缓冲点 P8
///// </summary>
//[ConfigProAttribute("UpDownAxis_DoorIBPosition_P8")]
//public int UpDownAxis_DoorIBPosition_P8 { get; set; }
/// <summary>
/// 升降轴 进料口出料缓冲点 P8
/// </summary>
[
ConfigProAttribute
(
"UpDownAxis_DoorIBPosition_P8"
)]
public
int
UpDownAxis_DoorIBPosition_P8
{
get
;
set
;
}
/// <summary>
/// PRO 旋转轴(轴1)P1 待机原位点 MiddleAxis_P1_Position
/// PRO 旋转轴(轴1)P1 待机原位点/NG料口位置 MiddleAxis_P1
/// </summary>
[
ConfigProAttribute
(
"MiddleAxis_P1
_Position
"
)]
public
int
MiddleAxis_P1
_Position
{
get
;
set
;
}
[
ConfigProAttribute
(
"MiddleAxis_P1"
)]
public
int
MiddleAxis_P1
{
get
;
set
;
}
/// <summary>
/// PRO 进出轴(轴3)P1待机原位点 InOutAxis_P1_Position
/// </summary>
...
...
@@ -323,36 +323,6 @@ namespace OnlineStore.LoadCSVLibrary
public
int
CompAxis_HomeAddSpeed
{
get
;
set
;
}
/// <summary>
/// PRO (轴一)旋转轴最小限位 MiddleAxis_PositionMin
/// </summary>
[
ConfigProAttribute
(
"MiddleAxis_PositionMin"
,
false
)]
public
int
MiddleAxis_PositionMin
{
get
;
set
;
}
/// <summary>
/// PRO (轴二)升降轴最小限位 UpdownAxis_PositionMin
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_PositionMin"
,
false
)]
public
int
UpdownAxis_PositionMin
{
get
;
set
;
}
/// <summary>
/// PRO (轴三)进出轴最小限位 InoutAxis_PositionMin
/// </summary>
[
ConfigProAttribute
(
"InoutAxis_PositionMin"
,
false
)]
public
int
InoutAxis_PositionMin
{
get
;
set
;
}
/// <summary>
/// PRO (轴一)旋转轴最大限位 MiddleAxis_PositionMax
/// </summary>
[
ConfigProAttribute
(
"MiddleAxis_PositionMax"
,
false
)]
public
int
MiddleAxis_PositionMax
{
get
;
set
;
}
/// <summary>
/// PRO (轴二)升降轴最大限位 UpdownAxis_PositionMax
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_PositionMax"
,
false
)]
public
int
UpdownAxis_PositionMax
{
get
;
set
;
}
/// <summary>
/// PRO (轴三)进出轴最大限位 InoutAxis_PositionMax
/// </summary>
[
ConfigProAttribute
(
"InoutAxis_PositionMax"
,
false
)]
public
int
InoutAxis_PositionMax
{
get
;
set
;
}
/// <summary>
...
...
@@ -372,13 +342,22 @@ namespace OnlineStore.LoadCSVLibrary
public
int
CompAxis_P3_Speed
{
get
;
set
;
}
/// <summary>
/// PRO,压紧轴(轴4)
缓慢压紧速度,CompAxis_Com
_Speed,100,,,,,,,
/// PRO,压紧轴(轴4)
P4速度,CompAxis_P4
_Speed,100,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"CompAxis_Com_Speed"
)]
public
int
CompAxis_Com_Speed
{
get
;
set
;
}
[
ConfigProAttribute
(
"CompAxis_P4_Speed"
)]
public
int
CompAxis_P4_Speed
{
get
;
set
;
}
/// <summary>
/// PRO,压紧轴(轴4)压紧确认信号收到之后下降的位置,CompAxis_Down_Position,2000,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"CompAxis_Down_Position"
)]
public
int
CompAxis_Down_Position
{
get
;
set
;
}
/// <summary>
/// PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,10000,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"CompAxis_P4_Position"
)]
public
int
CompAxis_P4_Position
{
get
;
set
;
}
/// <summary>
/// PRO,升降轴(轴2)PA1速度,UpDownAxis_PA1_Speed,100,,,,,, ,
/// </summary>
[
ConfigProAttribute
(
"UpDownAxis_PA1_Speed"
)]
...
...
@@ -405,6 +384,38 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[
ConfigProAttribute
(
"CompAxis_P3_Position"
)]
public
int
CompAxis_P3_Position
{
get
;
set
;
}
/// <summary>
/// PRO (轴一)旋转轴最小限位 MiddleAxis_PositionMin
/// </summary>
[
ConfigProAttribute
(
"MiddleAxis_PositionMin"
,
false
)]
public
int
MiddleAxis_PositionMin
{
get
;
set
;
}
/// <summary>
/// PRO (轴二)升降轴最小限位 UpdownAxis_PositionMin
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_PositionMin"
,
false
)]
public
int
UpdownAxis_PositionMin
{
get
;
set
;
}
/// <summary>
/// PRO (轴三)进出轴最小限位 InoutAxis_PositionMin
/// </summary>
[
ConfigProAttribute
(
"InoutAxis_PositionMin"
,
false
)]
public
int
InoutAxis_PositionMin
{
get
;
set
;
}
/// <summary>
/// PRO (轴一)旋转轴最大限位 MiddleAxis_PositionMax
/// </summary>
[
ConfigProAttribute
(
"MiddleAxis_PositionMax"
,
false
)]
public
int
MiddleAxis_PositionMax
{
get
;
set
;
}
/// <summary>
/// PRO (轴二)升降轴最大限位 UpdownAxis_PositionMax
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_PositionMax"
,
false
)]
public
int
UpdownAxis_PositionMax
{
get
;
set
;
}
/// <summary>
/// PRO (轴三)进出轴最大限位 InoutAxis_PositionMax
/// </summary>
[
ConfigProAttribute
(
"InoutAxis_PositionMax"
,
false
)]
public
int
InoutAxis_PositionMax
{
get
;
set
;
}
/// <summary>
/// 预警温度
/// </summary>
...
...
@@ -576,9 +587,9 @@ namespace OnlineStore.LoadCSVLibrary
//Config.UpDown_Axis.ResolveSpeed = Config.UpdownAxis_ResolveSpeed;
//Config.Middle_Axis.ResolveSpeed = Config.MiddleAxis_ResolveSpeed;
Config
.
Middle_Axis
.
DefaultPosition
=
Config
.
MiddleAxis_P1
_Position
;
Config
.
Middle_Axis
.
DefaultPosition
=
Config
.
MiddleAxis_P1
;
Config
.
InOut_Axis
.
DefaultPosition
=
Config
.
InOutAxis_P1_Position
;
Config
.
UpDown_Axis
.
DefaultPosition
=
Config
.
UpDownAxis_
DoorOPosition_
P1
;
Config
.
UpDown_Axis
.
DefaultPosition
=
Config
.
UpDownAxis_P1
;
Config
.
Comp_Axis
.
DefaultPosition
=
Config
.
CompAxis_P1_Position
;
Config
.
Comp_Axis
.
CanErrorCountMax
=
1000
;
Config
.
Comp_Axis
.
CanErrorCountMin
=
10
;
...
...
source/LoadCVSLibrary/storeConfig/config/Store_Config.cs
查看文件 @
4016eb2
...
...
@@ -164,9 +164,9 @@ namespace OnlineStore.LoadCSVLibrary
//Config.UpDown_Axis.ResolveSpeed = Config.UpdownAxis_ResolveSpeed;
//Config.Middle_Axis.ResolveSpeed = Config.MiddleAxis_ResolveSpeed;
Config
.
Middle_Axis
.
DefaultPosition
=
Config
.
MiddleAxis_P1
_Position
;
Config
.
Middle_Axis
.
DefaultPosition
=
Config
.
MiddleAxis_P1
;
Config
.
InOut_Axis
.
DefaultPosition
=
Config
.
InOutAxis_P1_Position
;
Config
.
UpDown_Axis
.
DefaultPosition
=
Config
.
UpDownAxis_
DoorOPosition_
P1
;
Config
.
UpDown_Axis
.
DefaultPosition
=
Config
.
UpDownAxis_P1
;
Config
.
Comp_Axis
.
DefaultPosition
=
Config
.
CompAxis_P1_Position
;
Config
.
Comp_Axis
.
CanErrorCountMax
=
1000
;
Config
.
Comp_Axis
.
CanErrorCountMin
=
10
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论