Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b9ac6aa1
由
LN
编写于
2019-12-31 17:37:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加料架自动入库配置项
1 个父辈
6fa92b60
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
67 行增加
和
26 行删除
source/ACPackingStore/App.config
source/ACPackingStore/FrmStore.Designer.cs
source/ACPackingStore/FrmStore.cs
source/Common/Setting_Init.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/EnteryDoorBean.cs
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
source/ACPackingStore/App.config
查看文件 @
b9ac6aa
...
...
@@ -50,6 +50,8 @@
<!--
AGV
调度服务器地址-->
<
add
key
=
"AgvServerIp"
value
=
"192.168.103.22"
/>
<
add
key
=
"CodeCount"
value
=
"2"
/>
<!--检测到料架后自动开始入库-->
<
add
key
=
"AutoShelfInstore"
value
=
"1"
/>
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
source/ACPackingStore/FrmStore.Designer.cs
查看文件 @
b9ac6aa
...
...
@@ -32,6 +32,7 @@
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmStore
));
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
chbAutoShelfInstore
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbUseBuzzer
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chkDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbAutoRun
=
new
System
.
Windows
.
Forms
.
CheckBox
();
...
...
@@ -88,6 +89,7 @@
//
// tabPage1
//
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbAutoShelfInstore
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbUseBuzzer
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chkDebug
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbAutoRun
);
...
...
@@ -101,11 +103,23 @@
this
.
tabPage1
.
Text
=
" 日志信息 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
//
// chbAutoShelfInstore
//
this
.
chbAutoShelfInstore
.
AutoSize
=
true
;
this
.
chbAutoShelfInstore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAutoShelfInstore
.
Location
=
new
System
.
Drawing
.
Point
(
751
,
13
);
this
.
chbAutoShelfInstore
.
Name
=
"chbAutoShelfInstore"
;
this
.
chbAutoShelfInstore
.
Size
=
new
System
.
Drawing
.
Size
(
154
,
24
);
this
.
chbAutoShelfInstore
.
TabIndex
=
196
;
this
.
chbAutoShelfInstore
.
Text
=
"检测到料架自动入库"
;
this
.
chbAutoShelfInstore
.
UseVisualStyleBackColor
=
true
;
this
.
chbAutoShelfInstore
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbAutoShelfInstore_CheckedChanged
);
//
// chbUseBuzzer
//
this
.
chbUseBuzzer
.
AutoSize
=
true
;
this
.
chbUseBuzzer
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbUseBuzzer
.
Location
=
new
System
.
Drawing
.
Point
(
62
3
,
13
);
this
.
chbUseBuzzer
.
Location
=
new
System
.
Drawing
.
Point
(
62
1
,
13
);
this
.
chbUseBuzzer
.
Name
=
"chbUseBuzzer"
;
this
.
chbUseBuzzer
.
Size
=
new
System
.
Drawing
.
Size
(
98
,
24
);
this
.
chbUseBuzzer
.
TabIndex
=
195
;
...
...
@@ -117,7 +131,7 @@
//
this
.
chkDebug
.
AutoSize
=
true
;
this
.
chkDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chkDebug
.
Location
=
new
System
.
Drawing
.
Point
(
285
,
1
2
);
this
.
chkDebug
.
Location
=
new
System
.
Drawing
.
Point
(
285
,
1
3
);
this
.
chkDebug
.
Name
=
"chkDebug"
;
this
.
chkDebug
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
24
);
this
.
chkDebug
.
TabIndex
=
194
;
...
...
@@ -129,7 +143,7 @@
//
this
.
chbAutoRun
.
AutoSize
=
true
;
this
.
chbAutoRun
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
4
37
,
12
);
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
4
49
,
13
);
this
.
chbAutoRun
.
Name
=
"chbAutoRun"
;
this
.
chbAutoRun
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
24
);
this
.
chbAutoRun
.
TabIndex
=
94
;
...
...
@@ -141,7 +155,7 @@
//
this
.
btnCopyLog
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnCopyLog
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnCopyLog
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
7
);
this
.
btnCopyLog
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
8
);
this
.
btnCopyLog
.
Name
=
"btnCopyLog"
;
this
.
btnCopyLog
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
btnCopyLog
.
TabIndex
=
191
;
...
...
@@ -153,7 +167,7 @@
//
this
.
btnClearLog
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnClearLog
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnClearLog
.
Location
=
new
System
.
Drawing
.
Point
(
130
,
7
);
this
.
btnClearLog
.
Location
=
new
System
.
Drawing
.
Point
(
130
,
8
);
this
.
btnClearLog
.
Name
=
"btnClearLog"
;
this
.
btnClearLog
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
btnClearLog
.
TabIndex
=
190
;
...
...
@@ -285,31 +299,31 @@
// toolStripMenuItem2
//
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
26
);
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
6
0
,
26
);
this
.
toolStripMenuItem2
.
Text
=
"启用调试"
;
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
//
// toolStripSeparator6
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
1
7
7
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
1
5
7
,
6
);
//
// 二维码学习ToolStripMenuItem
//
this
.
二维码学习
ToolStripMenuItem
.
Name
=
"二维码学习ToolStripMenuItem"
;
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
6
0
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Text
=
"二维码学习"
;
this
.
二维码学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
二维码学习
ToolStripMenuItem_Click
);
//
// toolStripSeparator7
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
1
7
7
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
1
5
7
,
6
);
//
// 托盘编码ToolStripMenuItem
//
this
.
托盘编码
ToolStripMenuItem
.
Name
=
"托盘编码ToolStripMenuItem"
;
this
.
托盘编码
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
26
);
this
.
托盘编码
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
6
0
,
26
);
this
.
托盘编码
ToolStripMenuItem
.
Text
=
"托盘编码"
;
this
.
托盘编码
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
托盘编码
ToolStripMenuItem_Click
);
//
...
...
@@ -436,6 +450,7 @@
private
System
.
Windows
.
Forms
.
CheckBox
chbUseBuzzer
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
托盘编码
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator8
;
private
System
.
Windows
.
Forms
.
CheckBox
chbAutoShelfInstore
;
}
}
source/ACPackingStore/FrmStore.cs
查看文件 @
b9ac6aa
...
...
@@ -51,13 +51,13 @@ namespace OnlineStore.ACPackingStore
}
chbAutoRun
.
Checked
=
store
.
UseBuzzer
;
chbAutoShelfInstore
.
Checked
=
store
.
AutoShelfInstore
;
this
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
chbAutoRun
.
Checked
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_AutoRun
).
Equals
(
1
);
// LogUtil.logBox = this.logBox;
// HideForm();
LoadOk
=
true
;
LogUtil
.
logBox
=
this
.
logBox
;
this
.
timer1
.
Start
();
}
...
...
@@ -442,5 +442,26 @@ namespace OnlineStore.ACPackingStore
FrmRFIPEdit
frm
=
new
FrmRFIPEdit
();
frm
.
ShowDialog
();
}
private
void
chbAutoShelfInstore_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
if
(
chbAutoShelfInstore
.
Checked
)
{
store
.
AutoShelfInstore
=
true
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
AutoShelfInstore
,
1
);
LogUtil
.
info
(
"勾选:检测到料架自动入库"
);
}
else
{
store
.
AutoShelfInstore
=
false
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
AutoShelfInstore
,
0
);
LogUtil
.
info
(
"去掉:检测到料架自动入库"
);
}
}
}
}
source/Common/Setting_Init.cs
查看文件 @
b9ac6aa
...
...
@@ -100,5 +100,6 @@ namespace OnlineStore.Common
public
static
string
AgvServerIp
=
"AgvServerIp"
;
public
static
string
CodeCount
=
"CodeCount"
;
public
static
string
AutoShelfInstore
=
"AutoShelfInstore"
;
}
}
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
查看文件 @
b9ac6aa
...
...
@@ -675,8 +675,9 @@ namespace OnlineStore.DeviceLibrary
ShowTimeLog
(
"IOTimeOutProcess"
);
//如果入口有料架需要入库
if
(
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
None
)
&&
(
IOValue
(
IO_Type
.
LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
HIGH
)))
if
(
StoreManager
.
Store
.
AutoShelfInstore
&&
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
None
)
&&
(
IOValue
(
IO_Type
.
LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
HIGH
)))
{
StartShelfInStore
();
}
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
b9ac6aa
...
...
@@ -281,7 +281,7 @@ namespace OnlineStore.DeviceLibrary
private
void
StartSendTray
(
string
str
=
"扫码失败"
)
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_71_ToNGDoor
);
InOutStoreLog
(
"送出料盘 "
+
MoveInfo
.
SLog
+
":"
+
str
+
",升降轴移动到NG料门口上端
,旋转轴移动到NG料门口
"
);
InOutStoreLog
(
"送出料盘 "
+
MoveInfo
.
SLog
+
":"
+
str
+
",升降轴移动到NG料门口上端
P12,旋转轴移动到NG料门口P11
"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
UpDown_P12
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
MoveInfo
.
MoveParam
.
MoveP
.
Middle_P11
,
Config
.
MiddleAxis_P1_Speed
);
...
...
@@ -549,8 +549,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_73_InoutToNGDoor
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_74_UpdownDown
);
InOutStoreLog
(
"送出料盘 "
+
MoveInfo
.
SLog
+
":升降轴到P1
2
,压紧轴到P3,放下料盘"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
2
,
Config
.
UpDownAxis_P2_Speed
);
InOutStoreLog
(
"送出料盘 "
+
MoveInfo
.
SLog
+
":升降轴到P1
1
,压紧轴到P3,放下料盘"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
1
,
Config
.
UpDownAxis_P2_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_74_UpdownDown
))
...
...
source/DeviceLibrary/ACPackingStore/EnteryDoorBean.cs
查看文件 @
b9ac6aa
...
...
@@ -48,14 +48,14 @@ namespace OnlineStore.DeviceLibrary
LastMoveDO
=
moveDO
;
LastCheckDI
=
checkDI
;
LogUtil
.
debug
(
"写入信号:"
+
moveDO
+
",等待信号:"
+
checkDI
+
""
);
//
if (moveDO.Equals(IO_Type.EntranceDoor_Open))
//
{
//
IOManager.IOMove(IO_Type.EntranceDoor_Close, IO_VALUE.LOW, subType);
//
}
//
else
//
{
//
IOManager.IOMove(IO_Type.EntranceDoor_Open, IO_VALUE.LOW, subType);
//
}
if
(
moveDO
.
Equals
(
IO_Type
.
EntranceDoor_Open
))
{
IOManager
.
IOMove
(
IO_Type
.
EntranceDoor_Close
,
IO_VALUE
.
LOW
,
subType
);
}
else
{
IOManager
.
IOMove
(
IO_Type
.
EntranceDoor_Open
,
IO_VALUE
.
LOW
,
subType
);
}
IOManager
.
IOMove
(
moveDO
,
IO_VALUE
.
HIGH
,
subType
);
Thread
.
Sleep
(
50
);
...
...
@@ -103,7 +103,7 @@ namespace OnlineStore.DeviceLibrary
public
bool
StartOpen
(
StoreMoveInfo
moveInfo
)
{
//
return false;
return
false
;
if
(
moveInfo
!=
null
)
{
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
EntranceDoor_Open
,
IO_VALUE
.
HIGH
));
...
...
@@ -114,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
}
public
bool
StartClose
(
StoreMoveInfo
moveInfo
)
{
//
return false;
return
false
;
if
(
moveInfo
!=
null
)
{
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
EntranceDoor_Close
,
IO_VALUE
.
HIGH
));
...
...
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
查看文件 @
b9ac6aa
...
...
@@ -31,6 +31,7 @@ namespace OnlineStore.DeviceLibrary
public
Store_Config
Config
{
get
;
set
;
}
public
bool
UseBuzzer
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseBuzzer
).
Equals
(
1
);
public
bool
AutoShelfInstore
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
AutoShelfInstore
).
Equals
(
1
);
#
region
初始化
internal
bool
canStart
=
false
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论