Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0acddeec
由
几米阳光
编写于
2018-11-02 17:22:43 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
AI3作为检测料盘大小的信号
1 个父辈
a3002d6c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
92 行增加
和
16 行删除
source/ACSingleStore/FrmAxisDebug.Designer.cs
source/ACSingleStore/FrmIOStatus.Designer.cs
source/ACSingleStore/FrmIOStatus.cs
source/DeviceLibrary/StoreConfig/AC/Data Matrix ECC 200.dcm
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/ACSingleStore/FrmAxisDebug.Designer.cs
查看文件 @
0acddee
...
...
@@ -85,12 +85,13 @@
//
// btnMiddleMove
//
this
.
btnMiddleMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnMiddleMove
.
Location
=
new
System
.
Drawing
.
Point
(
266
,
70
);
this
.
btnMiddleMove
.
Name
=
"btnMiddleMove"
;
this
.
btnMiddleMove
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
36
);
this
.
btnMiddleMove
.
TabIndex
=
4
;
this
.
btnMiddleMove
.
Text
=
"旋转轴+(顺时针)"
;
this
.
btnMiddleMove
.
UseVisualStyleBackColor
=
tru
e
;
this
.
btnMiddleMove
.
UseVisualStyleBackColor
=
fals
e
;
this
.
btnMiddleMove
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnMiddleMove_MouseDown
);
this
.
btnMiddleMove
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnMiddleMove_MouseUp
);
//
...
...
@@ -117,56 +118,61 @@
//
// btnUpDownMove
//
this
.
btnUpDownMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnUpDownMove
.
Location
=
new
System
.
Drawing
.
Point
(
266
,
124
);
this
.
btnUpDownMove
.
Name
=
"btnUpDownMove"
;
this
.
btnUpDownMove
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
36
);
this
.
btnUpDownMove
.
TabIndex
=
9
;
this
.
btnUpDownMove
.
Text
=
"升降轴+(上升)"
;
this
.
btnUpDownMove
.
UseVisualStyleBackColor
=
tru
e
;
this
.
btnUpDownMove
.
UseVisualStyleBackColor
=
fals
e
;
this
.
btnUpDownMove
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnUpDownMove_MouseDown
);
this
.
btnUpDownMove
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnUpDownMove_MouseUp
);
//
// btnInOutMove
//
this
.
btnInOutMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnInOutMove
.
Location
=
new
System
.
Drawing
.
Point
(
266
,
177
);
this
.
btnInOutMove
.
Name
=
"btnInOutMove"
;
this
.
btnInOutMove
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
36
);
this
.
btnInOutMove
.
TabIndex
=
10
;
this
.
btnInOutMove
.
Text
=
"进出轴+(前进)"
;
this
.
btnInOutMove
.
UseVisualStyleBackColor
=
tru
e
;
this
.
btnInOutMove
.
UseVisualStyleBackColor
=
fals
e
;
this
.
btnInOutMove
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnInOutMove_MouseDown
);
this
.
btnInOutMove
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnInOutMove_MouseUp
);
//
// btnInOutMovej
//
this
.
btnInOutMovej
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnInOutMovej
.
Location
=
new
System
.
Drawing
.
Point
(
401
,
177
);
this
.
btnInOutMovej
.
Name
=
"btnInOutMovej"
;
this
.
btnInOutMovej
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
36
);
this
.
btnInOutMovej
.
TabIndex
=
14
;
this
.
btnInOutMovej
.
Text
=
"进出轴-(后退)"
;
this
.
btnInOutMovej
.
UseVisualStyleBackColor
=
tru
e
;
this
.
btnInOutMovej
.
UseVisualStyleBackColor
=
fals
e
;
this
.
btnInOutMovej
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnInOutMovej_MouseDown
);
this
.
btnInOutMovej
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnInOutMovej_MouseUp
);
//
// btnUpDownMovej
//
this
.
btnUpDownMovej
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnUpDownMovej
.
Location
=
new
System
.
Drawing
.
Point
(
401
,
124
);
this
.
btnUpDownMovej
.
Name
=
"btnUpDownMovej"
;
this
.
btnUpDownMovej
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
36
);
this
.
btnUpDownMovej
.
TabIndex
=
13
;
this
.
btnUpDownMovej
.
Text
=
"升降轴-(下降)"
;
this
.
btnUpDownMovej
.
UseVisualStyleBackColor
=
tru
e
;
this
.
btnUpDownMovej
.
UseVisualStyleBackColor
=
fals
e
;
this
.
btnUpDownMovej
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnUpDownMovej_MouseDown
);
this
.
btnUpDownMovej
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnUpDownMovej_MouseUp
);
//
// btnMiddleMovej
//
this
.
btnMiddleMovej
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnMiddleMovej
.
Location
=
new
System
.
Drawing
.
Point
(
401
,
70
);
this
.
btnMiddleMovej
.
Name
=
"btnMiddleMovej"
;
this
.
btnMiddleMovej
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
36
);
this
.
btnMiddleMovej
.
TabIndex
=
12
;
this
.
btnMiddleMovej
.
Text
=
"旋转轴-(逆时针)"
;
this
.
btnMiddleMovej
.
UseVisualStyleBackColor
=
tru
e
;
this
.
btnMiddleMovej
.
UseVisualStyleBackColor
=
fals
e
;
this
.
btnMiddleMovej
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnMiddleMovej_MouseDown
);
this
.
btnMiddleMovej
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnMiddleMovej_MouseUp
);
//
...
...
@@ -233,23 +239,25 @@
//
// btnComMovej
//
this
.
btnComMovej
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnComMovej
.
Location
=
new
System
.
Drawing
.
Point
(
401
,
235
);
this
.
btnComMovej
.
Name
=
"btnComMovej"
;
this
.
btnComMovej
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
36
);
this
.
btnComMovej
.
TabIndex
=
25
;
this
.
btnComMovej
.
Text
=
"压紧轴-(向下)"
;
this
.
btnComMovej
.
UseVisualStyleBackColor
=
tru
e
;
this
.
btnComMovej
.
UseVisualStyleBackColor
=
fals
e
;
this
.
btnComMovej
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnComMovej_MouseDown
);
this
.
btnComMovej
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnComMovej_MouseUp
);
//
// btnComMove
//
this
.
btnComMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnComMove
.
Location
=
new
System
.
Drawing
.
Point
(
266
,
235
);
this
.
btnComMove
.
Name
=
"btnComMove"
;
this
.
btnComMove
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
36
);
this
.
btnComMove
.
TabIndex
=
24
;
this
.
btnComMove
.
Text
=
"压紧轴+(向上)"
;
this
.
btnComMove
.
UseVisualStyleBackColor
=
tru
e
;
this
.
btnComMove
.
UseVisualStyleBackColor
=
fals
e
;
this
.
btnComMove
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnComMove_MouseDown
);
this
.
btnComMove
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnComMove_MouseUp
);
//
...
...
source/ACSingleStore/FrmIOStatus.Designer.cs
查看文件 @
0acddee
...
...
@@ -61,6 +61,8 @@
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtAI1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtSize
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label10
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
...
@@ -462,6 +464,8 @@
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtSize
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtHeight
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label8
);
...
...
@@ -485,10 +489,10 @@
//
this
.
txtHeight
.
Enabled
=
false
;
this
.
txtHeight
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtHeight
.
Location
=
new
System
.
Drawing
.
Point
(
113
,
116
);
this
.
txtHeight
.
Location
=
new
System
.
Drawing
.
Point
(
89
,
116
);
this
.
txtHeight
.
MaxLength
=
10
;
this
.
txtHeight
.
Name
=
"txtHeight"
;
this
.
txtHeight
.
Size
=
new
System
.
Drawing
.
Size
(
21
1
,
23
);
this
.
txtHeight
.
Size
=
new
System
.
Drawing
.
Size
(
7
1
,
23
);
this
.
txtHeight
.
TabIndex
=
254
;
this
.
txtHeight
.
Text
=
"0"
;
//
...
...
@@ -499,9 +503,9 @@
this
.
label9
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label9
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
119
);
this
.
label9
.
Name
=
"label9"
;
this
.
label9
.
Size
=
new
System
.
Drawing
.
Size
(
92
,
17
);
this
.
label9
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
label9
.
TabIndex
=
253
;
this
.
label9
.
Text
=
"
实时
料盘高度:"
;
this
.
label9
.
Text
=
"料盘高度:"
;
this
.
label9
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// label8
...
...
@@ -618,6 +622,29 @@
this
.
label1
.
Text
=
"1:"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtSize
//
this
.
txtSize
.
Enabled
=
false
;
this
.
txtSize
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtSize
.
Location
=
new
System
.
Drawing
.
Point
(
253
,
116
);
this
.
txtSize
.
MaxLength
=
10
;
this
.
txtSize
.
Name
=
"txtSize"
;
this
.
txtSize
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
23
);
this
.
txtSize
.
TabIndex
=
256
;
this
.
txtSize
.
Text
=
"0"
;
//
// label10
//
this
.
label10
.
AutoSize
=
true
;
this
.
label10
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label10
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
179
,
119
);
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
label10
.
TabIndex
=
255
;
this
.
label10
.
Text
=
"料盘尺寸:"
;
this
.
label10
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// FrmIOStatus
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
...
...
@@ -694,6 +721,8 @@
private
System
.
Windows
.
Forms
.
Label
label8
;
private
System
.
Windows
.
Forms
.
Label
label9
;
private
System
.
Windows
.
Forms
.
TextBox
txtHeight
;
private
System
.
Windows
.
Forms
.
TextBox
txtSize
;
private
System
.
Windows
.
Forms
.
Label
label10
;
}
}
source/ACSingleStore/FrmIOStatus.cs
查看文件 @
0acddee
...
...
@@ -226,6 +226,7 @@ namespace OnlineStore.ACSingleStore
txtAIResult3
.
Text
=
KNDAIManager
.
ConvertAI
(
ai3Value
,
boxBean
.
Config
.
AIDI3_DefaultPosition
).
ToString
();
txtHeight
.
Text
=
boxBean
.
GetHeight
().
ToString
();
txtSize
.
Text
=
boxBean
.
GetSize
().
ToString
();
}
private
void
btnReadAllDi_Click
(
object
sender
,
EventArgs
e
)
...
...
source/DeviceLibrary/StoreConfig/AC/Data Matrix ECC 200.dcm
查看文件 @
0acddee
此文件类型无法预览
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
0acddee
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
0acddee
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
0acddee
...
...
@@ -967,9 +967,19 @@ namespace OnlineStore.DeviceLibrary
{
isWaitScan
=
false
;
IsScanCode
=
true
;
LogUtil
.
info
(
StoreName
+
"检测到料盘信号且等待1秒,开始扫码"
);
//BeginScannering();
GetCameraCode
();
//判断料盘尺寸
if
(
GetSize
()<=
7
)
{
LogUtil
.
info
(
StoreName
+
"检测到寸料盘,开始扫码"
);
GetCameraCode
();
}
else
{
LogUtil
.
info
(
StoreName
+
"检测到大于7寸的料盘,请放入正确的料盘"
);
IsScanCode
=
false
;
}
}
}
else
...
...
@@ -1374,15 +1384,43 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
高度传感器处理
public
int
GetSize
()
{
int
result
=
0
;
double
Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
3
),
Config
.
AIDI3_DefaultPosition
);
if
(
Value
>
14
)
{
result
=
16
;
}
else
if
(
Value
>=
10
)
{
result
=
12
;
}
else
if
(
Value
>=
4
)
{
result
=
8
;
}
else
{
result
=
0
;
}
if
(
result
>
0
)
{
return
13
;
}
else
{
return
7
;
}
}
public
int
GetHeight
()
{
int
result
=
0
;
double
ai1Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
1
),
Config
.
AIDI1_DefaultPosition
);
double
ai2Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
2
),
Config
.
AIDI2_DefaultPosition
);
double
ai3Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
3
),
Config
.
AIDI3_DefaultPosition
);
//
double ai3Value = KNDAIManager.ConvertAI(KNDAIManager.GetAIValue(Config.AIDevice_IP, 3), Config.AIDI3_DefaultPosition);
double
Value
=
Math
.
Round
((
ai1Value
+
ai2Value
+
ai3Value
)
/
3
,
1
);
double
Value
=
Math
.
Round
((
ai1Value
+
ai2Value
)
/
2
,
1
);
//int radValue =(int) ( Value / 4);
//double mValue = (Value % 4);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论