Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 55bad263
由
几米阳光
编写于
2019-01-22 20:02:43 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调试修改
1 个父辈
09148522
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
107 行增加
和
53 行删除
doc/设备IP地址分配.xlsx
source/ACSingleStore/FrmIOStatus.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/KangNaiDe/KNDAIManager.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
doc/设备IP地址分配.xlsx
查看文件 @
55bad26
此文件类型无法预览
source/ACSingleStore/FrmIOStatus.cs
查看文件 @
55bad26
...
...
@@ -227,8 +227,8 @@ namespace OnlineStore.ACSingleStore
txtAIResult1
.
Text
=
KNDAIManager
.
ConvertAI
(
ai1Value
,
boxBean
.
Config
.
AIDI1_DefaultPosition
).
ToString
();
txtAIResult2
.
Text
=
KNDAIManager
.
ConvertAI
(
ai2Value
,
boxBean
.
Config
.
AIDI2_DefaultPosition
).
ToString
();
txtAIResult3
.
Text
=
KNDAIManager
.
ConvertAI
(
ai
1
Value
,
boxBean
.
Config
.
AIDI3_DefaultPosition
).
ToString
();
txtAIResult4
.
Text
=
KNDAIManager
.
ConvertAI
(
ai
2
Value
,
boxBean
.
Config
.
AIDI4_DefaultPosition
).
ToString
();
txtAIResult3
.
Text
=
KNDAIManager
.
ConvertAI
(
ai
3
Value
,
boxBean
.
Config
.
AIDI3_DefaultPosition
).
ToString
();
txtAIResult4
.
Text
=
KNDAIManager
.
ConvertAI
(
ai
4
Value
,
boxBean
.
Config
.
AIDI4_DefaultPosition
).
ToString
();
//txtAIResult3.Text = KNDAIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtHeight
.
Text
=
boxBean
.
GetHeight
().
ToString
();
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
55bad26
...
...
@@ -71,9 +71,6 @@
this
.
label49
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
richTextBox1
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
label38
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtMiddleTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtInoutTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -234,6 +231,9 @@
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnClearL
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnLogDebug
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -803,7 +803,7 @@
this
.
richTextBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
richTextBox1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
9
);
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
545
,
337
);
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
545
,
295
);
this
.
richTextBox1
.
TabIndex
=
256
;
this
.
richTextBox1
.
Text
=
""
;
//
...
...
@@ -838,36 +838,6 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"伺服状态"
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
127
,
40
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
329
,
40
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
224
,
40
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// label38
//
this
.
label38
.
AutoSize
=
true
;
...
...
@@ -2692,6 +2662,36 @@
this
.
btnLogDebug
.
UseVisualStyleBackColor
=
true
;
this
.
btnLogDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
开启
DEBUGToolStripMenuItem_Click
);
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
127
,
40
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
329
,
40
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
224
,
40
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
source/ACSingleStore/记录.txt
查看文件 @
55bad26
...
...
@@ -33,8 +33,15 @@
20190116
从RC33珠海料仓拉取分支,作为RC29-33项目,即西安料仓三台,苏州博世料仓二台。
teamViewer
RC29-1 1169530003
RC29-2
RC29-3 1390263407
RC32-1 1174631483
RC32-2 1170697846
...
...
source/DeviceLibrary/KangNaiDe/KNDAIManager.cs
查看文件 @
55bad26
...
...
@@ -286,15 +286,29 @@ namespace OnlineStore.DeviceLibrary
{
if
(
StoreManager
.
Store
.
KNDIOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
HIGH
))
{
//每次上传后验证下
int
v1
=
(
int
)
GetAIValue
(
ioIp
,
StoreManager
.
Config
.
AIDI1_Addr
);
int
v2
=
(
int
)
GetAIValue
(
ioIp
,
StoreManager
.
Config
.
AIDI2_Addr
);
if
(
v1
.
Equals
(
0
)
&&
v2
.
Equals
(
0
))
{
LogUtil
.
info
(
msg
);
string
value
=
AcSerialBean
.
ByteToString
(
values
);
LogUtil
.
error
(
"收到【"
+
ioIp
+
"】的数据【"
+
value
+
"】,2个高度都为0"
);
// ConnectionIP(ioIp);
if
(
StoreManager
.
Config
.
AIDI1_Addr
>
0
&&
StoreManager
.
Config
.
AIDI2_Addr
>
0
)
{
//每次上传后验证下
int
v1
=
(
int
)
GetAIValue
(
ioIp
,
StoreManager
.
Config
.
AIDI1_Addr
);
int
v2
=
(
int
)
GetAIValue
(
ioIp
,
StoreManager
.
Config
.
AIDI2_Addr
);
if
(
v1
.
Equals
(
0
)
&&
v2
.
Equals
(
0
))
{
LogUtil
.
info
(
msg
);
string
value
=
AcSerialBean
.
ByteToString
(
values
);
LogUtil
.
error
(
"收到【"
+
ioIp
+
"】的数据【"
+
value
+
"】,2个高度都为0"
);
// ConnectionIP(ioIp);
}
}
else
if
(
StoreManager
.
Config
.
AIDI3_Addr
>
0
&&
StoreManager
.
Config
.
AIDI4_Addr
>
0
)
{
//每次上传后验证下
int
v1
=
(
int
)
GetAIValue
(
ioIp
,
StoreManager
.
Config
.
AIDI3_Addr
);
int
v2
=
(
int
)
GetAIValue
(
ioIp
,
StoreManager
.
Config
.
AIDI4_Addr
);
if
(
v1
.
Equals
(
0
)
&&
v2
.
Equals
(
0
))
{
LogUtil
.
info
(
msg
);
string
value
=
AcSerialBean
.
ByteToString
(
values
);
LogUtil
.
error
(
"收到【"
+
ioIp
+
"】的数据【"
+
value
+
"】,2个高度都为0"
);
// ConnectionIP(ioIp);
}
}
}
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
55bad26
...
...
@@ -1539,19 +1539,35 @@ namespace OnlineStore.DeviceLibrary
#
region
高度传感器处理
public
int
GetSize
()
{
if
(
Get13Height
()
>
0
)
if
(
Config
.
AIDI3_Addr
<=
0
||
Config
.
AIDI4_Addr
<=
0
)
{
return
7
;
}
else
if
(
Config
.
AIDI1_Addr
<=
0
||
Config
.
AIDI2_Addr
<=
0
)
{
return
13
;
}
return
7
;
else
{
if
(
Get13Height
()
>
0
)
{
return
13
;
}
return
7
;
}
}
public
int
Get7Height
()
{
if
(
Config
.
AIDI1_Addr
<=
0
||
Config
.
AIDI2_Addr
<=
0
)
{
return
0
;
}
int
result
=
0
;
if
(
KNDIOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
return
result
;
}
double
ai1Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
Config
.
AIDI1_Addr
),
Config
.
AIDI1_DefaultPosition
);
double
ai2Value
=
KNDAIManager
.
ConvertAI
(
KNDAIManager
.
GetAIValue
(
Config
.
AIDevice_IP
,
Config
.
AIDI2_Addr
),
Config
.
AIDI2_DefaultPosition
);
double
Value
=
Math
.
Round
((
ai1Value
+
ai2Value
)
/
2
,
1
);
...
...
@@ -1584,17 +1600,33 @@ namespace OnlineStore.DeviceLibrary
}
public
int
GetHeight
()
{
int
value
=
Get13Height
();
if
(
value
>
0
)
{
return
value
;
}
else
if
(
Config
.
AIDI3_Addr
<=
0
||
Config
.
AIDI4_Addr
<=
0
)
{
return
Get7Height
();
}
else
if
(
Config
.
AIDI1_Addr
<=
0
||
Config
.
AIDI2_Addr
<=
0
)
{
return
Get13Height
();
}
else
{
int
value
=
Get13Height
();
if
(
value
>
0
)
{
return
value
;
}
else
{
return
Get7Height
();
}
}
}
public
int
Get13Height
()
{
{
if
(
Config
.
AIDI3_Addr
<=
0
||
Config
.
AIDI4_Addr
<=
0
)
{
return
0
;
}
int
result
=
0
;
if
(
KNDIOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
@@ -1629,6 +1661,7 @@ namespace OnlineStore.DeviceLibrary
return
result
;
}
#
endregion
#
region
温湿度处理
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论