Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 06446855
由
LN
编写于
2023-08-01 17:02:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.出仓时,仓口无料门打开不要关闭并报警;
2.入库时现在仓口感应不到不报警的,改为仓口感应器感应不到料,门打开并报警.
1 个父辈
1f24990c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
81 行增加
和
16 行删除
source/ACSingleStore/FrmIDConfig.Designer.cs
source/ACSingleStore/FrmIDConfig.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/store/StoreStep.cs
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
source/ACSingleStore/FrmIDConfig.Designer.cs
查看文件 @
0644685
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
this
.
btnReset
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnReset
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chbDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
chbEmptyNeedAlarm
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnSavePosID
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSavePosID
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cmbPosition15
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
cmbPosition15
=
new
System
.
Windows
.
Forms
.
ComboBox
();
...
@@ -49,7 +50,7 @@
...
@@ -49,7 +50,7 @@
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cmbPosition7
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
cmbPosition7
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label21
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label21
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
chb
EmptyNeedAlarm
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chb
UseDoorCheck
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
...
@@ -156,7 +157,7 @@
...
@@ -156,7 +157,7 @@
this
.
chbDebug
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbDebug
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbDebug
.
AutoSize
=
true
;
this
.
chbDebug
.
AutoSize
=
true
;
this
.
chbDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
29
,
1
9
9
);
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
29
,
1
8
9
);
this
.
chbDebug
.
Name
=
"chbDebug"
;
this
.
chbDebug
.
Name
=
"chbDebug"
;
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
25
);
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
25
);
this
.
chbDebug
.
TabIndex
=
282
;
this
.
chbDebug
.
TabIndex
=
282
;
...
@@ -165,6 +166,7 @@
...
@@ -165,6 +166,7 @@
//
//
// groupBox1
// groupBox1
//
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
chbUseDoorCheck
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
chbEmptyNeedAlarm
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
chbEmptyNeedAlarm
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
chbDebug
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
chbDebug
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
...
@@ -182,6 +184,18 @@
...
@@ -182,6 +184,18 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"料仓配置"
;
this
.
groupBox1
.
Text
=
"料仓配置"
;
//
//
// chbEmptyNeedAlarm
//
this
.
chbEmptyNeedAlarm
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbEmptyNeedAlarm
.
AutoSize
=
true
;
this
.
chbEmptyNeedAlarm
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbEmptyNeedAlarm
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
189
);
this
.
chbEmptyNeedAlarm
.
Name
=
"chbEmptyNeedAlarm"
;
this
.
chbEmptyNeedAlarm
.
Size
=
new
System
.
Drawing
.
Size
(
237
,
25
);
this
.
chbEmptyNeedAlarm
.
TabIndex
=
283
;
this
.
chbEmptyNeedAlarm
.
Text
=
"出库时仓门口信号不亮时报警"
;
this
.
chbEmptyNeedAlarm
.
UseVisualStyleBackColor
=
true
;
//
// groupBox2
// groupBox2
//
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnSavePosID
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnSavePosID
);
...
@@ -325,17 +339,17 @@
...
@@ -325,17 +339,17 @@
this
.
label21
.
Text
=
"库位号-7寸盘定位:"
;
this
.
label21
.
Text
=
"库位号-7寸盘定位:"
;
this
.
label21
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label21
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
//
// chb
EmptyNeedAlarm
// chb
UseDoorCheck
//
//
this
.
chb
EmptyNeedAlarm
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chb
UseDoorCheck
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chb
EmptyNeedAlarm
.
AutoSize
=
true
;
this
.
chb
UseDoorCheck
.
AutoSize
=
true
;
this
.
chb
EmptyNeedAlarm
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chb
UseDoorCheck
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chb
EmptyNeedAlarm
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
199
);
this
.
chb
UseDoorCheck
.
Location
=
new
System
.
Drawing
.
Point
(
153
,
231
);
this
.
chb
EmptyNeedAlarm
.
Name
=
"chbEmptyNeedAlarm
"
;
this
.
chb
UseDoorCheck
.
Name
=
"chbUseDoorCheck
"
;
this
.
chb
EmptyNeedAlarm
.
Size
=
new
System
.
Drawing
.
Size
(
237
,
25
);
this
.
chb
UseDoorCheck
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
25
);
this
.
chb
EmptyNeedAlarm
.
TabIndex
=
283
;
this
.
chb
UseDoorCheck
.
TabIndex
=
284
;
this
.
chb
EmptyNeedAlarm
.
Text
=
"出库时仓门口信号不亮时报警
"
;
this
.
chb
UseDoorCheck
.
Text
=
"使用仓门料盘检测信号
"
;
this
.
chb
EmptyNeedAlarm
.
UseVisualStyleBackColor
=
true
;
this
.
chb
UseDoorCheck
.
UseVisualStyleBackColor
=
true
;
//
//
// FrmIdConfig
// FrmIdConfig
//
//
...
@@ -382,5 +396,6 @@
...
@@ -382,5 +396,6 @@
public
System
.
Windows
.
Forms
.
Label
label4
;
public
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
Button
btnSavePosID
;
private
System
.
Windows
.
Forms
.
Button
btnSavePosID
;
private
System
.
Windows
.
Forms
.
CheckBox
chbEmptyNeedAlarm
;
private
System
.
Windows
.
Forms
.
CheckBox
chbEmptyNeedAlarm
;
private
System
.
Windows
.
Forms
.
CheckBox
chbUseDoorCheck
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
source/ACSingleStore/FrmIDConfig.cs
查看文件 @
0644685
...
@@ -41,7 +41,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -41,7 +41,7 @@ namespace OnlineStore.ACSingleStore
cmbId
.
SelectedIndex
=
StoreId
-
1
;
cmbId
.
SelectedIndex
=
StoreId
-
1
;
}
}
chbDebug
.
Checked
=
StoreManager
.
Store
.
IsDebug
;
chbDebug
.
Checked
=
StoreManager
.
Store
.
IsDebug
;
chbUseDoorCheck
.
Checked
=
StoreManager
.
Store
.
Config
.
IsUse_Door_Check
.
Equals
(
1
);
LoadPos
();
LoadPos
();
}
}
private
List
<
string
>
allList
=
new
List
<
string
>();
private
List
<
string
>
allList
=
new
List
<
string
>();
...
@@ -101,11 +101,32 @@ namespace OnlineStore.ACSingleStore
...
@@ -101,11 +101,32 @@ namespace OnlineStore.ACSingleStore
bool
emptyNeedAlarm
=
chbEmptyNeedAlarm
.
Checked
;
bool
emptyNeedAlarm
=
chbEmptyNeedAlarm
.
Checked
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
EmptyOutNeedAlarm
,
emptyNeedAlarm
?
1
:
0
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
EmptyOutNeedAlarm
,
emptyNeedAlarm
?
1
:
0
);
LogUtil
.
info
(
$
"cid {storeCID} ,storeId{storeId} ,debug {StoreManager.Store.IsDebug} emptyNeedAlarm {emptyNeedAlarm}"
);
LogUtil
.
info
(
$
"cid {storeCID} ,storeId{storeId} ,debug {StoreManager.Store.IsDebug} emptyNeedAlarm {emptyNeedAlarm}"
);
SaveConfig
();
MessageBox
.
Show
(
"保存成功,请重启客户端"
);
MessageBox
.
Show
(
"保存成功,请重启客户端"
);
this
.
DialogResult
=
DialogResult
.
OK
;
this
.
DialogResult
=
DialogResult
.
OK
;
}
}
}
}
private
void
SaveConfig
()
{
try
{
bool
useDoorCheck
=
chbUseDoorCheck
.
Checked
;
bool
configV
=
StoreManager
.
Config
.
IsUse_Door_Check
.
Equals
(
1
);
if
(!
useDoorCheck
.
Equals
(
configV
))
{
StoreManager
.
Config
.
IsUse_Door_Check
=
useDoorCheck
?
1
:
0
;
LogUtil
.
info
(
$
"保存配置 Config。IsUse_Door_Check= {StoreManager.Config.IsUse_Door_Check}"
);
StoreManager
.
UpdateBoxConfig
(
StoreManager
.
Config
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"SaveConfig 出错: "
+
ex
.
ToString
());
}
}
private
void
btnBack_Click
(
object
sender
,
EventArgs
e
)
private
void
btnBack_Click
(
object
sender
,
EventArgs
e
)
{
{
this
.
DialogResult
=
DialogResult
.
Cancel
;
this
.
DialogResult
=
DialogResult
.
Cancel
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
0644685
...
@@ -345,6 +345,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -345,6 +345,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_00_TrayCheck
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_00_TrayCheck
);
InStoreLog
(
"入库:等待仓门口有料"
);
InStoreLog
(
"入库:等待仓门口有料"
);
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
}
}
...
@@ -432,12 +433,26 @@ namespace OnlineStore.DeviceLibrary
...
@@ -432,12 +433,26 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
string
msg
=
StoreName
+
"入库 等待料仓门口检测到料盘 ["
+
StoreMove
.
MoveParam
.
PosInfo
.
barcode
+
"] ["
+
StoreMove
.
MoveParam
.
PosInfo
.
PosId
+
"] 超时 ["
+
Math
.
Round
(
StoreMove
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒 "
;
string
msg
=
StoreName
+
"入库 等待料仓门口检测到料盘 ["
+
StoreMove
.
MoveParam
.
PosInfo
.
barcode
+
"] ["
+
StoreMove
.
MoveParam
.
PosInfo
.
PosId
+
"] 超时 ["
+
Math
.
Round
(
StoreMove
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒 "
;
SetWarnMsg
(
msg
,
StoreMove
.
GetStepDes
()
+
"_超时报警"
,
StoreMove
);
SetWarnMsg
(
msg
,
StoreMove
.
GetStepDes
()
+
"_超时报警"
,
StoreMove
);
LogUtil
.
error
(
WarnMsg
,
100
);
LogUtil
.
error
(
WarnMsg
,
100
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_01_TrayCheck
);
InStoreLog
(
"入库:打开仓门,继续等待仓门口信号"
);
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
//打开仓门,等待信号
OpenDoor
(
false
);
}
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_01_TrayCheck
)
{
SI_02_Move
(
moveP
);
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_02_InOutAxisHome
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_02_InOutAxisHome
)
{
{
...
@@ -876,6 +891,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -876,6 +891,13 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
}
}
else
if
(
EmptyOutNeedAlarm
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_27_WaitDoorTray
);
OutStoreLog
(
"出库:检测料仓门口料盘信号 , EmptyOutAlarm=true, 需要等待 TrayCheck_Door=HIGH"
);
StoreMove
.
TimeOutSeconds
=
5
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
HIGH
));
}
else
else
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_28_CloseDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_28_CloseDoor
);
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
0644685
...
@@ -350,6 +350,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -350,6 +350,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
[
Description
(
"入库_取料前_等待仓门口有料"
)]
[
Description
(
"入库_取料前_等待仓门口有料"
)]
SI_00_TrayCheck
=
200
,
SI_00_TrayCheck
=
200
,
/// <summary>
/// 等待仓门口有料
/// </summary>
[
Description
(
"入库_取料前_未检测到仓门口有料,打开仓门,继续等待"
)]
SI_01_TrayCheck
,
///// <summary>
///// <summary>
///// 入库,。定位气缸下降
///// 入库,。定位气缸下降
///// </summary>
///// </summary>
...
...
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
查看文件 @
0644685
...
@@ -196,7 +196,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -196,7 +196,7 @@ namespace OnlineStore.LoadCSVLibrary
string
proName
=
array
[
2
];
string
proName
=
array
[
2
];
string
proValue
=
array
[
3
];
string
proValue
=
array
[
3
];
try
try
{
{
PropertyInfo
prop
=
props
.
First
(
c
=>
c
.
Name
==
proName
);
//获取同名属性
PropertyInfo
prop
=
props
.
First
(
c
=>
c
.
Name
==
proName
);
//获取同名属性
if
(
prop
!=
null
)
if
(
prop
!=
null
)
{
{
...
@@ -205,7 +205,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -205,7 +205,7 @@ namespace OnlineStore.LoadCSVLibrary
}
}
}
}
catch
(
Exception
e
)
{
catch
(
Exception
e
)
{
Common
.
LogUtil
.
error
(
"出错:"
+
e
.
ToString
());
Common
.
LogUtil
.
error
(
"
保存数据【"
+
line
+
"】
出错:"
+
e
.
ToString
());
}
}
string
newLine
=
""
;
string
newLine
=
""
;
foreach
(
string
s
in
newArray
)
foreach
(
string
s
in
newArray
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论