Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6f747e76
由
几米阳光
编写于
2019-06-02 12:37:08 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加单盘入库功能
1 个父辈
7a872b9d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
120 行增加
和
109 行删除
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/Properties/Resource.en-US.resx
source/ACSingleStore/Properties/Resource.zh-CN.resx
source/ACSingleStore/记录.txt
source/Common/bean/Bean.cs
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/BLL2.cs
source/DeviceLibrary/ResourceControl.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
6f747e7
...
...
@@ -40,6 +40,7 @@
this
.
label21
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnOutStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnSingleTrayIn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblBatchMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnOpenDoor
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblWaitTragGo
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -259,9 +260,6 @@
this
.
清理日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator12
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
英文
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
btnTrayIn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnTrayOk
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblTray
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
groupAuto
.
SuspendLayout
();
this
.
groupBox6
.
SuspendLayout
();
...
...
@@ -452,9 +450,7 @@
//
this
.
groupBox6
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblTray
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnTrayIn
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnTrayOk
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnSingleTrayIn
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblBatchMsg
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnOpenDoor
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblWaitTragGo
);
...
...
@@ -473,6 +469,17 @@
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"批量上下料操作"
;
//
// btnSingleTrayIn
//
this
.
btnSingleTrayIn
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSingleTrayIn
.
Location
=
new
System
.
Drawing
.
Point
(
487
,
177
);
this
.
btnSingleTrayIn
.
Name
=
"btnSingleTrayIn"
;
this
.
btnSingleTrayIn
.
Size
=
new
System
.
Drawing
.
Size
(
155
,
38
);
this
.
btnSingleTrayIn
.
TabIndex
=
236
;
this
.
btnSingleTrayIn
.
Text
=
"启动单盘入库"
;
this
.
btnSingleTrayIn
.
UseVisualStyleBackColor
=
true
;
this
.
btnSingleTrayIn
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTrayIn_Click
);
//
// lblBatchMsg
//
this
.
lblBatchMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
...
...
@@ -499,20 +506,20 @@
this
.
lblWaitTragGo
.
AutoSize
=
true
;
this
.
lblWaitTragGo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblWaitTragGo
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblWaitTragGo
.
Location
=
new
System
.
Drawing
.
Point
(
1
93
,
99
);
this
.
lblWaitTragGo
.
Location
=
new
System
.
Drawing
.
Point
(
1
71
,
99
);
this
.
lblWaitTragGo
.
Name
=
"lblWaitTragGo"
;
this
.
lblWaitTragGo
.
Size
=
new
System
.
Drawing
.
Size
(
2
50
,
22
);
this
.
lblWaitTragGo
.
Size
=
new
System
.
Drawing
.
Size
(
2
98
,
22
);
this
.
lblWaitTragGo
.
TabIndex
=
231
;
this
.
lblWaitTragGo
.
Text
=
"请拿走料盘,并点击左侧按钮确认"
;
this
.
lblWaitTragGo
.
Text
=
"请拿走
或放入
料盘,并点击左侧按钮确认"
;
//
// btnWaitTrgGo
//
this
.
btnWaitTrgGo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnWaitTrgGo
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
9
2
);
this
.
btnWaitTrgGo
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
9
1
);
this
.
btnWaitTrgGo
.
Name
=
"btnWaitTrgGo"
;
this
.
btnWaitTrgGo
.
Size
=
new
System
.
Drawing
.
Size
(
155
,
38
);
this
.
btnWaitTrgGo
.
TabIndex
=
230
;
this
.
btnWaitTrgGo
.
Text
=
"
门口料盘已拿出
"
;
this
.
btnWaitTrgGo
.
Text
=
"
料盘已拿出/放入
"
;
this
.
btnWaitTrgGo
.
UseVisualStyleBackColor
=
true
;
this
.
btnWaitTrgGo
.
Click
+=
new
System
.
EventHandler
(
this
.
btnWaitTrgGo_Click
);
//
...
...
@@ -575,9 +582,9 @@
//
this
.
lblOutInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblOutInfo
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblOutInfo
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
99
);
this
.
lblOutInfo
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
99
);
this
.
lblOutInfo
.
Name
=
"lblOutInfo"
;
this
.
lblOutInfo
.
Size
=
new
System
.
Drawing
.
Size
(
584
,
22
);
this
.
lblOutInfo
.
Size
=
new
System
.
Drawing
.
Size
(
631
,
22
);
this
.
lblOutInfo
.
TabIndex
=
234
;
this
.
lblOutInfo
.
Text
=
"累积出库信息"
;
this
.
lblOutInfo
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
...
...
@@ -2943,41 +2950,6 @@
this
.
英文
ToolStripMenuItem
.
Text
=
"英文"
;
this
.
英文
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
开启
DEBUGToolStripMenuItem_Click
);
//
// btnTrayIn
//
this
.
btnTrayIn
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnTrayIn
.
Location
=
new
System
.
Drawing
.
Point
(
487
,
177
);
this
.
btnTrayIn
.
Name
=
"btnTrayIn"
;
this
.
btnTrayIn
.
Size
=
new
System
.
Drawing
.
Size
(
155
,
38
);
this
.
btnTrayIn
.
TabIndex
=
236
;
this
.
btnTrayIn
.
Text
=
"启动单盘入库"
;
this
.
btnTrayIn
.
UseVisualStyleBackColor
=
true
;
this
.
btnTrayIn
.
Visible
=
false
;
this
.
btnTrayIn
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTrayIn_Click
);
//
// btnTrayOk
//
this
.
btnTrayOk
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnTrayOk
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
176
);
this
.
btnTrayOk
.
Name
=
"btnTrayOk"
;
this
.
btnTrayOk
.
Size
=
new
System
.
Drawing
.
Size
(
155
,
38
);
this
.
btnTrayOk
.
TabIndex
=
235
;
this
.
btnTrayOk
.
Text
=
"料盘已放入"
;
this
.
btnTrayOk
.
UseVisualStyleBackColor
=
true
;
this
.
btnTrayOk
.
Visible
=
false
;
//
// lblTray
//
this
.
lblTray
.
AutoSize
=
true
;
this
.
lblTray
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblTray
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblTray
.
Location
=
new
System
.
Drawing
.
Point
(
193
,
183
);
this
.
lblTray
.
Name
=
"lblTray"
;
this
.
lblTray
.
Size
=
new
System
.
Drawing
.
Size
(
250
,
22
);
this
.
lblTray
.
TabIndex
=
237
;
this
.
lblTray
.
Text
=
"请放入料盘,并点击左侧按钮确认"
;
this
.
lblTray
.
Visible
=
false
;
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -3268,9 +3240,7 @@
public
System
.
Windows
.
Forms
.
Label
label30
;
private
System
.
Windows
.
Forms
.
GroupBox
groupAuto
;
private
System
.
Windows
.
Forms
.
CheckBox
checkBox1
;
private
System
.
Windows
.
Forms
.
Button
btnTrayIn
;
private
System
.
Windows
.
Forms
.
Button
btnTrayOk
;
private
System
.
Windows
.
Forms
.
Label
lblTray
;
private
System
.
Windows
.
Forms
.
Button
btnSingleTrayIn
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
6f747e7
...
...
@@ -403,7 +403,7 @@ namespace OnlineStore.AutoInOutStore
btnBatchInStore
.
Enabled
=
map
[
ParamDefine
.
startBatchIn
].
Equals
(
ParamDefine
.
enable
);
btnGetOutTray
.
Enabled
=
map
[
ParamDefine
.
takeOutReel
].
Equals
(
ParamDefine
.
enable
);
btnCloseDoor
.
Enabled
=
map
[
ParamDefine
.
closeLock
].
Equals
(
ParamDefine
.
enable
);
btnSingleTrayIn
.
Enabled
=
map
[
ParamDefine
.
singleReelIn
].
Equals
(
ParamDefine
.
enable
);
lblDoorStatus
.
Text
=
map
[
ParamDefine
.
doorStatus
];
lblOutInfo
.
Visible
=
!
lblWaitTragGo
.
Visible
;
lblOutInfo
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
InstoreInfo
,
"批量出入库信息: 入库:"
)+
AutomaticBaiting
.
BatchInStoreCount
+
","
+
AutomaticBaiting
.
BatchInStoreHeight
+
"mm,"
+
...
...
@@ -1754,19 +1754,12 @@ namespace OnlineStore.AutoInOutStore
private
void
btnTrayIn_Click
(
object
sender
,
EventArgs
e
)
{
string
defaultPosId
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
SinglePosId
).
Trim
();
if
(
store
.
PositionNumList
.
Contains
(
defaultPosId
))
{
bool
result
=
store
.
StartInStoreMove
(
new
InOutStoreParam
(
""
,
defaultPosId
),
false
,
true
);
if
(!
result
)
{
MessageBox
.
Show
(
"启动单盘出库失败:"
+
store
.
CodeOrInoutMsg
);
}
}
else
string
msg
=
AutomaticBaiting
.
doSingleReelIn
();
if
(!
msg
.
Equals
(
""
))
{
MessageBox
.
Show
(
"请先正确配置 "
+
Setting_Init
.
SinglePosId
);
MessageBox
.
Show
(
msg
);
}
}
}
}
source/ACSingleStore/Properties/Resource.en-US.resx
查看文件 @
6f747e7
...
...
@@ -899,10 +899,10 @@
<value>Open doorlock</value>
</data>
<data name="FrmStoreBox_lblWaitTragGo_Text" xml:space="preserve">
<value>Take reel,click left to confirm</value>
<value>Take
/Put In
reel,click left to confirm</value>
</data>
<data name="FrmStoreBox_btnWaitTrgGo_Text" xml:space="preserve">
<value>Portal reel taken</value>
<value>Portal reel taken
/put in
</value>
</data>
<data name="FrmStoreBox_lblBatchStatus_Text" xml:space="preserve">
<value>Wait to start</value>
...
...
source/ACSingleStore/Properties/Resource.zh-CN.resx
查看文件 @
6f747e7
...
...
@@ -895,10 +895,10 @@
<value>打开门锁</value>
</data>
<data name="FrmStoreBox_lblWaitTragGo_Text" xml:space="preserve">
<value>请拿走料盘,并点击左侧按钮确认</value>
<value>请拿走
/放入
料盘,并点击左侧按钮确认</value>
</data>
<data name="FrmStoreBox_btnWaitTrgGo_Text" xml:space="preserve">
<value>
门口料盘已拿出
</value>
<value>
料盘已拿出/放入
</value>
</data>
<data name="FrmStoreBox_lblBatchStatus_Text" xml:space="preserve">
<value>等待启动</value>
...
...
source/ACSingleStore/记录.txt
查看文件 @
6f747e7
...
...
@@ -191,8 +191,10 @@ IO模块读取时间改为可配置。
PRO,(轴五)上料轴出库上升最大高度,BatchAxis_OutMaxValue,1600000,,,,,,,
20190529:增加单盘入库功能
增加配置:
<add key="SinglePosId" value="1#AC2_2_1_1" />
...
...
source/Common/bean/Bean.cs
查看文件 @
6f747e7
...
...
@@ -225,6 +225,10 @@ namespace OnlineStore.Common
/// 门口料盘已取出
/// </summary>
public
static
string
confirmReelOut
=
"confirmReelOut"
;
/// <summary>
/// 单盘入库按钮
/// </summary>
public
static
string
singleReelIn
=
"singleReelIn"
;
public
static
string
doorStatus
=
"doorStatus"
;
...
...
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/BLL2.cs
查看文件 @
6f747e7
...
...
@@ -12,6 +12,7 @@ using System.Net;
using
System.Net.Sockets
;
using
System.Threading
;
using
System.Collections.Generic
;
using
OnlineStore.Common
;
namespace
Asa.IOModule
{
...
...
@@ -598,14 +599,20 @@ namespace Asa.IOModule
{
while
(
true
)
{
if
(
_receive
.
TryDequeue
(
out
byte
[]
buff
))
try
{
if
(
buff
[
7
]
==
1
)
ReadDO
(
buff
);
else
if
(
buff
[
7
]
==
2
)
ReadDI
(
buff
);
else
if
(
buff
[
7
]
==
5
)
ReadSingle
(
buff
);
if
(
_receive
.
TryDequeue
(
out
byte
[]
buff
))
{
if
(
buff
[
7
]
==
1
)
ReadDO
(
buff
);
else
if
(
buff
[
7
]
==
2
)
ReadDI
(
buff
);
else
if
(
buff
[
7
]
==
5
)
ReadSingle
(
buff
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"AIOBOX2 Receive出错:"
+
ex
.
ToString
());
}
Thread
.
Sleep
(
10
);
}
...
...
source/DeviceLibrary/ResourceControl.cs
查看文件 @
6f747e7
...
...
@@ -12,6 +12,12 @@ namespace OnlineStore.DeviceLibrary
public
delegate
string
GetStringDelegate
(
string
id
,
string
defaultStr
,
params
object
[]
param
);
public
static
event
GetStringDelegate
GetStringEvent
;
public
static
string
GetMsgStr
(
string
value
)
{
string
result
=
GetStrEvent
?.
Invoke
(
value
,
value
);
return
result
;
}
public
static
string
GetString
(
string
id
,
string
defaultStr
)
{
string
result
=
GetStrEvent
?.
Invoke
(
id
,
defaultStr
);
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
6f747e7
...
...
@@ -125,12 +125,12 @@ PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM6,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,
6
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,
10
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,
10
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,
4
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,
7
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,
7
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,40000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,40000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,
1
0000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,
3
0000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,800,,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
6f747e7
...
...
@@ -527,7 +527,7 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
InOutStoreParam
param
=
new
InOutStoreParam
(
""
,
PositionNumList
[
0
]);
if
(
LoadParamPosition
(
param
,
false
))
if
(
LoadParamPosition
(
param
))
{
StoreMove
.
MoveParam
=
param
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R41_InoutToP4
);
...
...
@@ -1839,6 +1839,11 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
info
(
StoreName
+
"收到服务器命令:confirmReelOut=doit"
);
AutomaticBaiting
.
doConfirmReelGo
();
}
else
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
singleReelIn
)
&&
dataMap
[
ParamDefine
.
singleReelIn
].
Equals
(
ParamDefine
.
doit
))
{
LogUtil
.
info
(
StoreName
+
"收到服务器命令:SingleReelIn=doit"
);
result
=
AutomaticBaiting
.
doSingleReelIn
();
}
if
(!
result
.
Equals
(
""
))
{
...
...
@@ -1846,7 +1851,7 @@ namespace OnlineStore.DeviceLibrary
CodeOrInoutMsg
=
result
;
}
}
}
}
private
void
ProcessHumidityCMD
(
Operation
resultOperation
)
{
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
6f747e7
...
...
@@ -38,7 +38,7 @@ namespace OnlineStore.DeviceLibrary
private
int
CurrInOutCount
=
0
;
private
int
CurrInOutACount
=
0
;
private
bool
LoadParamPosition
(
InOutStoreParam
param
,
bool
IsBatch
)
private
bool
LoadParamPosition
(
InOutStoreParam
param
)
{
if
(
param
==
null
)
{
...
...
@@ -308,7 +308,7 @@ namespace OnlineStore.DeviceLibrary
}
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
{
if
(!
LoadParamPosition
(
param
,
false
))
if
(!
LoadParamPosition
(
param
))
{
UpdateInOutMsg
(
logMsg
+
"失败,找不到库位信息"
);
return
false
;
...
...
@@ -605,7 +605,7 @@ namespace OnlineStore.DeviceLibrary
protected
void
SingleInStoreProcess
()
{
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_31_ToDoor
))
{
InStoreLog
(
"入库:SIS_32 单盘入库:叉子走到门口位置P4, 打开仓门 ,压紧轴到P3"
);
...
...
@@ -613,7 +613,8 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P4
,
Config
.
InOutAxis_P2_Speed
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
OpenDoorAndWait
();
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_32_InoutToDoor
))
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_32_InoutToDoor
))
{
InStoreLog
(
"入库:SIS_33 等待操作人员放入料盘 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_33_WaitTray
);
...
...
@@ -640,7 +641,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_35_InoutBack
))
{
InStoreLog
(
"入库:SIS_36 升降轴下降到扫码位置P2 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_36_UpdownDown
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_36_UpdownDown
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_OutHigh_P2
,
Config
.
UpDownAxis_P2_Speed
);
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_36_UpdownDown
))
...
...
@@ -651,30 +652,57 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_37_InoutToP2
))
{
InStoreLog
(
"入库:SIS_38 扫码,最多等待6000 "
);
InStoreLog
(
"入库:SIS_38 ,清理扫码信息,开始扫码,最多等待6000 "
);
AutomaticBaiting
.
ClearInStoreInfo
();
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_38_ScanCode
);
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitCodeOK
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
6000
));
GetCameraCode
();
AutomaticBaiting
.
GetCameraCode
();
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_38_ScanCode
))
{
InStoreLog
(
"入库:SIS_39 获取入库库位号 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_39_GetPosId
);
SingleInStorePosId
=
GetAutoPosid
();
if
(
AutomaticBaiting
.
LastCode
.
Equals
(
""
))
{
SingleSendOut
(
"未扫到二维码"
);
}
else
{
InStoreLog
(
"入库:SIS_39 获取入库库位号 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_39_GetPosId
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
//最多等待十秒
InOutStoreParam
param
=
AutomaticBaiting
.
GetInStoreParam
(
"单盘入库"
,
AutomaticBaiting
.
ProcessMsg
());
if
(
param
==
null
)
{
SingleSendOut
(
"从服务器获取入库信息失败"
);
}
else
if
(!
LoadParamPosition
(
param
))
{
SingleSendOut
(
"加载入库"
+
param
.
PositionNum
+
"参数失败"
);
}
else
{
//更改当前入库参数
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
StoreMove
.
NewMove
(
StoreMoveType
.
InStore
,
param
);
lastMoveType
=
StoreMoveType
.
InStore
;
StoreMove
.
IsBatchInOutStore
=
true
;
StoreMove
.
IsNeedInStore
=
true
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_01_LocationCylinderDown
);
}
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_39_GetPosId
))
{
InStoreLog
(
"入库:SIS_40 启动新的入库 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_40_StartInStore
);
SingleSendOut
(
"启动入库超时 "
);
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_40_StartInStore
))
{
InStoreLog
(
"入库:SIS_
32
开始送出料盘 ,叉子后退 "
);
InStoreLog
(
"入库:SIS_
41
开始送出料盘 ,叉子后退 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_41_StartSendTrayOut
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P1
,
Config
.
InOutAxis_P1_Position
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SIS_41_StartSendTrayOut
))
{
StoreMove
.
IsNeedInStore
=
false
;
...
...
@@ -684,20 +712,16 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
GetCameraCode
(
)
private
void
SingleSendOut
(
string
msg
)
{
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
Thread
.
Sleep
(
1000
);
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
StoreMove
.
IsBatchInOutStore
=
true
;
StoreMove
.
IsNeedInStore
=
false
;
InStoreLog
(
msg
+
",将料盘送出,叉子后退"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SIS_41_StartSendTrayOut
);
ACAxisMove
(
Config
.
InOut_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
InOut_P1
,
Config
.
InOutAxis_P1_Position
);
}
private
string
GetAutoPosid
()
{
return
ConfigAppSettings
.
GetValue
(
Setting_Init
.
SinglePosId
);
}
string
SingleInStorePosId
=
""
;
#
endregion
...
...
@@ -718,7 +742,7 @@ namespace OnlineStore.DeviceLibrary
}
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
{
if
(!
LoadParamPosition
(
param
,
IsBatchWork
))
if
(!
LoadParamPosition
(
param
))
{
UpdateInOutMsg
(
logMsg
+
"失败,找不到库位信息"
);
return
false
;
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
6f747e7
...
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
private
static
int
LastHeight
=
0
;
private
static
int
LastWidth
=
0
;
private
static
List
<
string
>
LastCodeList
=
new
List
<
string
>();
p
rivate
static
string
LastCode
=
""
;
p
ublic
static
string
LastCode
=
""
;
private
static
string
LastPosId
=
""
;
public
static
int
AxisChangeValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
AxisChangeValue
);
public
static
string
WarnMsg
=
""
;
...
...
@@ -101,7 +101,7 @@ namespace OnlineStore.DeviceLibrary
BatchInStoreCount
=
0
;
BatchInStoreHeight
=
0
;
}
p
rivate
static
void
ClearInStoreInfo
()
p
ublic
static
void
ClearInStoreInfo
()
{
LastCode
=
""
;
LastCodeList
=
new
List
<
string
>();
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
6f747e7
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论